From owner-svn-src-all@freebsd.org Sun Apr 14 00:06:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1C4915871E9; Sun, 14 Apr 2019 00:06:51 +0000 (UTC) (envelope-from ngie@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 282D471CDB; Sun, 14 Apr 2019 00:06:51 +0000 (UTC) (envelope-from ngie@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 F17151888B; Sun, 14 Apr 2019 00:06:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3E06o0l056441; Sun, 14 Apr 2019 00:06:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3E06nxf056436; Sun, 14 Apr 2019 00:06:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904140006.x3E06nxf056436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sun, 14 Apr 2019 00:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346196 - in head/lib/libpmc: . pmu-events X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/lib/libpmc: . pmu-events X-SVN-Commit-Revision: 346196 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 282D471CDB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 00:06:51 -0000 Author: ngie Date: Sun Apr 14 00:06:49 2019 New Revision: 346196 URL: https://svnweb.freebsd.org/changeset/base/346196 Log: Fix warnings with lib/libpmc * Use `MIN` instead of similar hand rolled macro. * Sort headers. * Use `errno.h` instead of `sys/errno.h`. * Wrap the argument to sizeof in parentheses for clarity. * Remove `__BSD_VISIBLE` and `_XOPEN_SOURCE` #defines to mute warnings about incompatible snprintf definitions. This fixes a number of warnings I've been seeing lately in my builds. Sort makefile variables per style.Makefile(9) (`CFLAGS`/`CWARNFLAG.gcc`) and bump `WARNS` to 3. MFC after: 2 weeks Reviewed by: jtl Approved by: jtl (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19851 Added: head/lib/libpmc/Makefile.inc (contents, props changed) Modified: head/lib/libpmc/Makefile head/lib/libpmc/libpmc_json.cc head/lib/libpmc/pmu-events/jevents.c head/lib/libpmc/pmu-events/jevents.h Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Sat Apr 13 23:52:33 2019 (r346195) +++ head/lib/libpmc/Makefile Sun Apr 14 00:06:49 2019 (r346196) @@ -6,9 +6,6 @@ LIB= pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h -CFLAGS+= -I${.CURDIR} -CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align - .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" .if ${MACHINE_ARCH} == "aarch64" @@ -30,6 +27,11 @@ libpmc_events.c: ${JEVENTS} ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c SRCS+= libpmc_events.c .endif + +WARNS?= 3 + +CFLAGS+= -I${.CURDIR} +CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align MAN= pmc.3 MAN+= pmc_allocate.3 Added: head/lib/libpmc/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmc/Makefile.inc Sun Apr 14 00:06:49 2019 (r346196) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +WARNS?= 3 Modified: head/lib/libpmc/libpmc_json.cc ============================================================================== --- head/lib/libpmc/libpmc_json.cc Sat Apr 13 23:52:33 2019 (r346195) +++ head/lib/libpmc/libpmc_json.cc Sun Apr 14 00:06:49 2019 (r346196) @@ -29,19 +29,21 @@ */ #include -#include #include -#include -#include +#include #include +#include #include +#include +#include +#include #include -#include -#include -#include #include #include + +#include #include +#include using std::string; Modified: head/lib/libpmc/pmu-events/jevents.c ============================================================================== --- head/lib/libpmc/pmu-events/jevents.c Sat Apr 13 23:52:33 2019 (r346195) +++ head/lib/libpmc/pmu-events/jevents.c Sun Apr 14 00:06:49 2019 (r346196) @@ -1,5 +1,3 @@ -#define _XOPEN_SOURCE 500 /* needed for nftw() */ -#define __BSD_VISIBLE 1 /* needed for asprintf() */ /* Parse event JSON files */ /* @@ -33,22 +31,22 @@ * */ - +#include +#include /* getrlimit */ +#include +#include /* getrlimit */ +#include +#include +#include +#include +#include +#include #include #include #include -#include #include -#include #include -#include -#include -#include -#include -#include /* getrlimit */ -#include /* getrlimit */ #include -#include #include "list.h" #include "jsmn.h" #include "json.h" @@ -641,7 +639,7 @@ int json_events(const char *fn, addfield(map, &extra_desc, " ", "(Precise event)", NULL); } - snprintf(buf, sizeof buf, "event=%#llx", eventcode); + snprintf(buf, sizeof(buf), "event=%#llx", eventcode); addfield(map, &event, ",", buf, NULL); if (desc && extra_desc) addfield(map, &desc, " ", extra_desc, NULL); @@ -866,7 +864,7 @@ static int get_maxfds(void) if (getrlimit(RLIMIT_NOFILE, &rlim) == 0) { if (rlim.rlim_max == RLIM_INFINITY) return 512; - return min((unsigned)rlim.rlim_max / 2, 512); + return MIN(rlim.rlim_max / 2, 512); } return 512; Modified: head/lib/libpmc/pmu-events/jevents.h ============================================================================== --- head/lib/libpmc/pmu-events/jevents.h Sat Apr 13 23:52:33 2019 (r346195) +++ head/lib/libpmc/pmu-events/jevents.h Sun Apr 14 00:06:49 2019 (r346196) @@ -11,12 +11,4 @@ int json_events(const char *fn, void *data); char *get_cpu_str(void); -#ifndef min -#define min(x, y) ({ \ - typeof(x) _min1 = (x); \ - typeof(y) _min2 = (y); \ - (void) (&_min1 == &_min2); \ - _min1 < _min2 ? _min1 : _min2; }) -#endif - #endif From owner-svn-src-all@freebsd.org Sun Apr 14 10:18:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 064CB156FE80; Sun, 14 Apr 2019 10:18:15 +0000 (UTC) (envelope-from tuexen@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 9B42F8A10B; Sun, 14 Apr 2019 10:18:14 +0000 (UTC) (envelope-from tuexen@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 6EFD61F090; Sun, 14 Apr 2019 10:18:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3EAIE8B078171; Sun, 14 Apr 2019 10:18:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EAIETP078170; Sun, 14 Apr 2019 10:18:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201904141018.x3EAIETP078170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 14 Apr 2019 10:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346197 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 346197 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9B42F8A10B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 10:18:15 -0000 Author: tuexen Date: Sun Apr 14 10:18:14 2019 New Revision: 346197 URL: https://svnweb.freebsd.org/changeset/base/346197 Log: When sending a routing message, don't allow the user to set the RTF_RNH_LOCKED flag in rtm_flags, since this flag is used only internally. Reported by: syzbot+65c676f5248a13753ea0@syzkaller.appspotmail.com Reviewed by: ae@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19898 Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Apr 14 00:06:49 2019 (r346196) +++ head/sys/net/rtsock.c Sun Apr 14 10:18:14 2019 (r346197) @@ -618,6 +618,8 @@ route_output(struct mbuf *m, struct socket *so, ...) if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, &info)) senderr(EINVAL); + if (rtm->rtm_flags & RTF_RNH_LOCKED) + senderr(EINVAL); info.rti_flags = rtm->rtm_flags; if (info.rti_info[RTAX_DST] == NULL || info.rti_info[RTAX_DST]->sa_family >= AF_MAX || From owner-svn-src-all@freebsd.org Sun Apr 14 10:38:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FC371570710; Sun, 14 Apr 2019 10:38:55 +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 B93278AAFA; Sun, 14 Apr 2019 10:38:54 +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 833181F3E9; Sun, 14 Apr 2019 10:38:54 +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 x3EAcsHJ088751; Sun, 14 Apr 2019 10:38:54 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EAcpmf088732; Sun, 14 Apr 2019 10:38:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141038.x3EAcpmf088732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 10:38: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: r346198 - in stable/12: sbin/ipfw sys/netinet6 sys/netpfil/ipfw sys/netpfil/ipfw/nat64 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/12: sbin/ipfw sys/netinet6 sys/netpfil/ipfw sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346198 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B93278AAFA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 10:38:55 -0000 Author: ae Date: Sun Apr 14 10:38:50 2019 New Revision: 346198 URL: https://svnweb.freebsd.org/changeset/base/346198 Log: MFC r345262: Modify struct nat64_config. Add second IPv6 prefix to generic config structure and rename another fields to conform to RFC6877. Now it contains two prefixes and length: PLAT is provider-side translator that translates N:1 global IPv6 addresses to global IPv4 addresses. CLAT is customer-side translator (XLAT) that algorithmically translates 1:1 IPv4 addresses to global IPv6 addresses. Use PLAT prefix in stateless (nat64stl) and stateful (nat64lsn) translators. Modify nat64_extract_ip4() and nat64_embed_ip4() functions to accept prefix length and use plat_plen to specify prefix length. Retire net.inet.ip.fw.nat64_allow_private sysctl variable. Add NAT64_ALLOW_PRIVATE flag and use "allow_private" config option to configure this ability separately for each NAT64 instance. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: stable/12/sbin/ipfw/ipfw.8 stable/12/sbin/ipfw/ipfw2.h stable/12/sbin/ipfw/nat64lsn.c stable/12/sbin/ipfw/nat64stl.c stable/12/sys/netinet6/ip_fw_nat64.h stable/12/sys/netpfil/ipfw/ip_fw_pfil.c stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h stable/12/sys/netpfil/ipfw/nat64/nat64_translate.c stable/12/sys/netpfil/ipfw/nat64/nat64_translate.h stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c stable/12/sys/netpfil/ipfw/nat64/nat64stl.c stable/12/sys/netpfil/ipfw/nat64/nat64stl.h stable/12/sys/netpfil/ipfw/nat64/nat64stl_control.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw.8 ============================================================================== --- stable/12/sbin/ipfw/ipfw.8 Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sbin/ipfw/ipfw.8 Sun Apr 14 10:38:50 2019 (r346198) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2019 +.Dd March 18, 2019 .Dt IPFW 8 .Os .Sh NAME @@ -3413,6 +3413,14 @@ With you are able to see each handled packet before and after translation. .It Cm -log Turn off logging of all handled packets via BPF. +.It Cm allow_private +Turn on processing private IPv4 addresses. By default IPv6 packets with +destinations mapped to private address ranges defined by RFC1918 are not +processed. +.It Cm -allow_private +Turn off private address handling in +.Nm nat64 +instance. .El .Pp To inspect a states table of stateful NAT64 the following command can be used: @@ -3460,6 +3468,14 @@ Turn on logging of all handled packets via BPF through interface. .It Cm -log Turn off logging of all handled packets via BPF. +.It Cm allow_private +Turn on processing private IPv4 addresses. By default IPv6 packets with +destinations mapped to private address ranges defined by RFC1918 are not +processed. +.It Cm -allow_private +Turn off private address handling in +.Nm nat64 +instance. .El .Pp Note that the behavior of stateless translator with respect to not matched @@ -3948,16 +3964,6 @@ Default is no. Controls whether bridged packets are passed to .Nm . Default is no. -.It Va net.inet.ip.fw.nat64_allow_private : No 0 -Defines how -.Nm nat64 -handles private IPv4 addresses: -.Bl -tag -width indent -.It Cm 0 -Packets with private IPv4 will not be handled by translator -.It Cm 1 -Translator will accept and process packets with private IPv4 addresses. -.El .It Va net.inet.ip.fw.nat64_debug : No 0 Controls debugging messages produced by .Nm ipfw_nat64 Modified: stable/12/sbin/ipfw/ipfw2.h ============================================================================== --- stable/12/sbin/ipfw/ipfw2.h Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sbin/ipfw/ipfw2.h Sun Apr 14 10:38:50 2019 (r346198) @@ -288,6 +288,8 @@ enum tokens { TOK_UDP_AGE, TOK_ICMP_AGE, TOK_LOGOFF, + TOK_PRIVATE, + TOK_PRIVATEOFF, /* NPTv6 tokens */ TOK_NPTV6, Modified: stable/12/sbin/ipfw/nat64lsn.c ============================================================================== --- stable/12/sbin/ipfw/nat64lsn.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sbin/ipfw/nat64lsn.c Sun Apr 14 10:38:50 2019 (r346198) @@ -377,6 +377,8 @@ static struct _s_x nat64newcmds[] = { { "icmp_age", TOK_ICMP_AGE }, { "log", TOK_LOG }, { "-log", TOK_LOGOFF }, + { "allow_private", TOK_PRIVATE }, + { "-allow_private", TOK_PRIVATEOFF }, { NULL, 0 } }; @@ -522,6 +524,12 @@ nat64lsn_create(const char *name, uint8_t set, int ac, case TOK_LOGOFF: cfg->flags &= ~NAT64_LOG; break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; } } @@ -627,6 +635,12 @@ nat64lsn_config(const char *name, uint8_t set, int ac, case TOK_LOGOFF: cfg->flags &= ~NAT64_LOG; break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; default: errx(EX_USAGE, "Can't change %s option", opt); } @@ -801,6 +815,8 @@ nat64lsn_show_cb(ipfw_nat64lsn_cfg *cfg, const char *n printf(" icmp_age %u", cfg->st_icmp_ttl); if (cfg->flags & NAT64_LOG) printf(" log"); + if (cfg->flags & NAT64_ALLOW_PRIVATE) + printf(" allow_private"); printf("\n"); return (0); } Modified: stable/12/sbin/ipfw/nat64stl.c ============================================================================== --- stable/12/sbin/ipfw/nat64stl.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sbin/ipfw/nat64stl.c Sun Apr 14 10:38:50 2019 (r346198) @@ -196,6 +196,8 @@ static struct _s_x nat64newcmds[] = { { "prefix6", TOK_PREFIX6 }, { "log", TOK_LOG }, { "-log", TOK_LOGOFF }, + { "allow_private", TOK_PRIVATE }, + { "-allow_private", TOK_PRIVATEOFF }, { NULL, 0 } }; @@ -263,6 +265,12 @@ nat64stl_create(const char *name, uint8_t set, int ac, case TOK_LOGOFF: cfg->flags &= ~NAT64_LOG; break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; } } @@ -332,6 +340,12 @@ nat64stl_config(const char *name, uint8_t set, int ac, case TOK_LOGOFF: cfg->flags &= ~NAT64_LOG; break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; default: errx(EX_USAGE, "Can't change %s option", opt); } @@ -451,6 +465,8 @@ nat64stl_show_cb(ipfw_nat64stl_cfg *cfg, const char *n printf(" prefix6 %s/%u", abuf, cfg->plen6); if (cfg->flags & NAT64_LOG) printf(" log"); + if (cfg->flags & NAT64_ALLOW_PRIVATE) + printf(" allow_private"); printf("\n"); return (0); } Modified: stable/12/sys/netinet6/ip_fw_nat64.h ============================================================================== --- stable/12/sys/netinet6/ip_fw_nat64.h Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netinet6/ip_fw_nat64.h Sun Apr 14 10:38:50 2019 (r346198) @@ -40,7 +40,7 @@ struct ipfw_nat64stl_stats { uint64_t noroute4; uint64_t noroute6; uint64_t noproto; /* Protocol not supported */ - uint64_t nomem; /* mbuf allocation filed */ + uint64_t nomem; /* mbuf allocation failed */ uint64_t dropped; /* dropped due to some errors */ }; @@ -53,7 +53,7 @@ struct ipfw_nat64lsn_stats { uint64_t noroute4; uint64_t noroute6; uint64_t noproto; /* Protocol not supported */ - uint64_t nomem; /* mbuf allocation filed */ + uint64_t nomem; /* mbuf allocation failed */ uint64_t dropped; /* dropped due to some errors */ uint64_t nomatch4; /* No addr/port match */ @@ -79,8 +79,10 @@ struct ipfw_nat64lsn_stats { uint64_t _reserved[4]; }; -#define NAT64_LOG 0x0001 /* Enable logging via BPF */ - +#define NAT64_LOG 0x0001 /* Enable logging via BPF */ +#define NAT64_ALLOW_PRIVATE 0x0002 /* Allow private IPv4 address + * translation + */ typedef struct _ipfw_nat64stl_cfg { char name[64]; /* NAT name */ ipfw_obj_ntlv ntlv6; /* object name tlv */ Modified: stable/12/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_pfil.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/ip_fw_pfil.c Sun Apr 14 10:38:50 2019 (r346198) @@ -152,8 +152,8 @@ again: ipfw = ipfw_chk(&args); *m0 = args.m; - KASSERT(*m0 != NULL || ipfw == IP_FW_DENY, ("%s: m0 is NULL", - __func__)); + KASSERT(*m0 != NULL || ipfw == IP_FW_DENY || + ipfw == IP_FW_NAT64, ("%s: m0 is NULL", __func__)); /* breaking out of the switch means drop */ switch (ipfw) { Modified: stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 10:38:50 2019 (r346198) @@ -51,14 +51,10 @@ __FBSDID("$FreeBSD$"); #include "nat64_translate.h" VNET_DEFINE(int, nat64_debug) = 0; -VNET_DEFINE(int, nat64_allow_private) = 0; SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, nat64_debug, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nat64_debug), 0, "Debug level for NAT64 module"); -SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, nat64_allow_private, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nat64_allow_private), 0, - "Allow use of non-global IPv4 addresses with NAT64"); static int sysctl_direct_output(SYSCTL_HANDLER_ARGS) Modified: stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 10:38:50 2019 (r346198) @@ -41,9 +41,7 @@ #define DP_ALL 0xFFFF VNET_DECLARE(int, nat64_debug); -VNET_DECLARE(int, nat64_allow_private); #define V_nat64_debug VNET(nat64_debug) -#define V_nat64_allow_private VNET(nat64_allow_private) #if 0 #define NAT64NOINLINE __noinline Modified: stable/12/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 10:38:50 2019 (r346198) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -241,7 +242,7 @@ nat64_output_one(struct mbuf *m, struct nat64_counters * Returns zero on success, otherwise EINVAL. */ int -nat64_check_prefix6(const struct in6_addr *prefix, int length) +nat64_check_prefixlen(int length) { switch (length) { @@ -250,29 +251,40 @@ nat64_check_prefix6(const struct in6_addr *prefix, int case 48: case 56: case 64: - /* Well-known prefix has 96 prefix length */ - if (IN6_IS_ADDR_WKPFX(prefix)) - return (EINVAL); - /* FALLTHROUGH */ case 96: - /* Bits 64 to 71 must be set to zero */ - if (prefix->__u6_addr.__u6_addr8[8] != 0) - return (EINVAL); - /* Some extra checks */ - if (IN6_IS_ADDR_MULTICAST(prefix) || - IN6_IS_ADDR_UNSPECIFIED(prefix) || - IN6_IS_ADDR_LOOPBACK(prefix)) - return (EINVAL); return (0); } return (EINVAL); } int +nat64_check_prefix6(const struct in6_addr *prefix, int length) +{ + + if (nat64_check_prefixlen(length) != 0) + return (EINVAL); + + /* Well-known prefix has 96 prefix length */ + if (IN6_IS_ADDR_WKPFX(prefix) && length != 96) + return (EINVAL); + + /* Bits 64 to 71 must be set to zero */ + if (prefix->__u6_addr.__u6_addr8[8] != 0) + return (EINVAL); + + /* Some extra checks */ + if (IN6_IS_ADDR_MULTICAST(prefix) || + IN6_IS_ADDR_UNSPECIFIED(prefix) || + IN6_IS_ADDR_LOOPBACK(prefix)) + return (EINVAL); + return (0); +} + +int nat64_check_private_ip4(const struct nat64_config *cfg, in_addr_t ia) { - if (V_nat64_allow_private) + if (cfg->flags & NAT64_ALLOW_PRIVATE) return (0); /* WKPFX must not be used to represent non-global IPv4 addresses */ @@ -301,29 +313,34 @@ nat64_check_private_ip4(const struct nat64_config *cfg return (0); } +/* + * Embed @ia IPv4 address into @ip6 IPv6 address. + * Place to embedding determined from prefix length @plen. + */ void -nat64_embed_ip4(const struct nat64_config *cfg, in_addr_t ia, - struct in6_addr *ip6) +nat64_embed_ip4(struct in6_addr *ip6, int plen, in_addr_t ia) { - /* assume the prefix6 is properly filled with zeros */ - bcopy(&cfg->prefix6, ip6, sizeof(*ip6)); - switch (cfg->plen6) { + switch (plen) { case 32: case 96: - ip6->s6_addr32[cfg->plen6 / 32] = ia; + ip6->s6_addr32[plen / 32] = ia; break; case 40: case 48: case 56: + /* + * Preserve prefix bits. + * Since suffix bits should be zero and reserved for future + * use, we just overwrite the whole word, where they are. + */ + ip6->s6_addr32[1] &= 0xffffffff << (32 - plen % 32); #if BYTE_ORDER == BIG_ENDIAN - ip6->s6_addr32[1] = cfg->prefix6.s6_addr32[1] | - (ia >> (cfg->plen6 % 32)); - ip6->s6_addr32[2] = ia << (24 - cfg->plen6 % 32); + ip6->s6_addr32[1] |= ia >> (plen % 32); + ip6->s6_addr32[2] = ia << (24 - plen % 32); #elif BYTE_ORDER == LITTLE_ENDIAN - ip6->s6_addr32[1] = cfg->prefix6.s6_addr32[1] | - (ia << (cfg->plen6 % 32)); - ip6->s6_addr32[2] = ia >> (24 - cfg->plen6 % 32); + ip6->s6_addr32[1] |= ia << (plen % 32); + ip6->s6_addr32[2] = ia >> (24 - plen % 32); #endif break; case 64: @@ -336,13 +353,18 @@ nat64_embed_ip4(const struct nat64_config *cfg, in_add #endif break; default: - panic("Wrong plen6"); + panic("Wrong plen: %d", plen); }; + /* + * Bits 64 to 71 of the address are reserved for compatibility + * with the host identifier format defined in the IPv6 addressing + * architecture [RFC4291]. These bits MUST be set to zero. + */ ip6->s6_addr8[8] = 0; } in_addr_t -nat64_extract_ip4(const struct nat64_config *cfg, const struct in6_addr *ip6) +nat64_extract_ip4(const struct in6_addr *ip6, int plen) { in_addr_t ia; @@ -353,7 +375,7 @@ nat64_extract_ip4(const struct nat64_config *cfg, cons * The suffix bits are reserved for future extensions and SHOULD * be set to zero. */ - switch (cfg->plen6) { + switch (plen) { case 32: if (ip6->s6_addr32[3] != 0 || ip6->s6_addr32[2] != 0) goto badip6; @@ -377,20 +399,20 @@ nat64_extract_ip4(const struct nat64_config *cfg, cons (ip6->s6_addr32[3] & htonl(0x00ffffff)) != 0) goto badip6; }; - switch (cfg->plen6) { + switch (plen) { case 32: case 96: - ia = ip6->s6_addr32[cfg->plen6 / 32]; + ia = ip6->s6_addr32[plen / 32]; break; case 40: case 48: case 56: #if BYTE_ORDER == BIG_ENDIAN - ia = (ip6->s6_addr32[1] << (cfg->plen6 % 32)) | - (ip6->s6_addr32[2] >> (24 - cfg->plen6 % 32)); + ia = (ip6->s6_addr32[1] << (plen % 32)) | + (ip6->s6_addr32[2] >> (24 - plen % 32)); #elif BYTE_ORDER == LITTLE_ENDIAN - ia = (ip6->s6_addr32[1] >> (cfg->plen6 % 32)) | - (ip6->s6_addr32[2] << (24 - cfg->plen6 % 32)); + ia = (ip6->s6_addr32[1] >> (plen % 32)) | + (ip6->s6_addr32[2] << (24 - plen % 32)); #endif break; case 64: @@ -403,12 +425,9 @@ nat64_extract_ip4(const struct nat64_config *cfg, cons default: return (0); }; - if (nat64_check_ip4(ia) != 0 || - nat64_check_private_ip4(cfg, ia) != 0) - goto badip4; + if (nat64_check_ip4(ia) == 0) + return (ia); - return (ia); -badip4: DPRINTF(DP_GENERIC | DP_DROPS, "invalid destination address: %08x", ia); return (0); @@ -435,7 +454,7 @@ badip6: * IPv6 to IPv4: HC' = cksum_add(HC, result) * IPv4 to IPv6: HC' = cksum_add(HC, ~result) */ -static NAT64NOINLINE uint16_t +static uint16_t nat64_cksum_convert(struct ip6_hdr *ip6, struct ip *ip) { uint32_t sum; @@ -455,7 +474,7 @@ nat64_cksum_convert(struct ip6_hdr *ip6, struct ip *ip return (sum); } -static NAT64NOINLINE void +static void nat64_init_ip4hdr(const struct ip6_hdr *ip6, const struct ip6_frag *frag, uint16_t plen, uint8_t proto, struct ip *ip) { @@ -1025,9 +1044,11 @@ nat64_icmp_translate(struct mbuf *m, struct ip6_hdr *i /* Construct new inner IPv6 header */ eip6 = mtodo(n, offset + sizeof(struct icmp6_hdr)); eip6->ip6_src = ip6->ip6_dst; - /* Use the fact that we have single /96 prefix for IPv4 map */ + + /* Use the same prefix that we have in outer header */ eip6->ip6_dst = ip6->ip6_src; - nat64_embed_ip4(cfg, ip.ip_dst.s_addr, &eip6->ip6_dst); + MPASS(cfg->flags & NAT64_PLATPFX); + nat64_embed_ip4(&eip6->ip6_dst, cfg->plat_plen, ip.ip_dst.s_addr); eip6->ip6_flow = htonl(ip.ip_tos << 20); eip6->ip6_vfc |= IPV6_VERSION; @@ -1450,7 +1471,9 @@ nat64_handle_icmp6(struct mbuf *m, int hlen, uint32_t /* Now we need to make a fake IPv4 packet to generate ICMP message */ ip.ip_dst.s_addr = aaddr; - ip.ip_src.s_addr = nat64_extract_ip4(cfg, &ip6i->ip6_src); + ip.ip_src.s_addr = nat64_extract_ip4(&ip6i->ip6_src, cfg->plat_plen); + if (ip.ip_src.s_addr == 0) + goto fail; /* XXX: Make fake ulp header */ if (V_nat64out == &nat64_direct) /* init_ip4hdr will decrement it */ ip6i->ip6_hlim += IPV6_HLIMDEC; @@ -1503,7 +1526,7 @@ nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, ui return (NAT64MFREE); } - ip.ip_dst.s_addr = nat64_extract_ip4(cfg, &ip6->ip6_dst); + ip.ip_dst.s_addr = nat64_extract_ip4(&ip6->ip6_dst, cfg->plat_plen); if (ip.ip_dst.s_addr == 0) { NAT64STAT_INC(&cfg->stats, dropped); return (NAT64MFREE); Modified: stable/12/sys/netpfil/ipfw/nat64/nat64_translate.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 10:38:50 2019 (r346198) @@ -46,12 +46,12 @@ struct nat64_stats { * unsupported/etc. */ - uint64_t jrequests; /* number of jobs requests queued */ - uint64_t jcalls; /* number of jobs handler calls */ - uint64_t jhostsreq; /* number of hosts requests */ - uint64_t jportreq; - uint64_t jhostfails; - uint64_t jportfails; + uint64_t jrequests; /* jobs requests queued */ + uint64_t jcalls; /* jobs handler calls */ + uint64_t jhostsreq; /* hosts requests */ + uint64_t jportreq; /* PG allocation requests */ + uint64_t jhostfails; /* hosts requests failed */ + uint64_t jportfails; /* PG allocation failed */ uint64_t jmaxlen; uint64_t jnomem; uint64_t jreinjected; @@ -85,11 +85,24 @@ struct nat64_counters { #define NAT64RETURN 1 #define NAT64MFREE -1 +/* + * According to RFC6877: + * PLAT is provider-side translator (XLAT) that translates N:1 global + * IPv6 addresses to global IPv4 addresses, and vice versa. + * + * CLAT is customer-side translator (XLAT) that algorithmically + * translates 1:1 private IPv4 addresses to global IPv6 addresses, + * and vice versa. + */ struct nat64_config { + struct in6_addr clat_prefix; + struct in6_addr plat_prefix; uint32_t flags; -#define NAT64_WKPFX 0x00010000 /* prefix6 is WKPFX */ - struct in6_addr prefix6; - uint8_t plen6; +#define NAT64_WKPFX 0x00010000 /* prefix is well-known */ +#define NAT64_CLATPFX 0x00020000 /* dst prefix is configured */ +#define NAT64_PLATPFX 0x00040000 /* src prefix is configured */ + uint8_t clat_plen; + uint8_t plat_plen; struct nat64_counters stats; }; @@ -128,6 +141,7 @@ nat64_check_ip4(in_addr_t ia) (a)->s6_addr32[1] == 0 && (a)->s6_addr32[2] == 0) int nat64_check_private_ip4(const struct nat64_config *cfg, in_addr_t ia); +int nat64_check_prefixlen(int length); int nat64_check_prefix6(const struct in6_addr *prefix, int length); int nat64_getlasthdr(struct mbuf *m, int *offset); int nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *saddr, @@ -137,10 +151,8 @@ int nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr struct nat64_config *cfg, void *logdata); int nat64_handle_icmp6(struct mbuf *m, int hlen, uint32_t aaddr, uint16_t aport, struct nat64_config *cfg, void *logdata); -void nat64_embed_ip4(const struct nat64_config *cfg, in_addr_t ia, - struct in6_addr *ip6); -in_addr_t nat64_extract_ip4(const struct nat64_config *cfg, - const struct in6_addr *ip6); +void nat64_embed_ip4(struct in6_addr *ip6, int plen, in_addr_t ia); +in_addr_t nat64_extract_ip4(const struct in6_addr *ip6, int plen); void nat64_set_output_method(int); int nat64_get_output_method(void); Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 10:38:50 2019 (r346198) @@ -407,7 +407,7 @@ nat64lsn_translate4(struct nat64lsn_cfg *cfg, const st } else logdata = NULL; - nat64_embed_ip4(&cfg->base, htonl(f_id->src_ip), &src6); + nat64_embed_ip4(&src6, cfg->base.plat_plen, htonl(f_id->src_ip)); ret = nat64_do_handle_ip4(*pm, &src6, &nh->addr, lport, &cfg->base, logdata); @@ -1481,8 +1481,10 @@ nat64lsn_translate6(struct nat64lsn_cfg *cfg, struct i return (nat64lsn_request_host(cfg, f_id, pm)); /* Fill-in on-stack state structure */ - kst.u.s.faddr = nat64_extract_ip4(&cfg->base, &f_id->dst_ip6); - if (kst.u.s.faddr == 0) { + kst.u.s.faddr = nat64_extract_ip4(&f_id->dst_ip6, + cfg->base.plat_plen); + if (kst.u.s.faddr == 0 || + nat64_check_private_ip4(&cfg->base, kst.u.s.faddr) != 0) { NAT64STAT_INC(&cfg->base.stats, dropped); goto drop; } Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h Sun Apr 14 10:38:50 2019 (r346198) @@ -216,7 +216,7 @@ struct nat64lsn_cfg { uint16_t st_icmp_ttl; /* ICMP expire */ uint32_t protochunks[NAT_MAX_PROTO];/* Number of chunks used */ struct nat64_config base; -#define NAT64LSN_FLAGSMASK (NAT64_LOG) +#define NAT64LSN_FLAGSMASK (NAT64_LOG | NAT64_ALLOW_PRIVATE) struct callout periodic; struct callout jcallout; Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c Sun Apr 14 10:38:50 2019 (r346198) @@ -164,10 +164,10 @@ nat64lsn_create(struct ip_fw_chain *ch, ip_fw3_opheade cfg->no.etlv = IPFW_TLV_NAT64LSN_NAME; cfg->no.set = uc->set; - cfg->base.prefix6 = uc->prefix6; - cfg->base.plen6 = uc->plen6; - cfg->base.flags = uc->flags & NAT64LSN_FLAGSMASK; - if (IN6_IS_ADDR_WKPFX(&cfg->base.prefix6)) + cfg->base.plat_prefix = uc->prefix6; + cfg->base.plat_plen = uc->plen6; + cfg->base.flags = (uc->flags & NAT64LSN_FLAGSMASK) | NAT64_PLATPFX; + if (IN6_IS_ADDR_WKPFX(&cfg->base.plat_prefix)) cfg->base.flags |= NAT64_WKPFX; cfg->prefix4 = addr4; @@ -324,9 +324,9 @@ nat64lsn_export_config(struct ip_fw_chain *ch, struct uc->st_udp_ttl = cfg->st_udp_ttl; uc->st_icmp_ttl = cfg->st_icmp_ttl; uc->prefix4.s_addr = htonl(cfg->prefix4); - uc->prefix6 = cfg->base.prefix6; + uc->prefix6 = cfg->base.plat_prefix; uc->plen4 = cfg->plen4; - uc->plen6 = cfg->base.plen6; + uc->plen6 = cfg->base.plat_plen; uc->set = cfg->no.set; strlcpy(uc->name, cfg->no.name, sizeof(uc->name)); } Modified: stable/12/sys/netpfil/ipfw/nat64/nat64stl.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64stl.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/nat64stl.c Sun Apr 14 10:38:50 2019 (r346198) @@ -99,7 +99,9 @@ nat64stl_handle_ip4(struct ip_fw_chain *chain, struct daddr = TARG_VAL(chain, tablearg, nh6); if (nat64_check_ip6(&daddr) != 0) return (NAT64MFREE); - nat64_embed_ip4(&cfg->base, ip->ip_src.s_addr, &saddr); + + saddr = cfg->base.plat_prefix; + nat64_embed_ip4(&saddr, cfg->base.plat_plen, ip->ip_src.s_addr); if (cfg->base.flags & NAT64_LOG) { logdata = &loghdr; nat64stl_log(logdata, m, AF_INET, cfg->no.kidx); @@ -118,7 +120,10 @@ nat64stl_handle_ip6(struct ip_fw_chain *chain, struct uint32_t aaddr; aaddr = htonl(TARG_VAL(chain, tablearg, nh4)); - + if (nat64_check_private_ip4(&cfg->base, aaddr) != 0) { + NAT64STAT_INC(&cfg->base.stats, dropped); + return (NAT64MFREE); + } /* * NOTE: we expect ipfw_chk() did m_pullup() up to upper level * protocol's headers. Also we skip some checks, that ip6_input(), @@ -126,7 +131,8 @@ nat64stl_handle_ip6(struct ip_fw_chain *chain, struct */ ip6 = mtod(m, struct ip6_hdr *); /* Check ip6_dst matches configured prefix */ - if (bcmp(&ip6->ip6_dst, &cfg->base.prefix6, cfg->base.plen6 / 8) != 0) + if (memcmp(&ip6->ip6_dst, &cfg->base.plat_prefix, + cfg->base.plat_plen / 8) != 0) return (NAT64SKIP); if (cfg->base.flags & NAT64_LOG) { @@ -254,7 +260,7 @@ ipfw_nat64stl(struct ip_fw_chain *chain, struct ip_fw_ if (ret == NAT64MFREE) m_freem(args->m); args->m = NULL; - return (IP_FW_DENY); + return (IP_FW_NAT64); } Modified: stable/12/sys/netpfil/ipfw/nat64/nat64stl.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64stl.h Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/nat64stl.h Sun Apr 14 10:38:50 2019 (r346198) @@ -43,7 +43,8 @@ struct nat64stl_cfg { #define NAT64STL_KIDX 0x0100 #define NAT64STL_46T 0x0200 #define NAT64STL_64T 0x0400 -#define NAT64STL_FLAGSMASK (NAT64_LOG) /* flags to pass to userland */ + /* flags to pass to userland */ +#define NAT64STL_FLAGSMASK (NAT64_LOG | NAT64_ALLOW_PRIVATE) char name[64]; }; Modified: stable/12/sys/netpfil/ipfw/nat64/nat64stl_control.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64stl_control.c Sun Apr 14 10:18:14 2019 (r346197) +++ stable/12/sys/netpfil/ipfw/nat64/nat64stl_control.c Sun Apr 14 10:38:50 2019 (r346198) @@ -99,8 +99,8 @@ nat64stl_export_config(struct ip_fw_chain *ch, struct { struct named_object *no; - uc->prefix6 = cfg->base.prefix6; - uc->plen6 = cfg->base.plen6; + uc->prefix6 = cfg->base.plat_prefix; + uc->plen6 = cfg->base.plat_plen; uc->flags = cfg->base.flags & NAT64STL_FLAGSMASK; uc->set = cfg->no.set; strlcpy(uc->name, cfg->no.name, sizeof(uc->name)); @@ -206,10 +206,10 @@ nat64stl_create(struct ip_fw_chain *ch, ip_fw3_opheade IPFW_UH_RUNLOCK(ch); cfg = nat64stl_alloc_config(uc->name, uc->set); - cfg->base.prefix6 = uc->prefix6; - cfg->base.plen6 = uc->plen6; - cfg->base.flags = uc->flags & NAT64STL_FLAGSMASK; - if (IN6_IS_ADDR_WKPFX(&cfg->base.prefix6)) + cfg->base.plat_prefix = uc->prefix6; + cfg->base.plat_plen = uc->plen6; + cfg->base.flags = (uc->flags & NAT64STL_FLAGSMASK) | NAT64_PLATPFX; + if (IN6_IS_ADDR_WKPFX(&cfg->base.plat_prefix)) cfg->base.flags |= NAT64_WKPFX; IPFW_UH_WLOCK(ch); From owner-svn-src-all@freebsd.org Sun Apr 14 10:40:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EBDD15707C6; Sun, 14 Apr 2019 10:40:46 +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 0E85C8AC53; Sun, 14 Apr 2019 10:40:46 +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 D7BC21F400; Sun, 14 Apr 2019 10:40:45 +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 x3EAejfM088921; Sun, 14 Apr 2019 10:40:45 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EAehDd088907; Sun, 14 Apr 2019 10:40:43 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141040.x3EAehDd088907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 10:40: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: r346199 - in stable/12: sbin/ipfw sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/12: sbin/ipfw sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0E85C8AC53 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 10:40:46 -0000 Author: ae Date: Sun Apr 14 10:40:43 2019 New Revision: 346199 URL: https://svnweb.freebsd.org/changeset/base/346199 Log: MFC r345263: Add SPDX-License-Identifier and update year in copyright. Modified: stable/12/sbin/ipfw/nat64lsn.c stable/12/sbin/ipfw/nat64stl.c stable/12/sys/netinet6/ip_fw_nat64.h stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h stable/12/sys/netpfil/ipfw/nat64/nat64_translate.c stable/12/sys/netpfil/ipfw/nat64/nat64_translate.h stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c stable/12/sys/netpfil/ipfw/nat64/nat64stl.c stable/12/sys/netpfil/ipfw/nat64/nat64stl.h stable/12/sys/netpfil/ipfw/nat64/nat64stl_control.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/nat64lsn.c ============================================================================== --- stable/12/sbin/ipfw/nat64lsn.c Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sbin/ipfw/nat64lsn.c Sun Apr 14 10:40:43 2019 (r346199) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015-2016 Alexander V. Chernikov - * Copyright (c) 2015-2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sbin/ipfw/nat64stl.c ============================================================================== --- stable/12/sbin/ipfw/nat64stl.c Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sbin/ipfw/nat64stl.c Sun Apr 14 10:40:43 2019 (r346199) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netinet6/ip_fw_nat64.h ============================================================================== --- stable/12/sys/netinet6/ip_fw_nat64.h Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netinet6/ip_fw_nat64.h Sun Apr 14 10:40:43 2019 (r346199) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * Copyright (c) 2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 10:40:43 2019 (r346199) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2018 Yandex LLC - * Copyright (c) 2015-2018 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 10:40:43 2019 (r346199) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2018 Yandex LLC - * Copyright (c) 2015-2018 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 10:40:43 2019 (r346199) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2018 Yandex LLC - * Copyright (c) 2015-2018 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/nat64_translate.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 10:40:43 2019 (r346199) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2018 Yandex LLC - * Copyright (c) 2015-2018 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 10:40:43 2019 (r346199) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * Copyright (c) 2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2016-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h Sun Apr 14 10:40:43 2019 (r346199) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * Copyright (c) 2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c Sun Apr 14 10:40:43 2019 (r346199) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * Copyright (c) 2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/nat64stl.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64stl.c Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/nat64stl.c Sun Apr 14 10:40:43 2019 (r346199) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/nat64stl.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64stl.h Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/nat64stl.h Sun Apr 14 10:40:43 2019 (r346199) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/netpfil/ipfw/nat64/nat64stl_control.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64stl_control.c Sun Apr 14 10:38:50 2019 (r346198) +++ stable/12/sys/netpfil/ipfw/nat64/nat64stl_control.c Sun Apr 14 10:40:43 2019 (r346199) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-all@freebsd.org Sun Apr 14 10:44:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B8771570A32; Sun, 14 Apr 2019 10:44:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 CE34A8B03F; Sun, 14 Apr 2019 10:44:09 +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 A801D1F5B8; Sun, 14 Apr 2019 10:44:09 +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 x3EAi97p093758; Sun, 14 Apr 2019 10:44:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EAi69k093744; Sun, 14 Apr 2019 10:44:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141044.x3EAi69k093744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 10:44: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: r346200 - in stable/12: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netinet sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/12: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netinet sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CE34A8B03F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 10:44:10 -0000 Author: ae Date: Sun Apr 14 10:44:06 2019 New Revision: 346200 URL: https://svnweb.freebsd.org/changeset/base/346200 Log: MFC r345264: Add NAT64 CLAT implementation as defined in RFC6877. CLAT is customer-side translator that algorithmically translates 1:1 private IPv4 addresses to global IPv6 addresses, and vice versa. It is implemented as part of ipfw_nat64 kernel module. When module is loaded or compiled into the kernel, it registers "nat64clat" external action. External action named instance can be created using `create` command and then used in ipfw rules. The create command accepts two IPv6 prefixes `plat_prefix` and `clat_prefix`. If plat_prefix is ommitted, IPv6 NAT64 Well-Known prefix 64:ff9b::/96 will be used. # ipfw nat64clat CLAT create clat_prefix SRC_PFX plat_prefix DST_PFX # ipfw add nat64clat CLAT ip4 from IPv4_PFX to any out # ipfw add nat64clat CLAT ip6 from DST_PFX to SRC_PFX in Obtained from: Yandex LLC Submitted by: Boris N. Lytochkin Relnotes: yes Sponsored by: Yandex LLC Added: stable/12/sbin/ipfw/nat64clat.c - copied unchanged from r345264, head/sbin/ipfw/nat64clat.c stable/12/sys/netpfil/ipfw/nat64/nat64clat.c - copied unchanged from r345264, head/sys/netpfil/ipfw/nat64/nat64clat.c stable/12/sys/netpfil/ipfw/nat64/nat64clat.h - copied unchanged from r345264, head/sys/netpfil/ipfw/nat64/nat64clat.h stable/12/sys/netpfil/ipfw/nat64/nat64clat_control.c - copied unchanged from r345264, head/sys/netpfil/ipfw/nat64/nat64clat_control.c Modified: stable/12/sbin/ipfw/Makefile stable/12/sbin/ipfw/ipfw.8 stable/12/sbin/ipfw/ipfw2.c stable/12/sbin/ipfw/ipfw2.h stable/12/sbin/ipfw/main.c stable/12/sys/conf/files stable/12/sys/modules/ipfw_nat64/Makefile stable/12/sys/netinet/ip_fw.h stable/12/sys/netinet6/ip_fw_nat64.h stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/Makefile ============================================================================== --- stable/12/sbin/ipfw/Makefile Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sbin/ipfw/Makefile Sun Apr 14 10:44:06 2019 (r346200) @@ -5,7 +5,7 @@ PACKAGE=ipfw PROG= ipfw SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c tables.c -SRCS+= nat64lsn.c nat64stl.c nptv6.c +SRCS+= nat64clat.c nat64lsn.c nat64stl.c nptv6.c WARNS?= 2 .if ${MK_PF} != "no" Modified: stable/12/sbin/ipfw/ipfw.8 ============================================================================== --- stable/12/sbin/ipfw/ipfw.8 Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sbin/ipfw/ipfw.8 Sun Apr 14 10:44:06 2019 (r346200) @@ -136,6 +136,21 @@ in-kernel NAT. .Cm destroy .Nm .Oo Cm set Ar N Oc Cm nat64stl Ar name Cm stats Op Cm reset +.Ss XLAT464 CLAT IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +.Nm +.Oo Cm set Ar N Oc Cm nat64clat Ar name Cm create Ar create-options +.Nm +.Oo Cm set Ar N Oc Cm nat64clat Ar name Cm config Ar config-options +.Nm +.Oo Cm set Ar N Oc Cm nat64clat +.Brq Ar name | all +.Brq Cm list | show +.Nm +.Oo Cm set Ar N Oc Cm nat64clat +.Brq Ar name | all +.Cm destroy +.Nm +.Oo Cm set Ar N Oc Cm nat64clat Ar name Cm stats Op Cm reset .Ss IPv6-to-IPv6 NETWORK PREFIX TRANSLATION .Nm .Oo Cm set Ar N Oc Cm nptv6 Ar name Cm create Ar create-options @@ -924,6 +939,11 @@ Pass packet to a stateless NAT64 instance (for IPv6/IP protocol translation): see the .Sx IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION Section for further information. +.It Cm nat64clat Ar name +Pass packet to a CLAT NAT64 instance (for client-side IPv6/IPv4 network address and +protocol translation): see the +.Sx IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +Section for further information. .It Cm nptv6 Ar name Pass packet to a NPTv6 instance (for IPv6-to-IPv6 network prefix translation): see the @@ -3482,6 +3502,57 @@ Note that the behavior of stateless translator with re packets differs from stateful translator. If corresponding addresses was not found in the lookup tables, the packet will not be dropped and the search continues. +.Pp +.Pp +.Ss XLAT464 CLAT translation +XLAT464 CLAT NAT64 translator implements client-side stateless translation as +defined in RFC6877 and is very similar to statless NAT64 translator +explained above. Instead of lookup tables it uses one-to-one mapping +between IPv4 and IPv6 addresses using configured prefixes. +This mode can be used as a replacement of DNS64 service for applications +that are not using it (e.g. VoIP) allowing them to access IPv4-only Internet +over IPv6-only networks with help of remote NAT64 translator. +.Pp +The CLAT NAT64 configuration command is the following: +.Bd -ragged -offset indent +.Bk -words +.Cm nat64clat +.Ar name +.Cm create +.Ar create-options +.Ek +.Ed +.Pp +The following parameters can be configured: +.Bl -tag -width indent +.It Cm clat_prefix Ar ipv6_prefix/length +The IPv6 prefix defines IPv4-embedded IPv6 addresses used by translator +to represent source IPv4 addresses. +.It Cm plat_prefix Ar ipv6_prefix/length +The IPv6 prefix defines IPv4-embedded IPv6 addresses used by translator +to represent destination IPv4 addresses. This IPv6 prefix should be configured +on a remote NAT64 translator. +.It Cm log +Turn on logging of all handled packets via BPF through +.Ar ipfwlog0 +interface. +.It Cm -log +Turn off logging of all handled packets via BPF. +.It Cm allow_private +Turn on processing private IPv4 addresses. By default +.Nm nat64clat +instance will not process IPv4 packets with destination address from private +ranges as defined in RFC1918. +.It Cm -allow_private +Turn off private address handling in +.Nm nat64clat +instance. +.El +.Pp +Note that the behavior of CLAT translator with respect to not matched +packets differs from stateful translator. +If corresponding addresses were not matched against prefixes configured, +the packet will not be dropped and the search continues. .Sh IPv6-to-IPv6 NETWORK PREFIX TRANSLATION (NPTv6) .Nm supports in-kernel IPv6-to-IPv6 network prefix translation as described Modified: stable/12/sbin/ipfw/ipfw2.c ============================================================================== --- stable/12/sbin/ipfw/ipfw2.c Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sbin/ipfw/ipfw2.c Sun Apr 14 10:44:06 2019 (r346200) @@ -237,6 +237,7 @@ static struct _s_x ether_types[] = { }; static struct _s_x rule_eactions[] = { + { "nat64clat", TOK_NAT64CLAT }, { "nat64lsn", TOK_NAT64LSN }, { "nat64stl", TOK_NAT64STL }, { "nptv6", TOK_NPTV6 }, Modified: stable/12/sbin/ipfw/ipfw2.h ============================================================================== --- stable/12/sbin/ipfw/ipfw2.h Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sbin/ipfw/ipfw2.h Sun Apr 14 10:44:06 2019 (r346200) @@ -291,6 +291,11 @@ enum tokens { TOK_PRIVATE, TOK_PRIVATEOFF, + /* NAT64 CLAT tokens */ + TOK_NAT64CLAT, + TOK_PLAT_PREFIX, + TOK_CLAT_PREFIX, + /* NPTv6 tokens */ TOK_NPTV6, TOK_INTPREFIX, @@ -387,6 +392,7 @@ void ipfw_flush(int force); void ipfw_zero(int ac, char *av[], int optname); void ipfw_list(int ac, char *av[], int show_counters); void ipfw_internal_handler(int ac, char *av[]); +void ipfw_nat64clat_handler(int ac, char *av[]); void ipfw_nat64lsn_handler(int ac, char *av[]); void ipfw_nat64stl_handler(int ac, char *av[]); void ipfw_nptv6_handler(int ac, char *av[]); Modified: stable/12/sbin/ipfw/main.c ============================================================================== --- stable/12/sbin/ipfw/main.c Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sbin/ipfw/main.c Sun Apr 14 10:44:06 2019 (r346200) @@ -429,6 +429,8 @@ ipfw_main(int oldac, char **oldav) if (co.use_set || try_next) { if (_substrcmp(*av, "delete") == 0) ipfw_delete(av); + else if (!strncmp(*av, "nat64clat", strlen(*av))) + ipfw_nat64clat_handler(ac, av); else if (!strncmp(*av, "nat64stl", strlen(*av))) ipfw_nat64stl_handler(ac, av); else if (!strncmp(*av, "nat64lsn", strlen(*av))) Copied: stable/12/sbin/ipfw/nat64clat.c (from r345264, head/sbin/ipfw/nat64clat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sbin/ipfw/nat64clat.c Sun Apr 14 10:44:06 2019 (r346200, copy of r345264, head/sbin/ipfw/nat64clat.c) @@ -0,0 +1,535 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Yandex LLC + * Copyright (c) 2019 Andrey V. Elsukov + * Copyright (c) 2019 Boris N. Lytochkin + * + * 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 ``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 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 "ipfw2.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +typedef int (nat64clat_cb_t)(ipfw_nat64clat_cfg *i, const char *name, + uint8_t set); +static int nat64clat_foreach(nat64clat_cb_t *f, const char *name, uint8_t set, + int sort); + +static void nat64clat_create(const char *name, uint8_t set, int ac, char **av); +static void nat64clat_config(const char *name, uint8_t set, int ac, char **av); +static void nat64clat_destroy(const char *name, uint8_t set); +static void nat64clat_stats(const char *name, uint8_t set); +static void nat64clat_reset_stats(const char *name, uint8_t set); +static int nat64clat_show_cb(ipfw_nat64clat_cfg *cfg, const char *name, + uint8_t set); +static int nat64clat_destroy_cb(ipfw_nat64clat_cfg *cfg, const char *name, + uint8_t set); + +static struct _s_x nat64cmds[] = { + { "create", TOK_CREATE }, + { "config", TOK_CONFIG }, + { "destroy", TOK_DESTROY }, + { "list", TOK_LIST }, + { "show", TOK_LIST }, + { "stats", TOK_STATS }, + { NULL, 0 } +}; + +static struct _s_x nat64statscmds[] = { + { "reset", TOK_RESET }, + { NULL, 0 } +}; + +/* + * This one handles all nat64clat-related commands + * ipfw [set N] nat64clat NAME {create | config} ... + * ipfw [set N] nat64clat NAME stats [reset] + * ipfw [set N] nat64clat {NAME | all} destroy + * ipfw [set N] nat64clat {NAME | all} {list | show} + */ +#define nat64clat_check_name table_check_name +void +ipfw_nat64clat_handler(int ac, char *av[]) +{ + const char *name; + int tcmd; + uint8_t set; + + if (co.use_set != 0) + set = co.use_set - 1; + else + set = 0; + ac--; av++; + + NEED1("nat64clat needs instance name"); + name = *av; + if (nat64clat_check_name(name) != 0) { + if (strcmp(name, "all") == 0) + name = NULL; + else + errx(EX_USAGE, "nat64clat instance name %s is invalid", + name); + } + ac--; av++; + NEED1("nat64clat needs command"); + + tcmd = get_token(nat64cmds, *av, "nat64clat command"); + if (name == NULL && tcmd != TOK_DESTROY && tcmd != TOK_LIST) + errx(EX_USAGE, "nat64clat instance name required"); + switch (tcmd) { + case TOK_CREATE: + ac--; av++; + nat64clat_create(name, set, ac, av); + break; + case TOK_CONFIG: + ac--; av++; + nat64clat_config(name, set, ac, av); + break; + case TOK_LIST: + nat64clat_foreach(nat64clat_show_cb, name, set, 1); + break; + case TOK_DESTROY: + if (name == NULL) + nat64clat_foreach(nat64clat_destroy_cb, NULL, set, 0); + else + nat64clat_destroy(name, set); + break; + case TOK_STATS: + ac--; av++; + if (ac == 0) { + nat64clat_stats(name, set); + break; + } + tcmd = get_token(nat64statscmds, *av, "stats command"); + if (tcmd == TOK_RESET) + nat64clat_reset_stats(name, set); + } +} + + +static void +nat64clat_fill_ntlv(ipfw_obj_ntlv *ntlv, const char *name, uint8_t set) +{ + + ntlv->head.type = IPFW_TLV_EACTION_NAME(1); /* it doesn't matter */ + ntlv->head.length = sizeof(ipfw_obj_ntlv); + ntlv->idx = 1; + ntlv->set = set; + strlcpy(ntlv->name, name, sizeof(ntlv->name)); +} + +static struct _s_x nat64newcmds[] = { + { "plat_prefix", TOK_PLAT_PREFIX }, + { "clat_prefix", TOK_CLAT_PREFIX }, + { "log", TOK_LOG }, + { "-log", TOK_LOGOFF }, + { "allow_private", TOK_PRIVATE }, + { "-allow_private", TOK_PRIVATEOFF }, + { NULL, 0 } +}; + +/* + * Creates new nat64clat instance + * ipfw nat64clat create clat_prefix plat_prefix + * Request: [ ipfw_obj_lheader ipfw_nat64clat_cfg ] + */ +#define NAT64CLAT_HAS_CLAT_PREFIX 0x01 +#define NAT64CLAT_HAS_PLAT_PREFIX 0x02 +static void +nat64clat_create(const char *name, uint8_t set, int ac, char *av[]) +{ + char buf[sizeof(ipfw_obj_lheader) + sizeof(ipfw_nat64clat_cfg)]; + ipfw_nat64clat_cfg *cfg; + ipfw_obj_lheader *olh; + int tcmd, flags; + char *p; + struct in6_addr prefix; + uint8_t plen; + + memset(buf, 0, sizeof(buf)); + olh = (ipfw_obj_lheader *)buf; + cfg = (ipfw_nat64clat_cfg *)(olh + 1); + + /* Some reasonable defaults */ + inet_pton(AF_INET6, "64:ff9b::", &cfg->plat_prefix); + cfg->plat_plen = 96; + cfg->set = set; + flags = NAT64CLAT_HAS_PLAT_PREFIX; + while (ac > 0) { + tcmd = get_token(nat64newcmds, *av, "option"); + ac--; av++; + + switch (tcmd) { + case TOK_PLAT_PREFIX: + case TOK_CLAT_PREFIX: + if (tcmd == TOK_PLAT_PREFIX) { + NEED1("IPv6 plat_prefix required"); + } else { + NEED1("IPv6 clat_prefix required"); + } + + if ((p = strchr(*av, '/')) != NULL) + *p++ = '\0'; + if (inet_pton(AF_INET6, *av, &prefix) != 1) + errx(EX_USAGE, + "Bad prefix: %s", *av); + plen = strtol(p, NULL, 10); + if (ipfw_check_nat64prefix(&prefix, plen) != 0) + errx(EX_USAGE, + "Bad prefix length: %s", p); + if (tcmd == TOK_PLAT_PREFIX) { + flags |= NAT64CLAT_HAS_PLAT_PREFIX; + cfg->plat_prefix = prefix; + cfg->plat_plen = plen; + } else { + flags |= NAT64CLAT_HAS_CLAT_PREFIX; + cfg->clat_prefix = prefix; + cfg->clat_plen = plen; + } + ac--; av++; + break; + case TOK_LOG: + cfg->flags |= NAT64_LOG; + break; + case TOK_LOGOFF: + cfg->flags &= ~NAT64_LOG; + break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; + } + } + + /* Check validness */ + if ((flags & NAT64CLAT_HAS_PLAT_PREFIX) != NAT64CLAT_HAS_PLAT_PREFIX) + errx(EX_USAGE, "plat_prefix required"); + if ((flags & NAT64CLAT_HAS_CLAT_PREFIX) != NAT64CLAT_HAS_CLAT_PREFIX) + errx(EX_USAGE, "clat_prefix required"); + + olh->count = 1; + olh->objsize = sizeof(*cfg); + olh->size = sizeof(buf); + strlcpy(cfg->name, name, sizeof(cfg->name)); + if (do_set3(IP_FW_NAT64CLAT_CREATE, &olh->opheader, sizeof(buf)) != 0) + err(EX_OSERR, "nat64clat instance creation failed"); +} + +/* + * Configures existing nat64clat instance + * ipfw nat64clat config + * Request: [ ipfw_obj_header ipfw_nat64clat_cfg ] + */ +static void +nat64clat_config(const char *name, uint8_t set, int ac, char **av) +{ + char buf[sizeof(ipfw_obj_header) + sizeof(ipfw_nat64clat_cfg)]; + ipfw_nat64clat_cfg *cfg; + ipfw_obj_header *oh; + char *opt; + char *p; + size_t sz; + int tcmd; + struct in6_addr prefix; + uint8_t plen; + + if (ac == 0) + errx(EX_USAGE, "config options required"); + memset(&buf, 0, sizeof(buf)); + oh = (ipfw_obj_header *)buf; + cfg = (ipfw_nat64clat_cfg *)(oh + 1); + sz = sizeof(buf); + + nat64clat_fill_ntlv(&oh->ntlv, name, set); + if (do_get3(IP_FW_NAT64CLAT_CONFIG, &oh->opheader, &sz) != 0) + err(EX_OSERR, "failed to get config for instance %s", name); + + while (ac > 0) { + tcmd = get_token(nat64newcmds, *av, "option"); + opt = *av; + ac--; av++; + + switch (tcmd) { + case TOK_PLAT_PREFIX: + case TOK_CLAT_PREFIX: + if (tcmd == TOK_PLAT_PREFIX) { + NEED1("IPv6 plat_prefix required"); + } else { + NEED1("IPv6 clat_prefix required"); + } + + if ((p = strchr(*av, '/')) != NULL) + *p++ = '\0'; + if (inet_pton(AF_INET6, *av, &prefix) != 1) + errx(EX_USAGE, + "Bad prefix: %s", *av); + plen = strtol(p, NULL, 10); + if (ipfw_check_nat64prefix(&prefix, plen) != 0) + errx(EX_USAGE, + "Bad prefix length: %s", p); + if (tcmd == TOK_PLAT_PREFIX) { + cfg->plat_prefix = prefix; + cfg->plat_plen = plen; + } else { + cfg->clat_prefix = prefix; + cfg->clat_plen = plen; + } + ac--; av++; + break; + case TOK_LOG: + cfg->flags |= NAT64_LOG; + break; + case TOK_LOGOFF: + cfg->flags &= ~NAT64_LOG; + break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; + default: + errx(EX_USAGE, "Can't change %s option", opt); + } + } + + if (do_set3(IP_FW_NAT64CLAT_CONFIG, &oh->opheader, sizeof(buf)) != 0) + err(EX_OSERR, "nat64clat instance configuration failed"); +} + +/* + * Destroys nat64clat instance. + * Request: [ ipfw_obj_header ] + */ +static void +nat64clat_destroy(const char *name, uint8_t set) +{ + ipfw_obj_header oh; + + memset(&oh, 0, sizeof(oh)); + nat64clat_fill_ntlv(&oh.ntlv, name, set); + if (do_set3(IP_FW_NAT64CLAT_DESTROY, &oh.opheader, sizeof(oh)) != 0) + err(EX_OSERR, "failed to destroy nat instance %s", name); +} + +/* + * Get nat64clat instance statistics. + * Request: [ ipfw_obj_header ] + * Reply: [ ipfw_obj_header ipfw_obj_ctlv [ uint64_t x N ] ] + */ +static int +nat64clat_get_stats(const char *name, uint8_t set, + struct ipfw_nat64clat_stats *stats) +{ + ipfw_obj_header *oh; + ipfw_obj_ctlv *oc; + size_t sz; + + sz = sizeof(*oh) + sizeof(*oc) + sizeof(*stats); + oh = calloc(1, sz); + nat64clat_fill_ntlv(&oh->ntlv, name, set); + if (do_get3(IP_FW_NAT64CLAT_STATS, &oh->opheader, &sz) == 0) { + oc = (ipfw_obj_ctlv *)(oh + 1); + memcpy(stats, oc + 1, sizeof(*stats)); + free(oh); + return (0); + } + free(oh); + return (-1); +} + +static void +nat64clat_stats(const char *name, uint8_t set) +{ + struct ipfw_nat64clat_stats stats; + + if (nat64clat_get_stats(name, set, &stats) != 0) + err(EX_OSERR, "Error retrieving stats"); + + if (co.use_set != 0 || set != 0) + printf("set %u ", set); + printf("nat64clat %s\n", name); + + printf("\t%ju packets translated from IPv6 to IPv4\n", + (uintmax_t)stats.opcnt64); + printf("\t%ju packets translated from IPv4 to IPv6\n", + (uintmax_t)stats.opcnt46); + printf("\t%ju IPv6 fragments created\n", + (uintmax_t)stats.ofrags); + printf("\t%ju IPv4 fragments received\n", + (uintmax_t)stats.ifrags); + printf("\t%ju output packets dropped due to no bufs, etc.\n", + (uintmax_t)stats.oerrors); + printf("\t%ju output packets discarded due to no IPv4 route\n", + (uintmax_t)stats.noroute4); + printf("\t%ju output packets discarded due to no IPv6 route\n", + (uintmax_t)stats.noroute6); + printf("\t%ju packets discarded due to unsupported protocol\n", + (uintmax_t)stats.noproto); + printf("\t%ju packets discarded due to memory allocation problems\n", + (uintmax_t)stats.nomem); + printf("\t%ju packets discarded due to some errors\n", + (uintmax_t)stats.dropped); +} + +/* + * Reset nat64clat instance statistics specified by @oh->ntlv. + * Request: [ ipfw_obj_header ] + */ +static void +nat64clat_reset_stats(const char *name, uint8_t set) +{ + ipfw_obj_header oh; + + memset(&oh, 0, sizeof(oh)); + nat64clat_fill_ntlv(&oh.ntlv, name, set); + if (do_set3(IP_FW_NAT64CLAT_RESET_STATS, &oh.opheader, sizeof(oh)) != 0) + err(EX_OSERR, "failed to reset stats for instance %s", name); +} + +static int +nat64clat_show_cb(ipfw_nat64clat_cfg *cfg, const char *name, uint8_t set) +{ + char plat_buf[INET6_ADDRSTRLEN], clat_buf[INET6_ADDRSTRLEN]; + + if (name != NULL && strcmp(cfg->name, name) != 0) + return (ESRCH); + + if (co.use_set != 0 && cfg->set != set) + return (ESRCH); + + if (co.use_set != 0 || cfg->set != 0) + printf("set %u ", cfg->set); + + inet_ntop(AF_INET6, &cfg->clat_prefix, clat_buf, sizeof(clat_buf)); + inet_ntop(AF_INET6, &cfg->plat_prefix, plat_buf, sizeof(plat_buf)); + printf("nat64clat %s clat_prefix %s/%u plat_prefix %s/%u", + cfg->name, clat_buf, cfg->clat_plen, plat_buf, cfg->plat_plen); + if (cfg->flags & NAT64_LOG) + printf(" log"); + if (cfg->flags & NAT64_ALLOW_PRIVATE) + printf(" allow_private"); + printf("\n"); + return (0); +} + +static int +nat64clat_destroy_cb(ipfw_nat64clat_cfg *cfg, const char *name, uint8_t set) +{ + + if (co.use_set != 0 && cfg->set != set) + return (ESRCH); + + nat64clat_destroy(cfg->name, cfg->set); + return (0); +} + + +/* + * Compare nat64clat instances names. + * Honor number comparison. + */ +static int +nat64name_cmp(const void *a, const void *b) +{ + ipfw_nat64clat_cfg *ca, *cb; + + ca = (ipfw_nat64clat_cfg *)a; + cb = (ipfw_nat64clat_cfg *)b; + + if (ca->set > cb->set) + return (1); + else if (ca->set < cb->set) + return (-1); + return (stringnum_cmp(ca->name, cb->name)); +} + +/* + * Retrieves nat64clat instance list from kernel, + * optionally sorts it and calls requested function for each instance. + * + * Request: [ ipfw_obj_lheader ] + * Reply: [ ipfw_obj_lheader ipfw_nat64clat_cfg x N ] + */ +static int +nat64clat_foreach(nat64clat_cb_t *f, const char *name, uint8_t set, int sort) +{ + ipfw_obj_lheader *olh; + ipfw_nat64clat_cfg *cfg; + size_t sz; + int i, error; + + /* Start with reasonable default */ + sz = sizeof(*olh) + 16 * sizeof(*cfg); + for (;;) { + if ((olh = calloc(1, sz)) == NULL) + return (ENOMEM); + + olh->size = sz; + if (do_get3(IP_FW_NAT64CLAT_LIST, &olh->opheader, &sz) != 0) { + sz = olh->size; + free(olh); + if (errno != ENOMEM) + return (errno); + continue; + } + + if (sort != 0) + qsort(olh + 1, olh->count, olh->objsize, + nat64name_cmp); + + cfg = (ipfw_nat64clat_cfg *)(olh + 1); + for (i = 0; i < olh->count; i++) { + error = f(cfg, name, set); /* Ignore errors for now */ + cfg = (ipfw_nat64clat_cfg *)((caddr_t)cfg + + olh->objsize); + } + free(olh); + break; + } + return (0); +} + Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sys/conf/files Sun Apr 14 10:44:06 2019 (r346200) @@ -4443,6 +4443,10 @@ netpfil/ipfw/ip_fw_iface.c optional inet ipfirewall netpfil/ipfw/ip_fw_nat.c optional inet ipfirewall_nat netpfil/ipfw/nat64/ip_fw_nat64.c optional inet inet6 ipfirewall \ ipfirewall_nat64 +netpfil/ipfw/nat64/nat64clat.c optional inet inet6 ipfirewall \ + ipfirewall_nat64 +netpfil/ipfw/nat64/nat64clat_control.c optional inet inet6 ipfirewall \ + ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn_control.c optional inet inet6 ipfirewall \ Modified: stable/12/sys/modules/ipfw_nat64/Makefile ============================================================================== --- stable/12/sys/modules/ipfw_nat64/Makefile Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sys/modules/ipfw_nat64/Makefile Sun Apr 14 10:44:06 2019 (r346200) @@ -4,6 +4,7 @@ KMOD= ipfw_nat64 SRCS= ip_fw_nat64.c nat64_translate.c +SRCS+= nat64clat.c nat64clat_control.c SRCS+= nat64lsn.c nat64lsn_control.c SRCS+= nat64stl.c nat64stl_control.c Modified: stable/12/sys/netinet/ip_fw.h ============================================================================== --- stable/12/sys/netinet/ip_fw.h Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sys/netinet/ip_fw.h Sun Apr 14 10:44:06 2019 (r346200) @@ -134,6 +134,13 @@ typedef struct _ip_fw3_opheader { #define IP_FW_NPTV6_STATS 154 /* Get NPTv6 instance statistics */ #define IP_FW_NPTV6_RESET_STATS 155 /* Reset NPTv6 instance statistics */ +#define IP_FW_NAT64CLAT_CREATE 160 /* Create clat NAT64 instance */ +#define IP_FW_NAT64CLAT_DESTROY 161 /* Destroy clat NAT64 instance */ +#define IP_FW_NAT64CLAT_CONFIG 162 /* Modify clat NAT64 instance */ +#define IP_FW_NAT64CLAT_LIST 163 /* List clat NAT64 instances */ +#define IP_FW_NAT64CLAT_STATS 164 /* Get NAT64CLAT instance statistics */ +#define IP_FW_NAT64CLAT_RESET_STATS 165 /* Reset NAT64CLAT instance statistics */ + /* * The kernel representation of ipfw rules is made of a list of * 'instructions' (for all practical purposes equivalent to BPF Modified: stable/12/sys/netinet6/ip_fw_nat64.h ============================================================================== --- stable/12/sys/netinet6/ip_fw_nat64.h Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sys/netinet6/ip_fw_nat64.h Sun Apr 14 10:44:06 2019 (r346200) @@ -45,6 +45,19 @@ struct ipfw_nat64stl_stats { uint64_t dropped; /* dropped due to some errors */ }; +struct ipfw_nat64clat_stats { + uint64_t opcnt64; /* 6to4 of packets translated */ + uint64_t opcnt46; /* 4to6 of packets translated */ + uint64_t ofrags; /* number of fragments generated */ + uint64_t ifrags; /* number of fragments received */ + uint64_t oerrors; /* number of output errors */ + uint64_t noroute4; + uint64_t noroute6; + uint64_t noproto; /* Protocol not supported */ + uint64_t nomem; /* mbuf allocation failed */ + uint64_t dropped; /* dropped due to some errors */ +}; + struct ipfw_nat64lsn_stats { uint64_t opcnt64; /* 6to4 of packets translated */ uint64_t opcnt46; /* 4to6 of packets translated */ @@ -94,6 +107,17 @@ typedef struct _ipfw_nat64stl_cfg { uint8_t spare[2]; uint32_t flags; } ipfw_nat64stl_cfg; + +typedef struct _ipfw_nat64clat_cfg { + char name[64]; /* NAT name */ + struct in6_addr plat_prefix; /* NAT64 (PLAT) prefix */ + struct in6_addr clat_prefix; /* Client (CLAT) prefix */ + uint8_t plat_plen; /* PLAT Prefix length */ + uint8_t clat_plen; /* CLAT Prefix length */ + uint8_t set; /* Named instance set [0..31] */ + uint8_t spare; + uint32_t flags; +} ipfw_nat64clat_cfg; /* * NAT64LSN default configuration values Modified: stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 10:44:06 2019 (r346200) @@ -86,9 +86,15 @@ vnet_ipfw_nat64_init(const void *arg __unused) error = nat64stl_init(ch, first); if (error != 0) return (error); + error = nat64clat_init(ch, first); + if (error != 0) { + nat64stl_uninit(ch, first); + return (error); + } error = nat64lsn_init(ch, first); if (error != 0) { nat64stl_uninit(ch, first); + nat64clat_uninit(ch, first); return (error); } return (0); @@ -103,6 +109,7 @@ vnet_ipfw_nat64_uninit(const void *arg __unused) ch = &V_layer3_chain; last = IS_DEFAULT_VNET(curvnet) ? 1: 0; nat64stl_uninit(ch, last); + nat64clat_uninit(ch, last); nat64lsn_uninit(ch, last); return (0); } Modified: stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 10:40:43 2019 (r346199) +++ stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 10:44:06 2019 (r346200) @@ -54,5 +54,7 @@ int nat64stl_init(struct ip_fw_chain *ch, int first); void nat64stl_uninit(struct ip_fw_chain *ch, int last); int nat64lsn_init(struct ip_fw_chain *ch, int first); void nat64lsn_uninit(struct ip_fw_chain *ch, int last); +int nat64clat_init(struct ip_fw_chain *ch, int first); +void nat64clat_uninit(struct ip_fw_chain *ch, int last); #endif /* _IP_FW_NAT64_H_ */ Copied: stable/12/sys/netpfil/ipfw/nat64/nat64clat.c (from r345264, head/sys/netpfil/ipfw/nat64/nat64clat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/netpfil/ipfw/nat64/nat64clat.c Sun Apr 14 10:44:06 2019 (r346200, copy of r345264, head/sys/netpfil/ipfw/nat64/nat64clat.c) @@ -0,0 +1,255 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Yandex LLC + * Copyright (c) 2019 Andrey V. Elsukov + * Copyright (c) 2019 Boris N. Lytochkin + * + * 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 ``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 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 +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "nat64clat.h" + +#define NAT64_LOOKUP(chain, cmd) \ + (struct nat64clat_cfg *)SRV_OBJECT((chain), (cmd)->arg1) + +static void +nat64clat_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, + uint32_t kidx) +{ + static uint32_t pktid = 0; + + memset(plog, 0, sizeof(*plog)); + plog->length = PFLOG_REAL_HDRLEN; + plog->af = family; + plog->action = PF_NAT; + plog->dir = PF_IN; + plog->rulenr = htonl(kidx); + pktid++; + plog->subrulenr = htonl(pktid); + plog->ruleset[0] = '\0'; + strlcpy(plog->ifname, "NAT64CLAT", sizeof(plog->ifname)); + ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); +} + +static int +nat64clat_handle_ip4(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg, + struct mbuf *m) +{ + struct pfloghdr loghdr, *logdata; + struct in6_addr saddr, daddr; + struct ip *ip; + + ip = mtod(m, struct ip*); + /* source address for CLAT may be private with no harm */ + if (nat64_check_ip4(ip->ip_src.s_addr) != 0 || + nat64_check_ip4(ip->ip_dst.s_addr) != 0 || + nat64_check_private_ip4(&cfg->base, ip->ip_dst.s_addr) != 0) + return (NAT64SKIP); + + memcpy(&saddr, &cfg->base.clat_prefix, sizeof(saddr)); + nat64_embed_ip4(&saddr, cfg->base.clat_plen, ip->ip_src.s_addr); + memcpy(&daddr, &cfg->base.plat_prefix, sizeof(daddr)); + nat64_embed_ip4(&daddr, cfg->base.plat_plen, ip->ip_dst.s_addr); + if (cfg->base.flags & NAT64_LOG) { + logdata = &loghdr; + nat64clat_log(logdata, m, AF_INET, cfg->no.kidx); + } else + logdata = NULL; + return (nat64_do_handle_ip4(m, &saddr, &daddr, 0, &cfg->base, + logdata)); +} + +static int +nat64clat_handle_ip6(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg, + struct mbuf *m) +{ + struct pfloghdr loghdr, *logdata; + struct ip6_hdr *ip6; + uint32_t aaddr; + + /* + * NOTE: we expect ipfw_chk() did m_pullup() up to upper level + * protocol's headers. Also we skip some checks, that ip6_input(), + * ip6_forward(), ip6_fastfwd() and ipfw_chk() already did. + */ + ip6 = mtod(m, struct ip6_hdr *); + /* Check ip6_dst matches configured prefix */ + if (memcmp(&ip6->ip6_dst, &cfg->base.clat_prefix, + cfg->base.clat_plen / 8) != 0) + return (NAT64SKIP); + /* Check ip6_src matches configured prefix */ + if (memcmp(&ip6->ip6_src, &cfg->base.plat_prefix, + cfg->base.plat_plen / 8) != 0) + return (NAT64SKIP); + + if (cfg->base.flags & NAT64_LOG) { + logdata = &loghdr; + nat64clat_log(logdata, m, AF_INET6, cfg->no.kidx); + } else + logdata = NULL; + + aaddr = nat64_extract_ip4(&ip6->ip6_src, cfg->base.plat_plen); + return (nat64_do_handle_ip6(m, aaddr, 0, &cfg->base, logdata)); +} + +static int +nat64clat_handle_icmp6(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg, + struct mbuf *m) +{ + struct pfloghdr loghdr, *logdata; + struct nat64_counters *stats; + struct ip6_hdr *ip6i; + struct icmp6_hdr *icmp6; + uint32_t daddr; + int hlen, proto; + + hlen = 0; + stats = &cfg->base.stats; + proto = nat64_getlasthdr(m, &hlen); + if (proto != IPPROTO_ICMPV6) { + NAT64STAT_INC(stats, dropped); + return (NAT64MFREE); + } + icmp6 = mtodo(m, hlen); + switch (icmp6->icmp6_type) { + case ICMP6_DST_UNREACH: + case ICMP6_PACKET_TOO_BIG: + case ICMP6_TIME_EXCEED_TRANSIT: + case ICMP6_PARAM_PROB: + break; + default: + NAT64STAT_INC(stats, dropped); + return (NAT64MFREE); + } + hlen += sizeof(struct icmp6_hdr); + if (m->m_pkthdr.len < hlen + sizeof(struct ip6_hdr) + ICMP_MINLEN) { + NAT64STAT_INC(stats, dropped); + return (NAT64MFREE); + } + if (m->m_len < hlen + sizeof(struct ip6_hdr) + ICMP_MINLEN) + m = m_pullup(m, hlen + sizeof(struct ip6_hdr) + ICMP_MINLEN); + if (m == NULL) { + NAT64STAT_INC(stats, nomem); + return (NAT64RETURN); + } + /* + * Use destination address from inner IPv6 header to determine + * IPv4 mapped address. + */ + ip6i = mtodo(m, hlen); + daddr = nat64_extract_ip4(&ip6i->ip6_dst, cfg->base.clat_plen); + if (daddr == 0) { + NAT64STAT_INC(stats, dropped); + return (NAT64MFREE); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Apr 14 11:06:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6567157156E; Sun, 14 Apr 2019 11:06:43 +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 5A63C8BB68; Sun, 14 Apr 2019 11:06:43 +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 2D6491F912; Sun, 14 Apr 2019 11:06:43 +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 x3EB6hI4004762; Sun, 14 Apr 2019 11:06:43 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EB6gcA004755; Sun, 14 Apr 2019 11:06:42 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141106.x3EB6gcA004755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 11:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346201 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 346201 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5A63C8BB68 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 11:06:44 -0000 Author: ae Date: Sun Apr 14 11:06:42 2019 New Revision: 346201 URL: https://svnweb.freebsd.org/changeset/base/346201 Log: MFC r342908: Reduce the size of struct ip_fw_args from 240 to 128 bytes on amd64. And refactor the code to avoid unneeded initialization to reduce overhead of per-packet processing. ipfw(4) can be invoked by pfil(9) framework for each packet several times. Each call uses on-stack variable of type struct ip_fw_args to keep the state of ipfw(4) processing. Currently this variable has 240 bytes size on amd64. Each time ipfw(4) does bzero() on it, and then it initializes some fields. glebius@ has reported that they at Netflix discovered, that initialization of this variable produces significant overhead on packet processing. After patching I managed to increase performance of packet processing on simple routing with ipfw(4) firewalling to about 11% from 9.8Mpps up to 11Mpps (Xeon E5-2660 v4@ + Mellanox 100G card). Introduced new field flags, it is used to keep track of what fields was initialized. Some fields were moved into the anonymous union, to reduce the size. They all are mutually exclusive. dummypar field was unused, and therefore it is removed. The hopstore6 field type was changed from sockaddr_in6 to a bit smaller struct ip_fw_nh6. And now the size of struct ip_fw_args is 128 bytes. ipfw_chk() was modified to properly handle ip_fw_args.flags instead of rely on checking for NULL pointers. Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D18690 MFC r342909: Fix the build with INVARIANTS. MFC r343551: Fix the bug introduced in r342908, that causes problems with dynamic handling for protocols without ports numbers. Since port numbers were uninitialized for protocols like ICMP/ICMPv6, ipfw_chk() used some non-zero values to create dynamic states, and due this it failed to match replies with created states. Reported by: Oliver Hartmann, Boris Lytochkin Obtained from: Yandex LLC Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c stable/11/sys/netpfil/ipfw/ip_fw_log.c stable/11/sys/netpfil/ipfw/ip_fw_pfil.c stable/11/sys/netpfil/ipfw/ip_fw_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Sun Apr 14 10:44:06 2019 (r346200) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Sun Apr 14 11:06:42 2019 (r346201) @@ -1189,6 +1189,7 @@ set_match(struct ip_fw_args *args, int slot, args->rule.slot = slot + 1; /* we use 0 as a marker */ args->rule.rule_id = 1 + chain->map[slot]->id; args->rule.rulenum = chain->map[slot]->rulenum; + args->flags |= IPFW_ARGS_REF; } #ifndef LINEAR_SKIPTO @@ -1374,17 +1375,12 @@ ipfw_chk(struct ip_fw_args *args) * Only valid for IPv4 packets. */ uint8_t proto; - uint16_t src_port = 0, dst_port = 0; /* NOTE: host format */ + uint16_t src_port, dst_port; /* NOTE: host format */ struct in_addr src_ip, dst_ip; /* NOTE: network format */ int iplen = 0; int pktlen; - uint16_t etype = 0; /* Host order stored ether type */ + uint16_t etype; /* Host order stored ether type */ - /* - * dyn_dir = MATCH_UNKNOWN when rules unchecked, - * MATCH_NONE when checked and not matched (q = NULL), - * MATCH_FORWARD or MATCH_REVERSE otherwise (q != NULL) - */ struct ipfw_dyn_info dyn_info; struct ip_fw *q = NULL; struct ip_fw_chain *chain = &V_layer3_chain; @@ -1412,10 +1408,8 @@ ipfw_chk(struct ip_fw_args *args) dst_ip.s_addr = 0; /* make sure it is initialized */ src_ip.s_addr = 0; /* make sure it is initialized */ + src_port = dst_port = 0; pktlen = m->m_pkthdr.len; - args->f_id.fib = M_GETFIB(m); /* note mbuf not altered) */ - proto = args->f_id.proto = 0; /* mark f_id invalid */ - /* XXX 0 is a valid proto: IP/IPv6 Hop-by-Hop Option */ DYN_INFO_INIT(&dyn_info); /* @@ -1439,18 +1433,19 @@ do { \ /* * if we have an ether header, */ - if (args->eh) + if (args->flags & IPFW_ARGS_ETHER) etype = ntohs(args->eh->ether_type); + else + etype = 0; /* Identify IP packets and fill up variables. */ if (pktlen >= sizeof(struct ip6_hdr) && - (args->eh == NULL || etype == ETHERTYPE_IPV6) && ip->ip_v == 6) { + (etype == 0 || etype == ETHERTYPE_IPV6) && ip->ip_v == 6) { struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; + is_ipv6 = 1; - args->f_id.addr_type = 6; hlen = sizeof(struct ip6_hdr); proto = ip6->ip6_nxt; - /* Search extension headers to find upper layer protocols */ while (ulp == NULL && offset == 0) { switch (proto) { @@ -1623,20 +1618,18 @@ do { \ } ip = mtod(m, struct ip *); ip6 = (struct ip6_hdr *)ip; + args->f_id.addr_type = 6; args->f_id.src_ip6 = ip6->ip6_src; args->f_id.dst_ip6 = ip6->ip6_dst; - args->f_id.src_ip = 0; - args->f_id.dst_ip = 0; args->f_id.flow_id6 = ntohl(ip6->ip6_flow); iplen = ntohs(ip6->ip6_plen) + sizeof(*ip6); } else if (pktlen >= sizeof(struct ip) && - (args->eh == NULL || etype == ETHERTYPE_IP) && ip->ip_v == 4) { - is_ipv4 = 1; + (etype == 0 || etype == ETHERTYPE_IP) && ip->ip_v == 4) { + is_ipv4 = 1; hlen = ip->ip_hl << 2; - args->f_id.addr_type = 4; - /* - * Collect parameters into local variables for faster matching. + * Collect parameters into local variables for faster + * matching. */ proto = ip->ip_p; src_ip = ip->ip_src; @@ -1689,23 +1682,30 @@ do { \ } ip = mtod(m, struct ip *); + args->f_id.addr_type = 4; args->f_id.src_ip = ntohl(src_ip.s_addr); args->f_id.dst_ip = ntohl(dst_ip.s_addr); + } else { + proto = 0; + dst_ip.s_addr = src_ip.s_addr = 0; + + args->f_id.addr_type = 1; /* XXX */ } #undef PULLUP_TO pktlen = iplen < pktlen ? iplen: pktlen; - if (proto) { /* we may have port numbers, store them */ - args->f_id.proto = proto; - args->f_id.src_port = src_port = ntohs(src_port); - args->f_id.dst_port = dst_port = ntohs(dst_port); - } + /* Properly initialize the rest of f_id */ + args->f_id.proto = proto; + args->f_id.src_port = src_port = ntohs(src_port); + args->f_id.dst_port = dst_port = ntohs(dst_port); + args->f_id.fib = M_GETFIB(m); + IPFW_PF_RLOCK(chain); if (! V_ipfw_vnet_ready) { /* shutting down, leave NOW. */ IPFW_PF_RUNLOCK(chain); return (IP_FW_PASS); /* accept */ } - if (args->rule.slot) { + if (args->flags & IPFW_ARGS_REF) { /* * Packet has already been tagged as a result of a previous * match on rule args->rule aka args->rule_id (PIPE, QUEUE, @@ -1833,7 +1833,7 @@ do { \ break; case O_MACADDR2: - if (args->eh != NULL) { /* have MAC header */ + if (args->flags & IPFW_ARGS_ETHER) { u_int32_t *want = (u_int32_t *) ((ipfw_insn_mac *)cmd)->addr; u_int32_t *mask = (u_int32_t *) @@ -1848,7 +1848,7 @@ do { \ break; case O_MAC_TYPE: - if (args->eh != NULL) { + if (args->flags & IPFW_ARGS_ETHER) { u_int16_t *p = ((ipfw_insn_u16 *)cmd)->ports; int i; @@ -1869,19 +1869,21 @@ do { \ break; case O_LAYER2: - match = (args->eh != NULL); + match = (args->flags & IPFW_ARGS_ETHER); break; case O_DIVERTED: - { - /* For diverted packets, args->rule.info + if ((args->flags & IPFW_ARGS_REF) == 0) + break; + /* + * For diverted packets, args->rule.info * contains the divert port (in host format) * reason and direction. */ - uint32_t i = args->rule.info; - match = (i&IPFW_IS_MASK) == IPFW_IS_DIVERT && - cmd->arg1 & ((i & IPFW_INFO_IN) ? 1 : 2); - } + match = ((args->rule.info & IPFW_IS_MASK) == + IPFW_IS_DIVERT) && ( + ((args->rule.info & IPFW_INFO_IN) ? + 1: 2) & cmd->arg1); break; case O_PROTO: @@ -2053,7 +2055,8 @@ do { \ #ifdef INET6 /* FALLTHROUGH */ case O_IP6_SRC_ME: - match= is_ipv6 && ipfw_localip6(&args->f_id.src_ip6); + match = is_ipv6 && + ipfw_localip6(&args->f_id.src_ip6); #endif break; @@ -2089,7 +2092,8 @@ do { \ #ifdef INET6 /* FALLTHROUGH */ case O_IP6_DST_ME: - match= is_ipv6 && ipfw_localip6(&args->f_id.dst_ip6); + match = is_ipv6 && + ipfw_localip6(&args->f_id.dst_ip6); #endif break; @@ -2687,8 +2691,8 @@ do { \ case O_DIVERT: case O_TEE: - if (args->eh) /* not on layer 2 */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not on layer 2 */ /* otherwise this is terminal */ l = 0; /* exit inner loop */ done = 1; /* exit outer loop */ @@ -2864,8 +2868,8 @@ do { \ break; case O_FORWARD_IP: - if (args->eh) /* not valid on layer2 pkts */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not valid on layer2 pkts */ if (q != f || dyn_info.direction == MATCH_FORWARD) { struct sockaddr_in *sa; @@ -2882,32 +2886,22 @@ do { \ * table_value as next_hop6 address. */ if (is_ipv6) { - struct sockaddr_in6 *sa6; + struct ip_fw_nh6 *nh6; - sa6 = args->next_hop6 = - &args->hopstore6; - sa6->sin6_family = AF_INET6; - sa6->sin6_len = sizeof(*sa6); - sa6->sin6_addr = TARG_VAL( + args->flags |= IPFW_ARGS_NH6; + nh6 = &args->hopstore6; + nh6->sin6_addr = TARG_VAL( chain, tablearg, nh6); - sa6->sin6_port = sa->sin_port; - /* - * Set sin6_scope_id only for - * link-local unicast addresses. - */ - if (IN6_IS_ADDR_LINKLOCAL( - &sa6->sin6_addr)) - sa6->sin6_scope_id = - TARG_VAL(chain, - tablearg, - zoneid); + nh6->sin6_port = sa->sin_port; + nh6->sin6_scope_id = TARG_VAL( + chain, tablearg, zoneid); } else #endif { + args->flags |= IPFW_ARGS_NH4; args->hopstore.sin_port = sa->sin_port; - sa = args->next_hop = - &args->hopstore; + sa = &args->hopstore; sa->sin_family = AF_INET; sa->sin_len = sizeof(*sa); sa->sin_addr.s_addr = htonl( @@ -2915,7 +2909,8 @@ do { \ nh4)); } } else { - args->next_hop = sa; + args->flags |= IPFW_ARGS_NH4PTR; + args->next_hop = sa; } } retval = IP_FW_PASS; @@ -2925,13 +2920,14 @@ do { \ #ifdef INET6 case O_FORWARD_IP6: - if (args->eh) /* not valid on layer2 pkts */ - break; + if (args->flags & IPFW_ARGS_ETHER) + break; /* not valid on layer2 pkts */ if (q != f || dyn_info.direction == MATCH_FORWARD) { struct sockaddr_in6 *sin6; sin6 = &(((ipfw_insn_sa6 *)cmd)->sa); + args->flags |= IPFW_ARGS_NH6PTR; args->next_hop6 = sin6; } retval = IP_FW_PASS; @@ -2960,7 +2956,7 @@ do { \ if (fib >= rt_numfibs) fib = 0; M_SETFIB(m, fib); - args->f_id.fib = fib; + args->f_id.fib = fib; /* XXX */ l = 0; /* exit inner loop */ break; } @@ -3007,6 +3003,7 @@ do { \ struct cfg_nat *t; int nat_id; + args->rule.info = 0; set_match(args, f_pos, chain); /* Check if this is 'global' nat rule */ if (cmd->arg1 == IP_FW_NAT44_GLOBAL) { @@ -3059,6 +3056,7 @@ do { \ else ip->ip_sum = in_cksum(m, hlen); retval = IP_FW_REASS; + args->rule.info = 0; set_match(args, f_pos, chain); } done = 1; /* exit outer loop */ Modified: stable/11/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_log.c Sun Apr 14 10:44:06 2019 (r346200) +++ stable/11/sys/netpfil/ipfw/ip_fw_log.c Sun Apr 14 11:06:42 2019 (r346201) @@ -105,7 +105,7 @@ ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u char action2[92], proto[128], fragment[32]; if (V_fw_verbose == 0) { - if (args->eh) /* layer2, use orig hdr */ + if (args->flags & IPFW_ARGS_ETHER) /* layer2, use orig hdr */ ipfw_bpf_mtap2(args->eh, ETHER_HDR_LEN, m); else { /* Add fake header. Later we will store Modified: stable/11/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_pfil.c Sun Apr 14 10:44:06 2019 (r346200) +++ stable/11/sys/netpfil/ipfw/ip_fw_pfil.c Sun Apr 14 11:06:42 2019 (r346201) @@ -124,13 +124,11 @@ ipfw_check_packet(void *arg, struct mbuf **m0, struct { struct ip_fw_args args; struct m_tag *tag; - int ipfw; - int ret; + int ipfw, ret; /* convert dir to IPFW values */ dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - bzero(&args, sizeof(args)); - + args.flags = 0; again: /* * extract and remove the tag if present. If we are left @@ -142,6 +140,7 @@ again: m_tag_delete(*m0, tag); if (args.rule.info & IPFW_ONEPASS) return (0); + args.flags |= IPFW_ARGS_REF; } args.m = *m0; @@ -155,53 +154,82 @@ again: __func__)); /* breaking out of the switch means drop */ - ret = 0; /* default return value for pass */ switch (ipfw) { case IP_FW_PASS: /* next_hop may be set by ipfw_chk */ - if (args.next_hop == NULL && args.next_hop6 == NULL) - break; /* pass */ + if ((args.flags & (IPFW_ARGS_NH4 | IPFW_ARGS_NH4PTR | + IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) == 0) { + ret = 0; + break; + } #if (!defined(INET6) && !defined(INET)) ret = EACCES; #else { - struct m_tag *fwd_tag; + void *psa; size_t len; - - KASSERT(args.next_hop == NULL || args.next_hop6 == NULL, - ("%s: both next_hop=%p and next_hop6=%p not NULL", __func__, - args.next_hop, args.next_hop6)); -#ifdef INET6 - if (args.next_hop6 != NULL) - len = sizeof(struct sockaddr_in6); -#endif #ifdef INET - if (args.next_hop != NULL) + if (args.flags & (IPFW_ARGS_NH4 | IPFW_ARGS_NH4PTR)) { + MPASS((args.flags & (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)) != (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)); + MPASS((args.flags & (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)) == 0); len = sizeof(struct sockaddr_in); -#endif - - /* Incoming packets should not be tagged so we do not + psa = (args.flags & IPFW_ARGS_NH4) ? + &args.hopstore : args.next_hop; + if (in_localip(satosin(psa)->sin_addr)) + (*m0)->m_flags |= M_FASTFWD_OURS; + (*m0)->m_flags |= M_IP_NEXTHOP; + } +#endif /* INET */ +#ifdef INET6 + if (args.flags & (IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) { + MPASS((args.flags & (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)) != (IPFW_ARGS_NH6 | + IPFW_ARGS_NH6PTR)); + MPASS((args.flags & (IPFW_ARGS_NH4 | + IPFW_ARGS_NH4PTR)) == 0); + len = sizeof(struct sockaddr_in6); + psa = args.next_hop6; + (*m0)->m_flags |= M_IP6_NEXTHOP; + } +#endif /* INET6 */ + /* + * Incoming packets should not be tagged so we do not * m_tag_find. Outgoing packets may be tagged, so we * reuse the tag if present. */ - fwd_tag = (dir == DIR_IN) ? NULL : + tag = (dir == DIR_IN) ? NULL : m_tag_find(*m0, PACKET_TAG_IPFORWARD, NULL); - if (fwd_tag != NULL) { - m_tag_unlink(*m0, fwd_tag); + if (tag != NULL) { + m_tag_unlink(*m0, tag); } else { - fwd_tag = m_tag_get(PACKET_TAG_IPFORWARD, len, + tag = m_tag_get(PACKET_TAG_IPFORWARD, len, M_NOWAIT); - if (fwd_tag == NULL) { + if (tag == NULL) { ret = EACCES; break; /* i.e. drop */ } } + if ((args.flags & IPFW_ARGS_NH6) == 0) + bcopy(psa, tag + 1, len); + m_tag_prepend(*m0, tag); + ret = 0; #ifdef INET6 - if (args.next_hop6 != NULL) { + /* IPv6 next hop needs additional handling */ + if (args.flags & (IPFW_ARGS_NH6 | IPFW_ARGS_NH6PTR)) { struct sockaddr_in6 *sa6; - sa6 = (struct sockaddr_in6 *)(fwd_tag + 1); - bcopy(args.next_hop6, sa6, len); + sa6 = satosin6(tag + 1); + if (args.flags & IPFW_ARGS_NH6) { + sa6->sin6_family = AF_INET6; + sa6->sin6_len = sizeof(*sa6); + sa6->sin6_addr = args.hopstore6.sin6_addr; + sa6->sin6_port = args.hopstore6.sin6_port; + sa6->sin6_scope_id = + args.hopstore6.sin6_scope_id; + } /* * If nh6 address is link-local we should convert * it to kernel internal form before doing any @@ -213,18 +241,8 @@ again: } if (in6_localip(&sa6->sin6_addr)) (*m0)->m_flags |= M_FASTFWD_OURS; - (*m0)->m_flags |= M_IP6_NEXTHOP; } -#endif -#ifdef INET - if (args.next_hop != NULL) { - bcopy(args.next_hop, (fwd_tag+1), len); - if (in_localip(args.next_hop->sin_addr)) - (*m0)->m_flags |= M_FASTFWD_OURS; - (*m0)->m_flags |= M_IP_NEXTHOP; - } -#endif - m_tag_prepend(*m0, fwd_tag); +#endif /* INET6 */ } #endif /* INET || INET6 */ break; @@ -237,6 +255,7 @@ again: ret = EACCES; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ + MPASS(args.flags & IPFW_ARGS_REF); if (mtod(*m0, struct ip *)->ip_v == 4) ret = ip_dn_io_ptr(m0, dir, &args); else if (mtod(*m0, struct ip *)->ip_v == 6) @@ -260,6 +279,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args.flags & IPFW_ARGS_REF); ret = ipfw_divert(m0, dir, &args.rule, (ipfw == IP_FW_TEE) ? 1 : 0); /* continue processing for the original packet (tee). */ @@ -273,6 +293,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args.flags & IPFW_ARGS_REF); ret = ng_ipfw_input_p(m0, dir, &args, (ipfw == IP_FW_NGTEE) ? 1 : 0); if (ipfw == IP_FW_NGTEE) /* ignore errors for NGTEE */ @@ -281,13 +302,15 @@ again: case IP_FW_NAT: /* honor one-pass in case of successful nat */ - if (V_fw_one_pass) - break; /* ret is already 0 */ + if (V_fw_one_pass) { + ret = 0; + break; + } goto again; case IP_FW_REASS: goto again; /* continue with packet */ - + case IP_FW_NAT64: ret = 0; break; @@ -302,7 +325,7 @@ again: *m0 = NULL; } - return ret; + return (ret); } /* @@ -312,15 +335,14 @@ int ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp) { - struct ether_header *eh; + struct ip_fw_args args; struct ether_header save_eh; + struct ether_header *eh; + struct m_tag *mtag; struct mbuf *m; int i, ret; - struct ip_fw_args args; - struct m_tag *mtag; - bzero(&args, sizeof(args)); - + args.flags = IPFW_ARGS_ETHER; again: /* fetch start point from rule, if any. remove the tag if present. */ mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); @@ -329,6 +351,7 @@ again: m_tag_delete(*m0, mtag); if (args.rule.info & IPFW_ONEPASS) return (0); + args.flags |= IPFW_ARGS_REF; } /* I need some amt of data to be contiguous */ @@ -347,10 +370,8 @@ again: args.m = m; /* the packet we are looking at */ args.oif = dir == PFIL_OUT ? ifp: NULL; /* destination, if any */ - args.next_hop = NULL; /* we do not support forward yet */ - args.next_hop6 = NULL; /* we do not support forward yet */ args.eh = &save_eh; /* MAC header for bridged/MAC packets */ - args.inp = NULL; /* used by ipfw uid/gid/jail rules */ + args.inp = inp; /* used by ipfw uid/gid/jail rules */ i = ipfw_chk(&args); m = args.m; if (m != NULL) { @@ -381,14 +402,14 @@ again: case IP_FW_DUMMYNET: ret = EACCES; - int dir2; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ *m0 = NULL; - dir2 = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - ip_dn_io_ptr(&m, dir2 | PROTO_LAYER2, &args); + dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; + MPASS(args.flags & IPFW_ARGS_REF); + ip_dn_io_ptr(&m, dir | PROTO_LAYER2, &args); return 0; case IP_FW_NGTEE: @@ -397,6 +418,7 @@ again: ret = EACCES; break; /* i.e. drop */ } + MPASS(args.flags & IPFW_ARGS_REF); ret = ng_ipfw_input_p(m0, (dir == PFIL_IN) ? DIR_IN : DIR_OUT, &args, (i == IP_FW_NGTEE) ? 1 : 0); if (i == IP_FW_NGTEE) /* ignore errors for NGTEE */ @@ -413,7 +435,7 @@ again: *m0 = NULL; } - return ret; + return (ret); } /* do the divert, return 1 on error 0 on success */ Modified: stable/11/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_private.h Sun Apr 14 10:44:06 2019 (r346200) +++ stable/11/sys/netpfil/ipfw/ip_fw_private.h Sun Apr 14 11:06:42 2019 (r346201) @@ -82,11 +82,13 @@ struct _ip6dn_args { * efficient to pass variables around and extend the interface. */ struct ip_fw_args { - struct mbuf *m; /* the mbuf chain */ - struct ifnet *oif; /* output interface */ - struct sockaddr_in *next_hop; /* forward address */ - struct sockaddr_in6 *next_hop6; /* ipv6 forward address */ - + uint32_t flags; +#define IPFW_ARGS_ETHER 0x0001 /* has valid ethernet header */ +#define IPFW_ARGS_NH4 0x0002 /* has IPv4 next hop in hopstore */ +#define IPFW_ARGS_NH6 0x0004 /* has IPv6 next hop in hopstore */ +#define IPFW_ARGS_NH4PTR 0x0008 /* has IPv4 next hop in next_hop */ +#define IPFW_ARGS_NH6PTR 0x0010 /* has IPv6 next hop in next_hop6 */ +#define IPFW_ARGS_REF 0x0020 /* has valid ipfw_rule_ref */ /* * On return, it points to the matching rule. * On entry, rule.slot > 0 means the info is valid and @@ -94,19 +96,33 @@ struct ip_fw_args { * If chain_id == chain->id && slot >0 then jump to that slot. * Otherwise, we locate the first rule >= rulenum:rule_id */ - struct ipfw_rule_ref rule; /* match/restart info */ + struct ipfw_rule_ref rule; /* match/restart info */ - struct ether_header *eh; /* for bridged packets */ - - struct ipfw_flow_id f_id; /* grabbed from IP header */ - //uint32_t cookie; /* a cookie depending on rule action */ - struct inpcb *inp; - - struct _ip6dn_args dummypar; /* dummynet->ip6_output */ - union { /* store here if cannot use a pointer */ - struct sockaddr_in hopstore; - struct sockaddr_in6 hopstore6; + struct ifnet *oif; /* output interface */ + struct inpcb *inp; + union { + /* + * We don't support forwarding on layer2, thus we can + * keep eh pointer in this union. + * next_hop[6] pointers can be used to point to next hop + * stored in rule's opcode to avoid copying into hopstore. + * Also, it is expected that all 0x1-0x10 flags are mutually + * exclusive. + */ + struct ether_header *eh; /* for bridged packets */ + struct sockaddr_in *next_hop; + struct sockaddr_in6 *next_hop6; + /* ipfw next hop storage */ + struct sockaddr_in hopstore; + struct ip_fw_nh6 { + struct in6_addr sin6_addr; + uint32_t sin6_scope_id; + uint16_t sin6_port; + } hopstore6; }; + + struct mbuf *m; /* the mbuf chain */ + struct ipfw_flow_id f_id; /* grabbed from IP header */ }; MALLOC_DECLARE(M_IPFW); From owner-svn-src-all@freebsd.org Sun Apr 14 11:19:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05EE315719BA; Sun, 14 Apr 2019 11:19:09 +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 9E9128C13B; Sun, 14 Apr 2019 11:19:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77E4D1FAE1; Sun, 14 Apr 2019 11:19:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3EBJ8YM009969; Sun, 14 Apr 2019 11:19:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EBJ8WN009968; Sun, 14 Apr 2019 11:19:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141119.x3EBJ8WN009968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 11:19: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: r346202 - stable/12/sys/netpfil/ipfw/nat64 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346202 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9E9128C13B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 11:19:09 -0000 Author: ae Date: Sun Apr 14 11:19:08 2019 New Revision: 346202 URL: https://svnweb.freebsd.org/changeset/base/346202 Log: Fix the build. Include net/pfil.h to be able use IPFW_WLOCK(). In head/ after r343619 it is not required, but this change was not MFCed. Modified: stable/12/sys/netpfil/ipfw/nat64/nat64clat_control.c Modified: stable/12/sys/netpfil/ipfw/nat64/nat64clat_control.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64clat_control.c Sun Apr 14 11:06:42 2019 (r346201) +++ stable/12/sys/netpfil/ipfw/nat64/nat64clat_control.c Sun Apr 14 11:19:08 2019 (r346202) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@freebsd.org Sun Apr 14 11:50:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAAB21572626; Sun, 14 Apr 2019 11:50:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51EBD8D286; Sun, 14 Apr 2019 11:50:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B4061FFF6; Sun, 14 Apr 2019 11:50:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3EBo8T3026158; Sun, 14 Apr 2019 11:50:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EBo8wu026157; Sun, 14 Apr 2019 11:50:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141150.x3EBo8wu026157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 11:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346203 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 346203 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 51EBD8D286 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 11:50:08 -0000 Author: ae Date: Sun Apr 14 11:50:07 2019 New Revision: 346203 URL: https://svnweb.freebsd.org/changeset/base/346203 Log: MFC r340717 (by ygy): Fix incorrect DSCP value range from 0..64 to 0..63. PR: 232786 Submitted by: Sergey Akhmatov Modified: stable/11/sbin/ipfw/ipfw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 11:19:08 2019 (r346202) +++ stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 11:50:07 2019 (r346203) @@ -1159,11 +1159,11 @@ Supported values are: .Pq Dv 101110 , .Cm be .Pq Dv 000000 . -Additionally, DSCP value can be specified by number (0..64). +Additionally, DSCP value can be specified by number (0..63). It is also possible to use the .Cm tablearg keyword with setdscp. -If the tablearg value is not within the 0..64 range, lower 6 bits of supplied +If the tablearg value is not within the 0..63 range, lower 6 bits of supplied value are used. .It Cm tcp-setmss Ar mss Set the Maximum Segment Size (MSS) in the TCP segment to value From owner-svn-src-all@freebsd.org Sun Apr 14 11:52:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDCB51572962; Sun, 14 Apr 2019 11:52: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 634EF8D75D; Sun, 14 Apr 2019 11:52: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 3D5ED20156; Sun, 14 Apr 2019 11:52: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 x3EBq1Zf027152; Sun, 14 Apr 2019 11:52:01 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EBq1t0027151; Sun, 14 Apr 2019 11:52:01 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141152.x3EBq1t0027151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 11:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346204 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 346204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 634EF8D75D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 11:52:01 -0000 Author: ae Date: Sun Apr 14 11:52:00 2019 New Revision: 346204 URL: https://svnweb.freebsd.org/changeset/base/346204 Log: MFC r340792 (by ygy): Fix a minor typo in ipfw(8) manual page. PR: 230747 Submitted by: f.toscan@hotmail.it Modified: stable/11/sbin/ipfw/ipfw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 11:50:07 2019 (r346203) +++ stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 11:52:00 2019 (r346204) @@ -4564,7 +4564,7 @@ The ipfw core (ipfw2) has been completely redesigned a reimplemented by Luigi Rizzo in summer 2002. Further actions and -options have been added by various developer over the years. +options have been added by various developers over the years. .Pp .An -nosplit In-kernel NAT support written by From owner-svn-src-all@freebsd.org Sun Apr 14 12:05:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BAB11573B35; Sun, 14 Apr 2019 12:05:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 137188E464; Sun, 14 Apr 2019 12:05:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF7EE20361; Sun, 14 Apr 2019 12:05:09 +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 x3EC59Wi036907; Sun, 14 Apr 2019 12:05:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EC58O3036897; Sun, 14 Apr 2019 12:05:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141205.x3EC58O3036897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 12:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346205 - in stable/11: sbin/ipfw sys/netinet sys/netpfil/ipfw sys/netpfil/ipfw/nat64 sys/netpfil/ipfw/nptv6 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11: sbin/ipfw sys/netinet sys/netpfil/ipfw sys/netpfil/ipfw/nat64 sys/netpfil/ipfw/nptv6 X-SVN-Commit-Revision: 346205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 137188E464 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 12:05:10 -0000 Author: ae Date: Sun Apr 14 12:05:08 2019 New Revision: 346205 URL: https://svnweb.freebsd.org/changeset/base/346205 Log: MFC r341471: Reimplement how net.inet.ip.fw.dyn_keep_states works. Turning on of this feature allows to keep dynamic states when parent rule is deleted. But it works only when the default rule is "allow from any to any". Now when rule with dynamic opcode is going to be deleted, and net.inet.ip.fw.dyn_keep_states is enabled, existing states will reference named objects corresponding to this rule, and also reference the rule. And when ipfw_dyn_lookup_state() will find state for deleted parent rule, it will return the pointer to the deleted rule, that is still valid. This implementation doesn't support O_LIMIT_PARENT rules. The refcnt field was added to struct ip_fw to keep reference, also next pointer added to be able iterate rules and not damage the content when deleted rules are chained. Named objects are referenced only when states are going to be deleted to be able reuse kidx of named objects when new parent rules will be installed. ipfw_dyn_get_count() function was modified and now it also looks into dynamic states and constructs maps of existing named objects. This is needed to correctly export orphaned states into userland. ipfw_free_rule() was changed to be global, since now dynamic state can free rule, when it is expired and references counters becomes 1. External actions subsystem also modified, since external actions can be deregisterd and instances can be destroyed. In these cases deleted rules, that are referenced by orphaned states, must be modified to prevent access to freed memory. ipfw_dyn_reset_eaction(), ipfw_reset_eaction_instance() functions added for these purposes. Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D17532 MFC r341472: Add ability to request listing and deleting only for dynamic states. This can be useful, when net.inet.ip.fw.dyn_keep_states is enabled, but after rules reloading some state must be deleted. Added new flag '-D' for such purpose. Retire '-e' flag, since there can not be expired states in the meaning that this flag historically had. Also add "verbose" mode for listing of dynamic states, it can be enabled with '-v' flag and adds additional information to states list. This can be useful for debugging. Obtained from: Yandex LLC Sponsored by: Yandex LLC MFC r344018: Remove `set' field from state structure and use set from parent rule. Initially it was introduced because parent rule pointer could be freed, and rule's information could become inaccessible. In r341471 this was changed. And now we don't need this information, and also it can become stale. E.g. rule can be moved from one set to another. This can lead to parent's set and state's set will not match. In this case it is possible that static rule will be freed, but dynamic state will not. This can happen when `ipfw delete set N` command is used to delete rules, that were moved to another set. To fix the problem we will use the set number from parent rule. Obtained from: Yandex LLC Sponsored by: Yandex LLC MFC r344870: Fix the problem with O_LIMIT states introduced in r344018. dyn_install_state() uses `rule` pointer when it creates state. For O_LIMIT states this pointer actually is not struct ip_fw, it is pointer to O_LIMIT_PARENT state, that keeps actual pointer to ip_fw parent rule. Thus we need to cache rule id and number before calling dyn_get_parent_state(), so we can use them later when the `rule` pointer is overrided. PR: 236292 Modified: stable/11/sbin/ipfw/ipfw.8 stable/11/sbin/ipfw/ipfw2.c stable/11/sbin/ipfw/ipfw2.h stable/11/sbin/ipfw/main.c stable/11/sys/netinet/ip_fw.h stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c stable/11/sys/netpfil/ipfw/ip_fw_eaction.c stable/11/sys/netpfil/ipfw/ip_fw_private.h stable/11/sys/netpfil/ipfw/ip_fw_sockopt.c stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c stable/11/sys/netpfil/ipfw/nptv6/nptv6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 11:52:00 2019 (r346204) +++ stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:05:08 2019 (r346205) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2018 +.Dd December 4, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -310,10 +310,9 @@ i.e., omitting the "ip from any to any" string when this does not carry any additional information. .It Fl d When listing, show dynamic rules in addition to static ones. -.It Fl e -When listing and -.Fl d -is specified, also show expired dynamic rules. +.It Fl D +When listing, show only dynamic states. +When deleting, delete only dynamic states. .It Fl f Run without prompting for confirmation for commands that can cause problems if misused, i.e., Modified: stable/11/sbin/ipfw/ipfw2.c ============================================================================== --- stable/11/sbin/ipfw/ipfw2.c Sun Apr 14 11:52:00 2019 (r346204) +++ stable/11/sbin/ipfw/ipfw2.c Sun Apr 14 12:05:08 2019 (r346205) @@ -2245,10 +2245,9 @@ show_dyn_state(struct cmdline_opts *co, struct format_ uint16_t rulenum; char buf[INET6_ADDRSTRLEN]; - if (!co->do_expired) { - if (!d->expire && !(d->dyn_type == O_LIMIT_PARENT)) - return; - } + if (d->expire == 0 && d->dyn_type != O_LIMIT_PARENT) + return; + bcopy(&d->rule, &rulenum, sizeof(rulenum)); bprintf(bp, "%05d", rulenum); if (fo->pcwidth > 0 || fo->bcwidth > 0) { @@ -2290,6 +2289,33 @@ show_dyn_state(struct cmdline_opts *co, struct format_ if (d->kidx != 0) bprintf(bp, " :%s", object_search_ctlv(fo->tstate, d->kidx, IPFW_TLV_STATE_NAME)); + +#define BOTH_SYN (TH_SYN | (TH_SYN << 8)) +#define BOTH_FIN (TH_FIN | (TH_FIN << 8)) + if (co->verbose) { + bprintf(bp, " state 0x%08x%s", d->state, + d->state ? " ": ","); + if (d->state & IPFW_DYN_ORPHANED) + bprintf(bp, "ORPHANED,"); + if ((d->state & BOTH_SYN) == BOTH_SYN) + bprintf(bp, "BOTH_SYN,"); + else { + if (d->state & TH_SYN) + bprintf(bp, "F_SYN,"); + if (d->state & (TH_SYN << 8)) + bprintf(bp, "R_SYN,"); + } + if ((d->state & BOTH_FIN) == BOTH_FIN) + bprintf(bp, "BOTH_FIN,"); + else { + if (d->state & TH_FIN) + bprintf(bp, "F_FIN,"); + if (d->state & (TH_FIN << 8)) + bprintf(bp, "R_FIN,"); + } + bprintf(bp, " f_ack 0x%x, r_ack 0x%x", d->ack_fwd, + d->ack_rev); + } } static int @@ -2693,7 +2719,8 @@ ipfw_list(int ac, char *av[], int show_counters) cfg = NULL; sfo.show_counters = show_counters; sfo.show_time = co.do_time; - sfo.flags = IPFW_CFG_GET_STATIC; + if (co.do_dynamic != 2) + sfo.flags |= IPFW_CFG_GET_STATIC; if (co.do_dynamic != 0) sfo.flags |= IPFW_CFG_GET_STATES; if ((sfo.show_counters | sfo.show_time) != 0) @@ -2738,17 +2765,15 @@ ipfw_show_config(struct cmdline_opts *co, struct forma fo->set_mask = cfg->set_mask; ctlv = (ipfw_obj_ctlv *)(cfg + 1); + if (ctlv->head.type == IPFW_TLV_TBLNAME_LIST) { + object_sort_ctlv(ctlv); + fo->tstate = ctlv; + readsz += ctlv->head.length; + ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + ctlv->head.length); + } if (cfg->flags & IPFW_CFG_GET_STATIC) { /* We've requested static rules */ - if (ctlv->head.type == IPFW_TLV_TBLNAME_LIST) { - object_sort_ctlv(ctlv); - fo->tstate = ctlv; - readsz += ctlv->head.length; - ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + - ctlv->head.length); - } - if (ctlv->head.type == IPFW_TLV_RULE_LIST) { rbase = (ipfw_obj_tlv *)(ctlv + 1); rcnt = ctlv->count; @@ -2775,10 +2800,12 @@ ipfw_show_config(struct cmdline_opts *co, struct forma if (ac == 0) { fo->first = 0; fo->last = IPFW_DEFAULT_RULE; - list_static_range(co, fo, &bp, rbase, rcnt); + if (cfg->flags & IPFW_CFG_GET_STATIC) + list_static_range(co, fo, &bp, rbase, rcnt); if (co->do_dynamic && dynsz > 0) { - printf("## Dynamic rules (%d %zu):\n", fo->dcnt, dynsz); + printf("## Dynamic rules (%d %zu):\n", fo->dcnt, + dynsz); list_dyn_range(co, fo, &bp, dynbase, dynsz); } @@ -2798,6 +2825,9 @@ ipfw_show_config(struct cmdline_opts *co, struct forma continue; } + if ((cfg->flags & IPFW_CFG_GET_STATIC) == 0) + continue; + if (list_static_range(co, fo, &bp, rbase, rcnt) == 0) { /* give precedence to other error(s) */ if (exitval == EX_OK) @@ -3311,6 +3341,8 @@ ipfw_delete(char *av[]) rt.flags |= IPFW_RCFLAG_SET; } } + if (co.do_dynamic == 2) + rt.flags |= IPFW_RCFLAG_DYNAMIC; i = do_range_cmd(IP_FW_XDEL, &rt); if (i != 0) { exitval = EX_UNAVAILABLE; @@ -3318,7 +3350,8 @@ ipfw_delete(char *av[]) continue; warn("rule %u: setsockopt(IP_FW_XDEL)", rt.start_rule); - } else if (rt.new_set == 0 && do_set == 0) { + } else if (rt.new_set == 0 && do_set == 0 && + co.do_dynamic != 2) { exitval = EX_UNAVAILABLE; if (co.do_quiet) continue; Modified: stable/11/sbin/ipfw/ipfw2.h ============================================================================== --- stable/11/sbin/ipfw/ipfw2.h Sun Apr 14 11:52:00 2019 (r346204) +++ stable/11/sbin/ipfw/ipfw2.h Sun Apr 14 12:05:08 2019 (r346205) @@ -37,8 +37,6 @@ struct cmdline_opts { int do_quiet; /* Be quiet in add and flush */ int do_pipe; /* this cmd refers to a pipe/queue/sched */ int do_nat; /* this cmd refers to a nat config */ - int do_dynamic; /* display dynamic rules */ - int do_expired; /* display expired dynamic rules */ int do_compact; /* show rules in compact mode */ int do_force; /* do not ask for confirmation */ int show_sets; /* display the set each rule belongs to */ @@ -48,6 +46,8 @@ struct cmdline_opts { /* The options below can have multiple values. */ + int do_dynamic; /* 1 - display dynamic rules */ + /* 2 - display/delete only dynamic rules */ int do_sort; /* field to sort results (0 = no) */ /* valid fields are 1 and above */ Modified: stable/11/sbin/ipfw/main.c ============================================================================== --- stable/11/sbin/ipfw/main.c Sun Apr 14 11:52:00 2019 (r346204) +++ stable/11/sbin/ipfw/main.c Sun Apr 14 12:05:08 2019 (r346205) @@ -262,7 +262,7 @@ ipfw_main(int oldac, char **oldav) save_av = av; optind = optreset = 1; /* restart getopt() */ - while ((ch = getopt(ac, av, "abcdefhinNp:qs:STtv")) != -1) + while ((ch = getopt(ac, av, "abcdDefhinNp:qs:STtv")) != -1) switch (ch) { case 'a': do_acct = 1; @@ -281,8 +281,12 @@ ipfw_main(int oldac, char **oldav) co.do_dynamic = 1; break; + case 'D': + co.do_dynamic = 2; + break; + case 'e': - co.do_expired = 1; + /* nop for compatibility */ break; case 'f': Modified: stable/11/sys/netinet/ip_fw.h ============================================================================== --- stable/11/sys/netinet/ip_fw.h Sun Apr 14 11:52:00 2019 (r346204) +++ stable/11/sys/netinet/ip_fw.h Sun Apr 14 12:05:08 2019 (r346205) @@ -706,6 +706,7 @@ struct _ipfw_dyn_rule { u_int32_t state; /* state of this rule (typically a * combination of TCP flags) */ +#define IPFW_DYN_ORPHANED 0x40000 /* state's parent rule was deleted */ u_int32_t ack_fwd; /* most recent ACKs in forward */ u_int32_t ack_rev; /* and reverse directions (used */ /* to generate keepalives) */ @@ -936,9 +937,10 @@ typedef struct _ipfw_range_tlv { #define IPFW_RCFLAG_RANGE 0x01 /* rule range is set */ #define IPFW_RCFLAG_ALL 0x02 /* match ALL rules */ #define IPFW_RCFLAG_SET 0x04 /* match rules in given set */ +#define IPFW_RCFLAG_DYNAMIC 0x08 /* match only dynamic states */ /* User-settable flags */ #define IPFW_RCFLAG_USER (IPFW_RCFLAG_RANGE | IPFW_RCFLAG_ALL | \ - IPFW_RCFLAG_SET) + IPFW_RCFLAG_SET | IPFW_RCFLAG_DYNAMIC) /* Internally used flags */ #define IPFW_RCFLAG_DEFAULT 0x0100 /* Do not skip defaul rule */ Modified: stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c Sun Apr 14 11:52:00 2019 (r346204) +++ stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c Sun Apr 14 12:05:08 2019 (r346205) @@ -121,6 +121,12 @@ __FBSDID("$FreeBSD$"); (d)->bcnt_ ## dir += pktlen; \ } while (0) +#define DYN_REFERENCED 0x01 +/* + * DYN_REFERENCED flag is used to show that state keeps reference to named + * object, and this reference should be released when state becomes expired. + */ + struct dyn_data { void *parent; /* pointer to parent rule */ uint32_t chain_id; /* cached ruleset id */ @@ -129,7 +135,7 @@ struct dyn_data { uint32_t hashval; /* hash value used for hash resize */ uint16_t fibnum; /* fib used to send keepalives */ uint8_t _pad[3]; - uint8_t set; /* parent rule set number */ + uint8_t flags; /* internal flags */ uint16_t rulenum; /* parent rule number */ uint32_t ruleid; /* parent rule id */ @@ -155,8 +161,7 @@ struct dyn_data { struct dyn_parent { void *parent; /* pointer to parent rule */ uint32_t count; /* number of linked states */ - uint8_t _pad; - uint8_t set; /* parent rule set number */ + uint8_t _pad[2]; uint16_t rulenum; /* parent rule number */ uint32_t ruleid; /* parent rule id */ uint32_t hashval; /* hash value used for hash resize */ @@ -499,7 +504,7 @@ static int dyn_lookup_ipv6_state_locked(const struct i uint32_t, const void *, int, uint32_t, uint16_t); static struct dyn_ipv6_state *dyn_alloc_ipv6_state( const struct ipfw_flow_id *, uint32_t, uint16_t, uint8_t); -static int dyn_add_ipv6_state(void *, uint32_t, uint16_t, uint8_t, +static int dyn_add_ipv6_state(void *, uint32_t, uint16_t, const struct ipfw_flow_id *, uint32_t, const void *, int, uint32_t, struct ipfw_dyn_info *, uint16_t, uint16_t, uint8_t); static void dyn_export_ipv6_state(const struct dyn_ipv6_state *, @@ -520,8 +525,7 @@ static struct dyn_ipv6_state *dyn_lookup_ipv6_parent_l const struct ipfw_flow_id *, uint32_t, const void *, uint32_t, uint16_t, uint32_t); static struct dyn_ipv6_state *dyn_add_ipv6_parent(void *, uint32_t, uint16_t, - uint8_t, const struct ipfw_flow_id *, uint32_t, uint32_t, uint32_t, - uint16_t); + const struct ipfw_flow_id *, uint32_t, uint32_t, uint32_t, uint16_t); #endif /* INET6 */ /* Functions to work with limit states */ @@ -532,17 +536,17 @@ static struct dyn_ipv4_state *dyn_lookup_ipv4_parent( static struct dyn_ipv4_state *dyn_lookup_ipv4_parent_locked( const struct ipfw_flow_id *, const void *, uint32_t, uint16_t, uint32_t); static struct dyn_parent *dyn_alloc_parent(void *, uint32_t, uint16_t, - uint8_t, uint32_t); + uint32_t); static struct dyn_ipv4_state *dyn_add_ipv4_parent(void *, uint32_t, uint16_t, - uint8_t, const struct ipfw_flow_id *, uint32_t, uint32_t, uint16_t); + const struct ipfw_flow_id *, uint32_t, uint32_t, uint16_t); static void dyn_tick(void *); static void dyn_expire_states(struct ip_fw_chain *, ipfw_range_tlv *); static void dyn_free_states(struct ip_fw_chain *); -static void dyn_export_parent(const struct dyn_parent *, uint16_t, +static void dyn_export_parent(const struct dyn_parent *, uint16_t, uint8_t, ipfw_dyn_rule *); static void dyn_export_data(const struct dyn_data *, uint16_t, uint8_t, - ipfw_dyn_rule *); + uint8_t, ipfw_dyn_rule *); static uint32_t dyn_update_tcp_state(struct dyn_data *, const struct ipfw_flow_id *, const struct tcphdr *, int); static void dyn_update_proto_state(struct dyn_data *, @@ -555,7 +559,7 @@ static int dyn_lookup_ipv4_state_locked(const struct i const void *, int, uint32_t, uint16_t); static struct dyn_ipv4_state *dyn_alloc_ipv4_state( const struct ipfw_flow_id *, uint16_t, uint8_t); -static int dyn_add_ipv4_state(void *, uint32_t, uint16_t, uint8_t, +static int dyn_add_ipv4_state(void *, uint32_t, uint16_t, const struct ipfw_flow_id *, const void *, int, uint32_t, struct ipfw_dyn_info *, uint16_t, uint16_t, uint8_t); static void dyn_export_ipv4_state(const struct dyn_ipv4_state *, @@ -1398,20 +1402,29 @@ ipfw_dyn_lookup_state(const struct ip_fw_args *args, c * should be deleted by dyn_expire_states(). * * In case when dyn_keep_states is enabled, return - * pointer to default rule and corresponding f_pos - * value. - * XXX: In this case we lose the cache efficiency, - * since f_pos is not cached, because it seems - * there is no easy way to atomically switch - * all fields related to parent rule of given - * state. + * pointer to deleted rule and f_pos value + * corresponding to penultimate rule. + * When we have enabled V_dyn_keep_states, states + * that become orphaned will get the DYN_REFERENCED + * flag and rule will keep around. So we can return + * it. But since it is not in the rules map, we need + * return such f_pos value, so after the state + * handling if the search will continue, the next rule + * will be the last one - the default rule. */ if (V_layer3_chain.map[data->f_pos] == rule) { data->chain_id = V_layer3_chain.id; info->f_pos = data->f_pos; } else if (V_dyn_keep_states != 0) { - rule = V_layer3_chain.default_rule; - info->f_pos = V_layer3_chain.n_rules - 1; + /* + * The original rule pointer is still usable. + * So, we return it, but f_pos need to be + * changed to point to the penultimate rule. + */ + MPASS(V_layer3_chain.n_rules > 1); + data->chain_id = V_layer3_chain.id; + data->f_pos = V_layer3_chain.n_rules - 2; + info->f_pos = data->f_pos; } else { rule = NULL; info->direction = MATCH_NONE; @@ -1443,7 +1456,7 @@ ipfw_dyn_lookup_state(const struct ip_fw_args *args, c static struct dyn_parent * dyn_alloc_parent(void *parent, uint32_t ruleid, uint16_t rulenum, - uint8_t set, uint32_t hashval) + uint32_t hashval) { struct dyn_parent *limit; @@ -1462,7 +1475,6 @@ dyn_alloc_parent(void *parent, uint32_t ruleid, uint16 limit->parent = parent; limit->ruleid = ruleid; limit->rulenum = rulenum; - limit->set = set; limit->hashval = hashval; limit->expire = time_uptime + V_dyn_short_lifetime; return (limit); @@ -1470,7 +1482,7 @@ dyn_alloc_parent(void *parent, uint32_t ruleid, uint16 static struct dyn_data * dyn_alloc_dyndata(void *parent, uint32_t ruleid, uint16_t rulenum, - uint8_t set, const struct ipfw_flow_id *pkt, const void *ulp, int pktlen, + const struct ipfw_flow_id *pkt, const void *ulp, int pktlen, uint32_t hashval, uint16_t fibnum) { struct dyn_data *data; @@ -1489,7 +1501,6 @@ dyn_alloc_dyndata(void *parent, uint32_t ruleid, uint1 data->parent = parent; data->ruleid = ruleid; data->rulenum = rulenum; - data->set = set; data->fibnum = fibnum; data->hashval = hashval; data->expire = time_uptime + V_dyn_syn_lifetime; @@ -1526,8 +1537,8 @@ dyn_alloc_ipv4_state(const struct ipfw_flow_id *pkt, u */ static struct dyn_ipv4_state * dyn_add_ipv4_parent(void *rule, uint32_t ruleid, uint16_t rulenum, - uint8_t set, const struct ipfw_flow_id *pkt, uint32_t hashval, - uint32_t version, uint16_t kidx) + const struct ipfw_flow_id *pkt, uint32_t hashval, uint32_t version, + uint16_t kidx) { struct dyn_ipv4_state *s; struct dyn_parent *limit; @@ -1554,7 +1565,7 @@ dyn_add_ipv4_parent(void *rule, uint32_t ruleid, uint1 } } - limit = dyn_alloc_parent(rule, ruleid, rulenum, set, hashval); + limit = dyn_alloc_parent(rule, ruleid, rulenum, hashval); if (limit == NULL) { DYN_BUCKET_UNLOCK(bucket); return (NULL); @@ -1579,7 +1590,7 @@ dyn_add_ipv4_parent(void *rule, uint32_t ruleid, uint1 static int dyn_add_ipv4_state(void *parent, uint32_t ruleid, uint16_t rulenum, - uint8_t set, const struct ipfw_flow_id *pkt, const void *ulp, int pktlen, + const struct ipfw_flow_id *pkt, const void *ulp, int pktlen, uint32_t hashval, struct ipfw_dyn_info *info, uint16_t fibnum, uint16_t kidx, uint8_t type) { @@ -1604,7 +1615,7 @@ dyn_add_ipv4_state(void *parent, uint32_t ruleid, uint } } - data = dyn_alloc_dyndata(parent, ruleid, rulenum, set, pkt, ulp, + data = dyn_alloc_dyndata(parent, ruleid, rulenum, pkt, ulp, pktlen, hashval, fibnum); if (data == NULL) { DYN_BUCKET_UNLOCK(bucket); @@ -1657,8 +1668,8 @@ dyn_alloc_ipv6_state(const struct ipfw_flow_id *pkt, u */ static struct dyn_ipv6_state * dyn_add_ipv6_parent(void *rule, uint32_t ruleid, uint16_t rulenum, - uint8_t set, const struct ipfw_flow_id *pkt, uint32_t zoneid, - uint32_t hashval, uint32_t version, uint16_t kidx) + const struct ipfw_flow_id *pkt, uint32_t zoneid, uint32_t hashval, + uint32_t version, uint16_t kidx) { struct dyn_ipv6_state *s; struct dyn_parent *limit; @@ -1685,7 +1696,7 @@ dyn_add_ipv6_parent(void *rule, uint32_t ruleid, uint1 } } - limit = dyn_alloc_parent(rule, ruleid, rulenum, set, hashval); + limit = dyn_alloc_parent(rule, ruleid, rulenum, hashval); if (limit == NULL) { DYN_BUCKET_UNLOCK(bucket); return (NULL); @@ -1710,8 +1721,8 @@ dyn_add_ipv6_parent(void *rule, uint32_t ruleid, uint1 static int dyn_add_ipv6_state(void *parent, uint32_t ruleid, uint16_t rulenum, - uint8_t set, const struct ipfw_flow_id *pkt, uint32_t zoneid, - const void *ulp, int pktlen, uint32_t hashval, struct ipfw_dyn_info *info, + const struct ipfw_flow_id *pkt, uint32_t zoneid, const void *ulp, + int pktlen, uint32_t hashval, struct ipfw_dyn_info *info, uint16_t fibnum, uint16_t kidx, uint8_t type) { struct dyn_ipv6_state *s; @@ -1735,7 +1746,7 @@ dyn_add_ipv6_state(void *parent, uint32_t ruleid, uint } } - data = dyn_alloc_dyndata(parent, ruleid, rulenum, set, pkt, ulp, + data = dyn_alloc_dyndata(parent, ruleid, rulenum, pkt, ulp, pktlen, hashval, fibnum); if (data == NULL) { DYN_BUCKET_UNLOCK(bucket); @@ -1785,8 +1796,7 @@ dyn_get_parent_state(const struct ipfw_flow_id *pkt, u DYNSTATE_CRITICAL_EXIT(); s = dyn_add_ipv4_parent(rule, rule->id, - rule->rulenum, rule->set, pkt, hashval, - version, kidx); + rule->rulenum, pkt, hashval, version, kidx); if (s == NULL) return (NULL); /* Now we are in critical section again. */ @@ -1809,8 +1819,8 @@ dyn_get_parent_state(const struct ipfw_flow_id *pkt, u DYNSTATE_CRITICAL_EXIT(); s = dyn_add_ipv6_parent(rule, rule->id, - rule->rulenum, rule->set, pkt, zoneid, hashval, - version, kidx); + rule->rulenum, pkt, zoneid, hashval, version, + kidx); if (s == NULL) return (NULL); /* Now we are in critical section again. */ @@ -1853,17 +1863,18 @@ dyn_get_parent_state(const struct ipfw_flow_id *pkt, u static int dyn_install_state(const struct ipfw_flow_id *pkt, uint32_t zoneid, - uint16_t fibnum, const void *ulp, int pktlen, void *rule, - uint32_t ruleid, uint16_t rulenum, uint8_t set, + uint16_t fibnum, const void *ulp, int pktlen, struct ip_fw *rule, struct ipfw_dyn_info *info, uint32_t limit, uint16_t limit_mask, uint16_t kidx, uint8_t type) { struct ipfw_flow_id id; - uint32_t hashval, parent_hashval; + uint32_t hashval, parent_hashval, ruleid, rulenum; int ret; MPASS(type == O_LIMIT || type == O_KEEP_STATE); + ruleid = rule->id; + rulenum = rule->rulenum; if (type == O_LIMIT) { /* Create masked flow id and calculate bucket */ id.addr_type = pkt->addr_type; @@ -1918,11 +1929,11 @@ dyn_install_state(const struct ipfw_flow_id *pkt, uint hashval = hash_packet(pkt); if (IS_IP4_FLOW_ID(pkt)) - ret = dyn_add_ipv4_state(rule, ruleid, rulenum, set, pkt, + ret = dyn_add_ipv4_state(rule, ruleid, rulenum, pkt, ulp, pktlen, hashval, info, fibnum, kidx, type); #ifdef INET6 else if (IS_IP6_FLOW_ID(pkt)) - ret = dyn_add_ipv6_state(rule, ruleid, rulenum, set, pkt, + ret = dyn_add_ipv6_state(rule, ruleid, rulenum, pkt, zoneid, ulp, pktlen, hashval, info, fibnum, kidx, type); #endif /* INET6 */ else @@ -1995,8 +2006,8 @@ ipfw_dyn_install_state(struct ip_fw_chain *chain, stru #ifdef INET6 IS_IP6_FLOW_ID(&args->f_id) ? dyn_getscopeid(args): #endif - 0, M_GETFIB(args->m), ulp, pktlen, rule, rule->id, rule->rulenum, - rule->set, info, limit, limit_mask, cmd->o.arg1, cmd->o.opcode)); + 0, M_GETFIB(args->m), ulp, pktlen, rule, info, limit, + limit_mask, cmd->o.arg1, cmd->o.opcode)); } /* @@ -2093,7 +2104,11 @@ dyn_free_states(struct ip_fw_chain *chain) } /* - * Returns 1 when state is matched by specified range, otherwise returns 0. + * Returns: + * 0 when state is not matched by specified range; + * 1 when state is matched by specified range; + * 2 when state is matched by specified range and requested deletion of + * dynamic states. */ static int dyn_match_range(uint16_t rulenum, uint8_t set, const ipfw_range_tlv *rt) @@ -2101,50 +2116,121 @@ dyn_match_range(uint16_t rulenum, uint8_t set, const i MPASS(rt != NULL); /* flush all states */ - if (rt->flags & IPFW_RCFLAG_ALL) + if (rt->flags & IPFW_RCFLAG_ALL) { + if (rt->flags & IPFW_RCFLAG_DYNAMIC) + return (2); /* forced */ return (1); + } if ((rt->flags & IPFW_RCFLAG_SET) != 0 && set != rt->set) return (0); if ((rt->flags & IPFW_RCFLAG_RANGE) != 0 && (rulenum < rt->start_rule || rulenum > rt->end_rule)) return (0); + if (rt->flags & IPFW_RCFLAG_DYNAMIC) + return (2); return (1); } +static void +dyn_acquire_rule(struct ip_fw_chain *ch, struct dyn_data *data, + struct ip_fw *rule, uint16_t kidx) +{ + struct dyn_state_obj *obj; + + /* + * Do not acquire reference twice. + * This can happen when rule deletion executed for + * the same range, but different ruleset id. + */ + if (data->flags & DYN_REFERENCED) + return; + + IPFW_UH_WLOCK_ASSERT(ch); + MPASS(kidx != 0); + + data->flags |= DYN_REFERENCED; + /* Reference the named object */ + obj = SRV_OBJECT(ch, kidx); + obj->no.refcnt++; + MPASS(obj->no.etlv == IPFW_TLV_STATE_NAME); + + /* Reference the parent rule */ + rule->refcnt++; +} + +static void +dyn_release_rule(struct ip_fw_chain *ch, struct dyn_data *data, + struct ip_fw *rule, uint16_t kidx) +{ + struct dyn_state_obj *obj; + + IPFW_UH_WLOCK_ASSERT(ch); + MPASS(kidx != 0); + + obj = SRV_OBJECT(ch, kidx); + if (obj->no.refcnt == 1) + dyn_destroy(ch, &obj->no); + else + obj->no.refcnt--; + + if (--rule->refcnt == 1) + ipfw_free_rule(rule); +} + +/* + * We do not keep O_LIMIT_PARENT states when V_dyn_keep_states is enabled. + * O_LIMIT state is created when new connection is going to be established + * and there is no matching state. So, since the old parent rule was deleted + * we can't create new states with old parent, and thus we can not account + * new connections with already established connections, and can not do + * proper limiting. + */ static int -dyn_match_ipv4_state(struct dyn_ipv4_state *s, const ipfw_range_tlv *rt) +dyn_match_ipv4_state(struct ip_fw_chain *ch, struct dyn_ipv4_state *s, + const ipfw_range_tlv *rt) { + struct ip_fw *rule; + int ret; - if (s->type == O_LIMIT_PARENT) - return (dyn_match_range(s->limit->rulenum, - s->limit->set, rt)); + if (s->type == O_LIMIT_PARENT) { + rule = s->limit->parent; + return (dyn_match_range(s->limit->rulenum, rule->set, rt)); + } + rule = s->data->parent; if (s->type == O_LIMIT) - return (dyn_match_range(s->data->rulenum, s->data->set, rt)); + rule = ((struct dyn_ipv4_state *)rule)->limit->parent; - if (V_dyn_keep_states == 0 && - dyn_match_range(s->data->rulenum, s->data->set, rt)) - return (1); + ret = dyn_match_range(s->data->rulenum, rule->set, rt); + if (ret == 0 || V_dyn_keep_states == 0 || ret > 1) + return (ret); + dyn_acquire_rule(ch, s->data, rule, s->kidx); return (0); } #ifdef INET6 static int -dyn_match_ipv6_state(struct dyn_ipv6_state *s, const ipfw_range_tlv *rt) +dyn_match_ipv6_state(struct ip_fw_chain *ch, struct dyn_ipv6_state *s, + const ipfw_range_tlv *rt) { + struct ip_fw *rule; + int ret; - if (s->type == O_LIMIT_PARENT) - return (dyn_match_range(s->limit->rulenum, - s->limit->set, rt)); + if (s->type == O_LIMIT_PARENT) { + rule = s->limit->parent; + return (dyn_match_range(s->limit->rulenum, rule->set, rt)); + } + rule = s->data->parent; if (s->type == O_LIMIT) - return (dyn_match_range(s->data->rulenum, s->data->set, rt)); + rule = ((struct dyn_ipv6_state *)rule)->limit->parent; - if (V_dyn_keep_states == 0 && - dyn_match_range(s->data->rulenum, s->data->set, rt)) - return (1); + ret = dyn_match_range(s->data->rulenum, rule->set, rt); + if (ret == 0 || V_dyn_keep_states == 0 || ret > 1) + return (ret); + dyn_acquire_rule(ch, s->data, rule, s->kidx); return (0); } #endif @@ -2154,7 +2240,7 @@ dyn_match_ipv6_state(struct dyn_ipv6_state *s, const i * @rt can be used to specify the range of states for deletion. */ static void -dyn_expire_states(struct ip_fw_chain *chain, ipfw_range_tlv *rt) +dyn_expire_states(struct ip_fw_chain *ch, ipfw_range_tlv *rt) { struct dyn_ipv4_slist expired_ipv4; #ifdef INET6 @@ -2162,8 +2248,11 @@ dyn_expire_states(struct ip_fw_chain *chain, ipfw_rang struct dyn_ipv6_state *s6, *s6n, *s6p; #endif struct dyn_ipv4_state *s4, *s4n, *s4p; + void *rule; int bucket, removed, length, max_length; + IPFW_UH_WLOCK_ASSERT(ch); + /* * Unlink expired states from each bucket. * With acquired bucket lock iterate entries of each lists: @@ -2188,7 +2277,8 @@ dyn_expire_states(struct ip_fw_chain *chain, ipfw_rang while (s != NULL) { \ next = CK_SLIST_NEXT(s, entry); \ if ((TIME_LEQ((s)->exp, time_uptime) && extra) || \ - (rt != NULL && dyn_match_ ## af ## _state(s, rt))) {\ + (rt != NULL && \ + dyn_match_ ## af ## _state(ch, s, rt))) { \ if (prev != NULL) \ CK_SLIST_REMOVE_AFTER(prev, entry); \ else \ @@ -2200,6 +2290,14 @@ dyn_expire_states(struct ip_fw_chain *chain, ipfw_rang DYN_COUNT_DEC(dyn_parent_count); \ else { \ DYN_COUNT_DEC(dyn_count); \ + if (s->data->flags & DYN_REFERENCED) { \ + rule = s->data->parent; \ + if (s->type == O_LIMIT) \ + rule = ((__typeof(s)) \ + rule)->limit->parent;\ + dyn_release_rule(ch, s->data, \ + rule, s->kidx); \ + } \ if (s->type == O_LIMIT) { \ s = s->data->parent; \ DPARENT_COUNT_DEC(s->limit); \ @@ -2684,6 +2782,42 @@ ipfw_expire_dyn_states(struct ip_fw_chain *chain, ipfw } /* + * Pass through all states and reset eaction for orphaned rules. + */ +void +ipfw_dyn_reset_eaction(struct ip_fw_chain *ch, uint16_t eaction_id, + uint16_t default_id, uint16_t instance_id) +{ +#ifdef INET6 + struct dyn_ipv6_state *s6; +#endif + struct dyn_ipv4_state *s4; + struct ip_fw *rule; + uint32_t bucket; + +#define DYN_RESET_EACTION(s, h, b) \ + CK_SLIST_FOREACH(s, &V_dyn_ ## h[b], entry) { \ + if ((s->data->flags & DYN_REFERENCED) == 0) \ + continue; \ + rule = s->data->parent; \ + if (s->type == O_LIMIT) \ + rule = ((__typeof(s))rule)->limit->parent; \ + ipfw_reset_eaction(ch, rule, eaction_id, \ + default_id, instance_id); \ + } + + IPFW_UH_WLOCK_ASSERT(ch); + if (V_dyn_count == 0) + return; + for (bucket = 0; bucket < V_curr_dyn_buckets; bucket++) { + DYN_RESET_EACTION(s4, ipv4, bucket); +#ifdef INET6 + DYN_RESET_EACTION(s6, ipv6, bucket); +#endif + } +} + +/* * Returns size of dynamic states in legacy format */ int @@ -2695,12 +2829,41 @@ ipfw_dyn_len(void) /* * Returns number of dynamic states. + * Marks every named object index used by dynamic states with bit in @bmask. + * Returns number of named objects accounted in bmask via @nocnt. * Used by dump format v1 (current). */ uint32_t -ipfw_dyn_get_count(void) +ipfw_dyn_get_count(uint32_t *bmask, int *nocnt) { +#ifdef INET6 + struct dyn_ipv6_state *s6; +#endif + struct dyn_ipv4_state *s4; + uint32_t bucket; +#define DYN_COUNT_OBJECTS(s, h, b) \ + CK_SLIST_FOREACH(s, &V_dyn_ ## h[b], entry) { \ + MPASS(s->kidx != 0); \ + if (ipfw_mark_object_kidx(bmask, IPFW_TLV_STATE_NAME, \ + s->kidx) != 0) \ + (*nocnt)++; \ + } + + IPFW_UH_RLOCK_ASSERT(&V_layer3_chain); + + /* No need to pass through all the buckets. */ + *nocnt = 0; + if (V_dyn_count + V_dyn_parent_count == 0) + return (0); + + for (bucket = 0; bucket < V_curr_dyn_buckets; bucket++) { + DYN_COUNT_OBJECTS(s4, ipv4, bucket); +#ifdef INET6 + DYN_COUNT_OBJECTS(s6, ipv6, bucket); +#endif + } + return (V_dyn_count + V_dyn_parent_count); } @@ -2734,7 +2897,7 @@ ipfw_is_dyn_rule(struct ip_fw *rule) } static void -dyn_export_parent(const struct dyn_parent *p, uint16_t kidx, +dyn_export_parent(const struct dyn_parent *p, uint16_t kidx, uint8_t set, ipfw_dyn_rule *dst) { @@ -2746,9 +2909,9 @@ dyn_export_parent(const struct dyn_parent *p, uint16_t /* 'rule' is used to pass up the rule number and set */ memcpy(&dst->rule, &p->rulenum, sizeof(p->rulenum)); + /* store set number into high word of dst->rule pointer. */ - memcpy((char *)&dst->rule + sizeof(p->rulenum), &p->set, - sizeof(p->set)); + memcpy((char *)&dst->rule + sizeof(p->rulenum), &set, sizeof(set)); /* unused fields */ dst->pcnt = 0; @@ -2767,7 +2930,7 @@ dyn_export_parent(const struct dyn_parent *p, uint16_t static void dyn_export_data(const struct dyn_data *data, uint16_t kidx, uint8_t type, - ipfw_dyn_rule *dst) + uint8_t set, ipfw_dyn_rule *dst) { dst->dyn_type = type; @@ -2779,13 +2942,16 @@ dyn_export_data(const struct dyn_data *data, uint16_t /* 'rule' is used to pass up the rule number and set */ memcpy(&dst->rule, &data->rulenum, sizeof(data->rulenum)); + /* store set number into high word of dst->rule pointer. */ - memcpy((char *)&dst->rule + sizeof(data->rulenum), &data->set, - sizeof(data->set)); + memcpy((char *)&dst->rule + sizeof(data->rulenum), &set, sizeof(set)); + dst->state = data->state; + if (data->flags & DYN_REFERENCED) + dst->state |= IPFW_DYN_ORPHANED; + /* unused fields */ dst->parent = NULL; - dst->state = data->state; dst->ack_fwd = data->ack_fwd; dst->ack_rev = data->ack_rev; dst->count = 0; @@ -2800,13 +2966,18 @@ dyn_export_data(const struct dyn_data *data, uint16_t static void dyn_export_ipv4_state(const struct dyn_ipv4_state *s, ipfw_dyn_rule *dst) { + struct ip_fw *rule; switch (s->type) { case O_LIMIT_PARENT: - dyn_export_parent(s->limit, s->kidx, dst); + rule = s->limit->parent; + dyn_export_parent(s->limit, s->kidx, rule->set, dst); break; default: - dyn_export_data(s->data, s->kidx, s->type, dst); + rule = s->data->parent; + if (s->type == O_LIMIT) + rule = ((struct dyn_ipv4_state *)rule)->limit->parent; + dyn_export_data(s->data, s->kidx, s->type, rule->set, dst); } dst->id.dst_ip = s->dst; @@ -2827,13 +2998,18 @@ dyn_export_ipv4_state(const struct dyn_ipv4_state *s, static void dyn_export_ipv6_state(const struct dyn_ipv6_state *s, ipfw_dyn_rule *dst) { + struct ip_fw *rule; switch (s->type) { case O_LIMIT_PARENT: - dyn_export_parent(s->limit, s->kidx, dst); + rule = s->limit->parent; + dyn_export_parent(s->limit, s->kidx, rule->set, dst); break; default: - dyn_export_data(s->data, s->kidx, s->type, dst); + rule = s->data->parent; + if (s->type == O_LIMIT) + rule = ((struct dyn_ipv6_state *)rule)->limit->parent; + dyn_export_data(s->data, s->kidx, s->type, rule->set, dst); } dst->id.src_ip6 = s->src; Modified: stable/11/sys/netpfil/ipfw/ip_fw_eaction.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_eaction.c Sun Apr 14 11:52:00 2019 (r346204) +++ stable/11/sys/netpfil/ipfw/ip_fw_eaction.c Sun Apr 14 12:05:08 2019 (r346205) @@ -252,11 +252,10 @@ destroy_eaction_obj(struct ip_fw_chain *ch, struct nam * Resets all eaction opcodes to default handlers. */ static void -reset_eaction_obj(struct ip_fw_chain *ch, uint16_t eaction_id) +reset_eaction_rules(struct ip_fw_chain *ch, uint16_t eaction_id, + uint16_t instance_id, bool reset_rules) { struct named_object *no; - struct ip_fw *rule; - ipfw_insn *cmd; int i; IPFW_UH_WLOCK_ASSERT(ch); @@ -267,35 +266,32 @@ reset_eaction_obj(struct ip_fw_chain *ch, uint16_t eac panic("Default external action handler is not found"); if (eaction_id == no->kidx) panic("Wrong eaction_id"); - EACTION_DEBUG("replace id %u with %u", eaction_id, no->kidx); + + EACTION_DEBUG("Going to replace id %u with %u", eaction_id, no->kidx); IPFW_WLOCK(ch); - for (i = 0; i < ch->n_rules; i++) { - rule = ch->map[i]; - cmd = ACTION_PTR(rule); - if (cmd->opcode != O_EXTERNAL_ACTION) - continue; - if (cmd->arg1 != eaction_id) - continue; - cmd->arg1 = no->kidx; /* Set to default id */ - /* - * XXX: we only bump refcount on default_eaction. - * Refcount on the original object will be just - * ignored on destroy. But on default_eaction it - * will be decremented on rule deletion. - */ - no->refcnt++; - /* - * Since named_object related to this instance will be - * also destroyed, truncate the chain of opcodes to - * remove the rest of cmd chain just after O_EXTERNAL_ACTION - * opcode. - */ - if (rule->act_ofs < rule->cmd_len - 1) { - EACTION_DEBUG("truncate rule %d: len %u -> %u", - rule->rulenum, rule->cmd_len, rule->act_ofs + 1); - rule->cmd_len = rule->act_ofs + 1; + /* + * Reset eaction objects only if it is referenced by rules. + * But always reset objects for orphaned dynamic states. + */ + if (reset_rules) { + for (i = 0; i < ch->n_rules; i++) { + /* + * Refcount on the original object will be just + * ignored on destroy. Refcount on default_eaction + * will be decremented on rule deletion, thus we + * need to reference default_eaction object. + */ + if (ipfw_reset_eaction(ch, ch->map[i], eaction_id, + no->kidx, instance_id) != 0) + no->refcnt++; } } + /* + * Reset eaction opcodes for orphaned dynamic states. + * Since parent rules are already deleted, we don't need to + * reference named object of default_eaction. + */ + ipfw_dyn_reset_eaction(ch, eaction_id, no->kidx, instance_id); IPFW_WUNLOCK(ch); } @@ -368,12 +364,71 @@ ipfw_del_eaction(struct ip_fw_chain *ch, uint16_t eact IPFW_UH_WUNLOCK(ch); return (EINVAL); } - if (no->refcnt > 1) - reset_eaction_obj(ch, eaction_id); + reset_eaction_rules(ch, eaction_id, 0, (no->refcnt > 1)); EACTION_DEBUG("External action '%s' with id %u unregistered", no->name, eaction_id); destroy_eaction_obj(ch, no); IPFW_UH_WUNLOCK(ch); + return (0); +} + +int +ipfw_reset_eaction(struct ip_fw_chain *ch, struct ip_fw *rule, + uint16_t eaction_id, uint16_t default_id, uint16_t instance_id) +{ + ipfw_insn *cmd, *icmd; + + IPFW_UH_WLOCK_ASSERT(ch); + IPFW_WLOCK_ASSERT(ch); + + cmd = ACTION_PTR(rule); + if (cmd->opcode != O_EXTERNAL_ACTION || + cmd->arg1 != eaction_id) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Apr 14 12:10:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F25AF1573E8A; Sun, 14 Apr 2019 12:10:24 +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 9042B8E7FD; Sun, 14 Apr 2019 12:10:24 +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 663672036A; Sun, 14 Apr 2019 12:10:24 +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 x3ECAOik037320; Sun, 14 Apr 2019 12:10:24 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ECAOg6037319; Sun, 14 Apr 2019 12:10:24 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141210.x3ECAOg6037319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 12:10:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346206 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 346206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9042B8E7FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 12:10:25 -0000 Author: ae Date: Sun Apr 14 12:10:23 2019 New Revision: 346206 URL: https://svnweb.freebsd.org/changeset/base/346206 Log: MFC r344665 (by trhodes): Grammar tweaks in ipfw manual page. Modified: stable/11/sbin/ipfw/ipfw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:05:08 2019 (r346205) +++ stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:10:23 2019 (r346206) @@ -233,7 +233,7 @@ or .Cm limit rule, and are typically used to open the firewall on-demand to legitimate traffic only. -Please, note, that +Please note, that .Cm keep-state amd .Cm limit @@ -684,8 +684,8 @@ is set to 0 (default), one can use attached to the .Li ipfw0 pseudo interface. -This pseudo interface can be created after a boot -manually by using the following command: +This pseudo interface can be created manually after a system +boot by using the following command: .Bd -literal -offset indent # ifconfig ipfw0 create .Ed @@ -698,7 +698,7 @@ file: firewall_logif="YES" .Ed .Pp -There is no overhead if no +There is zero overhead when no .Xr bpf 4 is attached to the pseudo interface. .Pp From owner-svn-src-all@freebsd.org Sun Apr 14 12:11:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 045381573F77; Sun, 14 Apr 2019 12:11:46 +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 9BCF88EB45; Sun, 14 Apr 2019 12:11:45 +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 6F450204D2; Sun, 14 Apr 2019 12:11:45 +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 x3ECBjir042191; Sun, 14 Apr 2019 12:11:45 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ECBj00042190; Sun, 14 Apr 2019 12:11:45 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141211.x3ECBj00042190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 12:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346207 - stable/12/sbin/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sbin/ipfw X-SVN-Commit-Revision: 346207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BCF88EB45 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 12:11:46 -0000 Author: ae Date: Sun Apr 14 12:11:45 2019 New Revision: 346207 URL: https://svnweb.freebsd.org/changeset/base/346207 Log: MFC r344665 (by trhodes): Grammar tweaks in ipfw manual page. Modified: stable/12/sbin/ipfw/ipfw.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw.8 ============================================================================== --- stable/12/sbin/ipfw/ipfw.8 Sun Apr 14 12:10:23 2019 (r346206) +++ stable/12/sbin/ipfw/ipfw.8 Sun Apr 14 12:11:45 2019 (r346207) @@ -248,7 +248,7 @@ or .Cm limit rule, and are typically used to open the firewall on-demand to legitimate traffic only. -Please, note, that +Please note, that .Cm keep-state amd .Cm limit @@ -699,8 +699,8 @@ is set to 0 (default), one can use attached to the .Li ipfw0 pseudo interface. -This pseudo interface can be created after a boot -manually by using the following command: +This pseudo interface can be created manually after a system +boot by using the following command: .Bd -literal -offset indent # ifconfig ipfw0 create .Ed @@ -713,7 +713,7 @@ file: firewall_logif="YES" .Ed .Pp -There is no overhead if no +There is zero overhead when no .Xr bpf 4 is attached to the pseudo interface. .Pp From owner-svn-src-all@freebsd.org Sun Apr 14 12:14:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5FB01574211; Sun, 14 Apr 2019 12:14:26 +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 5C13A8ED3C; Sun, 14 Apr 2019 12:14:26 +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 0AA192050E; Sun, 14 Apr 2019 12:14:26 +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 x3ECEPnq042467; Sun, 14 Apr 2019 12:14:25 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ECEPJT042466; Sun, 14 Apr 2019 12:14:25 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141214.x3ECEPJT042466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 12:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346208 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 346208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5C13A8ED3C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 12:14:27 -0000 Author: ae Date: Sun Apr 14 12:14:25 2019 New Revision: 346208 URL: https://svnweb.freebsd.org/changeset/base/346208 Log: MFC r344709 (by ygy): Fix typos and caps for ipfw(8) man page. PR: 236030 Submitted by: olgeni Modified: stable/11/sbin/ipfw/ipfw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:11:45 2019 (r346207) +++ stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:14:25 2019 (r346208) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2018 +.Dd March 1, 2019 .Dt IPFW 8 .Os .Sh NAME @@ -1329,11 +1329,11 @@ its use is discouraged. .Brc .Bl -tag -width indent .It Cm any -matches any IP address. +Matches any IP address. .It Cm me -matches any IP address configured on an interface in the system. +Matches any IP address configured on an interface in the system. .It Cm me6 -matches any IPv6 address configured on an interface in the system. +Matches any IPv6 address configured on an interface in the system. The address list is evaluated at the time the packet is analysed. .It Cm table Ns Pq Ar name Ns Op , Ns Ar value @@ -2083,7 +2083,7 @@ The following table types are supported: .It Ar flow-spec : Ar flow-field Ns Op , Ns Ar flow-spec .It Ar flow-field : src-ip | proto | src-port | dst-ip | dst-port .It Cm addr -matches IPv4 or IPv6 address. +Matches IPv4 or IPv6 address. Each entry is represented by an .Ar addr Ns Op / Ns Ar masklen and will match all addresses with base @@ -2097,11 +2097,11 @@ is not specified, it defaults to 32 for IPv4 and 128 f When looking up an IP address in a table, the most specific entry will match. .It Cm iface -matches interface names. +Matches interface names. Each entry is represented by string treated as interface name. Wildcards are not supported. .It Cm number -maches protocol ports, uids/gids or jail IDs. +Matches protocol ports, uids/gids or jail IDs. Each entry is represented by 32-bit unsigned integer. Ranges are not supported. .It Cm flow @@ -2792,7 +2792,7 @@ specifies the quantum (credit) of the scheduler. .Ar m is the number of bytes a queue can serve before being moved to the tail of old queues list. -The default is 1514 bytes, and the maximum accepable value +The default is 1514 bytes, and the maximum acceptable value is 9000 bytes. .It Cm limit .Ar m @@ -2800,14 +2800,14 @@ specifies the hard size limit (in unit of packets) of instance of the scheduler. The default value of .Ar m -is 10240 packets, and the maximum accepable value is 20480 packets. +is 10240 packets, and the maximum acceptable value is 20480 packets. .It Cm flows .Ar m specifies the total number of flow queues (sub-queues) that fq_* creates and manages. By default, 1024 sub-queues are created when an instance of the fq_{codel/pie} scheduler is created. -The maximum accepable value is +The maximum acceptable value is 65536. .El .Pp @@ -2906,7 +2906,7 @@ is the typical queue size for Ethernet devices. Note that for slow speed links you should keep the queue size short or your traffic might be affected by a significant queueing delay. -E.g., 50 max-sized ethernet packets (1500 bytes) mean 600Kbit +E.g., 50 max-sized Ethernet packets (1500 bytes) mean 600Kbit or 20s of queue on a 30Kbit/s pipe. Even worse effects can result if you get packets from an interface with a much larger MTU, e.g.\& the loopback interface @@ -3053,7 +3053,7 @@ De-randomisation is enabled by default. .It Cm onoff enable turning PIE on and off depending on queue load. If this option is enabled, -PIE turnes on when over 1/3 of queue becomes full. +PIE turns on when over 1/3 of queue becomes full. This option is disabled by default. .It Cm dre | ts @@ -4035,7 +4035,7 @@ by adding the following to the appropriate place in ru If your network has network traffic analyzer connected to your host directly via dedicated interface or remotely via RSPAN vlan, you can selectively mirror -some ethernet layer2 frames to the analyzer. +some Ethernet layer2 frames to the analyzer. .Pp First, make sure your firewall is already configured and runs. Then, enable layer2 processing if not already enabled: @@ -4380,7 +4380,7 @@ or it could be split in: .Dl "ipfw nat 5 config redirect_port tcp" .Dl " 192.168.0.1:80,192.168.0.10:22,192.168.0.20:25 500" .Pp -Sometimes you may want to mix NAT and dynamic rules. It could be achived with +Sometimes you may want to mix NAT and dynamic rules. It could be achieved with .Cm record-state and .Cm defer-action @@ -4393,8 +4393,8 @@ rule will be performed as soon as rule is matched. In .Cm allow rule packet need to be passed to NAT, not allowed as soon is possible. .Pp -There is example of set of rules to achive this. Bear in mind that this -is exmaple only and it is not very usefult by itself. +There is example of set of rules to achieve this. Bear in mind that this +is exmaple only and it is not very useful by itself. .Pp On way out, after all checks place this rules: .Pp From owner-svn-src-all@freebsd.org Sun Apr 14 12:28:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C1021574741; Sun, 14 Apr 2019 12:28:44 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B32088F57D; Sun, 14 Apr 2019 12:28:43 +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 88ADA206D1; Sun, 14 Apr 2019 12:28:43 +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 x3ECShev048117; Sun, 14 Apr 2019 12:28:43 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ECSg66048109; Sun, 14 Apr 2019 12:28:42 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141228.x3ECSg66048109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 12:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346209 - in stable/11: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B32088F57D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 12:28:44 -0000 Author: ae Date: Sun Apr 14 12:28:41 2019 New Revision: 346209 URL: https://svnweb.freebsd.org/changeset/base/346209 Log: MFC r339542: Retire IPFIREWALL_NAT64_DIRECT_OUTPUT kernel option. And add ability to switch the output method in run-time. Also document some sysctl variables that can by changed for NAT64 module. NAT64 had compile time option IPFIREWALL_NAT64_DIRECT_OUTPUT to use if_output directly from nat64 module. By default is used netisr based output method. Now both methods can be used, but they require different handling by rules. Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D16647 Modified: stable/11/sbin/ipfw/ipfw.8 stable/11/sys/conf/options stable/11/sys/modules/ipfw_nat64/Makefile stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:14:25 2019 (r346208) +++ stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:28:41 2019 (r346209) @@ -3304,9 +3304,14 @@ Make sure that ND6 neighbor solicitation (ICMPv6 type advertisement (ICMPv6 type 136) messages will not be handled by translation rules. .Pp -After translation NAT64 translator sends packets through corresponding netisr -queue. +After translation NAT64 translator by default sends packets through +corresponding netisr queue. Thus translator host should be configured as IPv4 and IPv6 router. +Also this means, that a packet is handled by firewall twice. +First time an original packet is handled and consumed by translator, +and then it is handled again as translated packet. +This behavior can be changed by sysctl variable +.Va net.inet.ip.fw.nat64_direct_output . .Pp The stateful NAT64 configuration command is the following: .Bd -ragged -offset indent @@ -3929,6 +3934,41 @@ Default is no. Controls whether bridged packets are passed to .Nm . Default is no. +.It Va net.inet.ip.fw.nat64_allow_private : No 0 +Defines how +.Nm nat64 +handles private IPv4 addresses: +.Bl -tag -width indent +.It Cm 0 +Packets with private IPv4 will not be handled by translator +.It Cm 1 +Translator will accept and process packets with private IPv4 addresses. +.El +.It Va net.inet.ip.fw.nat64_debug : No 0 +Controls debugging messages produced by +.Nm ipfw_nat64 +module. +.It Va net.inet.ip.fw.nat64_direct_output : No 0 +Controls the output method used by +.Nm ipfw_nat64 +module: +.Bl -tag -width indent +.It Cm 0 +A packet is handled by +.Nm ipfw +twice. +First time an original packet is handled by +.Nm ipfw +and consumed by +.Nm ipfw_nat64 +translator. +Then translated packet is queued via netisr to input processing again. +.It Cm 1 +A packet is handled by +.Nm ipfw +only once, and after translation it will be pushed directly to outgoing +interface. +.El .El .Sh INTERNAL DIAGNOSTICS There are some commands that may be useful to understand current state Modified: stable/11/sys/conf/options ============================================================================== --- stable/11/sys/conf/options Sun Apr 14 12:14:25 2019 (r346208) +++ stable/11/sys/conf/options Sun Apr 14 12:28:41 2019 (r346209) @@ -422,7 +422,6 @@ IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h IPFIREWALL_NAT64 opt_ipfw.h -IPFIREWALL_NAT64_DIRECT_OUTPUT opt_ipfw.h IPFIREWALL_NPTV6 opt_ipfw.h IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h Modified: stable/11/sys/modules/ipfw_nat64/Makefile ============================================================================== --- stable/11/sys/modules/ipfw_nat64/Makefile Sun Apr 14 12:14:25 2019 (r346208) +++ stable/11/sys/modules/ipfw_nat64/Makefile Sun Apr 14 12:28:41 2019 (r346209) @@ -6,8 +6,5 @@ KMOD= ipfw_nat64 SRCS= ip_fw_nat64.c nat64_translate.c SRCS+= nat64lsn.c nat64lsn_control.c SRCS+= nat64stl.c nat64stl_control.c -SRCS+= opt_ipfw.h - -#CFLAGS+= -DIPFIREWALL_NAT64_DIRECT_OUTPUT .include Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 12:14:25 2019 (r346208) +++ stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 12:28:41 2019 (r346209) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include "ip_fw_nat64.h" +#include "nat64_translate.h" VNET_DEFINE(int, nat64_debug) = 0; VNET_DEFINE(int, nat64_allow_private) = 0; @@ -56,8 +57,26 @@ SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, nat64_debug, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nat64_debug), 0, "Debug level for NAT64 module"); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, nat64_allow_private, - CTLFLAG_VNET |CTLFLAG_RW, &VNET_NAME(nat64_allow_private), 0, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nat64_allow_private), 0, "Allow use of non-global IPv4 addresses with NAT64"); + +static int +sysctl_direct_output(SYSCTL_HANDLER_ARGS) +{ + uint32_t value; + int error; + + value = nat64_get_output_method(); + error = sysctl_handle_32(oidp, &value, 0, req); + /* Read operation or some error */ + if ((error != 0) || (req->newptr == NULL)) + return (error); + nat64_set_output_method(value); + return (0); +} +SYSCTL_PROC(_net_inet_ip_fw, OID_AUTO, nat64_direct_output, + CTLFLAG_VNET | CTLTYPE_U32 | CTLFLAG_RW, 0, 0, sysctl_direct_output, "IU", + "Use if_output directly instead of deffered netisr-based processing"); static int vnet_ipfw_nat64_init(const void *arg __unused) Modified: stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 12:14:25 2019 (r346208) +++ stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 12:28:41 2019 (r346209) @@ -25,8 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_ipfw.h" - #include __FBSDID("$FreeBSD$"); @@ -71,6 +69,53 @@ __FBSDID("$FreeBSD$"); #include "ip_fw_nat64.h" #include "nat64_translate.h" + +typedef int (*nat64_output_t)(struct ifnet *, struct mbuf *, + struct sockaddr *, struct nat64_counters *, void *); +typedef int (*nat64_output_one_t)(struct mbuf *, struct nat64_counters *, + void *); + +static int nat64_find_route4(struct nhop4_basic *, struct sockaddr_in *, + struct mbuf *); +static int nat64_find_route6(struct nhop6_basic *, struct sockaddr_in6 *, + struct mbuf *); +static int nat64_output_one(struct mbuf *, struct nat64_counters *, void *); +static int nat64_output(struct ifnet *, struct mbuf *, struct sockaddr *, + struct nat64_counters *, void *); +static int nat64_direct_output_one(struct mbuf *, struct nat64_counters *, + void *); +static int nat64_direct_output(struct ifnet *, struct mbuf *, + struct sockaddr *, struct nat64_counters *, void *); + +struct nat64_methods { + nat64_output_t output; + nat64_output_one_t output_one; +}; +static const struct nat64_methods nat64_netisr = { + .output = nat64_output, + .output_one = nat64_output_one +}; +static const struct nat64_methods nat64_direct = { + .output = nat64_direct_output, + .output_one = nat64_direct_output_one +}; +static VNET_DEFINE(const struct nat64_methods *, nat64out) = &nat64_netisr; +#define V_nat64out VNET(nat64out) + +void +nat64_set_output_method(int direct) +{ + + V_nat64out = direct != 0 ? &nat64_direct: &nat64_netisr; +} + +int +nat64_get_output_method(void) +{ + + return (V_nat64out == &nat64_direct ? 1: 0); +} + static void nat64_log(struct pfloghdr *logdata, struct mbuf *m, sa_family_t family) { @@ -80,14 +125,8 @@ nat64_log(struct pfloghdr *logdata, struct mbuf *m, sa ipfw_bpf_mtap2(logdata, PFLOG_HDRLEN, m); } -#ifdef IPFIREWALL_NAT64_DIRECT_OUTPUT -static NAT64NOINLINE int nat64_find_route4(struct nhop4_basic *, - struct sockaddr_in *, struct mbuf *); -static NAT64NOINLINE int nat64_find_route6(struct nhop6_basic *, - struct sockaddr_in6 *, struct mbuf *); - -static NAT64NOINLINE int -nat64_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, +static int +nat64_direct_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct nat64_counters *stats, void *logdata) { int error; @@ -100,8 +139,9 @@ nat64_output(struct ifnet *ifp, struct mbuf *m, struct return (error); } -static NAT64NOINLINE int -nat64_output_one(struct mbuf *m, struct nat64_counters *stats, void *logdata) +static int +nat64_direct_output_one(struct mbuf *m, struct nat64_counters *stats, + void *logdata) { struct nhop6_basic nh6; struct nhop4_basic nh4; @@ -153,8 +193,8 @@ nat64_output_one(struct mbuf *m, struct nat64_counters NAT64STAT_INC(stats, oerrors); return (error); } -#else /* !IPFIREWALL_NAT64_DIRECT_OUTPUT */ -static NAT64NOINLINE int + +static int nat64_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct nat64_counters *stats, void *logdata) { @@ -187,13 +227,12 @@ nat64_output(struct ifnet *ifp, struct mbuf *m, struct return (ret); } -static NAT64NOINLINE int +static int nat64_output_one(struct mbuf *m, struct nat64_counters *stats, void *logdata) { return (nat64_output(NULL, m, NULL, stats, logdata)); } -#endif /* !IPFIREWALL_NAT64_DIRECT_OUTPUT */ /* * Check the given IPv6 prefix and length according to RFC6052: @@ -426,12 +465,10 @@ nat64_init_ip4hdr(const struct ip6_hdr *ip6, const str ip->ip_hl = sizeof(*ip) >> 2; ip->ip_tos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; ip->ip_len = htons(sizeof(*ip) + plen); -#ifdef IPFIREWALL_NAT64_DIRECT_OUTPUT - ip->ip_ttl = ip6->ip6_hlim - IPV6_HLIMDEC; -#else - /* Forwarding code will decrement TTL. */ ip->ip_ttl = ip6->ip6_hlim; -#endif + /* Forwarding code will decrement TTL for netisr based output. */ + if (V_nat64out == &nat64_direct) + ip->ip_ttl -= IPV6_HLIMDEC; ip->ip_sum = 0; ip->ip_p = (proto == IPPROTO_ICMPV6) ? IPPROTO_ICMP: proto; ip_fillid(ip); @@ -649,7 +686,7 @@ nat64_icmp6_reflect(struct mbuf *m, uint8_t type, uint icmp6->icmp6_cksum = in6_cksum(n, IPPROTO_ICMPV6, sizeof(struct ip6_hdr), plen); m_freem(m); - nat64_output_one(n, stats, logdata); + V_nat64out->output_one(n, stats, logdata); return; freeit: NAT64STAT_INC(stats, dropped); @@ -752,7 +789,7 @@ nat64_icmp_reflect(struct mbuf *m, uint8_t type, icmp->icmp_cksum = in_cksum_skip(n, sizeof(struct ip) + plen, sizeof(struct ip)); m_freem(m); - nat64_output_one(n, stats, logdata); + V_nat64out->output_one(n, stats, logdata); return; freeit: NAT64STAT_INC(stats, dropped); @@ -1169,12 +1206,10 @@ nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *s ip6.ip6_flow = htonl(ip->ip_tos << 20); ip6.ip6_vfc |= IPV6_VERSION; -#ifdef IPFIREWALL_NAT64_DIRECT_OUTPUT - ip6.ip6_hlim = ip->ip_ttl - IPTTLDEC; -#else - /* Forwarding code will decrement HLIM. */ ip6.ip6_hlim = ip->ip_ttl; -#endif + /* Forwarding code will decrement TTL for netisr based output. */ + if (V_nat64out == &nat64_direct) + ip6.ip6_hlim -= IPTTLDEC; ip6.ip6_plen = htons(plen); ip6.ip6_nxt = (proto == IPPROTO_ICMP) ? IPPROTO_ICMPV6: proto; /* Convert checksums. */ @@ -1207,7 +1242,7 @@ nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *s mbufq_init(&mq, 255); nat64_fragment6(&cfg->stats, &ip6, &mq, m, nh.nh_mtu, ip_id, ip_off); while ((m = mbufq_dequeue(&mq)) != NULL) { - if (nat64_output(nh.nh_ifp, m, (struct sockaddr *)&dst, + if (V_nat64out->output(nh.nh_ifp, m, (struct sockaddr *)&dst, &cfg->stats, logdata) != 0) break; NAT64STAT_INC(&cfg->stats, opcnt46); @@ -1417,9 +1452,8 @@ nat64_handle_icmp6(struct mbuf *m, int hlen, uint32_t ip.ip_dst.s_addr = aaddr; ip.ip_src.s_addr = nat64_extract_ip4(cfg, &ip6i->ip6_src); /* XXX: Make fake ulp header */ -#ifdef IPFIREWALL_NAT64_DIRECT_OUTPUT - ip6i->ip6_hlim += IPV6_HLIMDEC; /* init_ip4hdr will decrement it */ -#endif + if (V_nat64out == &nat64_direct) /* init_ip4hdr will decrement it */ + ip6i->ip6_hlim += IPV6_HLIMDEC; nat64_init_ip4hdr(ip6i, ip6f, plen, proto, &ip); m_adj(m, hlen - sizeof(struct ip)); bcopy(&ip, mtod(m, void *), sizeof(ip)); @@ -1589,7 +1623,7 @@ nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, ui m_adj(m, hlen - sizeof(ip)); bcopy(&ip, mtod(m, void *), sizeof(ip)); - if (nat64_output(nh.nh_ifp, m, (struct sockaddr *)&dst, + if (V_nat64out->output(nh.nh_ifp, m, (struct sockaddr *)&dst, &cfg->stats, logdata) == 0) NAT64STAT_INC(&cfg->stats, opcnt64); return (NAT64RETURN); Modified: stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 12:14:25 2019 (r346208) +++ stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 12:28:41 2019 (r346209) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov + * Copyright (c) 2015-2018 Yandex LLC + * Copyright (c) 2015-2018 Andrey V. Elsukov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -141,6 +141,9 @@ void nat64_embed_ip4(const struct nat64_config *cfg, i struct in6_addr *ip6); in_addr_t nat64_extract_ip4(const struct nat64_config *cfg, const struct in6_addr *ip6); + +void nat64_set_output_method(int); +int nat64_get_output_method(void); #endif From owner-svn-src-all@freebsd.org Sun Apr 14 12:34:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB91E1574C54; Sun, 14 Apr 2019 12:34:34 +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 8F5468FBB0; Sun, 14 Apr 2019 12:34:34 +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 0A76B2088F; Sun, 14 Apr 2019 12:34:34 +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 x3ECYYd7053193; Sun, 14 Apr 2019 12:34:34 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ECYUHj053178; Sun, 14 Apr 2019 12:34:30 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141234.x3ECYUHj053178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 12:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346210 - in stable/11: sbin/ipfw sys/netinet6 sys/netpfil/ipfw sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11: sbin/ipfw sys/netinet6 sys/netpfil/ipfw sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F5468FBB0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 12:34:35 -0000 Author: ae Date: Sun Apr 14 12:34:30 2019 New Revision: 346210 URL: https://svnweb.freebsd.org/changeset/base/346210 Log: MFC r345262: Modify struct nat64_config. Add second IPv6 prefix to generic config structure and rename another fields to conform to RFC6877. Now it contains two prefixes and length: PLAT is provider-side translator that translates N:1 global IPv6 addresses to global IPv4 addresses. CLAT is customer-side translator (XLAT) that algorithmically translates 1:1 IPv4 addresses to global IPv6 addresses. Use PLAT prefix in stateless (nat64stl) and stateful (nat64lsn) translators. Modify nat64_extract_ip4() and nat64_embed_ip4() functions to accept prefix length and use plat_plen to specify prefix length. Retire net.inet.ip.fw.nat64_allow_private sysctl variable. Add NAT64_ALLOW_PRIVATE flag and use "allow_private" config option to configure this ability separately for each NAT64 instance. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: stable/11/sbin/ipfw/ipfw.8 stable/11/sbin/ipfw/ipfw2.h stable/11/sbin/ipfw/nat64lsn.c stable/11/sbin/ipfw/nat64stl.c stable/11/sys/netinet6/ip_fw_nat64.h stable/11/sys/netpfil/ipfw/ip_fw_pfil.c stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c stable/11/sys/netpfil/ipfw/nat64/nat64stl.c stable/11/sys/netpfil/ipfw/nat64/nat64stl.h stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:34:30 2019 (r346210) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2019 +.Dd March 18, 2019 .Dt IPFW 8 .Os .Sh NAME @@ -3408,6 +3408,14 @@ With you are able to see each handled packet before and after translation. .It Cm -log Turn off logging of all handled packets via BPF. +.It Cm allow_private +Turn on processing private IPv4 addresses. By default IPv6 packets with +destinations mapped to private address ranges defined by RFC1918 are not +processed. +.It Cm -allow_private +Turn off private address handling in +.Nm nat64 +instance. .El .Pp To inspect a states table of stateful NAT64 the following command can be used: @@ -3455,6 +3463,14 @@ Turn on logging of all handled packets via BPF through interface. .It Cm -log Turn off logging of all handled packets via BPF. +.It Cm allow_private +Turn on processing private IPv4 addresses. By default IPv6 packets with +destinations mapped to private address ranges defined by RFC1918 are not +processed. +.It Cm -allow_private +Turn off private address handling in +.Nm nat64 +instance. .El .Pp Note that the behavior of stateless translator with respect to not matched @@ -3934,16 +3950,6 @@ Default is no. Controls whether bridged packets are passed to .Nm . Default is no. -.It Va net.inet.ip.fw.nat64_allow_private : No 0 -Defines how -.Nm nat64 -handles private IPv4 addresses: -.Bl -tag -width indent -.It Cm 0 -Packets with private IPv4 will not be handled by translator -.It Cm 1 -Translator will accept and process packets with private IPv4 addresses. -.El .It Va net.inet.ip.fw.nat64_debug : No 0 Controls debugging messages produced by .Nm ipfw_nat64 Modified: stable/11/sbin/ipfw/ipfw2.h ============================================================================== --- stable/11/sbin/ipfw/ipfw2.h Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sbin/ipfw/ipfw2.h Sun Apr 14 12:34:30 2019 (r346210) @@ -288,6 +288,8 @@ enum tokens { TOK_UDP_AGE, TOK_ICMP_AGE, TOK_LOGOFF, + TOK_PRIVATE, + TOK_PRIVATEOFF, /* NPTv6 tokens */ TOK_NPTV6, Modified: stable/11/sbin/ipfw/nat64lsn.c ============================================================================== --- stable/11/sbin/ipfw/nat64lsn.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sbin/ipfw/nat64lsn.c Sun Apr 14 12:34:30 2019 (r346210) @@ -377,6 +377,8 @@ static struct _s_x nat64newcmds[] = { { "icmp_age", TOK_ICMP_AGE }, { "log", TOK_LOG }, { "-log", TOK_LOGOFF }, + { "allow_private", TOK_PRIVATE }, + { "-allow_private", TOK_PRIVATEOFF }, { NULL, 0 } }; @@ -522,6 +524,12 @@ nat64lsn_create(const char *name, uint8_t set, int ac, case TOK_LOGOFF: cfg->flags &= ~NAT64_LOG; break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; } } @@ -627,6 +635,12 @@ nat64lsn_config(const char *name, uint8_t set, int ac, case TOK_LOGOFF: cfg->flags &= ~NAT64_LOG; break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; default: errx(EX_USAGE, "Can't change %s option", opt); } @@ -801,6 +815,8 @@ nat64lsn_show_cb(ipfw_nat64lsn_cfg *cfg, const char *n printf(" icmp_age %u", cfg->st_icmp_ttl); if (cfg->flags & NAT64_LOG) printf(" log"); + if (cfg->flags & NAT64_ALLOW_PRIVATE) + printf(" allow_private"); printf("\n"); return (0); } Modified: stable/11/sbin/ipfw/nat64stl.c ============================================================================== --- stable/11/sbin/ipfw/nat64stl.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sbin/ipfw/nat64stl.c Sun Apr 14 12:34:30 2019 (r346210) @@ -196,6 +196,8 @@ static struct _s_x nat64newcmds[] = { { "prefix6", TOK_PREFIX6 }, { "log", TOK_LOG }, { "-log", TOK_LOGOFF }, + { "allow_private", TOK_PRIVATE }, + { "-allow_private", TOK_PRIVATEOFF }, { NULL, 0 } }; @@ -263,6 +265,12 @@ nat64stl_create(const char *name, uint8_t set, int ac, case TOK_LOGOFF: cfg->flags &= ~NAT64_LOG; break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; } } @@ -332,6 +340,12 @@ nat64stl_config(const char *name, uint8_t set, int ac, case TOK_LOGOFF: cfg->flags &= ~NAT64_LOG; break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; default: errx(EX_USAGE, "Can't change %s option", opt); } @@ -451,6 +465,8 @@ nat64stl_show_cb(ipfw_nat64stl_cfg *cfg, const char *n printf(" prefix6 %s/%u", abuf, cfg->plen6); if (cfg->flags & NAT64_LOG) printf(" log"); + if (cfg->flags & NAT64_ALLOW_PRIVATE) + printf(" allow_private"); printf("\n"); return (0); } Modified: stable/11/sys/netinet6/ip_fw_nat64.h ============================================================================== --- stable/11/sys/netinet6/ip_fw_nat64.h Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netinet6/ip_fw_nat64.h Sun Apr 14 12:34:30 2019 (r346210) @@ -40,7 +40,7 @@ struct ipfw_nat64stl_stats { uint64_t noroute4; uint64_t noroute6; uint64_t noproto; /* Protocol not supported */ - uint64_t nomem; /* mbuf allocation filed */ + uint64_t nomem; /* mbuf allocation failed */ uint64_t dropped; /* dropped due to some errors */ }; @@ -53,7 +53,7 @@ struct ipfw_nat64lsn_stats { uint64_t noroute4; uint64_t noroute6; uint64_t noproto; /* Protocol not supported */ - uint64_t nomem; /* mbuf allocation filed */ + uint64_t nomem; /* mbuf allocation failed */ uint64_t dropped; /* dropped due to some errors */ uint64_t nomatch4; /* No addr/port match */ @@ -79,8 +79,10 @@ struct ipfw_nat64lsn_stats { uint64_t _reserved[4]; }; -#define NAT64_LOG 0x0001 /* Enable logging via BPF */ - +#define NAT64_LOG 0x0001 /* Enable logging via BPF */ +#define NAT64_ALLOW_PRIVATE 0x0002 /* Allow private IPv4 address + * translation + */ typedef struct _ipfw_nat64stl_cfg { char name[64]; /* NAT name */ ipfw_obj_ntlv ntlv6; /* object name tlv */ Modified: stable/11/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_pfil.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/ip_fw_pfil.c Sun Apr 14 12:34:30 2019 (r346210) @@ -150,8 +150,8 @@ again: ipfw = ipfw_chk(&args); *m0 = args.m; - KASSERT(*m0 != NULL || ipfw == IP_FW_DENY, ("%s: m0 is NULL", - __func__)); + KASSERT(*m0 != NULL || ipfw == IP_FW_DENY || + ipfw == IP_FW_NAT64, ("%s: m0 is NULL", __func__)); /* breaking out of the switch means drop */ switch (ipfw) { Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 12:34:30 2019 (r346210) @@ -51,14 +51,10 @@ __FBSDID("$FreeBSD$"); #include "nat64_translate.h" VNET_DEFINE(int, nat64_debug) = 0; -VNET_DEFINE(int, nat64_allow_private) = 0; SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, nat64_debug, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nat64_debug), 0, "Debug level for NAT64 module"); -SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, nat64_allow_private, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nat64_allow_private), 0, - "Allow use of non-global IPv4 addresses with NAT64"); static int sysctl_direct_output(SYSCTL_HANDLER_ARGS) Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 12:34:30 2019 (r346210) @@ -41,9 +41,7 @@ #define DP_ALL 0xFFFF VNET_DECLARE(int, nat64_debug); -VNET_DECLARE(int, nat64_allow_private); #define V_nat64_debug VNET(nat64_debug) -#define V_nat64_allow_private VNET(nat64_allow_private) #if 0 #define NAT64NOINLINE __noinline Modified: stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 12:34:30 2019 (r346210) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -241,7 +242,7 @@ nat64_output_one(struct mbuf *m, struct nat64_counters * Returns zero on success, otherwise EINVAL. */ int -nat64_check_prefix6(const struct in6_addr *prefix, int length) +nat64_check_prefixlen(int length) { switch (length) { @@ -250,29 +251,40 @@ nat64_check_prefix6(const struct in6_addr *prefix, int case 48: case 56: case 64: - /* Well-known prefix has 96 prefix length */ - if (IN6_IS_ADDR_WKPFX(prefix)) - return (EINVAL); - /* FALLTHROUGH */ case 96: - /* Bits 64 to 71 must be set to zero */ - if (prefix->__u6_addr.__u6_addr8[8] != 0) - return (EINVAL); - /* Some extra checks */ - if (IN6_IS_ADDR_MULTICAST(prefix) || - IN6_IS_ADDR_UNSPECIFIED(prefix) || - IN6_IS_ADDR_LOOPBACK(prefix)) - return (EINVAL); return (0); } return (EINVAL); } int +nat64_check_prefix6(const struct in6_addr *prefix, int length) +{ + + if (nat64_check_prefixlen(length) != 0) + return (EINVAL); + + /* Well-known prefix has 96 prefix length */ + if (IN6_IS_ADDR_WKPFX(prefix) && length != 96) + return (EINVAL); + + /* Bits 64 to 71 must be set to zero */ + if (prefix->__u6_addr.__u6_addr8[8] != 0) + return (EINVAL); + + /* Some extra checks */ + if (IN6_IS_ADDR_MULTICAST(prefix) || + IN6_IS_ADDR_UNSPECIFIED(prefix) || + IN6_IS_ADDR_LOOPBACK(prefix)) + return (EINVAL); + return (0); +} + +int nat64_check_private_ip4(const struct nat64_config *cfg, in_addr_t ia) { - if (V_nat64_allow_private) + if (cfg->flags & NAT64_ALLOW_PRIVATE) return (0); /* WKPFX must not be used to represent non-global IPv4 addresses */ @@ -301,29 +313,34 @@ nat64_check_private_ip4(const struct nat64_config *cfg return (0); } +/* + * Embed @ia IPv4 address into @ip6 IPv6 address. + * Place to embedding determined from prefix length @plen. + */ void -nat64_embed_ip4(const struct nat64_config *cfg, in_addr_t ia, - struct in6_addr *ip6) +nat64_embed_ip4(struct in6_addr *ip6, int plen, in_addr_t ia) { - /* assume the prefix6 is properly filled with zeros */ - bcopy(&cfg->prefix6, ip6, sizeof(*ip6)); - switch (cfg->plen6) { + switch (plen) { case 32: case 96: - ip6->s6_addr32[cfg->plen6 / 32] = ia; + ip6->s6_addr32[plen / 32] = ia; break; case 40: case 48: case 56: + /* + * Preserve prefix bits. + * Since suffix bits should be zero and reserved for future + * use, we just overwrite the whole word, where they are. + */ + ip6->s6_addr32[1] &= 0xffffffff << (32 - plen % 32); #if BYTE_ORDER == BIG_ENDIAN - ip6->s6_addr32[1] = cfg->prefix6.s6_addr32[1] | - (ia >> (cfg->plen6 % 32)); - ip6->s6_addr32[2] = ia << (24 - cfg->plen6 % 32); + ip6->s6_addr32[1] |= ia >> (plen % 32); + ip6->s6_addr32[2] = ia << (24 - plen % 32); #elif BYTE_ORDER == LITTLE_ENDIAN - ip6->s6_addr32[1] = cfg->prefix6.s6_addr32[1] | - (ia << (cfg->plen6 % 32)); - ip6->s6_addr32[2] = ia >> (24 - cfg->plen6 % 32); + ip6->s6_addr32[1] |= ia << (plen % 32); + ip6->s6_addr32[2] = ia >> (24 - plen % 32); #endif break; case 64: @@ -336,13 +353,18 @@ nat64_embed_ip4(const struct nat64_config *cfg, in_add #endif break; default: - panic("Wrong plen6"); + panic("Wrong plen: %d", plen); }; + /* + * Bits 64 to 71 of the address are reserved for compatibility + * with the host identifier format defined in the IPv6 addressing + * architecture [RFC4291]. These bits MUST be set to zero. + */ ip6->s6_addr8[8] = 0; } in_addr_t -nat64_extract_ip4(const struct nat64_config *cfg, const struct in6_addr *ip6) +nat64_extract_ip4(const struct in6_addr *ip6, int plen) { in_addr_t ia; @@ -353,7 +375,7 @@ nat64_extract_ip4(const struct nat64_config *cfg, cons * The suffix bits are reserved for future extensions and SHOULD * be set to zero. */ - switch (cfg->plen6) { + switch (plen) { case 32: if (ip6->s6_addr32[3] != 0 || ip6->s6_addr32[2] != 0) goto badip6; @@ -377,20 +399,20 @@ nat64_extract_ip4(const struct nat64_config *cfg, cons (ip6->s6_addr32[3] & htonl(0x00ffffff)) != 0) goto badip6; }; - switch (cfg->plen6) { + switch (plen) { case 32: case 96: - ia = ip6->s6_addr32[cfg->plen6 / 32]; + ia = ip6->s6_addr32[plen / 32]; break; case 40: case 48: case 56: #if BYTE_ORDER == BIG_ENDIAN - ia = (ip6->s6_addr32[1] << (cfg->plen6 % 32)) | - (ip6->s6_addr32[2] >> (24 - cfg->plen6 % 32)); + ia = (ip6->s6_addr32[1] << (plen % 32)) | + (ip6->s6_addr32[2] >> (24 - plen % 32)); #elif BYTE_ORDER == LITTLE_ENDIAN - ia = (ip6->s6_addr32[1] >> (cfg->plen6 % 32)) | - (ip6->s6_addr32[2] << (24 - cfg->plen6 % 32)); + ia = (ip6->s6_addr32[1] >> (plen % 32)) | + (ip6->s6_addr32[2] << (24 - plen % 32)); #endif break; case 64: @@ -403,12 +425,9 @@ nat64_extract_ip4(const struct nat64_config *cfg, cons default: return (0); }; - if (nat64_check_ip4(ia) != 0 || - nat64_check_private_ip4(cfg, ia) != 0) - goto badip4; + if (nat64_check_ip4(ia) == 0) + return (ia); - return (ia); -badip4: DPRINTF(DP_GENERIC | DP_DROPS, "invalid destination address: %08x", ia); return (0); @@ -435,7 +454,7 @@ badip6: * IPv6 to IPv4: HC' = cksum_add(HC, result) * IPv4 to IPv6: HC' = cksum_add(HC, ~result) */ -static NAT64NOINLINE uint16_t +static uint16_t nat64_cksum_convert(struct ip6_hdr *ip6, struct ip *ip) { uint32_t sum; @@ -455,7 +474,7 @@ nat64_cksum_convert(struct ip6_hdr *ip6, struct ip *ip return (sum); } -static NAT64NOINLINE void +static void nat64_init_ip4hdr(const struct ip6_hdr *ip6, const struct ip6_frag *frag, uint16_t plen, uint8_t proto, struct ip *ip) { @@ -1025,9 +1044,11 @@ nat64_icmp_translate(struct mbuf *m, struct ip6_hdr *i /* Construct new inner IPv6 header */ eip6 = mtodo(n, offset + sizeof(struct icmp6_hdr)); eip6->ip6_src = ip6->ip6_dst; - /* Use the fact that we have single /96 prefix for IPv4 map */ + + /* Use the same prefix that we have in outer header */ eip6->ip6_dst = ip6->ip6_src; - nat64_embed_ip4(cfg, ip.ip_dst.s_addr, &eip6->ip6_dst); + MPASS(cfg->flags & NAT64_PLATPFX); + nat64_embed_ip4(&eip6->ip6_dst, cfg->plat_plen, ip.ip_dst.s_addr); eip6->ip6_flow = htonl(ip.ip_tos << 20); eip6->ip6_vfc |= IPV6_VERSION; @@ -1450,7 +1471,9 @@ nat64_handle_icmp6(struct mbuf *m, int hlen, uint32_t /* Now we need to make a fake IPv4 packet to generate ICMP message */ ip.ip_dst.s_addr = aaddr; - ip.ip_src.s_addr = nat64_extract_ip4(cfg, &ip6i->ip6_src); + ip.ip_src.s_addr = nat64_extract_ip4(&ip6i->ip6_src, cfg->plat_plen); + if (ip.ip_src.s_addr == 0) + goto fail; /* XXX: Make fake ulp header */ if (V_nat64out == &nat64_direct) /* init_ip4hdr will decrement it */ ip6i->ip6_hlim += IPV6_HLIMDEC; @@ -1503,7 +1526,7 @@ nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, ui return (NAT64MFREE); } - ip.ip_dst.s_addr = nat64_extract_ip4(cfg, &ip6->ip6_dst); + ip.ip_dst.s_addr = nat64_extract_ip4(&ip6->ip6_dst, cfg->plat_plen); if (ip.ip_dst.s_addr == 0) { NAT64STAT_INC(&cfg->stats, dropped); return (NAT64MFREE); Modified: stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 12:34:30 2019 (r346210) @@ -46,12 +46,12 @@ struct nat64_stats { * unsupported/etc. */ - uint64_t jrequests; /* number of jobs requests queued */ - uint64_t jcalls; /* number of jobs handler calls */ - uint64_t jhostsreq; /* number of hosts requests */ - uint64_t jportreq; - uint64_t jhostfails; - uint64_t jportfails; + uint64_t jrequests; /* jobs requests queued */ + uint64_t jcalls; /* jobs handler calls */ + uint64_t jhostsreq; /* hosts requests */ + uint64_t jportreq; /* PG allocation requests */ + uint64_t jhostfails; /* hosts requests failed */ + uint64_t jportfails; /* PG allocation failed */ uint64_t jmaxlen; uint64_t jnomem; uint64_t jreinjected; @@ -85,11 +85,24 @@ struct nat64_counters { #define NAT64RETURN 1 #define NAT64MFREE -1 +/* + * According to RFC6877: + * PLAT is provider-side translator (XLAT) that translates N:1 global + * IPv6 addresses to global IPv4 addresses, and vice versa. + * + * CLAT is customer-side translator (XLAT) that algorithmically + * translates 1:1 private IPv4 addresses to global IPv6 addresses, + * and vice versa. + */ struct nat64_config { + struct in6_addr clat_prefix; + struct in6_addr plat_prefix; uint32_t flags; -#define NAT64_WKPFX 0x00010000 /* prefix6 is WKPFX */ - struct in6_addr prefix6; - uint8_t plen6; +#define NAT64_WKPFX 0x00010000 /* prefix is well-known */ +#define NAT64_CLATPFX 0x00020000 /* dst prefix is configured */ +#define NAT64_PLATPFX 0x00040000 /* src prefix is configured */ + uint8_t clat_plen; + uint8_t plat_plen; struct nat64_counters stats; }; @@ -128,6 +141,7 @@ nat64_check_ip4(in_addr_t ia) (a)->s6_addr32[1] == 0 && (a)->s6_addr32[2] == 0) int nat64_check_private_ip4(const struct nat64_config *cfg, in_addr_t ia); +int nat64_check_prefixlen(int length); int nat64_check_prefix6(const struct in6_addr *prefix, int length); int nat64_getlasthdr(struct mbuf *m, int *offset); int nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *saddr, @@ -137,10 +151,8 @@ int nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr struct nat64_config *cfg, void *logdata); int nat64_handle_icmp6(struct mbuf *m, int hlen, uint32_t aaddr, uint16_t aport, struct nat64_config *cfg, void *logdata); -void nat64_embed_ip4(const struct nat64_config *cfg, in_addr_t ia, - struct in6_addr *ip6); -in_addr_t nat64_extract_ip4(const struct nat64_config *cfg, - const struct in6_addr *ip6); +void nat64_embed_ip4(struct in6_addr *ip6, int plen, in_addr_t ia); +in_addr_t nat64_extract_ip4(const struct in6_addr *ip6, int plen); void nat64_set_output_method(int); int nat64_get_output_method(void); Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 12:34:30 2019 (r346210) @@ -407,7 +407,7 @@ nat64lsn_translate4(struct nat64lsn_cfg *cfg, const st } else logdata = NULL; - nat64_embed_ip4(&cfg->base, htonl(f_id->src_ip), &src6); + nat64_embed_ip4(&src6, cfg->base.plat_plen, htonl(f_id->src_ip)); ret = nat64_do_handle_ip4(*pm, &src6, &nh->addr, lport, &cfg->base, logdata); @@ -1481,8 +1481,10 @@ nat64lsn_translate6(struct nat64lsn_cfg *cfg, struct i return (nat64lsn_request_host(cfg, f_id, pm)); /* Fill-in on-stack state structure */ - kst.u.s.faddr = nat64_extract_ip4(&cfg->base, &f_id->dst_ip6); - if (kst.u.s.faddr == 0) { + kst.u.s.faddr = nat64_extract_ip4(&f_id->dst_ip6, + cfg->base.plat_plen); + if (kst.u.s.faddr == 0 || + nat64_check_private_ip4(&cfg->base, kst.u.s.faddr) != 0) { NAT64STAT_INC(&cfg->base.stats, dropped); goto drop; } Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h Sun Apr 14 12:34:30 2019 (r346210) @@ -216,7 +216,7 @@ struct nat64lsn_cfg { uint16_t st_icmp_ttl; /* ICMP expire */ uint32_t protochunks[NAT_MAX_PROTO];/* Number of chunks used */ struct nat64_config base; -#define NAT64LSN_FLAGSMASK (NAT64_LOG) +#define NAT64LSN_FLAGSMASK (NAT64_LOG | NAT64_ALLOW_PRIVATE) struct callout periodic; struct callout jcallout; Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c Sun Apr 14 12:34:30 2019 (r346210) @@ -164,10 +164,10 @@ nat64lsn_create(struct ip_fw_chain *ch, ip_fw3_opheade cfg->no.etlv = IPFW_TLV_NAT64LSN_NAME; cfg->no.set = uc->set; - cfg->base.prefix6 = uc->prefix6; - cfg->base.plen6 = uc->plen6; - cfg->base.flags = uc->flags & NAT64LSN_FLAGSMASK; - if (IN6_IS_ADDR_WKPFX(&cfg->base.prefix6)) + cfg->base.plat_prefix = uc->prefix6; + cfg->base.plat_plen = uc->plen6; + cfg->base.flags = (uc->flags & NAT64LSN_FLAGSMASK) | NAT64_PLATPFX; + if (IN6_IS_ADDR_WKPFX(&cfg->base.plat_prefix)) cfg->base.flags |= NAT64_WKPFX; cfg->prefix4 = addr4; @@ -324,9 +324,9 @@ nat64lsn_export_config(struct ip_fw_chain *ch, struct uc->st_udp_ttl = cfg->st_udp_ttl; uc->st_icmp_ttl = cfg->st_icmp_ttl; uc->prefix4.s_addr = htonl(cfg->prefix4); - uc->prefix6 = cfg->base.prefix6; + uc->prefix6 = cfg->base.plat_prefix; uc->plen4 = cfg->plen4; - uc->plen6 = cfg->base.plen6; + uc->plen6 = cfg->base.plat_plen; uc->set = cfg->no.set; strlcpy(uc->name, cfg->no.name, sizeof(uc->name)); } Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl.c Sun Apr 14 12:34:30 2019 (r346210) @@ -99,7 +99,9 @@ nat64stl_handle_ip4(struct ip_fw_chain *chain, struct daddr = TARG_VAL(chain, tablearg, nh6); if (nat64_check_ip6(&daddr) != 0) return (NAT64MFREE); - nat64_embed_ip4(&cfg->base, ip->ip_src.s_addr, &saddr); + + saddr = cfg->base.plat_prefix; + nat64_embed_ip4(&saddr, cfg->base.plat_plen, ip->ip_src.s_addr); if (cfg->base.flags & NAT64_LOG) { logdata = &loghdr; nat64stl_log(logdata, m, AF_INET, cfg->no.kidx); @@ -118,7 +120,10 @@ nat64stl_handle_ip6(struct ip_fw_chain *chain, struct uint32_t aaddr; aaddr = htonl(TARG_VAL(chain, tablearg, nh4)); - + if (nat64_check_private_ip4(&cfg->base, aaddr) != 0) { + NAT64STAT_INC(&cfg->base.stats, dropped); + return (NAT64MFREE); + } /* * NOTE: we expect ipfw_chk() did m_pullup() up to upper level * protocol's headers. Also we skip some checks, that ip6_input(), @@ -126,7 +131,8 @@ nat64stl_handle_ip6(struct ip_fw_chain *chain, struct */ ip6 = mtod(m, struct ip6_hdr *); /* Check ip6_dst matches configured prefix */ - if (bcmp(&ip6->ip6_dst, &cfg->base.prefix6, cfg->base.plen6 / 8) != 0) + if (memcmp(&ip6->ip6_dst, &cfg->base.plat_prefix, + cfg->base.plat_plen / 8) != 0) return (NAT64SKIP); if (cfg->base.flags & NAT64_LOG) { @@ -254,7 +260,7 @@ ipfw_nat64stl(struct ip_fw_chain *chain, struct ip_fw_ if (ret == NAT64MFREE) m_freem(args->m); args->m = NULL; - return (IP_FW_DENY); + return (IP_FW_NAT64); } Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl.h Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl.h Sun Apr 14 12:34:30 2019 (r346210) @@ -43,7 +43,8 @@ struct nat64stl_cfg { #define NAT64STL_KIDX 0x0100 #define NAT64STL_46T 0x0200 #define NAT64STL_64T 0x0400 -#define NAT64STL_FLAGSMASK (NAT64_LOG) /* flags to pass to userland */ + /* flags to pass to userland */ +#define NAT64STL_FLAGSMASK (NAT64_LOG | NAT64_ALLOW_PRIVATE) char name[64]; }; Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Sun Apr 14 12:28:41 2019 (r346209) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Sun Apr 14 12:34:30 2019 (r346210) @@ -99,8 +99,8 @@ nat64stl_export_config(struct ip_fw_chain *ch, struct { struct named_object *no; - uc->prefix6 = cfg->base.prefix6; - uc->plen6 = cfg->base.plen6; + uc->prefix6 = cfg->base.plat_prefix; + uc->plen6 = cfg->base.plat_plen; uc->flags = cfg->base.flags & NAT64STL_FLAGSMASK; uc->set = cfg->no.set; strlcpy(uc->name, cfg->no.name, sizeof(uc->name)); @@ -206,10 +206,10 @@ nat64stl_create(struct ip_fw_chain *ch, ip_fw3_opheade IPFW_UH_RUNLOCK(ch); cfg = nat64stl_alloc_config(uc->name, uc->set); - cfg->base.prefix6 = uc->prefix6; - cfg->base.plen6 = uc->plen6; - cfg->base.flags = uc->flags & NAT64STL_FLAGSMASK; - if (IN6_IS_ADDR_WKPFX(&cfg->base.prefix6)) + cfg->base.plat_prefix = uc->prefix6; + cfg->base.plat_plen = uc->plen6; + cfg->base.flags = (uc->flags & NAT64STL_FLAGSMASK) | NAT64_PLATPFX; + if (IN6_IS_ADDR_WKPFX(&cfg->base.plat_prefix)) cfg->base.flags |= NAT64_WKPFX; IPFW_UH_WLOCK(ch); From owner-svn-src-all@freebsd.org Sun Apr 14 12:36:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FFCB1574CC8; Sun, 14 Apr 2019 12:36:02 +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 021558FCEE; Sun, 14 Apr 2019 12:36:02 +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 C283A20890; Sun, 14 Apr 2019 12:36: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 x3ECa1PG053332; Sun, 14 Apr 2019 12:36:01 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ECZwFr053315; Sun, 14 Apr 2019 12:35:58 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141235.x3ECZwFr053315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 12:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346211 - in stable/11: sbin/ipfw sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11: sbin/ipfw sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346211 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 021558FCEE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 12:36:02 -0000 Author: ae Date: Sun Apr 14 12:35:58 2019 New Revision: 346211 URL: https://svnweb.freebsd.org/changeset/base/346211 Log: MFC r345263: Add SPDX-License-Identifier and update year in copyright. Modified: stable/11/sbin/ipfw/nat64lsn.c stable/11/sbin/ipfw/nat64stl.c stable/11/sys/netinet6/ip_fw_nat64.h stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c stable/11/sys/netpfil/ipfw/nat64/nat64stl.c stable/11/sys/netpfil/ipfw/nat64/nat64stl.h stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/nat64lsn.c ============================================================================== --- stable/11/sbin/ipfw/nat64lsn.c Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sbin/ipfw/nat64lsn.c Sun Apr 14 12:35:58 2019 (r346211) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015-2016 Alexander V. Chernikov - * Copyright (c) 2015-2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sbin/ipfw/nat64stl.c ============================================================================== --- stable/11/sbin/ipfw/nat64stl.c Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sbin/ipfw/nat64stl.c Sun Apr 14 12:35:58 2019 (r346211) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netinet6/ip_fw_nat64.h ============================================================================== --- stable/11/sys/netinet6/ip_fw_nat64.h Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netinet6/ip_fw_nat64.h Sun Apr 14 12:35:58 2019 (r346211) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * Copyright (c) 2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 12:35:58 2019 (r346211) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2018 Yandex LLC - * Copyright (c) 2015-2018 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 12:35:58 2019 (r346211) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2018 Yandex LLC - * Copyright (c) 2015-2018 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c Sun Apr 14 12:35:58 2019 (r346211) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2018 Yandex LLC - * Copyright (c) 2015-2018 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Sun Apr 14 12:35:58 2019 (r346211) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2018 Yandex LLC - * Copyright (c) 2015-2018 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 12:35:58 2019 (r346211) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * Copyright (c) 2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2016-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h Sun Apr 14 12:35:58 2019 (r346211) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * Copyright (c) 2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c Sun Apr 14 12:35:58 2019 (r346211) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015 Yandex LLC + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * Copyright (c) 2016 Andrey V. Elsukov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl.c Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl.c Sun Apr 14 12:35:58 2019 (r346211) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl.h Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl.h Sun Apr 14 12:35:58 2019 (r346211) @@ -1,7 +1,8 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov - * All rights reserved. + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Sun Apr 14 12:34:30 2019 (r346210) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Sun Apr 14 12:35:58 2019 (r346211) @@ -1,8 +1,9 @@ /*- - * Copyright (c) 2015-2016 Yandex LLC - * Copyright (c) 2015-2016 Andrey V. Elsukov + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015-2019 Yandex LLC * Copyright (c) 2015 Alexander V. Chernikov - * All rights reserved. + * Copyright (c) 2015-2019 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-all@freebsd.org Sun Apr 14 12:39:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C65561574DB2; Sun, 14 Apr 2019 12:39:12 +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 716F18FE4E; Sun, 14 Apr 2019 12:39:12 +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 499B220893; Sun, 14 Apr 2019 12:39:12 +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 x3ECdCVY053524; Sun, 14 Apr 2019 12:39:12 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ECd9pk053508; Sun, 14 Apr 2019 12:39:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141239.x3ECd9pk053508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 12:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346212 - in stable/11: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netinet sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netinet sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346212 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 716F18FE4E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 12:39:13 -0000 Author: ae Date: Sun Apr 14 12:39:09 2019 New Revision: 346212 URL: https://svnweb.freebsd.org/changeset/base/346212 Log: MFC r345264: Add NAT64 CLAT implementation as defined in RFC6877. CLAT is customer-side translator that algorithmically translates 1:1 private IPv4 addresses to global IPv6 addresses, and vice versa. It is implemented as part of ipfw_nat64 kernel module. When module is loaded or compiled into the kernel, it registers "nat64clat" external action. External action named instance can be created using `create` command and then used in ipfw rules. The create command accepts two IPv6 prefixes `plat_prefix` and `clat_prefix`. If plat_prefix is ommitted, IPv6 NAT64 Well-Known prefix 64:ff9b::/96 will be used. # ipfw nat64clat CLAT create clat_prefix SRC_PFX plat_prefix DST_PFX # ipfw add nat64clat CLAT ip4 from IPv4_PFX to any out # ipfw add nat64clat CLAT ip6 from DST_PFX to SRC_PFX in Obtained from: Yandex LLC Submitted by: Boris N. Lytochkin Relnotes: yes Sponsored by: Yandex LLC Added: stable/11/sbin/ipfw/nat64clat.c - copied unchanged from r345264, head/sbin/ipfw/nat64clat.c stable/11/sys/netpfil/ipfw/nat64/nat64clat.c - copied unchanged from r345264, head/sys/netpfil/ipfw/nat64/nat64clat.c stable/11/sys/netpfil/ipfw/nat64/nat64clat.h - copied unchanged from r345264, head/sys/netpfil/ipfw/nat64/nat64clat.h stable/11/sys/netpfil/ipfw/nat64/nat64clat_control.c - copied, changed from r345264, head/sys/netpfil/ipfw/nat64/nat64clat_control.c Modified: stable/11/sbin/ipfw/Makefile stable/11/sbin/ipfw/ipfw.8 stable/11/sbin/ipfw/ipfw2.c stable/11/sbin/ipfw/ipfw2.h stable/11/sbin/ipfw/main.c stable/11/sys/conf/files stable/11/sys/modules/ipfw_nat64/Makefile stable/11/sys/netinet/ip_fw.h stable/11/sys/netinet6/ip_fw_nat64.h stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/Makefile ============================================================================== --- stable/11/sbin/ipfw/Makefile Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sbin/ipfw/Makefile Sun Apr 14 12:39:09 2019 (r346212) @@ -5,7 +5,7 @@ PACKAGE=ipfw PROG= ipfw SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c tables.c -SRCS+= nat64lsn.c nat64stl.c nptv6.c +SRCS+= nat64clat.c nat64lsn.c nat64stl.c nptv6.c WARNS?= 2 .if ${MK_PF} != "no" Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sbin/ipfw/ipfw.8 Sun Apr 14 12:39:09 2019 (r346212) @@ -136,6 +136,21 @@ in-kernel NAT. .Cm destroy .Nm .Oo Cm set Ar N Oc Cm nat64stl Ar name Cm stats Op Cm reset +.Ss XLAT464 CLAT IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +.Nm +.Oo Cm set Ar N Oc Cm nat64clat Ar name Cm create Ar create-options +.Nm +.Oo Cm set Ar N Oc Cm nat64clat Ar name Cm config Ar config-options +.Nm +.Oo Cm set Ar N Oc Cm nat64clat +.Brq Ar name | all +.Brq Cm list | show +.Nm +.Oo Cm set Ar N Oc Cm nat64clat +.Brq Ar name | all +.Cm destroy +.Nm +.Oo Cm set Ar N Oc Cm nat64clat Ar name Cm stats Op Cm reset .Ss IPv6-to-IPv6 NETWORK PREFIX TRANSLATION .Nm .Oo Cm set Ar N Oc Cm nptv6 Ar name Cm create Ar create-options @@ -924,6 +939,11 @@ Pass packet to a stateless NAT64 instance (for IPv6/IP protocol translation): see the .Sx IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION Section for further information. +.It Cm nat64clat Ar name +Pass packet to a CLAT NAT64 instance (for client-side IPv6/IPv4 network address and +protocol translation): see the +.Sx IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +Section for further information. .It Cm nptv6 Ar name Pass packet to a NPTv6 instance (for IPv6-to-IPv6 network prefix translation): see the @@ -3477,6 +3497,57 @@ Note that the behavior of stateless translator with re packets differs from stateful translator. If corresponding addresses was not found in the lookup tables, the packet will not be dropped and the search continues. +.Pp +.Pp +.Ss XLAT464 CLAT translation +XLAT464 CLAT NAT64 translator implements client-side stateless translation as +defined in RFC6877 and is very similar to statless NAT64 translator +explained above. Instead of lookup tables it uses one-to-one mapping +between IPv4 and IPv6 addresses using configured prefixes. +This mode can be used as a replacement of DNS64 service for applications +that are not using it (e.g. VoIP) allowing them to access IPv4-only Internet +over IPv6-only networks with help of remote NAT64 translator. +.Pp +The CLAT NAT64 configuration command is the following: +.Bd -ragged -offset indent +.Bk -words +.Cm nat64clat +.Ar name +.Cm create +.Ar create-options +.Ek +.Ed +.Pp +The following parameters can be configured: +.Bl -tag -width indent +.It Cm clat_prefix Ar ipv6_prefix/length +The IPv6 prefix defines IPv4-embedded IPv6 addresses used by translator +to represent source IPv4 addresses. +.It Cm plat_prefix Ar ipv6_prefix/length +The IPv6 prefix defines IPv4-embedded IPv6 addresses used by translator +to represent destination IPv4 addresses. This IPv6 prefix should be configured +on a remote NAT64 translator. +.It Cm log +Turn on logging of all handled packets via BPF through +.Ar ipfwlog0 +interface. +.It Cm -log +Turn off logging of all handled packets via BPF. +.It Cm allow_private +Turn on processing private IPv4 addresses. By default +.Nm nat64clat +instance will not process IPv4 packets with destination address from private +ranges as defined in RFC1918. +.It Cm -allow_private +Turn off private address handling in +.Nm nat64clat +instance. +.El +.Pp +Note that the behavior of CLAT translator with respect to not matched +packets differs from stateful translator. +If corresponding addresses were not matched against prefixes configured, +the packet will not be dropped and the search continues. .Sh IPv6-to-IPv6 NETWORK PREFIX TRANSLATION (NPTv6) .Nm supports in-kernel IPv6-to-IPv6 network prefix translation as described Modified: stable/11/sbin/ipfw/ipfw2.c ============================================================================== --- stable/11/sbin/ipfw/ipfw2.c Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sbin/ipfw/ipfw2.c Sun Apr 14 12:39:09 2019 (r346212) @@ -237,6 +237,7 @@ static struct _s_x ether_types[] = { }; static struct _s_x rule_eactions[] = { + { "nat64clat", TOK_NAT64CLAT }, { "nat64lsn", TOK_NAT64LSN }, { "nat64stl", TOK_NAT64STL }, { "nptv6", TOK_NPTV6 }, Modified: stable/11/sbin/ipfw/ipfw2.h ============================================================================== --- stable/11/sbin/ipfw/ipfw2.h Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sbin/ipfw/ipfw2.h Sun Apr 14 12:39:09 2019 (r346212) @@ -291,6 +291,11 @@ enum tokens { TOK_PRIVATE, TOK_PRIVATEOFF, + /* NAT64 CLAT tokens */ + TOK_NAT64CLAT, + TOK_PLAT_PREFIX, + TOK_CLAT_PREFIX, + /* NPTv6 tokens */ TOK_NPTV6, TOK_INTPREFIX, @@ -386,6 +391,7 @@ void ipfw_flush(int force); void ipfw_zero(int ac, char *av[], int optname); void ipfw_list(int ac, char *av[], int show_counters); void ipfw_internal_handler(int ac, char *av[]); +void ipfw_nat64clat_handler(int ac, char *av[]); void ipfw_nat64lsn_handler(int ac, char *av[]); void ipfw_nat64stl_handler(int ac, char *av[]); void ipfw_nptv6_handler(int ac, char *av[]); Modified: stable/11/sbin/ipfw/main.c ============================================================================== --- stable/11/sbin/ipfw/main.c Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sbin/ipfw/main.c Sun Apr 14 12:39:09 2019 (r346212) @@ -429,6 +429,8 @@ ipfw_main(int oldac, char **oldav) if (co.use_set || try_next) { if (_substrcmp(*av, "delete") == 0) ipfw_delete(av); + else if (!strncmp(*av, "nat64clat", strlen(*av))) + ipfw_nat64clat_handler(ac, av); else if (!strncmp(*av, "nat64stl", strlen(*av))) ipfw_nat64stl_handler(ac, av); else if (!strncmp(*av, "nat64lsn", strlen(*av))) Copied: stable/11/sbin/ipfw/nat64clat.c (from r345264, head/sbin/ipfw/nat64clat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sbin/ipfw/nat64clat.c Sun Apr 14 12:39:09 2019 (r346212, copy of r345264, head/sbin/ipfw/nat64clat.c) @@ -0,0 +1,535 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Yandex LLC + * Copyright (c) 2019 Andrey V. Elsukov + * Copyright (c) 2019 Boris N. Lytochkin + * + * 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 ``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 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 "ipfw2.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +typedef int (nat64clat_cb_t)(ipfw_nat64clat_cfg *i, const char *name, + uint8_t set); +static int nat64clat_foreach(nat64clat_cb_t *f, const char *name, uint8_t set, + int sort); + +static void nat64clat_create(const char *name, uint8_t set, int ac, char **av); +static void nat64clat_config(const char *name, uint8_t set, int ac, char **av); +static void nat64clat_destroy(const char *name, uint8_t set); +static void nat64clat_stats(const char *name, uint8_t set); +static void nat64clat_reset_stats(const char *name, uint8_t set); +static int nat64clat_show_cb(ipfw_nat64clat_cfg *cfg, const char *name, + uint8_t set); +static int nat64clat_destroy_cb(ipfw_nat64clat_cfg *cfg, const char *name, + uint8_t set); + +static struct _s_x nat64cmds[] = { + { "create", TOK_CREATE }, + { "config", TOK_CONFIG }, + { "destroy", TOK_DESTROY }, + { "list", TOK_LIST }, + { "show", TOK_LIST }, + { "stats", TOK_STATS }, + { NULL, 0 } +}; + +static struct _s_x nat64statscmds[] = { + { "reset", TOK_RESET }, + { NULL, 0 } +}; + +/* + * This one handles all nat64clat-related commands + * ipfw [set N] nat64clat NAME {create | config} ... + * ipfw [set N] nat64clat NAME stats [reset] + * ipfw [set N] nat64clat {NAME | all} destroy + * ipfw [set N] nat64clat {NAME | all} {list | show} + */ +#define nat64clat_check_name table_check_name +void +ipfw_nat64clat_handler(int ac, char *av[]) +{ + const char *name; + int tcmd; + uint8_t set; + + if (co.use_set != 0) + set = co.use_set - 1; + else + set = 0; + ac--; av++; + + NEED1("nat64clat needs instance name"); + name = *av; + if (nat64clat_check_name(name) != 0) { + if (strcmp(name, "all") == 0) + name = NULL; + else + errx(EX_USAGE, "nat64clat instance name %s is invalid", + name); + } + ac--; av++; + NEED1("nat64clat needs command"); + + tcmd = get_token(nat64cmds, *av, "nat64clat command"); + if (name == NULL && tcmd != TOK_DESTROY && tcmd != TOK_LIST) + errx(EX_USAGE, "nat64clat instance name required"); + switch (tcmd) { + case TOK_CREATE: + ac--; av++; + nat64clat_create(name, set, ac, av); + break; + case TOK_CONFIG: + ac--; av++; + nat64clat_config(name, set, ac, av); + break; + case TOK_LIST: + nat64clat_foreach(nat64clat_show_cb, name, set, 1); + break; + case TOK_DESTROY: + if (name == NULL) + nat64clat_foreach(nat64clat_destroy_cb, NULL, set, 0); + else + nat64clat_destroy(name, set); + break; + case TOK_STATS: + ac--; av++; + if (ac == 0) { + nat64clat_stats(name, set); + break; + } + tcmd = get_token(nat64statscmds, *av, "stats command"); + if (tcmd == TOK_RESET) + nat64clat_reset_stats(name, set); + } +} + + +static void +nat64clat_fill_ntlv(ipfw_obj_ntlv *ntlv, const char *name, uint8_t set) +{ + + ntlv->head.type = IPFW_TLV_EACTION_NAME(1); /* it doesn't matter */ + ntlv->head.length = sizeof(ipfw_obj_ntlv); + ntlv->idx = 1; + ntlv->set = set; + strlcpy(ntlv->name, name, sizeof(ntlv->name)); +} + +static struct _s_x nat64newcmds[] = { + { "plat_prefix", TOK_PLAT_PREFIX }, + { "clat_prefix", TOK_CLAT_PREFIX }, + { "log", TOK_LOG }, + { "-log", TOK_LOGOFF }, + { "allow_private", TOK_PRIVATE }, + { "-allow_private", TOK_PRIVATEOFF }, + { NULL, 0 } +}; + +/* + * Creates new nat64clat instance + * ipfw nat64clat create clat_prefix plat_prefix + * Request: [ ipfw_obj_lheader ipfw_nat64clat_cfg ] + */ +#define NAT64CLAT_HAS_CLAT_PREFIX 0x01 +#define NAT64CLAT_HAS_PLAT_PREFIX 0x02 +static void +nat64clat_create(const char *name, uint8_t set, int ac, char *av[]) +{ + char buf[sizeof(ipfw_obj_lheader) + sizeof(ipfw_nat64clat_cfg)]; + ipfw_nat64clat_cfg *cfg; + ipfw_obj_lheader *olh; + int tcmd, flags; + char *p; + struct in6_addr prefix; + uint8_t plen; + + memset(buf, 0, sizeof(buf)); + olh = (ipfw_obj_lheader *)buf; + cfg = (ipfw_nat64clat_cfg *)(olh + 1); + + /* Some reasonable defaults */ + inet_pton(AF_INET6, "64:ff9b::", &cfg->plat_prefix); + cfg->plat_plen = 96; + cfg->set = set; + flags = NAT64CLAT_HAS_PLAT_PREFIX; + while (ac > 0) { + tcmd = get_token(nat64newcmds, *av, "option"); + ac--; av++; + + switch (tcmd) { + case TOK_PLAT_PREFIX: + case TOK_CLAT_PREFIX: + if (tcmd == TOK_PLAT_PREFIX) { + NEED1("IPv6 plat_prefix required"); + } else { + NEED1("IPv6 clat_prefix required"); + } + + if ((p = strchr(*av, '/')) != NULL) + *p++ = '\0'; + if (inet_pton(AF_INET6, *av, &prefix) != 1) + errx(EX_USAGE, + "Bad prefix: %s", *av); + plen = strtol(p, NULL, 10); + if (ipfw_check_nat64prefix(&prefix, plen) != 0) + errx(EX_USAGE, + "Bad prefix length: %s", p); + if (tcmd == TOK_PLAT_PREFIX) { + flags |= NAT64CLAT_HAS_PLAT_PREFIX; + cfg->plat_prefix = prefix; + cfg->plat_plen = plen; + } else { + flags |= NAT64CLAT_HAS_CLAT_PREFIX; + cfg->clat_prefix = prefix; + cfg->clat_plen = plen; + } + ac--; av++; + break; + case TOK_LOG: + cfg->flags |= NAT64_LOG; + break; + case TOK_LOGOFF: + cfg->flags &= ~NAT64_LOG; + break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; + } + } + + /* Check validness */ + if ((flags & NAT64CLAT_HAS_PLAT_PREFIX) != NAT64CLAT_HAS_PLAT_PREFIX) + errx(EX_USAGE, "plat_prefix required"); + if ((flags & NAT64CLAT_HAS_CLAT_PREFIX) != NAT64CLAT_HAS_CLAT_PREFIX) + errx(EX_USAGE, "clat_prefix required"); + + olh->count = 1; + olh->objsize = sizeof(*cfg); + olh->size = sizeof(buf); + strlcpy(cfg->name, name, sizeof(cfg->name)); + if (do_set3(IP_FW_NAT64CLAT_CREATE, &olh->opheader, sizeof(buf)) != 0) + err(EX_OSERR, "nat64clat instance creation failed"); +} + +/* + * Configures existing nat64clat instance + * ipfw nat64clat config + * Request: [ ipfw_obj_header ipfw_nat64clat_cfg ] + */ +static void +nat64clat_config(const char *name, uint8_t set, int ac, char **av) +{ + char buf[sizeof(ipfw_obj_header) + sizeof(ipfw_nat64clat_cfg)]; + ipfw_nat64clat_cfg *cfg; + ipfw_obj_header *oh; + char *opt; + char *p; + size_t sz; + int tcmd; + struct in6_addr prefix; + uint8_t plen; + + if (ac == 0) + errx(EX_USAGE, "config options required"); + memset(&buf, 0, sizeof(buf)); + oh = (ipfw_obj_header *)buf; + cfg = (ipfw_nat64clat_cfg *)(oh + 1); + sz = sizeof(buf); + + nat64clat_fill_ntlv(&oh->ntlv, name, set); + if (do_get3(IP_FW_NAT64CLAT_CONFIG, &oh->opheader, &sz) != 0) + err(EX_OSERR, "failed to get config for instance %s", name); + + while (ac > 0) { + tcmd = get_token(nat64newcmds, *av, "option"); + opt = *av; + ac--; av++; + + switch (tcmd) { + case TOK_PLAT_PREFIX: + case TOK_CLAT_PREFIX: + if (tcmd == TOK_PLAT_PREFIX) { + NEED1("IPv6 plat_prefix required"); + } else { + NEED1("IPv6 clat_prefix required"); + } + + if ((p = strchr(*av, '/')) != NULL) + *p++ = '\0'; + if (inet_pton(AF_INET6, *av, &prefix) != 1) + errx(EX_USAGE, + "Bad prefix: %s", *av); + plen = strtol(p, NULL, 10); + if (ipfw_check_nat64prefix(&prefix, plen) != 0) + errx(EX_USAGE, + "Bad prefix length: %s", p); + if (tcmd == TOK_PLAT_PREFIX) { + cfg->plat_prefix = prefix; + cfg->plat_plen = plen; + } else { + cfg->clat_prefix = prefix; + cfg->clat_plen = plen; + } + ac--; av++; + break; + case TOK_LOG: + cfg->flags |= NAT64_LOG; + break; + case TOK_LOGOFF: + cfg->flags &= ~NAT64_LOG; + break; + case TOK_PRIVATE: + cfg->flags |= NAT64_ALLOW_PRIVATE; + break; + case TOK_PRIVATEOFF: + cfg->flags &= ~NAT64_ALLOW_PRIVATE; + break; + default: + errx(EX_USAGE, "Can't change %s option", opt); + } + } + + if (do_set3(IP_FW_NAT64CLAT_CONFIG, &oh->opheader, sizeof(buf)) != 0) + err(EX_OSERR, "nat64clat instance configuration failed"); +} + +/* + * Destroys nat64clat instance. + * Request: [ ipfw_obj_header ] + */ +static void +nat64clat_destroy(const char *name, uint8_t set) +{ + ipfw_obj_header oh; + + memset(&oh, 0, sizeof(oh)); + nat64clat_fill_ntlv(&oh.ntlv, name, set); + if (do_set3(IP_FW_NAT64CLAT_DESTROY, &oh.opheader, sizeof(oh)) != 0) + err(EX_OSERR, "failed to destroy nat instance %s", name); +} + +/* + * Get nat64clat instance statistics. + * Request: [ ipfw_obj_header ] + * Reply: [ ipfw_obj_header ipfw_obj_ctlv [ uint64_t x N ] ] + */ +static int +nat64clat_get_stats(const char *name, uint8_t set, + struct ipfw_nat64clat_stats *stats) +{ + ipfw_obj_header *oh; + ipfw_obj_ctlv *oc; + size_t sz; + + sz = sizeof(*oh) + sizeof(*oc) + sizeof(*stats); + oh = calloc(1, sz); + nat64clat_fill_ntlv(&oh->ntlv, name, set); + if (do_get3(IP_FW_NAT64CLAT_STATS, &oh->opheader, &sz) == 0) { + oc = (ipfw_obj_ctlv *)(oh + 1); + memcpy(stats, oc + 1, sizeof(*stats)); + free(oh); + return (0); + } + free(oh); + return (-1); +} + +static void +nat64clat_stats(const char *name, uint8_t set) +{ + struct ipfw_nat64clat_stats stats; + + if (nat64clat_get_stats(name, set, &stats) != 0) + err(EX_OSERR, "Error retrieving stats"); + + if (co.use_set != 0 || set != 0) + printf("set %u ", set); + printf("nat64clat %s\n", name); + + printf("\t%ju packets translated from IPv6 to IPv4\n", + (uintmax_t)stats.opcnt64); + printf("\t%ju packets translated from IPv4 to IPv6\n", + (uintmax_t)stats.opcnt46); + printf("\t%ju IPv6 fragments created\n", + (uintmax_t)stats.ofrags); + printf("\t%ju IPv4 fragments received\n", + (uintmax_t)stats.ifrags); + printf("\t%ju output packets dropped due to no bufs, etc.\n", + (uintmax_t)stats.oerrors); + printf("\t%ju output packets discarded due to no IPv4 route\n", + (uintmax_t)stats.noroute4); + printf("\t%ju output packets discarded due to no IPv6 route\n", + (uintmax_t)stats.noroute6); + printf("\t%ju packets discarded due to unsupported protocol\n", + (uintmax_t)stats.noproto); + printf("\t%ju packets discarded due to memory allocation problems\n", + (uintmax_t)stats.nomem); + printf("\t%ju packets discarded due to some errors\n", + (uintmax_t)stats.dropped); +} + +/* + * Reset nat64clat instance statistics specified by @oh->ntlv. + * Request: [ ipfw_obj_header ] + */ +static void +nat64clat_reset_stats(const char *name, uint8_t set) +{ + ipfw_obj_header oh; + + memset(&oh, 0, sizeof(oh)); + nat64clat_fill_ntlv(&oh.ntlv, name, set); + if (do_set3(IP_FW_NAT64CLAT_RESET_STATS, &oh.opheader, sizeof(oh)) != 0) + err(EX_OSERR, "failed to reset stats for instance %s", name); +} + +static int +nat64clat_show_cb(ipfw_nat64clat_cfg *cfg, const char *name, uint8_t set) +{ + char plat_buf[INET6_ADDRSTRLEN], clat_buf[INET6_ADDRSTRLEN]; + + if (name != NULL && strcmp(cfg->name, name) != 0) + return (ESRCH); + + if (co.use_set != 0 && cfg->set != set) + return (ESRCH); + + if (co.use_set != 0 || cfg->set != 0) + printf("set %u ", cfg->set); + + inet_ntop(AF_INET6, &cfg->clat_prefix, clat_buf, sizeof(clat_buf)); + inet_ntop(AF_INET6, &cfg->plat_prefix, plat_buf, sizeof(plat_buf)); + printf("nat64clat %s clat_prefix %s/%u plat_prefix %s/%u", + cfg->name, clat_buf, cfg->clat_plen, plat_buf, cfg->plat_plen); + if (cfg->flags & NAT64_LOG) + printf(" log"); + if (cfg->flags & NAT64_ALLOW_PRIVATE) + printf(" allow_private"); + printf("\n"); + return (0); +} + +static int +nat64clat_destroy_cb(ipfw_nat64clat_cfg *cfg, const char *name, uint8_t set) +{ + + if (co.use_set != 0 && cfg->set != set) + return (ESRCH); + + nat64clat_destroy(cfg->name, cfg->set); + return (0); +} + + +/* + * Compare nat64clat instances names. + * Honor number comparison. + */ +static int +nat64name_cmp(const void *a, const void *b) +{ + ipfw_nat64clat_cfg *ca, *cb; + + ca = (ipfw_nat64clat_cfg *)a; + cb = (ipfw_nat64clat_cfg *)b; + + if (ca->set > cb->set) + return (1); + else if (ca->set < cb->set) + return (-1); + return (stringnum_cmp(ca->name, cb->name)); +} + +/* + * Retrieves nat64clat instance list from kernel, + * optionally sorts it and calls requested function for each instance. + * + * Request: [ ipfw_obj_lheader ] + * Reply: [ ipfw_obj_lheader ipfw_nat64clat_cfg x N ] + */ +static int +nat64clat_foreach(nat64clat_cb_t *f, const char *name, uint8_t set, int sort) +{ + ipfw_obj_lheader *olh; + ipfw_nat64clat_cfg *cfg; + size_t sz; + int i, error; + + /* Start with reasonable default */ + sz = sizeof(*olh) + 16 * sizeof(*cfg); + for (;;) { + if ((olh = calloc(1, sz)) == NULL) + return (ENOMEM); + + olh->size = sz; + if (do_get3(IP_FW_NAT64CLAT_LIST, &olh->opheader, &sz) != 0) { + sz = olh->size; + free(olh); + if (errno != ENOMEM) + return (errno); + continue; + } + + if (sort != 0) + qsort(olh + 1, olh->count, olh->objsize, + nat64name_cmp); + + cfg = (ipfw_nat64clat_cfg *)(olh + 1); + for (i = 0; i < olh->count; i++) { + error = f(cfg, name, set); /* Ignore errors for now */ + cfg = (ipfw_nat64clat_cfg *)((caddr_t)cfg + + olh->objsize); + } + free(olh); + break; + } + return (0); +} + Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sys/conf/files Sun Apr 14 12:39:09 2019 (r346212) @@ -4229,6 +4229,10 @@ netpfil/ipfw/ip_fw_iface.c optional inet ipfirewall netpfil/ipfw/ip_fw_nat.c optional inet ipfirewall_nat netpfil/ipfw/nat64/ip_fw_nat64.c optional inet inet6 ipfirewall \ ipfirewall_nat64 +netpfil/ipfw/nat64/nat64clat.c optional inet inet6 ipfirewall \ + ipfirewall_nat64 +netpfil/ipfw/nat64/nat64clat_control.c optional inet inet6 ipfirewall \ + ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn_control.c optional inet inet6 ipfirewall \ Modified: stable/11/sys/modules/ipfw_nat64/Makefile ============================================================================== --- stable/11/sys/modules/ipfw_nat64/Makefile Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sys/modules/ipfw_nat64/Makefile Sun Apr 14 12:39:09 2019 (r346212) @@ -4,6 +4,7 @@ KMOD= ipfw_nat64 SRCS= ip_fw_nat64.c nat64_translate.c +SRCS+= nat64clat.c nat64clat_control.c SRCS+= nat64lsn.c nat64lsn_control.c SRCS+= nat64stl.c nat64stl_control.c Modified: stable/11/sys/netinet/ip_fw.h ============================================================================== --- stable/11/sys/netinet/ip_fw.h Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sys/netinet/ip_fw.h Sun Apr 14 12:39:09 2019 (r346212) @@ -132,6 +132,13 @@ typedef struct _ip_fw3_opheader { #define IP_FW_NPTV6_STATS 154 /* Get NPTv6 instance statistics */ #define IP_FW_NPTV6_RESET_STATS 155 /* Reset NPTv6 instance statistics */ +#define IP_FW_NAT64CLAT_CREATE 160 /* Create clat NAT64 instance */ +#define IP_FW_NAT64CLAT_DESTROY 161 /* Destroy clat NAT64 instance */ +#define IP_FW_NAT64CLAT_CONFIG 162 /* Modify clat NAT64 instance */ +#define IP_FW_NAT64CLAT_LIST 163 /* List clat NAT64 instances */ +#define IP_FW_NAT64CLAT_STATS 164 /* Get NAT64CLAT instance statistics */ +#define IP_FW_NAT64CLAT_RESET_STATS 165 /* Reset NAT64CLAT instance statistics */ + /* * The kernel representation of ipfw rules is made of a list of * 'instructions' (for all practical purposes equivalent to BPF Modified: stable/11/sys/netinet6/ip_fw_nat64.h ============================================================================== --- stable/11/sys/netinet6/ip_fw_nat64.h Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sys/netinet6/ip_fw_nat64.h Sun Apr 14 12:39:09 2019 (r346212) @@ -45,6 +45,19 @@ struct ipfw_nat64stl_stats { uint64_t dropped; /* dropped due to some errors */ }; +struct ipfw_nat64clat_stats { + uint64_t opcnt64; /* 6to4 of packets translated */ + uint64_t opcnt46; /* 4to6 of packets translated */ + uint64_t ofrags; /* number of fragments generated */ + uint64_t ifrags; /* number of fragments received */ + uint64_t oerrors; /* number of output errors */ + uint64_t noroute4; + uint64_t noroute6; + uint64_t noproto; /* Protocol not supported */ + uint64_t nomem; /* mbuf allocation failed */ + uint64_t dropped; /* dropped due to some errors */ +}; + struct ipfw_nat64lsn_stats { uint64_t opcnt64; /* 6to4 of packets translated */ uint64_t opcnt46; /* 4to6 of packets translated */ @@ -94,6 +107,17 @@ typedef struct _ipfw_nat64stl_cfg { uint8_t spare[2]; uint32_t flags; } ipfw_nat64stl_cfg; + +typedef struct _ipfw_nat64clat_cfg { + char name[64]; /* NAT name */ + struct in6_addr plat_prefix; /* NAT64 (PLAT) prefix */ + struct in6_addr clat_prefix; /* Client (CLAT) prefix */ + uint8_t plat_plen; /* PLAT Prefix length */ + uint8_t clat_plen; /* CLAT Prefix length */ + uint8_t set; /* Named instance set [0..31] */ + uint8_t spare; + uint32_t flags; +} ipfw_nat64clat_cfg; /* * NAT64LSN default configuration values Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Sun Apr 14 12:39:09 2019 (r346212) @@ -86,9 +86,15 @@ vnet_ipfw_nat64_init(const void *arg __unused) error = nat64stl_init(ch, first); if (error != 0) return (error); + error = nat64clat_init(ch, first); + if (error != 0) { + nat64stl_uninit(ch, first); + return (error); + } error = nat64lsn_init(ch, first); if (error != 0) { nat64stl_uninit(ch, first); + nat64clat_uninit(ch, first); return (error); } return (0); @@ -103,6 +109,7 @@ vnet_ipfw_nat64_uninit(const void *arg __unused) ch = &V_layer3_chain; last = IS_DEFAULT_VNET(curvnet) ? 1: 0; nat64stl_uninit(ch, last); + nat64clat_uninit(ch, last); nat64lsn_uninit(ch, last); return (0); } Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 12:35:58 2019 (r346211) +++ stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.h Sun Apr 14 12:39:09 2019 (r346212) @@ -54,5 +54,7 @@ int nat64stl_init(struct ip_fw_chain *ch, int first); void nat64stl_uninit(struct ip_fw_chain *ch, int last); int nat64lsn_init(struct ip_fw_chain *ch, int first); void nat64lsn_uninit(struct ip_fw_chain *ch, int last); +int nat64clat_init(struct ip_fw_chain *ch, int first); +void nat64clat_uninit(struct ip_fw_chain *ch, int last); #endif /* _IP_FW_NAT64_H_ */ Copied: stable/11/sys/netpfil/ipfw/nat64/nat64clat.c (from r345264, head/sys/netpfil/ipfw/nat64/nat64clat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/netpfil/ipfw/nat64/nat64clat.c Sun Apr 14 12:39:09 2019 (r346212, copy of r345264, head/sys/netpfil/ipfw/nat64/nat64clat.c) @@ -0,0 +1,255 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Yandex LLC + * Copyright (c) 2019 Andrey V. Elsukov + * Copyright (c) 2019 Boris N. Lytochkin + * + * 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 ``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 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 +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "nat64clat.h" + +#define NAT64_LOOKUP(chain, cmd) \ + (struct nat64clat_cfg *)SRV_OBJECT((chain), (cmd)->arg1) + +static void +nat64clat_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, + uint32_t kidx) +{ + static uint32_t pktid = 0; + + memset(plog, 0, sizeof(*plog)); + plog->length = PFLOG_REAL_HDRLEN; + plog->af = family; + plog->action = PF_NAT; + plog->dir = PF_IN; + plog->rulenr = htonl(kidx); + pktid++; + plog->subrulenr = htonl(pktid); + plog->ruleset[0] = '\0'; + strlcpy(plog->ifname, "NAT64CLAT", sizeof(plog->ifname)); + ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); +} + +static int +nat64clat_handle_ip4(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg, + struct mbuf *m) +{ + struct pfloghdr loghdr, *logdata; + struct in6_addr saddr, daddr; + struct ip *ip; + + ip = mtod(m, struct ip*); + /* source address for CLAT may be private with no harm */ + if (nat64_check_ip4(ip->ip_src.s_addr) != 0 || + nat64_check_ip4(ip->ip_dst.s_addr) != 0 || + nat64_check_private_ip4(&cfg->base, ip->ip_dst.s_addr) != 0) + return (NAT64SKIP); + + memcpy(&saddr, &cfg->base.clat_prefix, sizeof(saddr)); + nat64_embed_ip4(&saddr, cfg->base.clat_plen, ip->ip_src.s_addr); + memcpy(&daddr, &cfg->base.plat_prefix, sizeof(daddr)); + nat64_embed_ip4(&daddr, cfg->base.plat_plen, ip->ip_dst.s_addr); + if (cfg->base.flags & NAT64_LOG) { + logdata = &loghdr; + nat64clat_log(logdata, m, AF_INET, cfg->no.kidx); + } else + logdata = NULL; + return (nat64_do_handle_ip4(m, &saddr, &daddr, 0, &cfg->base, + logdata)); +} + +static int +nat64clat_handle_ip6(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg, + struct mbuf *m) +{ + struct pfloghdr loghdr, *logdata; + struct ip6_hdr *ip6; + uint32_t aaddr; + + /* + * NOTE: we expect ipfw_chk() did m_pullup() up to upper level + * protocol's headers. Also we skip some checks, that ip6_input(), + * ip6_forward(), ip6_fastfwd() and ipfw_chk() already did. + */ + ip6 = mtod(m, struct ip6_hdr *); + /* Check ip6_dst matches configured prefix */ + if (memcmp(&ip6->ip6_dst, &cfg->base.clat_prefix, + cfg->base.clat_plen / 8) != 0) + return (NAT64SKIP); + /* Check ip6_src matches configured prefix */ + if (memcmp(&ip6->ip6_src, &cfg->base.plat_prefix, + cfg->base.plat_plen / 8) != 0) + return (NAT64SKIP); + + if (cfg->base.flags & NAT64_LOG) { + logdata = &loghdr; + nat64clat_log(logdata, m, AF_INET6, cfg->no.kidx); + } else + logdata = NULL; + + aaddr = nat64_extract_ip4(&ip6->ip6_src, cfg->base.plat_plen); + return (nat64_do_handle_ip6(m, aaddr, 0, &cfg->base, logdata)); +} + +static int +nat64clat_handle_icmp6(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg, + struct mbuf *m) +{ + struct pfloghdr loghdr, *logdata; + struct nat64_counters *stats; + struct ip6_hdr *ip6i; + struct icmp6_hdr *icmp6; + uint32_t daddr; + int hlen, proto; + + hlen = 0; + stats = &cfg->base.stats; + proto = nat64_getlasthdr(m, &hlen); + if (proto != IPPROTO_ICMPV6) { + NAT64STAT_INC(stats, dropped); + return (NAT64MFREE); + } + icmp6 = mtodo(m, hlen); + switch (icmp6->icmp6_type) { + case ICMP6_DST_UNREACH: + case ICMP6_PACKET_TOO_BIG: + case ICMP6_TIME_EXCEED_TRANSIT: + case ICMP6_PARAM_PROB: + break; + default: + NAT64STAT_INC(stats, dropped); + return (NAT64MFREE); + } + hlen += sizeof(struct icmp6_hdr); + if (m->m_pkthdr.len < hlen + sizeof(struct ip6_hdr) + ICMP_MINLEN) { + NAT64STAT_INC(stats, dropped); + return (NAT64MFREE); + } + if (m->m_len < hlen + sizeof(struct ip6_hdr) + ICMP_MINLEN) + m = m_pullup(m, hlen + sizeof(struct ip6_hdr) + ICMP_MINLEN); + if (m == NULL) { + NAT64STAT_INC(stats, nomem); + return (NAT64RETURN); + } + /* + * Use destination address from inner IPv6 header to determine + * IPv4 mapped address. + */ + ip6i = mtodo(m, hlen); + daddr = nat64_extract_ip4(&ip6i->ip6_dst, cfg->base.clat_plen); + if (daddr == 0) { + NAT64STAT_INC(stats, dropped); + return (NAT64MFREE); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Apr 14 13:08:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54895157592A; Sun, 14 Apr 2019 13:08:20 +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 EC0E26A1B2; Sun, 14 Apr 2019 13:08: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 C522420DA0; Sun, 14 Apr 2019 13:08: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 x3ED8Jcd069470; Sun, 14 Apr 2019 13:08:19 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ED8IgK069463; Sun, 14 Apr 2019 13:08:18 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141308.x3ED8IgK069463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 13:08: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: r346213 - in stable/12: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/12: sbin/ipfw sys/conf sys/modules/ipfw_nat64 sys/netinet6 sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EC0E26A1B2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 13:08:20 -0000 Author: ae Date: Sun Apr 14 13:08:18 2019 New Revision: 346213 URL: https://svnweb.freebsd.org/changeset/base/346213 Log: MFC r345293: Update NAT64LSN implementation: o most of data structures and relations were modified to be able support large number of translation states. Now each supported protocol can use full ports range. Ports groups now are belong to IPv4 alias addresses, not hosts. Each ports group can keep several states chunks. This is controlled with new `states_chunks` config option. States chunks allow to have several translation states for single alias address and port, but for different destination addresses. o by default all hash tables now use jenkins hash. o ConcurrencyKit and epoch(9) is used to make NAT64LSN lockless on fast path. o one NAT64LSN instance now can be used to handle several IPv6 prefixes, special prefix "::" value should be used for this purpose when instance is created. o due to modified internal data structures relations, the socket opcode that does states listing was changed. Obtained from: Yandex LLC Sponsored by: Yandex LLC MFC r345294: Remove extra spaces. Modified: stable/12/sbin/ipfw/ipfw.8 stable/12/sbin/ipfw/ipfw2.h stable/12/sbin/ipfw/nat64lsn.c stable/12/sys/conf/files stable/12/sys/modules/ipfw_nat64/Makefile stable/12/sys/netinet6/ip_fw_nat64.h stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c stable/12/sys/netpfil/ipfw/nat64/nat64lsn.h stable/12/sys/netpfil/ipfw/nat64/nat64lsn_control.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw.8 ============================================================================== --- stable/12/sbin/ipfw/ipfw.8 Sun Apr 14 12:39:09 2019 (r346212) +++ stable/12/sbin/ipfw/ipfw.8 Sun Apr 14 13:08:18 2019 (r346213) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2019 +.Dd March 19, 2019 .Dt IPFW 8 .Os .Sh NAME @@ -3300,6 +3300,7 @@ See .Sx SYSCTL VARIABLES for more info. .Sh IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +.Ss Stateful translation .Nm supports in-kernel IPv6/IPv4 network address and protocol translation. Stateful NAT64 translation allows IPv6-only clients to contact IPv4 servers @@ -3317,7 +3318,8 @@ to be able use stateful NAT64 translator. Stateful NAT64 uses a bunch of memory for several types of objects. When IPv6 client initiates connection, NAT64 translator creates a host entry in the states table. -Each host entry has a number of ports group entries allocated on demand. +Each host entry uses preallocated IPv4 alias entry. +Each alias entry has a number of ports group entries allocated on demand. Ports group entries contains connection state entries. There are several options to control limits and lifetime for these objects. .Pp @@ -3337,6 +3339,11 @@ First time an original packet is handled and consumed and then it is handled again as translated packet. This behavior can be changed by sysctl variable .Va net.inet.ip.fw.nat64_direct_output . +Also translated packet can be tagged using +.Cm tag +rule action, and then matched by +.Cm tagged +opcode to avoid loops and extra overhead. .Pp The stateful NAT64 configuration command is the following: .Bd -ragged -offset indent @@ -3364,15 +3371,16 @@ to represent IPv4 addresses. This IPv6 prefix should b The translator implementation follows RFC6052, that restricts the length of prefixes to one of following: 32, 40, 48, 56, 64, or 96. The Well-Known IPv6 Prefix 64:ff9b:: must be 96 bits long. -.It Cm max_ports Ar number -Maximum number of ports reserved for upper level protocols to one IPv6 client. -All reserved ports are divided into chunks between supported protocols. -The number of connections from one IPv6 client is limited by this option. -Note that closed TCP connections still remain in the list of connections until -.Cm tcp_close_age -interval will not expire. -Default value is -.Ar 2048 . +The special +.Ar ::/length +prefix can be used to handle several IPv6 prefixes with one NAT64 instance. +The NAT64 instance will determine a destination IPv4 address from prefix +.Ar length . +.It Cm states_chunks Ar number +The number of states chunks in single ports group. +Each ports group by default can keep 64 state entries in single chunk. +The above value affects the maximum number of states that can be associated with single IPv4 alias address and port. +The value must be power of 2, and up to 128. .It Cm host_del_age Ar seconds The number of seconds until the host entry for a IPv6 client will be deleted and all its resources will be released due to inactivity. Modified: stable/12/sbin/ipfw/ipfw2.h ============================================================================== --- stable/12/sbin/ipfw/ipfw2.h Sun Apr 14 12:39:09 2019 (r346212) +++ stable/12/sbin/ipfw/ipfw2.h Sun Apr 14 13:08:18 2019 (r346213) @@ -278,6 +278,7 @@ enum tokens { TOK_AGG_LEN, TOK_AGG_COUNT, TOK_MAX_PORTS, + TOK_STATES_CHUNKS, TOK_JMAXLEN, TOK_PORT_RANGE, TOK_HOST_DEL_AGE, Modified: stable/12/sbin/ipfw/nat64lsn.c ============================================================================== --- stable/12/sbin/ipfw/nat64lsn.c Sun Apr 14 12:39:09 2019 (r346212) +++ stable/12/sbin/ipfw/nat64lsn.c Sun Apr 14 13:08:18 2019 (r346213) @@ -87,68 +87,70 @@ nat64lsn_print_states(void *buf) char sflags[4], *sf, *proto; ipfw_obj_header *oh; ipfw_obj_data *od; - ipfw_nat64lsn_stg *stg; - ipfw_nat64lsn_state *ste; + ipfw_nat64lsn_stg_v1 *stg; + ipfw_nat64lsn_state_v1 *ste; uint64_t next_idx; int i, sz; oh = (ipfw_obj_header *)buf; od = (ipfw_obj_data *)(oh + 1); - stg = (ipfw_nat64lsn_stg *)(od + 1); + stg = (ipfw_nat64lsn_stg_v1 *)(od + 1); sz = od->head.length - sizeof(*od); next_idx = 0; while (sz > 0 && next_idx != 0xFF) { - next_idx = stg->next_idx; + next_idx = stg->next.index; sz -= sizeof(*stg); if (stg->count == 0) { stg++; continue; } - switch (stg->proto) { - case IPPROTO_TCP: - proto = "TCP"; - break; - case IPPROTO_UDP: - proto = "UDP"; - break; - case IPPROTO_ICMPV6: - proto = "ICMPv6"; - break; - } - inet_ntop(AF_INET6, &stg->host6, s, sizeof(s)); + /* + * NOTE: addresses are in network byte order, + * ports are in host byte order. + */ inet_ntop(AF_INET, &stg->alias4, a, sizeof(a)); - ste = (ipfw_nat64lsn_state *)(stg + 1); + ste = (ipfw_nat64lsn_state_v1 *)(stg + 1); for (i = 0; i < stg->count && sz > 0; i++) { sf = sflags; + inet_ntop(AF_INET6, &ste->host6, s, sizeof(s)); inet_ntop(AF_INET, &ste->daddr, f, sizeof(f)); - if (stg->proto == IPPROTO_TCP) { + switch (ste->proto) { + case IPPROTO_TCP: + proto = "TCP"; if (ste->flags & 0x02) *sf++ = 'S'; if (ste->flags & 0x04) *sf++ = 'E'; if (ste->flags & 0x01) *sf++ = 'F'; + break; + case IPPROTO_UDP: + proto = "UDP"; + break; + case IPPROTO_ICMP: + proto = "ICMPv6"; + break; } *sf = '\0'; - switch (stg->proto) { + switch (ste->proto) { case IPPROTO_TCP: case IPPROTO_UDP: printf("%s:%d\t%s:%d\t%s\t%s\t%d\t%s:%d\n", s, ste->sport, a, ste->aport, proto, sflags, ste->idle, f, ste->dport); break; - case IPPROTO_ICMPV6: + case IPPROTO_ICMP: printf("%s\t%s\t%s\t\t%d\t%s\n", s, a, proto, ste->idle, f); break; default: printf("%s\t%s\t%d\t\t%d\t%s\n", - s, a, stg->proto, ste->idle, f); + s, a, ste->proto, ste->idle, f); } ste++; sz -= sizeof(*ste); } - stg = (ipfw_nat64lsn_stg *)ste; + stg = (ipfw_nat64lsn_stg_v1 *)ste; } return (next_idx); } @@ -174,6 +176,7 @@ nat64lsn_states_cb(ipfw_nat64lsn_cfg *cfg, const char err(EX_OSERR, NULL); do { oh = (ipfw_obj_header *)buf; + oh->opheader.version = 1; /* Force using ov new API */ od = (ipfw_obj_data *)(oh + 1); nat64lsn_fill_ntlv(&oh->ntlv, cfg->name, set); od->head.type = IPFW_TLV_OBJDATA; @@ -363,12 +366,8 @@ nat64lsn_parse_int(const char *arg, const char *desc) static struct _s_x nat64newcmds[] = { { "prefix6", TOK_PREFIX6 }, - { "agg_len", TOK_AGG_LEN }, /* not yet */ - { "agg_count", TOK_AGG_COUNT }, /* not yet */ - { "port_range", TOK_PORT_RANGE }, /* not yet */ { "jmaxlen", TOK_JMAXLEN }, { "prefix4", TOK_PREFIX4 }, - { "max_ports", TOK_MAX_PORTS }, { "host_del_age", TOK_HOST_DEL_AGE }, { "pg_del_age", TOK_PG_DEL_AGE }, { "tcp_syn_age", TOK_TCP_SYN_AGE }, @@ -376,10 +375,13 @@ static struct _s_x nat64newcmds[] = { { "tcp_est_age", TOK_TCP_EST_AGE }, { "udp_age", TOK_UDP_AGE }, { "icmp_age", TOK_ICMP_AGE }, + { "states_chunks",TOK_STATES_CHUNKS }, { "log", TOK_LOG }, { "-log", TOK_LOGOFF }, { "allow_private", TOK_PRIVATE }, { "-allow_private", TOK_PRIVATEOFF }, + /* for compatibility with old configurations */ + { "max_ports", TOK_MAX_PORTS }, /* unused */ { NULL, 0 } }; @@ -436,42 +438,17 @@ nat64lsn_create(const char *name, uint8_t set, int ac, nat64lsn_parse_prefix(*av, AF_INET6, &cfg->prefix6, &cfg->plen6); if (ipfw_check_nat64prefix(&cfg->prefix6, - cfg->plen6) != 0) + cfg->plen6) != 0 && + !IN6_IS_ADDR_UNSPECIFIED(&cfg->prefix6)) errx(EX_USAGE, "Bad prefix6 %s", *av); ac--; av++; break; -#if 0 - case TOK_AGG_LEN: - NEED1("Aggregation prefix len required"); - cfg->agg_prefix_len = nat64lsn_parse_int(*av, opt); - ac--; av++; - break; - case TOK_AGG_COUNT: - NEED1("Max per-prefix count required"); - cfg->agg_prefix_max = nat64lsn_parse_int(*av, opt); - ac--; av++; - break; - case TOK_PORT_RANGE: - NEED1("port range x[:y] required"); - if ((p = strchr(*av, ':')) == NULL) - cfg->min_port = (uint16_t)nat64lsn_parse_int( - *av, opt); - else { - *p++ = '\0'; - cfg->min_port = (uint16_t)nat64lsn_parse_int( - *av, opt); - cfg->max_port = (uint16_t)nat64lsn_parse_int( - p, opt); - } - ac--; av++; - break; case TOK_JMAXLEN: NEED1("job queue length required"); cfg->jmaxlen = nat64lsn_parse_int(*av, opt); ac--; av++; break; -#endif case TOK_MAX_PORTS: NEED1("Max per-user ports required"); cfg->max_ports = nat64lsn_parse_int(*av, opt); @@ -519,6 +496,12 @@ nat64lsn_create(const char *name, uint8_t set, int ac, *av, opt); ac--; av++; break; + case TOK_STATES_CHUNKS: + NEED1("number of chunks required"); + cfg->states_chunks = (uint8_t)nat64lsn_parse_int( + *av, opt); + ac--; av++; + break; case TOK_LOG: cfg->flags |= NAT64_LOG; break; @@ -630,6 +613,12 @@ nat64lsn_config(const char *name, uint8_t set, int ac, *av, opt); ac--; av++; break; + case TOK_STATES_CHUNKS: + NEED1("number of chunks required"); + cfg->states_chunks = (uint8_t)nat64lsn_parse_int( + *av, opt); + ac--; av++; + break; case TOK_LOG: cfg->flags |= NAT64_LOG; break; @@ -789,31 +778,24 @@ nat64lsn_show_cb(ipfw_nat64lsn_cfg *cfg, const char *n printf("nat64lsn %s prefix4 %s/%u", cfg->name, abuf, cfg->plen4); inet_ntop(AF_INET6, &cfg->prefix6, abuf, sizeof(abuf)); printf(" prefix6 %s/%u", abuf, cfg->plen6); -#if 0 - printf("agg_len %u agg_count %u ", cfg->agg_prefix_len, - cfg->agg_prefix_max); - if (cfg->min_port != NAT64LSN_PORT_MIN || - cfg->max_port != NAT64LSN_PORT_MAX) - printf(" port_range %u:%u", cfg->min_port, cfg->max_port); - if (cfg->jmaxlen != NAT64LSN_JMAXLEN) - printf(" jmaxlen %u ", cfg->jmaxlen); -#endif - if (cfg->max_ports != NAT64LSN_MAX_PORTS) - printf(" max_ports %u", cfg->max_ports); - if (cfg->nh_delete_delay != NAT64LSN_HOST_AGE) + if (co.verbose || cfg->states_chunks > 1) + printf(" states_chunks %u", cfg->states_chunks); + if (co.verbose || cfg->nh_delete_delay != NAT64LSN_HOST_AGE) printf(" host_del_age %u", cfg->nh_delete_delay); - if (cfg->pg_delete_delay != NAT64LSN_PG_AGE) - printf(" pg_del_age %u ", cfg->pg_delete_delay); - if (cfg->st_syn_ttl != NAT64LSN_TCP_SYN_AGE) + if (co.verbose || cfg->pg_delete_delay != NAT64LSN_PG_AGE) + printf(" pg_del_age %u", cfg->pg_delete_delay); + if (co.verbose || cfg->st_syn_ttl != NAT64LSN_TCP_SYN_AGE) printf(" tcp_syn_age %u", cfg->st_syn_ttl); - if (cfg->st_close_ttl != NAT64LSN_TCP_FIN_AGE) + if (co.verbose || cfg->st_close_ttl != NAT64LSN_TCP_FIN_AGE) printf(" tcp_close_age %u", cfg->st_close_ttl); - if (cfg->st_estab_ttl != NAT64LSN_TCP_EST_AGE) + if (co.verbose || cfg->st_estab_ttl != NAT64LSN_TCP_EST_AGE) printf(" tcp_est_age %u", cfg->st_estab_ttl); - if (cfg->st_udp_ttl != NAT64LSN_UDP_AGE) + if (co.verbose || cfg->st_udp_ttl != NAT64LSN_UDP_AGE) printf(" udp_age %u", cfg->st_udp_ttl); - if (cfg->st_icmp_ttl != NAT64LSN_ICMP_AGE) + if (co.verbose || cfg->st_icmp_ttl != NAT64LSN_ICMP_AGE) printf(" icmp_age %u", cfg->st_icmp_ttl); + if (co.verbose || cfg->jmaxlen != NAT64LSN_JMAXLEN) + printf(" jmaxlen %u", cfg->jmaxlen); if (cfg->flags & NAT64_LOG) printf(" log"); if (cfg->flags & NAT64_ALLOW_PRIVATE) Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Sun Apr 14 12:39:09 2019 (r346212) +++ stable/12/sys/conf/files Sun Apr 14 13:08:18 2019 (r346213) @@ -4448,9 +4448,9 @@ netpfil/ipfw/nat64/nat64clat.c optional inet inet6 ipf netpfil/ipfw/nat64/nat64clat_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn.c optional inet inet6 ipfirewall \ - ipfirewall_nat64 + ipfirewall_nat64 compile-with "${NORMAL_C} -I$S/contrib/ck/include" netpfil/ipfw/nat64/nat64lsn_control.c optional inet inet6 ipfirewall \ - ipfirewall_nat64 + ipfirewall_nat64 compile-with "${NORMAL_C} -I$S/contrib/ck/include" netpfil/ipfw/nat64/nat64stl.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64stl_control.c optional inet inet6 ipfirewall \ Modified: stable/12/sys/modules/ipfw_nat64/Makefile ============================================================================== --- stable/12/sys/modules/ipfw_nat64/Makefile Sun Apr 14 12:39:09 2019 (r346212) +++ stable/12/sys/modules/ipfw_nat64/Makefile Sun Apr 14 13:08:18 2019 (r346213) @@ -8,4 +8,6 @@ SRCS+= nat64clat.c nat64clat_control.c SRCS+= nat64lsn.c nat64lsn_control.c SRCS+= nat64stl.c nat64stl_control.c +CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include + .include Modified: stable/12/sys/netinet6/ip_fw_nat64.h ============================================================================== --- stable/12/sys/netinet6/ip_fw_nat64.h Sun Apr 14 12:39:09 2019 (r346212) +++ stable/12/sys/netinet6/ip_fw_nat64.h Sun Apr 14 13:08:18 2019 (r346213) @@ -122,7 +122,7 @@ typedef struct _ipfw_nat64clat_cfg { /* * NAT64LSN default configuration values */ -#define NAT64LSN_MAX_PORTS 2048 /* Max number of ports per host */ +#define NAT64LSN_MAX_PORTS 2048 /* Unused */ #define NAT64LSN_JMAXLEN 2048 /* Max outstanding requests. */ #define NAT64LSN_TCP_SYN_AGE 10 /* State's TTL after SYN received. */ #define NAT64LSN_TCP_EST_AGE (2 * 3600) /* TTL for established connection */ @@ -135,16 +135,20 @@ typedef struct _ipfw_nat64clat_cfg { typedef struct _ipfw_nat64lsn_cfg { char name[64]; /* NAT name */ uint32_t flags; - uint32_t max_ports; /* Max ports per client */ - uint32_t agg_prefix_len; /* Prefix length to count */ - uint32_t agg_prefix_max; /* Max hosts per agg prefix */ + + uint32_t max_ports; /* Unused */ + uint32_t agg_prefix_len; /* Unused */ + uint32_t agg_prefix_max; /* Unused */ + struct in_addr prefix4; uint16_t plen4; /* Prefix length */ uint16_t plen6; /* Prefix length */ struct in6_addr prefix6; /* NAT64 prefix */ uint32_t jmaxlen; /* Max jobqueue length */ - uint16_t min_port; /* Min port group # to use */ - uint16_t max_port; /* Max port group # to use */ + + uint16_t min_port; /* Unused */ + uint16_t max_port; /* Unused */ + uint16_t nh_delete_delay;/* Stale host delete delay */ uint16_t pg_delete_delay;/* Stale portgroup delete delay */ uint16_t st_syn_ttl; /* TCP syn expire */ @@ -153,7 +157,7 @@ typedef struct _ipfw_nat64lsn_cfg { uint16_t st_udp_ttl; /* UDP expire */ uint16_t st_icmp_ttl; /* ICMP expire */ uint8_t set; /* Named instance set [0..31] */ - uint8_t spare; + uint8_t states_chunks; /* Number of states chunks per PG */ } ipfw_nat64lsn_cfg; typedef struct _ipfw_nat64lsn_state { @@ -177,5 +181,30 @@ typedef struct _ipfw_nat64lsn_stg { uint32_t spare2; } ipfw_nat64lsn_stg; -#endif /* _NETINET6_IP_FW_NAT64_H_ */ +typedef struct _ipfw_nat64lsn_state_v1 { + struct in6_addr host6; /* Bound IPv6 host */ + struct in_addr daddr; /* Remote IPv4 address */ + uint16_t dport; /* Remote destination port */ + uint16_t aport; /* Local alias port */ + uint16_t sport; /* Source port */ + uint16_t spare; + uint16_t idle; /* Last used time */ + uint8_t flags; /* State flags */ + uint8_t proto; /* protocol */ +} ipfw_nat64lsn_state_v1; +typedef struct _ipfw_nat64lsn_stg_v1 { + union nat64lsn_pgidx { + uint64_t index; + struct { + uint8_t chunk; /* states chunk */ + uint8_t proto; /* protocol */ + uint16_t port; /* base port */ + in_addr_t addr; /* alias address */ + }; + } next; /* next state index */ + struct in_addr alias4; /* IPv4 alias address */ + uint32_t count; /* Number of states */ +} ipfw_nat64lsn_stg_v1; + +#endif /* _NETINET6_IP_FW_NAT64_H_ */ Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 12:39:09 2019 (r346212) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 13:08:18 2019 (r346213) @@ -33,16 +33,17 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include +#include #include #include #include #include #include #include -#include #include -#include #include #include @@ -71,17 +72,22 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_NAT64LSN, "NAT64LSN", "NAT64LSN"); -static void nat64lsn_periodic(void *data); -#define PERIODIC_DELAY 4 -static uint8_t nat64lsn_proto_map[256]; -uint8_t nat64lsn_rproto_map[NAT_MAX_PROTO]; +static epoch_t nat64lsn_epoch; +#define NAT64LSN_EPOCH_ENTER(et) epoch_enter_preempt(nat64lsn_epoch, &(et)) +#define NAT64LSN_EPOCH_EXIT(et) epoch_exit_preempt(nat64lsn_epoch, &(et)) +#define NAT64LSN_EPOCH_WAIT() epoch_wait_preempt(nat64lsn_epoch) +#define NAT64LSN_EPOCH_ASSERT() MPASS(in_epoch(nat64lsn_epoch)) +#define NAT64LSN_EPOCH_CALL(c, f) epoch_call(nat64lsn_epoch, (c), (f)) -#define NAT64_FLAG_FIN 0x01 /* FIN was seen */ -#define NAT64_FLAG_SYN 0x02 /* First syn in->out */ -#define NAT64_FLAG_ESTAB 0x04 /* Packet with Ack */ -#define NAT64_FLAGS_TCP (NAT64_FLAG_SYN|NAT64_FLAG_ESTAB|NAT64_FLAG_FIN) +static uma_zone_t nat64lsn_host_zone; +static uma_zone_t nat64lsn_pgchunk_zone; +static uma_zone_t nat64lsn_pg_zone; +static uma_zone_t nat64lsn_aliaslink_zone; +static uma_zone_t nat64lsn_state_zone; +static uma_zone_t nat64lsn_job_zone; -#define NAT64_FLAG_RDR 0x80 /* Port redirect */ +static void nat64lsn_periodic(void *data); +#define PERIODIC_DELAY 4 #define NAT64_LOOKUP(chain, cmd) \ (struct nat64lsn_cfg *)SRV_OBJECT((chain), (cmd)->arg1) /* @@ -91,25 +97,33 @@ uint8_t nat64lsn_rproto_map[NAT_MAX_PROTO]; enum nat64lsn_jtype { JTYPE_NEWHOST = 1, JTYPE_NEWPORTGROUP, - JTYPE_DELPORTGROUP, + JTYPE_DESTROY, }; struct nat64lsn_job_item { - TAILQ_ENTRY(nat64lsn_job_item) next; + STAILQ_ENTRY(nat64lsn_job_item) entries; enum nat64lsn_jtype jtype; - struct nat64lsn_host *nh; - struct nat64lsn_portgroup *pg; - void *spare_idx; - struct in6_addr haddr; - uint8_t nat_proto; - uint8_t done; - int needs_idx; - int delcount; - unsigned int fhash; /* Flow hash */ - uint32_t aaddr; /* Last used address (net) */ - struct mbuf *m; - struct ipfw_flow_id f_id; - uint64_t delmask[NAT64LSN_PGPTRNMASK]; + + union { + struct { /* used by JTYPE_NEWHOST, JTYPE_NEWPORTGROUP */ + struct mbuf *m; + struct nat64lsn_host *host; + struct nat64lsn_state *state; + uint32_t src6_hval; + uint32_t state_hval; + struct ipfw_flow_id f_id; + in_addr_t faddr; + uint16_t port; + uint8_t proto; + uint8_t done; + }; + struct { /* used by JTYPE_DESTROY */ + struct nat64lsn_hosts_slist hosts; + struct nat64lsn_pg_slist portgroups; + struct nat64lsn_pgchunk *pgchunk; + struct epoch_context epoch_ctx; + }; + }; }; static struct mtx jmtx; @@ -118,143 +132,311 @@ static struct mtx jmtx; #define JQUEUE_LOCK() mtx_lock(&jmtx) #define JQUEUE_UNLOCK() mtx_unlock(&jmtx) +static int nat64lsn_alloc_host(struct nat64lsn_cfg *cfg, + struct nat64lsn_job_item *ji); +static int nat64lsn_alloc_pg(struct nat64lsn_cfg *cfg, + struct nat64lsn_job_item *ji); +static struct nat64lsn_job_item *nat64lsn_create_job( + struct nat64lsn_cfg *cfg, int jtype); static void nat64lsn_enqueue_job(struct nat64lsn_cfg *cfg, struct nat64lsn_job_item *ji); -static void nat64lsn_enqueue_jobs(struct nat64lsn_cfg *cfg, - struct nat64lsn_job_head *jhead, int jlen); +static void nat64lsn_job_destroy(epoch_context_t ctx); +static void nat64lsn_destroy_host(struct nat64lsn_host *host); +static void nat64lsn_destroy_pg(struct nat64lsn_pg *pg); -static struct nat64lsn_job_item *nat64lsn_create_job(struct nat64lsn_cfg *cfg, - const struct ipfw_flow_id *f_id, int jtype); -static int nat64lsn_request_portgroup(struct nat64lsn_cfg *cfg, - const struct ipfw_flow_id *f_id, struct mbuf **pm, uint32_t aaddr, - int needs_idx); -static int nat64lsn_request_host(struct nat64lsn_cfg *cfg, - const struct ipfw_flow_id *f_id, struct mbuf **pm); static int nat64lsn_translate4(struct nat64lsn_cfg *cfg, - const struct ipfw_flow_id *f_id, struct mbuf **pm); + const struct ipfw_flow_id *f_id, struct mbuf **mp); static int nat64lsn_translate6(struct nat64lsn_cfg *cfg, - struct ipfw_flow_id *f_id, struct mbuf **pm); + struct ipfw_flow_id *f_id, struct mbuf **mp); +static int nat64lsn_translate6_internal(struct nat64lsn_cfg *cfg, + struct mbuf **mp, struct nat64lsn_state *state, uint8_t flags); -static int alloc_portgroup(struct nat64lsn_job_item *ji); -static void destroy_portgroup(struct nat64lsn_portgroup *pg); -static void destroy_host6(struct nat64lsn_host *nh); -static int alloc_host6(struct nat64lsn_cfg *cfg, struct nat64lsn_job_item *ji); +#define NAT64_BIT_TCP_FIN 0 /* FIN was seen */ +#define NAT64_BIT_TCP_SYN 1 /* First syn in->out */ +#define NAT64_BIT_TCP_ESTAB 2 /* Packet with Ack */ +#define NAT64_BIT_READY_IPV4 6 /* state is ready for translate4 */ +#define NAT64_BIT_STALE 7 /* state is going to be expired */ -static int attach_portgroup(struct nat64lsn_cfg *cfg, - struct nat64lsn_job_item *ji); -static int attach_host6(struct nat64lsn_cfg *cfg, struct nat64lsn_job_item *ji); +#define NAT64_FLAG_FIN (1 << NAT64_BIT_TCP_FIN) +#define NAT64_FLAG_SYN (1 << NAT64_BIT_TCP_SYN) +#define NAT64_FLAG_ESTAB (1 << NAT64_BIT_TCP_ESTAB) +#define NAT64_FLAGS_TCP (NAT64_FLAG_SYN|NAT64_FLAG_ESTAB|NAT64_FLAG_FIN) +#define NAT64_FLAG_READY (1 << NAT64_BIT_READY_IPV4) +#define NAT64_FLAG_STALE (1 << NAT64_BIT_STALE) -/* XXX tmp */ -static uma_zone_t nat64lsn_host_zone; -static uma_zone_t nat64lsn_pg_zone; -static uma_zone_t nat64lsn_pgidx_zone; +static inline uint8_t +convert_tcp_flags(uint8_t flags) +{ + uint8_t result; -static unsigned int nat64lsn_periodic_chkstates(struct nat64lsn_cfg *cfg, - struct nat64lsn_host *nh); + result = flags & (TH_FIN|TH_SYN); + result |= (flags & TH_RST) >> 2; /* Treat RST as FIN */ + result |= (flags & TH_ACK) >> 2; /* Treat ACK as estab */ -#define I6_hash(x) (djb_hash((const unsigned char *)(x), 16)) -#define I6_first(_ph, h) (_ph)[h] -#define I6_next(x) (x)->next -#define I6_val(x) (&(x)->addr) -#define I6_cmp(a, b) IN6_ARE_ADDR_EQUAL(a, b) -#define I6_lock(a, b) -#define I6_unlock(a, b) + return (result); +} -#define I6HASH_FIND(_cfg, _res, _a) \ - CHT_FIND(_cfg->ih, _cfg->ihsize, I6_, _res, _a) -#define I6HASH_INSERT(_cfg, _i) \ - CHT_INSERT_HEAD(_cfg->ih, _cfg->ihsize, I6_, _i) -#define I6HASH_REMOVE(_cfg, _res, _tmp, _a) \ - CHT_REMOVE(_cfg->ih, _cfg->ihsize, I6_, _res, _tmp, _a) +static void +nat64lsn_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, + struct nat64lsn_state *state) +{ -#define I6HASH_FOREACH_SAFE(_cfg, _x, _tmp, _cb, _arg) \ - CHT_FOREACH_SAFE(_cfg->ih, _cfg->ihsize, I6_, _x, _tmp, _cb, _arg) + memset(plog, 0, sizeof(*plog)); + plog->length = PFLOG_REAL_HDRLEN; + plog->af = family; + plog->action = PF_NAT; + plog->dir = PF_IN; + plog->rulenr = htonl(state->ip_src); + plog->subrulenr = htonl((uint32_t)(state->aport << 16) | + (state->proto << 8) | (state->ip_dst & 0xff)); + plog->ruleset[0] = '\0'; + strlcpy(plog->ifname, "NAT64LSN", sizeof(plog->ifname)); + ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); +} -#define HASH_IN4(x) djb_hash((const unsigned char *)(x), 8) +#define HVAL(p, n, s) jenkins_hash32((const uint32_t *)(p), (n), (s)) +#define HOST_HVAL(c, a) HVAL((a),\ + sizeof(struct in6_addr) / sizeof(uint32_t), (c)->hash_seed) +#define HOSTS(c, v) ((c)->hosts_hash[(v) & ((c)->hosts_hashsize - 1)]) -static unsigned -djb_hash(const unsigned char *h, const int len) +#define ALIASLINK_HVAL(c, f) HVAL(&(f)->dst_ip6,\ + sizeof(struct in6_addr) * 2 / sizeof(uint32_t), (c)->hash_seed) +#define ALIAS_BYHASH(c, v) \ + ((c)->aliases[(v) & ((1 << (32 - (c)->plen4)) - 1)]) +static struct nat64lsn_aliaslink* +nat64lsn_get_aliaslink(struct nat64lsn_cfg *cfg __unused, + struct nat64lsn_host *host, const struct ipfw_flow_id *f_id __unused) { - unsigned int result = 0; - int i; - for (i = 0; i < len; i++) - result = 33 * result ^ h[i]; - - return (result); + /* + * We can implement some different algorithms how + * select an alias address. + * XXX: for now we use first available. + */ + return (CK_SLIST_FIRST(&host->aliases)); } -/* -static size_t -bitmask_size(size_t num, int *level) +#define STATE_HVAL(c, d) HVAL((d), 2, (c)->hash_seed) +#define STATE_HASH(h, v) \ + ((h)->states_hash[(v) & ((h)->states_hashsize - 1)]) +#define STATES_CHUNK(p, v) \ + ((p)->chunks_count == 1 ? (p)->states : \ + ((p)->states_chunk[CHUNK_BY_FADDR(p, v)])) + +#ifdef __LP64__ +#define FREEMASK_FFSLL(pg, faddr) \ + ffsll(*FREEMASK_CHUNK((pg), (faddr))) +#define FREEMASK_BTR(pg, faddr, bit) \ + ck_pr_btr_64(FREEMASK_CHUNK((pg), (faddr)), (bit)) +#define FREEMASK_BTS(pg, faddr, bit) \ + ck_pr_bts_64(FREEMASK_CHUNK((pg), (faddr)), (bit)) +#define FREEMASK_ISSET(pg, faddr, bit) \ + ISSET64(*FREEMASK_CHUNK((pg), (faddr)), (bit)) +#define FREEMASK_COPY(pg, n, out) \ + (out) = ck_pr_load_64(FREEMASK_CHUNK((pg), (n))) +#else +static inline int +freemask_ffsll(uint32_t *freemask) { - size_t x; - int c; + int i; - for (c = 0, x = num; num > 1; num /= 64, c++) - ; - - return (x); + if ((i = ffsl(freemask[0])) != 0) + return (i); + if ((i = ffsl(freemask[1])) != 0) + return (i + 32); + return (0); } +#define FREEMASK_FFSLL(pg, faddr) \ + freemask_ffsll(FREEMASK_CHUNK((pg), (faddr))) +#define FREEMASK_BTR(pg, faddr, bit) \ + ck_pr_btr_32(FREEMASK_CHUNK((pg), (faddr)) + (bit) / 32, (bit) % 32) +#define FREEMASK_BTS(pg, faddr, bit) \ + ck_pr_bts_32(FREEMASK_CHUNK((pg), (faddr)) + (bit) / 32, (bit) % 32) +#define FREEMASK_ISSET(pg, faddr, bit) \ + ISSET32(*(FREEMASK_CHUNK((pg), (faddr)) + (bit) / 32), (bit) % 32) +#define FREEMASK_COPY(pg, n, out) \ + (out) = ck_pr_load_32(FREEMASK_CHUNK((pg), (n))) | \ + ((uint64_t)ck_pr_load_32(FREEMASK_CHUNK((pg), (n)) + 1) << 32) +#endif /* !__LP64__ */ -static void -bitmask_prepare(uint64_t *pmask, size_t bufsize, int level) + +#define NAT64LSN_TRY_PGCNT 32 +static struct nat64lsn_pg* +nat64lsn_get_pg(uint32_t *chunkmask, uint32_t *pgmask, + struct nat64lsn_pgchunk **chunks, struct nat64lsn_pg **pgptr, + uint32_t *pgidx, in_addr_t faddr) { - size_t x, z; + struct nat64lsn_pg *pg, *oldpg; + uint32_t idx, oldidx; + int cnt; - memset(pmask, 0xFF, bufsize); - for (x = 0, z = 1; level > 1; x += z, z *= 64, level--) - ; - pmask[x] ~= 0x01; + cnt = 0; + /* First try last used PG */ + oldpg = pg = ck_pr_load_ptr(pgptr); + idx = oldidx = ck_pr_load_32(pgidx); + /* If pgidx is out of range, reset it to the first pgchunk */ + if (!ISSET32(*chunkmask, idx / 32)) + idx = 0; + do { + ck_pr_fence_load(); + if (pg != NULL && FREEMASK_BITCOUNT(pg, faddr) > 0) { + /* + * If last used PG has not free states, + * try to update pointer. + * NOTE: it can be already updated by jobs handler, + * thus we use CAS operation. + */ + if (cnt > 0) + ck_pr_cas_ptr(pgptr, oldpg, pg); + return (pg); + } + /* Stop if idx is out of range */ + if (!ISSET32(*chunkmask, idx / 32)) + break; + + if (ISSET32(pgmask[idx / 32], idx % 32)) + pg = ck_pr_load_ptr( + &chunks[idx / 32]->pgptr[idx % 32]); + else + pg = NULL; + + idx++; + } while (++cnt < NAT64LSN_TRY_PGCNT); + + /* If pgidx is out of range, reset it to the first pgchunk */ + if (!ISSET32(*chunkmask, idx / 32)) + idx = 0; + ck_pr_cas_32(pgidx, oldidx, idx); + return (NULL); } -*/ -static void -nat64lsn_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, - uint32_t n, uint32_t sn) +static struct nat64lsn_state* +nat64lsn_get_state6to4(struct nat64lsn_cfg *cfg, struct nat64lsn_host *host, + const struct ipfw_flow_id *f_id, uint32_t hval, in_addr_t faddr, + uint16_t port, uint8_t proto) { + struct nat64lsn_aliaslink *link; + struct nat64lsn_state *state; + struct nat64lsn_pg *pg; + int i, offset; - memset(plog, 0, sizeof(*plog)); - plog->length = PFLOG_REAL_HDRLEN; - plog->af = family; - plog->action = PF_NAT; - plog->dir = PF_IN; - plog->rulenr = htonl(n); - plog->subrulenr = htonl(sn); - plog->ruleset[0] = '\0'; - strlcpy(plog->ifname, "NAT64LSN", sizeof(plog->ifname)); - ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); + NAT64LSN_EPOCH_ASSERT(); + + /* Check that we already have state for given arguments */ + CK_SLIST_FOREACH(state, &STATE_HASH(host, hval), entries) { + if (state->proto == proto && state->ip_dst == faddr && + state->sport == port && state->dport == f_id->dst_port) + return (state); + } + + link = nat64lsn_get_aliaslink(cfg, host, f_id); + if (link == NULL) + return (NULL); + + switch (proto) { + case IPPROTO_TCP: + pg = nat64lsn_get_pg( + &link->alias->tcp_chunkmask, link->alias->tcp_pgmask, + link->alias->tcp, &link->alias->tcp_pg, + &link->alias->tcp_pgidx, faddr); + break; + case IPPROTO_UDP: + pg = nat64lsn_get_pg( + &link->alias->udp_chunkmask, link->alias->udp_pgmask, + link->alias->udp, &link->alias->udp_pg, + &link->alias->udp_pgidx, faddr); + break; + case IPPROTO_ICMP: + pg = nat64lsn_get_pg( + &link->alias->icmp_chunkmask, link->alias->icmp_pgmask, + link->alias->icmp, &link->alias->icmp_pg, + &link->alias->icmp_pgidx, faddr); + break; + default: + panic("%s: wrong proto %d", __func__, proto); + } + if (pg == NULL) + return (NULL); + + /* Check that PG has some free states */ + state = NULL; + i = FREEMASK_BITCOUNT(pg, faddr); + while (i-- > 0) { + offset = FREEMASK_FFSLL(pg, faddr); + if (offset == 0) { + /* + * We lost the race. + * No more free states in this PG. + */ + break; + } + + /* Lets try to atomically grab the state */ + if (FREEMASK_BTR(pg, faddr, offset - 1)) { + state = &STATES_CHUNK(pg, faddr)->state[offset - 1]; + /* Initialize */ + state->flags = proto != IPPROTO_TCP ? 0 : + convert_tcp_flags(f_id->_flags); + state->proto = proto; + state->aport = pg->base_port + offset - 1; + state->dport = f_id->dst_port; + state->sport = port; + state->ip6_dst = f_id->dst_ip6; + state->ip_dst = faddr; + state->ip_src = link->alias->addr; + state->hval = hval; + state->host = host; + SET_AGE(state->timestamp); + + /* Insert new state into host's hash table */ + HOST_LOCK(host); + CK_SLIST_INSERT_HEAD(&STATE_HASH(host, hval), + state, entries); + host->states_count++; + /* + * XXX: In case if host is going to be expired, + * reset NAT64LSN_DEADHOST flag. + */ + host->flags &= ~NAT64LSN_DEADHOST; + HOST_UNLOCK(host); + NAT64STAT_INC(&cfg->base.stats, screated); + /* Mark the state as ready for translate4 */ + ck_pr_fence_store(); + ck_pr_bts_32(&state->flags, NAT64_BIT_READY_IPV4); + break; + } + } + return (state); } + /* * Inspects icmp packets to see if the message contains different * packet header so we need to alter @addr and @port. */ static int -inspect_icmp_mbuf(struct mbuf **m, uint8_t *nat_proto, uint32_t *addr, +inspect_icmp_mbuf(struct mbuf **mp, uint8_t *proto, uint32_t *addr, uint16_t *port) { + struct icmp *icmp; struct ip *ip; - struct tcphdr *tcp; - struct udphdr *udp; - struct icmphdr *icmp; int off; - uint8_t proto; + uint8_t inner_proto; - ip = mtod(*m, struct ip *); /* Outer IP header */ + ip = mtod(*mp, struct ip *); /* Outer IP header */ off = (ip->ip_hl << 2) + ICMP_MINLEN; - if ((*m)->m_len < off) - *m = m_pullup(*m, off); - if (*m == NULL) + if ((*mp)->m_len < off) + *mp = m_pullup(*mp, off); + if (*mp == NULL) return (ENOMEM); - ip = mtod(*m, struct ip *); /* Outer IP header */ - icmp = L3HDR(ip, struct icmphdr *); + ip = mtod(*mp, struct ip *); /* Outer IP header */ + icmp = L3HDR(ip, struct icmp *); switch (icmp->icmp_type) { case ICMP_ECHO: case ICMP_ECHOREPLY: /* Use icmp ID as distinguisher */ - *port = ntohs(*((uint16_t *)(icmp + 1))); + *port = ntohs(icmp->icmp_id); return (0); case ICMP_UNREACH: case ICMP_TIMXCEED: @@ -266,90 +448,133 @@ inspect_icmp_mbuf(struct mbuf **m, uint8_t *nat_proto, * ICMP_UNREACH and ICMP_TIMXCEED contains IP header + 64 bits * of ULP header. */ - if ((*m)->m_pkthdr.len < off + sizeof(struct ip) + ICMP_MINLEN) + if ((*mp)->m_pkthdr.len < off + sizeof(struct ip) + ICMP_MINLEN) return (EINVAL); - if ((*m)->m_len < off + sizeof(struct ip) + ICMP_MINLEN) - *m = m_pullup(*m, off + sizeof(struct ip) + ICMP_MINLEN); - if (*m == NULL) + if ((*mp)->m_len < off + sizeof(struct ip) + ICMP_MINLEN) + *mp = m_pullup(*mp, off + sizeof(struct ip) + ICMP_MINLEN); + if (*mp == NULL) return (ENOMEM); - ip = mtodo(*m, off); /* Inner IP header */ - proto = ip->ip_p; + ip = mtodo(*mp, off); /* Inner IP header */ + inner_proto = ip->ip_p; off += ip->ip_hl << 2; /* Skip inner IP header */ *addr = ntohl(ip->ip_src.s_addr); - if ((*m)->m_len < off + ICMP_MINLEN) - *m = m_pullup(*m, off + ICMP_MINLEN); - if (*m == NULL) + if ((*mp)->m_len < off + ICMP_MINLEN) + *mp = m_pullup(*mp, off + ICMP_MINLEN); + if (*mp == NULL) return (ENOMEM); - switch (proto) { + switch (inner_proto) { case IPPROTO_TCP: - tcp = mtodo(*m, off); - *nat_proto = NAT_PROTO_TCP; - *port = ntohs(tcp->th_sport); - return (0); case IPPROTO_UDP: - udp = mtodo(*m, off); - *nat_proto = NAT_PROTO_UDP; - *port = ntohs(udp->uh_sport); + /* Copy source port from the header */ + *port = ntohs(*((uint16_t *)mtodo(*mp, off))); + *proto = inner_proto; return (0); case IPPROTO_ICMP: /* * We will translate only ICMP errors for our ICMP * echo requests. */ - icmp = mtodo(*m, off); + icmp = mtodo(*mp, off); if (icmp->icmp_type != ICMP_ECHO) return (EOPNOTSUPP); - *port = ntohs(*((uint16_t *)(icmp + 1))); + *port = ntohs(icmp->icmp_id); return (0); }; return (EOPNOTSUPP); } -static inline uint8_t -convert_tcp_flags(uint8_t flags) +static struct nat64lsn_state* +nat64lsn_get_state4to6(struct nat64lsn_cfg *cfg, struct nat64lsn_alias *alias, + in_addr_t faddr, uint16_t port, uint8_t proto) { - uint8_t result; + struct nat64lsn_state *state; + struct nat64lsn_pg *pg; + int chunk_idx, pg_idx, state_idx; - result = flags & (TH_FIN|TH_SYN); - result |= (flags & TH_RST) >> 2; /* Treat RST as FIN */ - result |= (flags & TH_ACK) >> 2; /* Treat ACK as estab */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Apr 14 13:17:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D6221575E6F; Sun, 14 Apr 2019 13:17:41 +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 037626A7C0; Sun, 14 Apr 2019 13:17:41 +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 CCC4620F5E; Sun, 14 Apr 2019 13:17:40 +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 x3EDHext074576; Sun, 14 Apr 2019 13:17:40 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EDHeMH074575; Sun, 14 Apr 2019 13:17:40 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201904141317.x3EDHeMH074575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 14 Apr 2019 13:17:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346214 - stable/12/sys/netpfil/ipfw/nat64 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 346214 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 037626A7C0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 13:17:41 -0000 Author: ae Date: Sun Apr 14 13:17:40 2019 New Revision: 346214 URL: https://svnweb.freebsd.org/changeset/base/346214 Log: MFC r345319: Use NET_EPOCH instead of allocating separate one. The code was modified to fix incompatibility that was introduced in r342872. Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 13:08:18 2019 (r346213) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 13:17:40 2019 (r346214) @@ -72,12 +72,10 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_NAT64LSN, "NAT64LSN", "NAT64LSN"); -static epoch_t nat64lsn_epoch; -#define NAT64LSN_EPOCH_ENTER(et) epoch_enter_preempt(nat64lsn_epoch, &(et)) -#define NAT64LSN_EPOCH_EXIT(et) epoch_exit_preempt(nat64lsn_epoch, &(et)) -#define NAT64LSN_EPOCH_WAIT() epoch_wait_preempt(nat64lsn_epoch) -#define NAT64LSN_EPOCH_ASSERT() MPASS(in_epoch(nat64lsn_epoch)) -#define NAT64LSN_EPOCH_CALL(c, f) epoch_call(nat64lsn_epoch, (c), (f)) +#define NAT64LSN_EPOCH_ENTER(et) NET_EPOCH_ENTER_ET(et) +#define NAT64LSN_EPOCH_EXIT(et) NET_EPOCH_EXIT_ET(et) +#define NAT64LSN_EPOCH_ASSERT() MPASS(in_epoch(net_epoch_preempt)) +#define NAT64LSN_EPOCH_CALL(c, f) epoch_call(net_epoch_preempt, (c), (f)) static uma_zone_t nat64lsn_host_zone; static uma_zone_t nat64lsn_pgchunk_zone; @@ -1578,8 +1576,6 @@ void nat64lsn_init_internal(void) { - nat64lsn_epoch = epoch_alloc(EPOCH_PREEMPT); - nat64lsn_host_zone = uma_zcreate("NAT64LSN hosts", sizeof(struct nat64lsn_host), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); @@ -1606,8 +1602,6 @@ nat64lsn_uninit_internal(void) { /* XXX: epoch_task drain */ - epoch_free(nat64lsn_epoch); - JQUEUE_LOCK_DESTROY(); uma_zdestroy(nat64lsn_host_zone); uma_zdestroy(nat64lsn_pgchunk_zone); From owner-svn-src-all@freebsd.org Sun Apr 14 13:37:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3DD815765B1; Sun, 14 Apr 2019 13:37:51 +0000 (UTC) (envelope-from bde@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 4369C6AFEB; Sun, 14 Apr 2019 13:37:51 +0000 (UTC) (envelope-from bde@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 1C342212B9; Sun, 14 Apr 2019 13:37:51 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3EDbokg084986; Sun, 14 Apr 2019 13:37:50 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EDboMO084985; Sun, 14 Apr 2019 13:37:50 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201904141337.x3EDboMO084985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 14 Apr 2019 13:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346215 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 346215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4369C6AFEB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 13:37:51 -0000 Author: bde Date: Sun Apr 14 13:37:50 2019 New Revision: 346215 URL: https://svnweb.freebsd.org/changeset/base/346215 Log: For writing and reading single pixels, avoid some pessimizations for depths > 8. Add some smaller optimizations for these depths. Use a more generic method for all depths >= 8, although this gives tiny pessimizations for these depths. For clearing the whole frame buffer, avoid the same pessimizations for depths > 8. Add some larger optimizations for these depths. Use an even more generic method for all depths >= 8 to give the optimizations for depths > 8 and a tiny pessimization for depth 8. The main pessimization was that old versions of bcopy() copy 1 byte at a time for all trailing bytes. (i386 still does this. amd64 now pessimizzes large sizes instead of small ones if the CPU supports ERMS. dev/fb gets this wrong by mostly not using the bcopy() family or the technically correct bus space functions but by mostly copying 2 bytes at a time using an unoptimized loop without even volatile declarations to prevent the compiler rewriting it.) The sizes here are 1, 2, 3 or 4 bytes, so depths 9-16 were up to twice as slow as necessary and depths 17-24 were up to 3 times slower than necessary. Fix this (except depths 17-24 are still up to 2 times slower than necessary) by using (builtin) memcpy() instead of bcopy() and reorganizing so that the complier can see the small constant sizes. Reduce special cases while reorganizing although this is slightly slower than adding special cases. The compiler inlining (and even -O2 vs -O0) makes little difference compared with reducing the number of accesses except on modern hardware it gives a small improvement. Clearing was also pessimized mainly by the extra accesses. Fix it quite differently by creating a MEMBUF containing 1 line (in fast memory using a slow method) and copying this. This is only slightly slower than reducing everything to efficient memset()s and bcopy()s, but simpler, especially for the segmented case. This works for planar modes too, but don't use it then since the old method was actually optimal for planar modes (it works by moving the slow i/o instructions out of inner loops), while for direct modes the slow instructions were all in the invisible inner loop in bcopy(). Use htole32() and le32toh() and some type puns instead of unoptimized functions for converting colors. This optimization is mostly in the noise. libvgl is only supported on x86, so it could hard-code the assumption that the byte order is le32, but the old conversion functions didn't hard-code this. Modified: head/lib/libvgl/simple.c Modified: head/lib/libvgl/simple.c ============================================================================== --- head/lib/libvgl/simple.c Sun Apr 14 13:17:40 2019 (r346214) +++ head/lib/libvgl/simple.c Sun Apr 14 13:37:50 2019 (r346215) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "vgl.h" static byte VGLSavePaletteRed[256]; @@ -44,96 +45,44 @@ static byte VGLSavePaletteBlue[256]; #define min(x, y) (((x) < (y)) ? (x) : (y)) #define max(x, y) (((x) > (y)) ? (x) : (y)) -static void -color2mem(u_long color, byte *b, int len) -{ - switch (len) { - case 4: - b[3] = (color >> 24) & 0xff; - /* fallthrough */ - case 3: - b[2] = (color >> 16) & 0xff; - /* fallthrough */ - case 2: - b[1] = (color >> 8) & 0xff; - /* fallthrough */ - case 1: - default: - b[0] = color & 0xff; - break; - } - - return; -} - -static u_long -mem2color(byte *b, int len) -{ - u_long color = 0; - - switch (len) { - case 4: - color |= (b[3] & 0xff) << 24; - /* fallthrough */ - case 3: - color |= (b[2] & 0xff) << 16; - /* fallthrough */ - case 2: - color |= (b[1] & 0xff) << 8; - /* fallthrough */ - case 1: - default: - color |= (b[0] & 0xff); - break; - } - - return color; -} - void VGLSetXY(VGLBitmap *object, int x, int y, u_long color) { int offset; - byte b[4]; VGLCheckSwitch(); if (x>=0 && xVXsize && y>=0 && yVYsize) { if (object->Type == MEMBUF || !VGLMouseFreeze(x, y, 1, 1, 0x80000000 | color)) { + offset = (y * object->VXsize + x) * object->PixelBytes; switch (object->Type) { + case VIDBUF8S: + case VIDBUF16S: + case VIDBUF24S: + case VIDBUF32S: + offset = VGLSetSegment(offset); + /* FALLTHROUGH */ case MEMBUF: - switch (object->PixelBytes) { - case 2: - goto vidbuf16; - case 3: - goto vidbuf24; - case 4: - goto vidbuf32; - } - /* fallthrough */ case VIDBUF8: - object->Bitmap[y*object->VXsize+x]=((byte)color); - break; - case VIDBUF8S: - object->Bitmap[VGLSetSegment(y*object->VXsize+x)]=((byte)color); - break; case VIDBUF16: -vidbuf16: case VIDBUF24: -vidbuf24: case VIDBUF32: -vidbuf32: - color2mem(color, b, object->PixelBytes); - bcopy(b, &object->Bitmap[(y*object->VXsize+x) * object->PixelBytes], - object->PixelBytes); + color = htole32(color); + switch (object->PixelBytes) { + case 1: + memcpy(&object->Bitmap[offset], &color, 1); + break; + case 2: + memcpy(&object->Bitmap[offset], &color, 2); + break; + case 3: + memcpy(&object->Bitmap[offset], &color, 3); + break; + case 4: + memcpy(&object->Bitmap[offset], &color, 4); + break; + } break; - case VIDBUF16S: - case VIDBUF24S: - case VIDBUF32S: - color2mem(color, b, object->PixelBytes); - offset = VGLSetSegment((y*object->VXsize+x) * object->PixelBytes); - bcopy(b, &object->Bitmap[offset], object->PixelBytes); - break; case VIDBUF8X: outb(0x3c4, 0x02); outb(0x3c5, 0x01 << (x&0x3)); @@ -161,42 +110,38 @@ static u_long __VGLGetXY(VGLBitmap *object, int x, int y) { int offset; - byte b[4]; int i; u_long color; byte mask; + offset = (y * object->VXsize + x) * object->PixelBytes; switch (object->Type) { + case VIDBUF8S: + case VIDBUF16S: + case VIDBUF24S: + case VIDBUF32S: + offset = VGLSetSegment(offset); + /* FALLTHROUGH */ case MEMBUF: - switch (object->PixelBytes) { - case 2: - goto vidbuf16; - case 3: - goto vidbuf24; - case 4: - goto vidbuf32; - } - /* fallthrough */ case VIDBUF8: - return object->Bitmap[((y*object->VXsize)+x)]; - case VIDBUF8S: - return object->Bitmap[VGLSetSegment(y*object->VXsize+x)]; case VIDBUF16: -vidbuf16: case VIDBUF24: -vidbuf24: case VIDBUF32: -vidbuf32: - bcopy(&object->Bitmap[(y*object->VXsize+x) * object->PixelBytes], - b, object->PixelBytes); - return (mem2color(b, object->PixelBytes)); - case VIDBUF16S: - case VIDBUF24S: - case VIDBUF32S: - offset = VGLSetSegment((y*object->VXsize+x) * object->PixelBytes); - bcopy(&object->Bitmap[offset], b, object->PixelBytes); - - return (mem2color(b, object->PixelBytes)); + switch (object->PixelBytes) { + case 1: + memcpy(&color, &object->Bitmap[offset], 1); + return le32toh(color) & 0xff; + case 2: + memcpy(&color, &object->Bitmap[offset], 2); + return le32toh(color) & 0xffff; + case 3: + memcpy(&color, &object->Bitmap[offset], 3); + return le32toh(color) & 0xffffff; + case 4: + memcpy(&color, &object->Bitmap[offset], 4); + return le32toh(color); + } + break; case VIDBUF8X: outb(0x3ce, 0x04); outb(0x3cf, x & 0x3); return object->Bitmap[(unsigned)(VGLAdpInfo.va_line_width*y)+(x/4)]; @@ -539,63 +484,38 @@ VGLFilledEllipse(VGLBitmap *object, int xc, int yc, in void VGLClear(VGLBitmap *object, u_long color) { + VGLBitmap src; int offset; int len; - int i, total = 0; - byte b[4]; + int i; VGLCheckSwitch(); if (object->Type != MEMBUF) VGLMouseFreeze(0, 0, object->Xsize, object->Ysize, color); switch (object->Type) { case MEMBUF: - switch (object->PixelBytes) { - case 2: - goto vidbuf16; - case 3: - goto vidbuf24; - case 4: - goto vidbuf32; - } - /* fallthrough */ case VIDBUF8: - memset(object->Bitmap, (byte)color, object->VXsize*object->VYsize); - break; - case VIDBUF8S: - for (offset = 0; offset < object->VXsize*object->VYsize; ) { - VGLSetSegment(offset); - len = min(object->VXsize*object->VYsize - offset, - VGLAdpInfo.va_window_size); - memset(object->Bitmap, (byte)color, len); - offset += len; - } - break; case VIDBUF16: -vidbuf16: - case VIDBUF24: -vidbuf24: - case VIDBUF32: -vidbuf32: - color2mem(color, b, object->PixelBytes); - total = object->VXsize*object->VYsize*object->PixelBytes; - for (i = 0; i < total; i += object->PixelBytes) - bcopy(b, object->Bitmap + i, object->PixelBytes); - break; - case VIDBUF16S: + case VIDBUF24: case VIDBUF24S: + case VIDBUF32: case VIDBUF32S: - color2mem(color, b, object->PixelBytes); - total = object->VXsize*object->VYsize*object->PixelBytes; - for (offset = 0; offset < total; ) { - VGLSetSegment(offset); - len = min(total - offset, VGLAdpInfo.va_window_size); - for (i = 0; i < len; i += object->PixelBytes) - bcopy(b, object->Bitmap + (offset + i) % VGLAdpInfo.va_window_size, - object->PixelBytes); - offset += len; - } + src.Type = MEMBUF; + src.Xsize = object->Xsize; + src.VXsize = object->VXsize; + src.Ysize = 1; + src.VYsize = 1; + src.Xorigin = 0; + src.Yorigin = 0; + src.Bitmap = alloca(object->VXsize * object->PixelBytes); + src.PixelBytes = object->PixelBytes; + color = htole32(color); + for (i = 0; i < object->VXsize; i++) + bcopy(&color, src.Bitmap + i * object->PixelBytes, object->PixelBytes); + for (i = 0; i < object->VYsize; i++) + __VGLBitmapCopy(&src, 0, 0, object, 0, i, object->VYsize, 1); break; case VIDBUF8X: From owner-svn-src-all@freebsd.org Sun Apr 14 15:19:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A228157857C; Sun, 14 Apr 2019 15:19:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03EEC6DDF8; Sun, 14 Apr 2019 15:19:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm1-x331.google.com with SMTP id z24so17043469wmi.5; Sun, 14 Apr 2019 08:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wIAcKt77BrlhQeePUMwhnHR7UZrckdVrnOdVhiE+e8Y=; b=ejxeVdj0TFOOinK6twoT3j5lNQVitHFsP3EOQpLTa8FkW+Nh/O+D3CouXT3DwZrHGk K+RcIbUByiSKh9VIsRnAETCeGQE/RKcsBUfNSkmsjftDWqjTMaoR0daNU/VWRZSPCcqn pEMAAEdNO03CMW47K7fCQbdL5IeMINFh00ZnF2ZyuYw9b2J02BzOdXDnMjVplv5cyJVz QESDP7R4/CumhKZ7r317vUDmaACg3zuEjUOogm9axZ/R1SETtKs0gAyQnvMlb+uVEeJj FJ1wwdShPPzQisopnbJ1wEF012ksQfh7wl/RtZavXh7K/zih90Y1lQ3kVuOHnpG2wQUl d+ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wIAcKt77BrlhQeePUMwhnHR7UZrckdVrnOdVhiE+e8Y=; b=mQbKTcqyfsVY8O6lSNyCwmQYanSZ1bPYQCPzQem+AGc96BEg2Hygx1u5/OMBMiDVSV TU0KTzRAZRwj5yUh64EcTRPmr4Da1oBqQPaY67VEAEnRTgTSPx+exPDZ/Dc9gO2xBSeA Ar12w0Jj5fdoTpm8biDA0PxFa3XBT8Ibfdwwp/5oHhcBm7vnrWO1W6KxEkpkx1ipDg2U c8BylCtqO8b33zxOVflHBr/H/nxIPz3FrEe6ojGgUgPpIUw+16RuLghAVFCWGD3pVKbY DDD04EeaauVU6392GkLU5eNniRoOOe5aLMuQKoZBSSwE3J7kWaGzcEf7Ygyc7IBCGNxK JyTw== X-Gm-Message-State: APjAAAUE5LICVVubYJu7ca6kDcV7UEsHB4asth8vdufksnnp+lyJZpsJ ERRNnsTd1nKyOJA9oL6T2Wuq61cyu2oXbndUzcpZKA== X-Google-Smtp-Source: APXvYqy5Sset3BB2gJ2DJd6mCD1PRRc3CkGtoG/CAtT1RmbUEaWkU764VKjBoxtZy0Y0G/057JDtISms0sW9rBWvL+o= X-Received: by 2002:a1c:6309:: with SMTP id x9mr18538818wmb.101.1555255174900; Sun, 14 Apr 2019 08:19:34 -0700 (PDT) MIME-Version: 1.0 References: <201904041632.x34GWR4Z006164@repo.freebsd.org> In-Reply-To: <201904041632.x34GWR4Z006164@repo.freebsd.org> From: Adrian Chadd Date: Sun, 14 Apr 2019 08:19:22 -0700 Message-ID: Subject: Re: svn commit: r345875 - in head: contrib/elftoolchain/strings usr.bin/strings To: Mariusz Zaborski Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 03EEC6DDF8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=ejxeVdj0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2a00:1450:4864:20::331 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-6.69 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[1.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; IP_SCORE(-2.79)[ip: (-9.32), ipnet: 2a00:1450::/32(-2.39), asn: 15169(-2.19), country: US(-0.06)]; NEURAL_HAM_SHORT(-0.89)[-0.890,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 15:19:38 -0000 This exposed a fun bug - gcc mips 6.4.0 complains about an unused arg (fa) in fileargs_fopen() in the strings change when you compile without casper support. I do that on mips. I have a local change that converts the #define to an inline function so the unused arg can be (void)'ed away. Mind if I commit it? -adrian On Thu, 4 Apr 2019 at 09:32, Mariusz Zaborski wrote: > Author: oshogbo > Date: Thu Apr 4 16:32:27 2019 > New Revision: 345875 > URL: https://svnweb.freebsd.org/changeset/base/345875 > > Log: > strings: capsicumize it > > Reviewed by: cem > Discussed with: emaste > Differential Revision: https://reviews.freebsd.org/D18038 > > Modified: > head/contrib/elftoolchain/strings/strings.c > head/usr.bin/strings/Makefile > > Modified: head/contrib/elftoolchain/strings/strings.c > > ============================================================================== > --- head/contrib/elftoolchain/strings/strings.c Thu Apr 4 12:02:48 2019 > (r345874) > +++ head/contrib/elftoolchain/strings/strings.c Thu Apr 4 16:32:27 2019 > (r345875) > @@ -25,8 +25,10 @@ > */ > > #include > +#include > #include > > +#include > #include > #include > #include > @@ -44,6 +46,9 @@ > #include > #include > > +#include > +#include > + > #include "_elftc.h" > > ELFTC_VCSID("$Id: strings.c 3648 2018-11-22 23:26:43Z emaste $"); > @@ -85,7 +90,7 @@ static struct option strings_longopts[] = { > }; > > int getcharacter(FILE *, long *); > -int handle_file(const char *); > +int handle_file(fileargs_t *fa, const char *); > int handle_elf(const char *, FILE *); > int handle_binary(const char *, FILE *, size_t); > int find_strings(const char *, FILE *, off_t, off_t); > @@ -99,6 +104,8 @@ void usage(void); > int > main(int argc, char **argv) > { > + fileargs_t *fa; > + cap_rights_t rights; > int ch, rc; > > rc = 0; > @@ -187,27 +194,41 @@ main(int argc, char **argv) > argc -= optind; > argv += optind; > > + cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL); > + fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights); > + if (fa == NULL) > + err(1, "Unable to initialize casper fileargs"); > + > + caph_cache_catpages(); > + if (caph_limit_stdio() < 0 && caph_enter_casper() < 0) { > + fileargs_free(fa); > + err(1, "Unable to enter capability mode"); > + } > + > if (min_len == 0) > min_len = 4; > if (*argv == NULL) > rc = find_strings("{standard input}", stdin, 0, 0); > else while (*argv != NULL) { > - if (handle_file(*argv) != 0) > + if (handle_file(fa, *argv) != 0) > rc = 1; > argv++; > } > + > + fileargs_free(fa); > + > return (rc); > } > > int > -handle_file(const char *name) > +handle_file(fileargs_t *fa, const char *name) > { > FILE *pfile; > int rt; > > if (name == NULL) > return (1); > - pfile = fopen(name, "rb"); > + pfile = fileargs_fopen(fa, name, "rb"); > if (pfile == NULL) { > warnx("'%s': %s", name, strerror(errno)); > return (1); > > Modified: head/usr.bin/strings/Makefile > > ============================================================================== > --- head/usr.bin/strings/Makefile Thu Apr 4 12:02:48 2019 > (r345874) > +++ head/usr.bin/strings/Makefile Thu Apr 4 16:32:27 2019 > (r345875) > @@ -10,6 +10,12 @@ PROG= strings > > LIBADD= elftc elf > > +.if ${MK_CASPER} != "no" && !defined(BOOTSTRAPPING) > +LIBADD+= casper > +LIBADD+= cap_fileargs > +CFLAGS+= -DWITH_CASPER > +.endif > + > CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common > > .include > > From owner-svn-src-all@freebsd.org Sun Apr 14 18:04:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45A0F157CD07; Sun, 14 Apr 2019 18:04:54 +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 DA15774899; Sun, 14 Apr 2019 18:04:53 +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 B2B2024189; Sun, 14 Apr 2019 18:04:53 +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 x3EI4rhi029800; Sun, 14 Apr 2019 18:04:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3EI4rex029798; Sun, 14 Apr 2019 18:04:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904141804.x3EI4rex029798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 14 Apr 2019 18:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346216 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 346216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DA15774899 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2019 18:04:54 -0000 Author: kib Date: Sun Apr 14 18:04:53 2019 New Revision: 346216 URL: https://svnweb.freebsd.org/changeset/base/346216 Log: ld-elf.so: make LD_DEBUG always functional. This causes some increase of the dynamic linker size, but benefits of avoiding compiling private copy or the linker when debugging is required. definitely worth it. The dbg() calls can be compiled out by defining LD_NO_DEBUG symbol. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/Makefile head/libexec/rtld-elf/debug.h Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Sun Apr 14 13:37:50 2019 (r346215) +++ head/libexec/rtld-elf/Makefile Sun Apr 14 18:04:53 2019 (r346216) @@ -2,7 +2,7 @@ # Use the following command to build local debug version of dynamic # linker: -# make DEBUG_FLAGS=-g DEBUG=-DDEBUG WITHOUT_TESTS=yes all +# make DEBUG_FLAGS=-g WITHOUT_TESTS=yes all .include PACKAGE= clibs Modified: head/libexec/rtld-elf/debug.h ============================================================================== --- head/libexec/rtld-elf/debug.h Sun Apr 14 13:37:50 2019 (r346215) +++ head/libexec/rtld-elf/debug.h Sun Apr 14 18:04:53 2019 (r346216) @@ -39,10 +39,10 @@ #include #include -extern void debug_printf(const char *, ...) __printflike(1, 2); +void debug_printf(const char *, ...) __printflike(1, 2); extern int debug; -#ifdef DEBUG +#ifndef NO_LD_DEBUG #define dbg(...) debug_printf(__VA_ARGS__) #else #define dbg(...) ((void) 0) From owner-svn-src-all@freebsd.org Mon Apr 15 01:27:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A57441585E18; Mon, 15 Apr 2019 01:27:17 +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 47CFA8A3FD; Mon, 15 Apr 2019 01:27:17 +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 36647D0E; Mon, 15 Apr 2019 01:27:17 +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 x3F1RHWi062977; Mon, 15 Apr 2019 01:27:17 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3F1RG7X062973; Mon, 15 Apr 2019 01:27:16 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201904150127.x3F1RG7X062973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 15 Apr 2019 01:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346217 - in head/sys: fs/nfs fs/nfsclient kern sys X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys: fs/nfs fs/nfsclient kern sys X-SVN-Commit-Revision: 346217 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47CFA8A3FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 01:27:17 -0000 Author: rmacklem Date: Mon Apr 15 01:27:15 2019 New Revision: 346217 URL: https://svnweb.freebsd.org/changeset/base/346217 Log: Fix the NFSv4 client to safely find processes. r340744 broke the NFSv4 client, because it replaced pfind_locked() with a call to pfind(), since pfind() acquires the sx lock for the pid hash and the NFSv4 already holds a mutex when it does the call. The patch fixes the problem by recreating a pfind_any_locked() and adding the functions pidhash_slockall() and pidhash_sunlockall to acquire/release all of the pid hash locks. These functions are then used by the NFSv4 client instead of acquiring the allproc_lock and calling pfind(). Reviewed by: kib, mjg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19887 Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/kern/kern_proc.c head/sys/sys/proc.h Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sun Apr 14 18:04:53 2019 (r346216) +++ head/sys/fs/nfs/nfsport.h Mon Apr 15 01:27:15 2019 (r346217) @@ -692,8 +692,6 @@ void nfsrvd_rcv(struct socket *, void *, int); #define NFSUNLOCKMNT(m) mtx_unlock(&((m)->nm_mtx)) #define NFSLOCKREQUEST(r) mtx_lock(&((r)->r_mtx)) #define NFSUNLOCKREQUEST(r) mtx_unlock(&((r)->r_mtx)) -#define NFSPROCLISTLOCK() sx_slock(&allproc_lock) -#define NFSPROCLISTUNLOCK() sx_sunlock(&allproc_lock) #define NFSLOCKSOCKREQ(r) mtx_lock(&((r)->nr_mtx)) #define NFSUNLOCKSOCKREQ(r) mtx_unlock(&((r)->nr_mtx)) #define NFSLOCKDS(d) mtx_lock(&((d)->nfsclds_mtx)) Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Sun Apr 14 18:04:53 2019 (r346216) +++ head/sys/fs/nfsclient/nfs_clport.c Mon Apr 15 01:27:15 2019 (r346217) @@ -1156,7 +1156,7 @@ nfscl_procdoesntexist(u_int8_t *own) tl.cval[2] = *own++; tl.cval[3] = *own++; pid = tl.lval; - p = pfind(pid); + p = pfind_any_locked(pid); if (p == NULL) return (1); if (p->p_stats == NULL) { Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Sun Apr 14 18:04:53 2019 (r346216) +++ head/sys/fs/nfsclient/nfs_clstate.c Mon Apr 15 01:27:15 2019 (r346217) @@ -1789,7 +1789,13 @@ nfscl_cleanupkext(struct nfsclclient *clp, struct nfsc struct nfscllockowner *lp, *nlp; struct nfscldeleg *dp; - NFSPROCLISTLOCK(); + /* + * All the pidhash locks must be acquired, since they are sx locks + * and must be acquired before the mutexes. The pid(s) that will + * be used aren't known yet, so all the locks need to be acquired. + * Fortunately, this function is only performed once/sec. + */ + pidhash_slockall(); NFSLOCKCLSTATE(); LIST_FOREACH_SAFE(owp, &clp->nfsc_owner, nfsow_list, nowp) { LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { @@ -1816,7 +1822,7 @@ nfscl_cleanupkext(struct nfsclclient *clp, struct nfsc } } NFSUNLOCKCLSTATE(); - NFSPROCLISTUNLOCK(); + pidhash_sunlockall(); } /* Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Apr 14 18:04:53 2019 (r346216) +++ head/sys/kern/kern_proc.c Mon Apr 15 01:27:15 2019 (r346217) @@ -193,7 +193,7 @@ procinit(void) pidhashtbl_lock = malloc(sizeof(*pidhashtbl_lock) * (pidhashlock + 1), M_PROC, M_WAITOK | M_ZERO); for (i = 0; i < pidhashlock + 1; i++) - sx_init(&pidhashtbl_lock[i], "pidhash"); + sx_init_flags(&pidhashtbl_lock[i], "pidhash", SX_DUPOK); pgrphashtbl = hashinit(maxproc / 4, M_PROC, &pgrphash); proc_zone = uma_zcreate("PROC", sched_sizeof_proc(), proc_ctor, proc_dtor, proc_init, proc_fini, @@ -365,6 +365,52 @@ inferior(struct proc *p) return (0); } return (1); +} + +/* + * Shared lock all the pid hash lists. + */ +void +pidhash_slockall(void) +{ + u_long i; + + for (i = 0; i < pidhashlock + 1; i++) + sx_slock(&pidhashtbl_lock[i]); +} + +/* + * Shared unlock all the pid hash lists. + */ +void +pidhash_sunlockall(void) +{ + u_long i; + + for (i = 0; i < pidhashlock + 1; i++) + sx_sunlock(&pidhashtbl_lock[i]); +} + +/* + * Similar to pfind_any(), this function finds zombies. + */ +struct proc * +pfind_any_locked(pid_t pid) +{ + struct proc *p; + + sx_assert(PIDHASHLOCK(pid), SX_LOCKED); + LIST_FOREACH(p, PIDHASH(pid), p_hash) { + if (p->p_pid == pid) { + PROC_LOCK(p); + if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); + p = NULL; + } + break; + } + } + return (p); } /* Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sun Apr 14 18:04:53 2019 (r346216) +++ head/sys/sys/proc.h Mon Apr 15 01:27:15 2019 (r346217) @@ -989,8 +989,11 @@ extern struct uma_zone *proc_zone; struct proc *pfind(pid_t); /* Find process by id. */ struct proc *pfind_any(pid_t); /* Find (zombie) process by id. */ +struct proc *pfind_any_locked(pid_t pid); /* Find process by id, locked. */ struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ +void pidhash_slockall(void); /* Shared lock all pid hash lists. */ +void pidhash_sunlockall(void); /* Shared unlock all pid hash lists. */ struct fork_req { int fr_flags; From owner-svn-src-all@freebsd.org Mon Apr 15 02:12:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D34815869EA for ; Mon, 15 Apr 2019 02:12:56 +0000 (UTC) (envelope-from albert.clifton02485@gmail.com) Received: from mail-vs1-xe41.google.com (mail-vs1-xe41.google.com [IPv6:2607:f8b0:4864:20::e41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F2E38B599 for ; Mon, 15 Apr 2019 02:12:55 +0000 (UTC) (envelope-from albert.clifton02485@gmail.com) Received: by mail-vs1-xe41.google.com with SMTP id t23so6151366vso.10 for ; Sun, 14 Apr 2019 19:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=lrl+5NbQD4CRjwWruazzRpjTnAP/jnDAs/pVixX3Koc=; b=cncsX2dUgXTq4GmZ8hUtECbqKxXHga8zcMgCSGHWe1fsAQSfr/Bq88djL1HqNa2yEe COS5kc2mH6/PrHoZ2Zl/AccqCAxmn0J/cSuPbdTHAVIsyRmZqKVJcT3FMjjbgdHdo6PF wFRoIxf9HlQ8lqXKKmHrsoxOdjMth6NTaJdFFdmf+TArPleXjqFJKdI0XSwLe8g7Ytoa iMj7YdLzc1vTZttQlClwOt5PdcG8EiiscGIfTxeXYjLE9zU/tlA2KfFI6Zlg6oX1WAS/ SygMlObG3kjt4blGBdsDocYG30G2hD3GBnTmsruUP4geJyopDkSqirtKvT13GQa0dNlB qu3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=lrl+5NbQD4CRjwWruazzRpjTnAP/jnDAs/pVixX3Koc=; b=bRsobchd4n1159IZzBsquk7Esc/W5Nii2krM+oL8WtO/zNa3SOstdNWhjWgg4EeuVS 2G5ncvY7NOujFZWcHfEPMXzjigVeKc+2kiOCYpMOyiwqTaqSYCvSqA9rGpLMrIWY6Rvu t+SIOsxVcUFgakDWhTiW2VBT80KzNbvQwjXbjGFECUda4auv2RGOZ3vda1xMi4n7hpr2 H7fdyyW4QfDXSYEG//nwUp6UEZelFinyevXyuFG+s5rmENpBo5xC+WH8xVjSgKgo1uVU mH9krKtl6KiPS5auYhZU7/dJyZwE9PC/PcjSkvJhwPM0JwjuPPk/T7abtBhSTxbJjV/q StXQ== X-Gm-Message-State: APjAAAXq9EdwDikhTg9w5zvEdhPCU9tMdj87XDLmPfbNFl5Fw18ETPS2 cNkI5dE5enf4R6+zCVcinBWzImuaE/tZixn/gfQt1Q== X-Google-Smtp-Source: APXvYqzz0L2zQ5nU8fkaQXk+HPBFawY9+hiddHFF3vUYbVmghrHViwSaDfS5Frq/iey+trgm4f1B+mX13afLk00H1ts= X-Received: by 2002:a67:818e:: with SMTP id c136mr38937642vsd.65.1555294374410; Sun, 14 Apr 2019 19:12:54 -0700 (PDT) Received: from 52669349336 named unknown by gmailapi.google.com with HTTPREST; Sun, 14 Apr 2019 19:12:53 -0700 MIME-Version: 1.0 Sender: Albert Clifton From: Albert Clifton Date: Sun, 14 Apr 2019 19:12:53 -0700 X-Google-Sender-Auth: fW-_YyjCpOLohxouInUzJF6SnIc Message-ID: Subject: Web Achievement: gcu-squad.org To: Svn-Src-All X-Rspamd-Queue-Id: 2F2E38B599 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=cncsX2dU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of albertclifton02485@gmail.com designates 2607:f8b0:4864:20::e41 as permitted sender) smtp.mailfrom=albertclifton02485@gmail.com X-Spamd-Result: default: False [-3.56 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.58)[-0.580,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; URL_IN_SUBJECT(0.40)[gcu-squad.org]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.37)[ip: (3.35), ipnet: 2607:f8b0::/32(-2.96), asn: 15169(-2.19), country: US(-0.06)]; RCVD_IN_DNSWL_NONE(0.00)[1.4.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 02:12:56 -0000 Hi gcu-squad Team, Hope you are doing well. Analyzing and sending reports about your website is a common practice these days. However, practically making your website visible is not everybody=E2= =80=99s cup of tea. There is always a debate about return on investment from online promotion as there are several ways to promote a website, for example *SEO* , *PPC*, *Social media* etc. Our packages are designed for a complete advance digital marketing experience which includes all the major factors of promotion in order to beat your competitors. Being at the top of Search engine is the best thing you can do for your website, be it through *SEO*, *PPC* or any other promotion method. If you want to grow your business then always stay ahead of your competitors. We understand every small and medium enterprises scope and limitations. So we blend our offers competitively to meet everyone=E2=80=99s business need.= There=E2=80=99s been a lot to discuss for better results on your site as traditional methods cause negative influence. Our Team can show you the right direction and guidelines to overcome the flaws. Given consent I would love to give you a call and discuss further about your website and share our expert point of view. *Let me know your thought. I will be looking forward to your response.* *Albert Clifton* *Digital Marketing Analyst* ------------------------------------------------------------- Ps: You may ask us to =E2=80=9CREMOVE=E2=80=9D to stop further corresponden= ce. [image: beacon] From owner-svn-src-all@freebsd.org Mon Apr 15 02:42:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76D931587102; Mon, 15 Apr 2019 02:42:46 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B93098BEAC; Mon, 15 Apr 2019 02:42:45 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: by mail-lj1-x233.google.com with SMTP id y6so14096994ljd.12; Sun, 14 Apr 2019 19:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UVWvKmRzKXRXH/OufVKUKVXxOeIksECyjNAOPFoyRI4=; b=qtig7QK6NAW/5JhZ5YLxfgGgT5XFQ6J9SoOlJ56pgIgCmH5k9d6VwNmnMWTi4s2uf4 t3bq/cXVM0JgzQPscJgwUTHn4iG88YRV4ZF62F1aVW/3DbXa5YycOMleC0MW7CKhIrG4 vTk3SvUDllNEtsGX/utIWJEvOwAG0Smc1QZsJmu2rTApZPoXZAL41B69PMbBE3gBzmOG hYduxLFxtoHLSNYHcnSqdWtMHQdjuYMYLB+qzqr2xD6WMs3qPa5PezZG8Qjc96A4JN1a SDFnCVARZzOOZLJq/VjxCNSRdV/xD7nUzXPtDQERbQJNZdOyCOPkB8L8Sbio8WO5gcbQ ifmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=UVWvKmRzKXRXH/OufVKUKVXxOeIksECyjNAOPFoyRI4=; b=M1aro9vetTMDU3uQfOgxf2+XNqPV1lA9mkHsGL+Vog6mofnFefv0KK4eP+rPLrYXZB bPZS0ertGkbqN5Tvxeq6R0o5SvXB37EltF7JmCDjMuxPvY0bL+Bg+DXVTp8OgT77ED3M m+Nh9wxlsOqc+m3WhWDW5E8sqcKA2nyZiuZY0nm6CriRrqSwQFfsUx4ItP+czuOVO0RG YPoU4yb+fbdZC/o+HvvMZ4uNk26opsdh3xEn/49jzOK2tCPPiiflBohQ379DMPTr6gUz 4Aus5alVhNwqpB8w+K0Yz7YyAL8OisftL01StvTMtbeeYPwdK6gU7WU46yfOCRZspSsU BkJw== X-Gm-Message-State: APjAAAUYFH/4qRXXyfE1QmSMWHkHiRNDoeUnwXz1wWMkxTzQdfwsLpBO okeUXHEROGsTzaZZS15NSNg= X-Google-Smtp-Source: APXvYqwneG5whVsMuwAgfwxq6YvqaIXWuUiKU+Tiv731m8/hncfEUowqyiGU+bRTOlwH7lc7QlgsGA== X-Received: by 2002:a2e:8ece:: with SMTP id e14mr21496948ljl.66.1555296164199; Sun, 14 Apr 2019 19:42:44 -0700 (PDT) Received: from x-wing (87-206-170-77.dynamic.chello.pl. [87.206.170.77]) by smtp.gmail.com with ESMTPSA id q12sm2228019lfa.37.2019.04.14.19.42.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Apr 2019 19:42:42 -0700 (PDT) Sender: Mariusz Zaborski Date: Mon, 15 Apr 2019 04:42:46 +0200 From: Mariusz Zaborski To: Adrian Chadd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345875 - in head: contrib/elftoolchain/strings usr.bin/strings Message-ID: <20190415024246.GA36864@x-wing> References: <201904041632.x34GWR4Z006164@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: B93098BEAC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; TAGGED_RCPT(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 02:42:46 -0000 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 14, 2019 at 08:19:22AM -0700, Adrian Chadd wrote: > This exposed a fun bug - gcc mips 6.4.0 complains about an unused arg (fa) > in fileargs_fopen() in the strings change when you compile without casper > support. I do that on mips. >=20 > I have a local change that converts the #define to an inline function so > the unused arg can be (void)'ed away. Mind if I commit it? Sounds good to me. Although you don't have an issue with others services? --=20 Mariusz Zaborski oshogbo//vx | http://oshogbo.vexillium.org FreeBSD committer | https://freebsd.org Software developer | http://wheelsystems.com If it's not broken, let's fix it till it is!!1 >=20 > On Thu, 4 Apr 2019 at 09:32, Mariusz Zaborski wrote: >=20 > > Author: oshogbo > > Date: Thu Apr 4 16:32:27 2019 > > New Revision: 345875 > > URL: https://svnweb.freebsd.org/changeset/base/345875 > > > > Log: > > strings: capsicumize it > > > > Reviewed by: cem > > Discussed with: emaste > > Differential Revision: https://reviews.freebsd.org/D18038 > > > > Modified: > > head/contrib/elftoolchain/strings/strings.c > > head/usr.bin/strings/Makefile > > > > Modified: head/contrib/elftoolchain/strings/strings.c > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/contrib/elftoolchain/strings/strings.c Thu Apr 4 12:02:48 2019 > > (r345874) > > +++ head/contrib/elftoolchain/strings/strings.c Thu Apr 4 16:32:27 2019 > > (r345875) > > @@ -25,8 +25,10 @@ > > */ > > > > #include > > +#include > > #include > > > > +#include > > #include > > #include > > #include > > @@ -44,6 +46,9 @@ > > #include > > #include > > > > +#include > > +#include > > + > > #include "_elftc.h" > > > > ELFTC_VCSID("$Id: strings.c 3648 2018-11-22 23:26:43Z emaste $"); > > @@ -85,7 +90,7 @@ static struct option strings_longopts[] =3D { > > }; > > > > int getcharacter(FILE *, long *); > > -int handle_file(const char *); > > +int handle_file(fileargs_t *fa, const char *); > > int handle_elf(const char *, FILE *); > > int handle_binary(const char *, FILE *, size_t); > > int find_strings(const char *, FILE *, off_t, off_t); > > @@ -99,6 +104,8 @@ void usage(void); > > int > > main(int argc, char **argv) > > { > > + fileargs_t *fa; > > + cap_rights_t rights; > > int ch, rc; > > > > rc =3D 0; > > @@ -187,27 +194,41 @@ main(int argc, char **argv) > > argc -=3D optind; > > argv +=3D optind; > > > > + cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCN= TL); > > + fa =3D fileargs_init(argc, argv, O_RDONLY, 0, &rights); > > + if (fa =3D=3D NULL) > > + err(1, "Unable to initialize casper fileargs"); > > + > > + caph_cache_catpages(); > > + if (caph_limit_stdio() < 0 && caph_enter_casper() < 0) { > > + fileargs_free(fa); > > + err(1, "Unable to enter capability mode"); > > + } > > + > > if (min_len =3D=3D 0) > > min_len =3D 4; > > if (*argv =3D=3D NULL) > > rc =3D find_strings("{standard input}", stdin, 0, 0); > > else while (*argv !=3D NULL) { > > - if (handle_file(*argv) !=3D 0) > > + if (handle_file(fa, *argv) !=3D 0) > > rc =3D 1; > > argv++; > > } > > + > > + fileargs_free(fa); > > + > > return (rc); > > } > > > > int > > -handle_file(const char *name) > > +handle_file(fileargs_t *fa, const char *name) > > { > > FILE *pfile; > > int rt; > > > > if (name =3D=3D NULL) > > return (1); > > - pfile =3D fopen(name, "rb"); > > + pfile =3D fileargs_fopen(fa, name, "rb"); > > if (pfile =3D=3D NULL) { > > warnx("'%s': %s", name, strerror(errno)); > > return (1); > > > > Modified: head/usr.bin/strings/Makefile > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/usr.bin/strings/Makefile Thu Apr 4 12:02:48 2019 > > (r345874) > > +++ head/usr.bin/strings/Makefile Thu Apr 4 16:32:27 2019 > > (r345875) > > @@ -10,6 +10,12 @@ PROG=3D strings > > > > LIBADD=3D elftc elf > > > > +.if ${MK_CASPER} !=3D "no" && !defined(BOOTSTRAPPING) > > +LIBADD+=3D casper > > +LIBADD+=3D cap_fileargs > > +CFLAGS+=3D -DWITH_CASPER > > +.endif > > + > > CFLAGS+=3D-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common > > > > .include > > > > --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkD1x0xkJXVVY1Gwf38KEGuLGxWQFAlyz758ACgkQ38KEGuLG xWR1Qg/8C64XwBxmWoPJOFc+NN4scD6Pczcy8vBknNSuCK2T3++axg8sLJjiIPuP FmTekAnACu1pZe4WdnirO0mXvB/4sSp/uhvPacGXOhCcfsmgSKuKJIfZt4wqKqrU fv108NyKpLaLXrV9c/8N5Fu7p44aduJxpdkzJcSq0cwTNKOxGVsrDYpfC7o4r0e0 bthYQfhyc9JlMwj75mPTh/DQnwwbpZ6dNodigWSsF4ujvCexjj1pcMefo3IMc88P zYD5hJ9JHZKnIwhbMRpuML4MP1+EHyV3uCxQ1aWekDTltkULzJ8KHaguL+1oWUYL CW9SsnPVcpRmGLK/JOrG5SFnCm2OttIZOnhriMS+LRIhXd+f6J6I5VsgITJbnCbu E+Suo514UOxhInuBODJEGfiUYoJmTM2nOPisNsNE3N/x2ToRW+O1gDA02lL9btRC uSKObJ72FL2Lkmru1LsJz/Z9uGN09o6gSJKrI3DB8QJxlBJeJqUxwNFY8XmAJuaE TRChi7OHQGmH6Ira0s+qUnhFW+jM7hRswe8Q9YD16yKLoY25AQAOn+0ez3BBKqJk LwGa5xQR9M9ItUsvJW2HGYKmhSqHIVtvjsrI1sANWYYUIK/WMIo8TN4ISEsNjpLe 4P6r9mCA8U1ZMt9dm8dMoovh3QShkMELrApJfWZCmX6w+z2QdWw= =ClwG -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o-- From owner-svn-src-all@freebsd.org Mon Apr 15 03:31:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EF871587C25; Mon, 15 Apr 2019 03:31:03 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 3D0538D882; Mon, 15 Apr 2019 03:31:03 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FF4921EA; Mon, 15 Apr 2019 03:31:03 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3F3V2tb026412; Mon, 15 Apr 2019 03:31:02 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3F3V2kv026411; Mon, 15 Apr 2019 03:31:02 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201904150331.x3F3V2kv026411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 15 Apr 2019 03:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346218 - head/lib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libnv X-SVN-Commit-Revision: 346218 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D0538D882 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 03:31:03 -0000 Author: oshogbo Date: Mon Apr 15 03:31:02 2019 New Revision: 346218 URL: https://svnweb.freebsd.org/changeset/base/346218 Log: libnv: add support for nvlist_send()/nvlist_recv() on Linux This may be useful for cross build in the feature. Submitted by: Mindaugas Rasiukevicius MFC after: 2 weeks Modified: head/lib/libnv/msgio.c Modified: head/lib/libnv/msgio.c ============================================================================== --- head/lib/libnv/msgio.c Mon Apr 15 01:27:15 2019 (r346217) +++ head/lib/libnv/msgio.c Mon Apr 15 03:31:02 2019 (r346218) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -58,7 +59,12 @@ __FBSDID("$FreeBSD$"); #define PJDLOG_ABORT(...) abort() #endif +#ifdef __linux__ +/* Linux: arbitrary size, but must be lower than SCM_MAX_FD. */ +#define PKG_MAX_SIZE ((64U - 1) * CMSG_SPACE(sizeof(int))) +#else #define PKG_MAX_SIZE (MCLBYTES / CMSG_SPACE(sizeof(int)) - 1) +#endif static int msghdr_add_fd(struct cmsghdr *cmsg, int fd) @@ -74,31 +80,6 @@ msghdr_add_fd(struct cmsghdr *cmsg, int fd) return (0); } -static int -msghdr_get_fd(struct cmsghdr *cmsg) -{ - int fd; - - if (cmsg == NULL || cmsg->cmsg_level != SOL_SOCKET || - cmsg->cmsg_type != SCM_RIGHTS || - cmsg->cmsg_len != CMSG_LEN(sizeof(fd))) { - errno = EINVAL; - return (-1); - } - - bcopy(CMSG_DATA(cmsg), &fd, sizeof(fd)); -#ifndef MSG_CMSG_CLOEXEC - /* - * If the MSG_CMSG_CLOEXEC flag is not available we cannot set the - * close-on-exec flag atomically, but we still want to set it for - * consistency. - */ - (void) fcntl(fd, F_SETFD, FD_CLOEXEC); -#endif - - return (fd); -} - static void fd_wait(int fd, bool doread) { @@ -157,14 +138,7 @@ msg_send(int sock, const struct msghdr *msg) return (0); } -/* - * MacOS/Linux do not define struct cmsgcred but we need to bootstrap libnv - * when building on non-FreeBSD systems. Since they are not used during - * bootstrap we can just omit these two functions there. - */ -#ifndef __FreeBSD__ -#warning "cred_send() not supported on non-FreeBSD systems" -#else +#ifdef __FreeBSD__ int cred_send(int sock) { @@ -326,29 +300,53 @@ fd_package_recv(int sock, int *fds, size_t nfds) if (msg_recv(sock, &msg) == -1) goto end; - for (i = 0, cmsg = CMSG_FIRSTHDR(&msg); i < nfds && cmsg != NULL; - i++, cmsg = CMSG_NXTHDR(&msg, cmsg)) { - fds[i] = msghdr_get_fd(cmsg); - if (fds[i] < 0) + i = 0; + cmsg = CMSG_FIRSTHDR(&msg); + while (cmsg && i < nfds) { + unsigned int n; + + if (cmsg->cmsg_level != SOL_SOCKET || + cmsg->cmsg_type != SCM_RIGHTS) { + errno = EINVAL; break; + } + n = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int); + if (i + n > nfds) { + errno = EINVAL; + break; + } + bcopy(CMSG_DATA(cmsg), fds + i, sizeof(int) * n); + cmsg = CMSG_NXTHDR(&msg, cmsg); + i += n; } if (cmsg != NULL || i < nfds) { - int fd; + unsigned int last; /* * We need to close all received descriptors, even if we have * different control message (eg. SCM_CREDS) in between. */ - for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; - cmsg = CMSG_NXTHDR(&msg, cmsg)) { - fd = msghdr_get_fd(cmsg); - if (fd >= 0) - close(fd); + last = i; + for (i = 0; i < last; i++) { + if (fds[i] >= 0) { + close(fds[i]); + } } errno = EINVAL; goto end; } + +#ifndef MSG_CMSG_CLOEXEC + /* + * If the MSG_CMSG_CLOEXEC flag is not available we cannot set the + * close-on-exec flag atomically, but we still want to set it for + * consistency. + */ + for (i = 0; i < nfds; i++) { + (void) fcntl(fds[i], F_SETFD, FD_CLOEXEC); + } +#endif ret = 0; end: From owner-svn-src-all@freebsd.org Mon Apr 15 03:32:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0060C1587C82; Mon, 15 Apr 2019 03:32:02 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 952C18DB98; Mon, 15 Apr 2019 03:32:01 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A6232241; Mon, 15 Apr 2019 03:32:01 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3F3W1pf031231; Mon, 15 Apr 2019 03:32:01 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3F3W1Kb031230; Mon, 15 Apr 2019 03:32:01 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201904150332.x3F3W1Kb031230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 15 Apr 2019 03:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346219 - head/lib/libnv/tests X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libnv/tests X-SVN-Commit-Revision: 346219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 952C18DB98 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 03:32:02 -0000 Author: oshogbo Date: Mon Apr 15 03:32:01 2019 New Revision: 346219 URL: https://svnweb.freebsd.org/changeset/base/346219 Log: libnv: extend the tests Add cases for sending file descriptors. Submitted by: Mindaugas Rasiukevicius MFC after: 2 weeks Modified: head/lib/libnv/tests/nvlist_send_recv_test.c Modified: head/lib/libnv/tests/nvlist_send_recv_test.c ============================================================================== --- head/lib/libnv/tests/nvlist_send_recv_test.c Mon Apr 15 03:31:02 2019 (r346218) +++ head/lib/libnv/tests/nvlist_send_recv_test.c Mon Apr 15 03:32:01 2019 (r346219) @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -58,6 +59,7 @@ child(int sock) { nvlist_t *nvl; nvlist_t *empty; + int pfd[2]; nvl = nvlist_create(0); empty = nvlist_create(0); @@ -73,7 +75,16 @@ child(int sock) nvlist_add_string(nvl, "nvlist/string/", ""); nvlist_add_string(nvl, "nvlist/string/x", "x"); nvlist_add_string(nvl, "nvlist/string/abcdefghijklmnopqrstuvwxyz", "abcdefghijklmnopqrstuvwxyz"); + nvlist_add_descriptor(nvl, "nvlist/descriptor/STDERR_FILENO", STDERR_FILENO); + if (pipe(pfd) == -1) + err(EXIT_FAILURE, "pipe"); + if (write(pfd[1], "test", 4) != 4) + err(EXIT_FAILURE, "write"); + close(pfd[1]); + nvlist_add_descriptor(nvl, "nvlist/descriptor/pipe_rd", pfd[0]); + close(pfd[0]); + nvlist_add_binary(nvl, "nvlist/binary/x", "x", 1); nvlist_add_binary(nvl, "nvlist/binary/abcdefghijklmnopqrstuvwxyz", "abcdefghijklmnopqrstuvwxyz", sizeof("abcdefghijklmnopqrstuvwxyz")); nvlist_move_nvlist(nvl, "nvlist/nvlist/empty", empty); @@ -91,8 +102,9 @@ parent(int sock) const nvlist_t *cnvl, *empty; const char *name, *cname; void *cookie, *ccookie; - int type, ctype; + int type, ctype, fd; size_t size; + char buf[4]; nvl = nvlist_recv(sock, 0); CHECK(nvlist_error(nvl) == 0); @@ -175,6 +187,15 @@ parent(int sock) name = nvlist_next(nvl, &type, &cookie); CHECK(name != NULL); + CHECK(type == NV_TYPE_DESCRIPTOR); + CHECK(strcmp(name, "nvlist/descriptor/pipe_rd") == 0); + fd = nvlist_get_descriptor(nvl, name); + CHECK(fd_is_valid(fd)); + CHECK(read(fd, buf, sizeof(buf)) == 4); + CHECK(strncmp(buf, "test", sizeof(buf)) == 0); + + name = nvlist_next(nvl, &type, &cookie); + CHECK(name != NULL); CHECK(type == NV_TYPE_BINARY); CHECK(strcmp(name, "nvlist/binary/x") == 0); CHECK(memcmp(nvlist_get_binary(nvl, name, NULL), "x", 1) == 0); @@ -278,6 +299,12 @@ parent(int sock) cname = nvlist_next(cnvl, &ctype, &ccookie); CHECK(cname != NULL); + CHECK(ctype == NV_TYPE_DESCRIPTOR); + CHECK(strcmp(cname, "nvlist/descriptor/pipe_rd") == 0); + CHECK(fd_is_valid(nvlist_get_descriptor(cnvl, cname))); + + cname = nvlist_next(cnvl, &ctype, &ccookie); + CHECK(cname != NULL); CHECK(ctype == NV_TYPE_BINARY); CHECK(strcmp(cname, "nvlist/binary/x") == 0); CHECK(memcmp(nvlist_get_binary(cnvl, cname, NULL), "x", 1) == 0); @@ -359,7 +386,7 @@ int main(void) { - printf("1..136\n"); + printf("1..146\n"); fflush(stdout); send_nvlist(); From owner-svn-src-all@freebsd.org Mon Apr 15 06:33:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74F06158A89F; Mon, 15 Apr 2019 06:33:06 +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 1226A6B910; Mon, 15 Apr 2019 06:33:06 +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 842F04443; Mon, 15 Apr 2019 06:33:05 +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 x3F6X52W025547; Mon, 15 Apr 2019 06:33:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3F6X5W7025546; Mon, 15 Apr 2019 06:33:05 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201904150633.x3F6X5W7025546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 15 Apr 2019 06:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346220 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 346220 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1226A6B910 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 06:33:06 -0000 Author: delphij Date: Mon Apr 15 06:33:05 2019 New Revision: 346220 URL: https://svnweb.freebsd.org/changeset/base/346220 Log: Don't cast result from malloc(). MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/dir.c Modified: head/sbin/fsck_msdosfs/dir.c ============================================================================== --- head/sbin/fsck_msdosfs/dir.c Mon Apr 15 03:32:01 2019 (r346219) +++ head/sbin/fsck_msdosfs/dir.c Mon Apr 15 06:33:05 2019 (r346220) @@ -115,7 +115,7 @@ newDosDirEntry(void) struct dosDirEntry *de; if (!(de = freede)) { - if (!(de = (struct dosDirEntry *)malloc(sizeof *de))) + if (!(de = malloc(sizeof *de))) return 0; } else freede = de->next; @@ -140,7 +140,7 @@ newDirTodo(void) struct dirTodoNode *dt; if (!(dt = freedt)) { - if (!(dt = (struct dirTodoNode *)malloc(sizeof *dt))) + if (!(dt = malloc(sizeof *dt))) return 0; } else freedt = dt->next; From owner-svn-src-all@freebsd.org Mon Apr 15 12:07:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F9741571F48; Mon, 15 Apr 2019 12:07:43 +0000 (UTC) (envelope-from mckusick@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 B77877651F; Mon, 15 Apr 2019 12:07:42 +0000 (UTC) (envelope-from mckusick@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 8CB7C7C20; Mon, 15 Apr 2019 12:07:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FC7ggX099478; Mon, 15 Apr 2019 12:07:42 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FC7gYo099477; Mon, 15 Apr 2019 12:07:42 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201904151207.x3FC7gYo099477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 15 Apr 2019 12:07:42 +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: r346221 - stable/12/sys/dev/md X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/12/sys/dev/md X-SVN-Commit-Revision: 346221 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B77877651F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 12:07:43 -0000 Author: mckusick Date: Mon Apr 15 12:07:41 2019 New Revision: 346221 URL: https://svnweb.freebsd.org/changeset/base/346221 Log: MFC of 345758 Properly flush outstanding I/Os when forcibly deleteing a memory disk device. Sponsored by: Netflix Modified: stable/12/sys/dev/md/md.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/md/md.c ============================================================================== --- stable/12/sys/dev/md/md.c Mon Apr 15 06:33:05 2019 (r346220) +++ stable/12/sys/dev/md/md.c Mon Apr 15 12:07:41 2019 (r346221) @@ -110,6 +110,7 @@ #define MD_SHUTDOWN 0x10000 /* Tell worker thread to terminate. */ #define MD_EXITING 0x20000 /* Worker thread is exiting. */ +#define MD_PROVIDERGONE 0x40000 /* Safe to free the softc */ #ifndef MD_NSECT #define MD_NSECT (10000 * 2) @@ -199,6 +200,7 @@ static g_start_t g_md_start; static g_access_t g_md_access; static void g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp); +static g_provgone_t g_md_providergone; static struct cdev *status_dev = NULL; static struct sx md_sx; @@ -220,6 +222,7 @@ struct g_class g_md_class = { .start = g_md_start, .access = g_md_access, .dumpconf = g_md_dumpconf, + .providergone = g_md_providergone, }; DECLARE_GEOM_CLASS(g_md_class, g_md); @@ -481,8 +484,8 @@ g_md_start(struct bio *bp) } mtx_lock(&sc->queue_mtx); bioq_disksort(&sc->bio_queue, bp); - mtx_unlock(&sc->queue_mtx); wakeup(sc); + mtx_unlock(&sc->queue_mtx); } #define MD_MALLOC_MOVE_ZERO 1 @@ -1483,17 +1486,30 @@ bad: return (error); } +static void +g_md_providergone(struct g_provider *pp) +{ + struct md_s *sc = pp->geom->softc; + + mtx_lock(&sc->queue_mtx); + sc->flags |= MD_PROVIDERGONE; + wakeup(&sc->flags); + mtx_unlock(&sc->queue_mtx); +} + static int mddestroy(struct md_s *sc, struct thread *td) { if (sc->gp) { - sc->gp->softc = NULL; g_topology_lock(); g_wither_geom(sc->gp, ENXIO); g_topology_unlock(); - sc->gp = NULL; - sc->pp = NULL; + + mtx_lock(&sc->queue_mtx); + while (!(sc->flags & MD_PROVIDERGONE)) + msleep(&sc->flags, &sc->queue_mtx, PRIBIO, "mddestroy", 0); + mtx_unlock(&sc->queue_mtx); } if (sc->devstat) { devstat_remove_entry(sc->devstat); From owner-svn-src-all@freebsd.org Mon Apr 15 12:09:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C78771572017; Mon, 15 Apr 2019 12:09:59 +0000 (UTC) (envelope-from mckusick@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 62D7176690; Mon, 15 Apr 2019 12:09:59 +0000 (UTC) (envelope-from mckusick@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 309697C21; Mon, 15 Apr 2019 12:09:59 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FC9wnh099633; Mon, 15 Apr 2019 12:09:58 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FC9wxo099632; Mon, 15 Apr 2019 12:09:58 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201904151209.x3FC9wxo099632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 15 Apr 2019 12:09:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346222 - stable/11/sys/dev/md X-SVN-Group: stable-11 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/11/sys/dev/md X-SVN-Commit-Revision: 346222 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 62D7176690 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 12:10:00 -0000 Author: mckusick Date: Mon Apr 15 12:09:58 2019 New Revision: 346222 URL: https://svnweb.freebsd.org/changeset/base/346222 Log: MFC of 345758 Properly flush outstanding I/Os when forcibly deleteing a memory disk device. Sponsored by: Netflix Modified: stable/11/sys/dev/md/md.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/md/md.c ============================================================================== --- stable/11/sys/dev/md/md.c Mon Apr 15 12:07:41 2019 (r346221) +++ stable/11/sys/dev/md/md.c Mon Apr 15 12:09:58 2019 (r346222) @@ -106,6 +106,7 @@ #define MD_SHUTDOWN 0x10000 /* Tell worker thread to terminate. */ #define MD_EXITING 0x20000 /* Worker thread is exiting. */ +#define MD_PROVIDERGONE 0x40000 /* Safe to free the softc */ #ifndef MD_NSECT #define MD_NSECT (10000 * 2) @@ -152,6 +153,7 @@ static g_start_t g_md_start; static g_access_t g_md_access; static void g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp); +static g_provgone_t g_md_providergone; static struct cdev *status_dev = NULL; static struct sx md_sx; @@ -173,6 +175,7 @@ struct g_class g_md_class = { .start = g_md_start, .access = g_md_access, .dumpconf = g_md_dumpconf, + .providergone = g_md_providergone, }; DECLARE_GEOM_CLASS(g_md_class, g_md); @@ -432,8 +435,8 @@ g_md_start(struct bio *bp) } mtx_lock(&sc->queue_mtx); bioq_disksort(&sc->bio_queue, bp); - mtx_unlock(&sc->queue_mtx); wakeup(sc); + mtx_unlock(&sc->queue_mtx); } #define MD_MALLOC_MOVE_ZERO 1 @@ -1421,17 +1424,30 @@ bad: return (error); } +static void +g_md_providergone(struct g_provider *pp) +{ + struct md_s *sc = pp->geom->softc; + + mtx_lock(&sc->queue_mtx); + sc->flags |= MD_PROVIDERGONE; + wakeup(&sc->flags); + mtx_unlock(&sc->queue_mtx); +} + static int mddestroy(struct md_s *sc, struct thread *td) { if (sc->gp) { - sc->gp->softc = NULL; g_topology_lock(); g_wither_geom(sc->gp, ENXIO); g_topology_unlock(); - sc->gp = NULL; - sc->pp = NULL; + + mtx_lock(&sc->queue_mtx); + while (!(sc->flags & MD_PROVIDERGONE)) + msleep(&sc->flags, &sc->queue_mtx, PRIBIO, "mddestroy", 0); + mtx_unlock(&sc->queue_mtx); } if (sc->devstat) { devstat_remove_entry(sc->devstat); From owner-svn-src-all@freebsd.org Mon Apr 15 12:23:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E335B157269C; Mon, 15 Apr 2019 12:23:34 +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 7E51076EE8; Mon, 15 Apr 2019 12:23:34 +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 52B037F64; Mon, 15 Apr 2019 12:23:34 +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 x3FCNY82010034; Mon, 15 Apr 2019 12:23:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FCNY2B010033; Mon, 15 Apr 2019 12:23:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904151223.x3FCNY2B010033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 Apr 2019 12:23: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: r346223 - stable/12/sys/ufs/ffs X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/ufs/ffs X-SVN-Commit-Revision: 346223 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7E51076EE8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 12:23:35 -0000 Author: kib Date: Mon Apr 15 12:23:33 2019 New Revision: 346223 URL: https://svnweb.freebsd.org/changeset/base/346223 Log: MFC r346031: Handle races when remounting UFS volume from ro to rw. Modified: stable/12/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_vfsops.c Mon Apr 15 12:09:58 2019 (r346222) +++ stable/12/sys/ufs/ffs/ffs_vfsops.c Mon Apr 15 12:23:33 2019 (r346223) @@ -154,7 +154,7 @@ ffs_mount(struct mount *mp) struct fs *fs; pid_t fsckpid = 0; int error, error1, flags; - uint64_t mntorflags; + uint64_t mntorflags, saved_mnt_flag; accmode_t accmode; struct nameidata ndp; char *fspec; @@ -371,25 +371,40 @@ ffs_mount(struct mount *mp) return (error); if ((error = vn_start_write(NULL, &mp, V_WAIT)) != 0) return (error); + error = vfs_write_suspend_umnt(mp); + if (error != 0) + return (error); fs->fs_ronly = 0; MNT_ILOCK(mp); - mp->mnt_flag &= ~MNT_RDONLY; + saved_mnt_flag = MNT_RDONLY; + if (MOUNTEDSOFTDEP(mp) && (mp->mnt_flag & + MNT_ASYNC) != 0) + saved_mnt_flag |= MNT_ASYNC; + mp->mnt_flag &= ~saved_mnt_flag; MNT_IUNLOCK(mp); fs->fs_mtime = time_second; /* check to see if we need to start softdep */ if ((fs->fs_flags & FS_DOSOFTDEP) && (error = softdep_mount(devvp, mp, fs, td->td_ucred))){ - vn_finished_write(mp); + fs->fs_ronly = 1; + MNT_ILOCK(mp); + mp->mnt_flag |= saved_mnt_flag; + MNT_IUNLOCK(mp); + vfs_write_resume(mp, 0); return (error); } fs->fs_clean = 0; if ((error = ffs_sbupdate(ump, MNT_WAIT, 0)) != 0) { - vn_finished_write(mp); + fs->fs_ronly = 1; + MNT_ILOCK(mp); + mp->mnt_flag |= saved_mnt_flag; + MNT_IUNLOCK(mp); + vfs_write_resume(mp, 0); return (error); } if (fs->fs_snapinum[0] != 0) ffs_snapshot_mount(mp); - vn_finished_write(mp); + vfs_write_resume(mp, 0); } /* * Soft updates is incompatible with "async", From owner-svn-src-all@freebsd.org Mon Apr 15 12:24:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4910C15726FA; Mon, 15 Apr 2019 12:24: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 E29A57700B; Mon, 15 Apr 2019 12:24: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 BD2197F65; Mon, 15 Apr 2019 12:24: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 x3FCOJiE010125; Mon, 15 Apr 2019 12:24:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FCOJRw010124; Mon, 15 Apr 2019 12:24:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904151224.x3FCOJRw010124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 Apr 2019 12:24: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: r346224 - stable/12/sbin/mount X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sbin/mount X-SVN-Commit-Revision: 346224 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E29A57700B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 12:24:20 -0000 Author: kib Date: Mon Apr 15 12:24:19 2019 New Revision: 346224 URL: https://svnweb.freebsd.org/changeset/base/346224 Log: MFC r346038: Exercise some care before sending SIGHUP to mountd. Modified: stable/12/sbin/mount/mount.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/mount/mount.c ============================================================================== --- stable/12/sbin/mount/mount.c Mon Apr 15 12:23:33 2019 (r346223) +++ stable/12/sbin/mount/mount.c Mon Apr 15 12:24:19 2019 (r346224) @@ -227,6 +227,7 @@ restart_mountd(void) struct pidfh *pfh; pid_t mountdpid; + mountdpid = 0; pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &mountdpid); if (pfh != NULL) { /* Mountd is not running. */ @@ -237,6 +238,16 @@ restart_mountd(void) /* Cannot open pidfile for some reason. */ return; } + + /* + * Refuse to send broadcast or group signals, this has + * happened due to the bugs in pidfile(3). + */ + if (mountdpid <= 0) { + warnx("mountd pid %d, refusing to send SIGHUP", mountdpid); + return; + } + /* We have mountd(8) PID in mountdpid varible, let's signal it. */ if (kill(mountdpid, SIGHUP) == -1) err(1, "signal mountd"); From owner-svn-src-all@freebsd.org Mon Apr 15 13:03:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7256C15738AE; Mon, 15 Apr 2019 13:03:11 +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 14BF4804EE; Mon, 15 Apr 2019 13:03:11 +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 DCB448626; Mon, 15 Apr 2019 13:03:10 +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 x3FD3A5U031076; Mon, 15 Apr 2019 13:03:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FD3As2031072; Mon, 15 Apr 2019 13:03:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904151303.x3FD3As2031072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 Apr 2019 13:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346225 - in head: lib/libc/stdlib libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: lib/libc/stdlib libexec/rtld-elf X-SVN-Commit-Revision: 346225 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 14BF4804EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 13:03:11 -0000 Author: kib Date: Mon Apr 15 13:03:09 2019 New Revision: 346225 URL: https://svnweb.freebsd.org/changeset/base/346225 Log: Fix order of destructors between main binary and libraries. Since inits for the main binary are run from rtld (for some time), the rtld_exit atexit(3) handler, which is passed from rtld to the program entry and installed by csu, is installed after any atexit(3) handlers installed by main binary constructors. This means that rtld_exit() is fired before main binary handlers. Typical C++ static constructors are executed from init (either binary or libs) but use atexit(3) to ensure that destructors are called in the right order, independent of the linking order. Also, C++ libraries finalizers call __cxa_finalize(3) to flush library' atexit(3) entries. Since atexit(3) entry is cleared after being run, this would be mostly innocent, except that, atexit(rtld_exit) done after main binary constructors, makes destructors from libraries executed before destructors for main. Fix by reordering atexit(rtld_exit) before inits for main binary, same as it happened when inits were called by csu. Do it using new private libc symbol with pre-defined ABI. Reported. tested, and reviewed by: kan Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/stdlib/Symbol.map head/lib/libc/stdlib/atexit.c head/libexec/rtld-elf/rtld.c Modified: head/lib/libc/stdlib/Symbol.map ============================================================================== --- head/lib/libc/stdlib/Symbol.map Mon Apr 15 12:24:19 2019 (r346224) +++ head/lib/libc/stdlib/Symbol.map Mon Apr 15 13:03:09 2019 (r346225) @@ -129,4 +129,5 @@ FBSDprivate_1.0 { _system; __libc_system; __cxa_thread_call_dtors; + __libc_atexit; }; Modified: head/lib/libc/stdlib/atexit.c ============================================================================== --- head/lib/libc/stdlib/atexit.c Mon Apr 15 12:24:19 2019 (r346224) +++ head/lib/libc/stdlib/atexit.c Mon Apr 15 13:03:09 2019 (r346225) @@ -142,6 +142,7 @@ atexit(void (*func)(void)) error = atexit_register(&fn); return (error); } +__weak_reference(atexit, __libc_atexit); /** * Register a block to be performed at exit. Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Apr 15 12:24:19 2019 (r346224) +++ head/libexec/rtld-elf/rtld.c Mon Apr 15 13:03:09 2019 (r346225) @@ -151,6 +151,7 @@ static int rtld_dirname(const char *, char *); static int rtld_dirname_abs(const char *, char *); static void *rtld_dlopen(const char *name, int fd, int mode); static void rtld_exit(void); +static void rtld_nop_exit(void); static char *search_library_path(const char *, const char *, const char *, int *); static char *search_library_pathfds(const char *, const char *, int *); @@ -295,6 +296,8 @@ const char *ld_path_rtld = _PATH_RTLD; const char *ld_standard_library_path = STANDARD_LIBRARY_PATH; const char *ld_env_prefix = LD_; +static void (*rtld_exit_ptr)(void); + /* * Fill in a DoneList with an allocation large enough to hold all of * the currently-loaded objects. Keep this as a macro since it calls @@ -756,6 +759,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr *ld_bind_now != '\0', SYMLOOK_EARLY, &lockstate) == -1) rtld_die(); + rtld_exit_ptr = rtld_exit; if (obj_main->crt_no_init) preinit_main(); objlist_call_init(&initlist, &lockstate); @@ -778,7 +782,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr dbg("transferring control to program entry point = %p", obj_main->entry); /* Return the exit procedure and the program entry point. */ - *exit_proc = rtld_exit; + *exit_proc = rtld_exit_ptr; *objp = obj_main; return (func_ptr_type) obj_main->entry; } @@ -2662,6 +2666,7 @@ objlist_call_init(Objlist *list, RtldLockState *lockst Obj_Entry *obj; char *saved_msg; Elf_Addr *init_addr; + void (*reg)(void (*)(void)); int index; /* @@ -2690,7 +2695,16 @@ objlist_call_init(Objlist *list, RtldLockState *lockst */ elm->obj->init_done = true; hold_object(elm->obj); + reg = NULL; + if (elm->obj == obj_main && obj_main->crt_no_init) { + reg = (void (*)(void (*)(void)))get_program_var_addr( + "__libc_atexit", lockstate); + } lock_release(rtld_bind_lock, lockstate); + if (reg != NULL) { + reg(rtld_exit); + rtld_exit_ptr = rtld_nop_exit; + } /* * It is legal to have both DT_INIT and DT_INIT_ARRAY defined. @@ -3002,6 +3016,11 @@ rtld_exit(void) if (!libmap_disable) lm_fini(); lock_release(rtld_bind_lock, &lockstate); +} + +static void +rtld_nop_exit(void) +{ } /* From owner-svn-src-all@freebsd.org Mon Apr 15 13:11:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4856A1573B32; Mon, 15 Apr 2019 13:11:52 +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 DD26A80A99; Mon, 15 Apr 2019 13:11:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7BE88689; Mon, 15 Apr 2019 13:11:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FDBpCr035570; Mon, 15 Apr 2019 13:11:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FDBpfE035569; Mon, 15 Apr 2019 13:11:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904151311.x3FDBpfE035569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 Apr 2019 13:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346226 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/ufs/ffs X-SVN-Commit-Revision: 346226 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DD26A80A99 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 13:11:52 -0000 Author: kib Date: Mon Apr 15 13:11:51 2019 New Revision: 346226 URL: https://svnweb.freebsd.org/changeset/base/346226 Log: MFC r346031: Handle races when remounting UFS volume from ro to rw. Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_vfsops.c Mon Apr 15 13:03:09 2019 (r346225) +++ stable/11/sys/ufs/ffs/ffs_vfsops.c Mon Apr 15 13:11:51 2019 (r346226) @@ -149,7 +149,7 @@ ffs_mount(struct mount *mp) struct fs *fs; pid_t fsckpid = 0; int error, error1, flags; - uint64_t mntorflags; + uint64_t mntorflags, saved_mnt_flag; accmode_t accmode; struct nameidata ndp; char *fspec; @@ -366,25 +366,40 @@ ffs_mount(struct mount *mp) return (error); if ((error = vn_start_write(NULL, &mp, V_WAIT)) != 0) return (error); + error = vfs_write_suspend_umnt(mp); + if (error != 0) + return (error); fs->fs_ronly = 0; MNT_ILOCK(mp); - mp->mnt_flag &= ~MNT_RDONLY; + saved_mnt_flag = MNT_RDONLY; + if (MOUNTEDSOFTDEP(mp) && (mp->mnt_flag & + MNT_ASYNC) != 0) + saved_mnt_flag |= MNT_ASYNC; + mp->mnt_flag &= ~saved_mnt_flag; MNT_IUNLOCK(mp); fs->fs_mtime = time_second; /* check to see if we need to start softdep */ if ((fs->fs_flags & FS_DOSOFTDEP) && (error = softdep_mount(devvp, mp, fs, td->td_ucred))){ - vn_finished_write(mp); + fs->fs_ronly = 1; + MNT_ILOCK(mp); + mp->mnt_flag |= saved_mnt_flag; + MNT_IUNLOCK(mp); + vfs_write_resume(mp, 0); return (error); } fs->fs_clean = 0; if ((error = ffs_sbupdate(ump, MNT_WAIT, 0)) != 0) { - vn_finished_write(mp); + fs->fs_ronly = 1; + MNT_ILOCK(mp); + mp->mnt_flag |= saved_mnt_flag; + MNT_IUNLOCK(mp); + vfs_write_resume(mp, 0); return (error); } if (fs->fs_snapinum[0] != 0) ffs_snapshot_mount(mp); - vn_finished_write(mp); + vfs_write_resume(mp, 0); } /* * Soft updates is incompatible with "async", From owner-svn-src-all@freebsd.org Mon Apr 15 13:12:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAC521573D7F; Mon, 15 Apr 2019 13:12:55 +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 8B1DF80D2A; Mon, 15 Apr 2019 13:12:55 +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 63B0F87E8; Mon, 15 Apr 2019 13:12:55 +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 x3FDCtt7036508; Mon, 15 Apr 2019 13:12:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FDCtGC036507; Mon, 15 Apr 2019 13:12:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904151312.x3FDCtGC036507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 Apr 2019 13:12:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346227 - stable/11/sbin/mount X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sbin/mount X-SVN-Commit-Revision: 346227 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8B1DF80D2A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 13:12:56 -0000 Author: kib Date: Mon Apr 15 13:12:54 2019 New Revision: 346227 URL: https://svnweb.freebsd.org/changeset/base/346227 Log: MFC r346038: Exercise some care before sending SIGHUP to mountd. Modified: stable/11/sbin/mount/mount.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount/mount.c ============================================================================== --- stable/11/sbin/mount/mount.c Mon Apr 15 13:11:51 2019 (r346226) +++ stable/11/sbin/mount/mount.c Mon Apr 15 13:12:54 2019 (r346227) @@ -224,6 +224,7 @@ restart_mountd(void) struct pidfh *pfh; pid_t mountdpid; + mountdpid = 0; pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &mountdpid); if (pfh != NULL) { /* Mountd is not running. */ @@ -234,6 +235,16 @@ restart_mountd(void) /* Cannot open pidfile for some reason. */ return; } + + /* + * Refuse to send broadcast or group signals, this has + * happened due to the bugs in pidfile(3). + */ + if (mountdpid <= 0) { + warnx("mountd pid %d, refusing to send SIGHUP", mountdpid); + return; + } + /* We have mountd(8) PID in mountdpid varible, let's signal it. */ if (kill(mountdpid, SIGHUP) == -1) err(1, "signal mountd"); From owner-svn-src-all@freebsd.org Mon Apr 15 13:41:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7338615747F9; Mon, 15 Apr 2019 13:41:55 +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 153B98227C; Mon, 15 Apr 2019 13:41:55 +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 CC08B8CA9; Mon, 15 Apr 2019 13:41:54 +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 x3FDfsIV051688; Mon, 15 Apr 2019 13:41:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FDfslJ051685; Mon, 15 Apr 2019 13:41:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904151341.x3FDfslJ051685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 Apr 2019 13:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346228 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 346228 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 153B98227C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 13:41:55 -0000 Author: emaste Date: Mon Apr 15 13:41:53 2019 New Revision: 346228 URL: https://svnweb.freebsd.org/changeset/base/346228 Log: Add quirk for ignoring SPCR AccessWidth values on the PL011 UART The SPCR table on the Lenovo HR330A Ampere eMAG server indicates 8-bit access, but 32-bit access is required for the PL011 to work. PL011 on SBSA platforms always supports 32-bit access (and that was hardcoded here before my EC2 fix), let's use 32-bit access for PL011 and 32BIT interface types. Tested by emaste on Ampere eMAG and Cavium/Marvell ThunderX2. Submitted by: Greg V Reviewed by: andrew, imp (earlier) Differential Revision: https://reviews.freebsd.org/D19507 Modified: head/sys/dev/uart/uart_bus.h head/sys/dev/uart/uart_cpu_arm64.c head/sys/dev/uart/uart_dev_pl011.c Modified: head/sys/dev/uart/uart_bus.h ============================================================================== --- head/sys/dev/uart/uart_bus.h Mon Apr 15 13:12:54 2019 (r346227) +++ head/sys/dev/uart/uart_bus.h Mon Apr 15 13:41:53 2019 (r346228) @@ -57,7 +57,8 @@ #define UART_IOCTL_BAUD 4 /* UART quirk flags */ -#define UART_F_BUSY_DETECT 0x1 +#define UART_F_BUSY_DETECT 0x1 +#define UART_F_IGNORE_SPCR_REGSHFT 0x2 /* * UART class & instance (=softc) Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Mon Apr 15 13:12:54 2019 (r346227) +++ head/sys/dev/uart/uart_cpu_arm64.c Mon Apr 15 13:41:53 2019 (r346228) @@ -153,6 +153,11 @@ uart_cpu_acpi_probe(struct uart_class **classp, bus_sp *shiftp = spcr->SerialPort.AccessWidth - 1; *iowidthp = spcr->SerialPort.BitWidth / 8; + if ((cd->cd_quirks & UART_F_IGNORE_SPCR_REGSHFT) == + UART_F_IGNORE_SPCR_REGSHFT) { + *shiftp = cd->cd_regshft; + } + out: acpi_unmap_table(spcr); return (err); Modified: head/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- head/sys/dev/uart/uart_dev_pl011.c Mon Apr 15 13:12:54 2019 (r346227) +++ head/sys/dev/uart/uart_dev_pl011.c Mon Apr 15 13:41:53 2019 (r346228) @@ -342,8 +342,9 @@ UART_FDT_CLASS_AND_DEVICE(fdt_compat_data); #ifdef DEV_ACPI static struct acpi_uart_compat_data acpi_compat_data[] = { - {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011, 2, 0, 0, 0, "uart plo11"}, - {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC, 2, 0, 0, 0, "uart plo11"}, + {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011, 2, 0, 0, UART_F_IGNORE_SPCR_REGSHFT, "uart pl011"}, + {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC, 2, 0, 0, UART_F_IGNORE_SPCR_REGSHFT, "uart pl011"}, + {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_32BIT, 2, 0, 0, UART_F_IGNORE_SPCR_REGSHFT, "uart pl011"}, {NULL, NULL, 0, 0, 0, 0, 0, NULL}, }; UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); From owner-svn-src-all@freebsd.org Mon Apr 15 14:32:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B26CA15755C0; Mon, 15 Apr 2019 14:32:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 5594283BF6; Mon, 15 Apr 2019 14:32:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 112DA955A; Mon, 15 Apr 2019 14:32:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FEWJIq078621; Mon, 15 Apr 2019 14:32:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FEWJGO078620; Mon, 15 Apr 2019 14:32:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201904151432.x3FEWJGO078620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 15 Apr 2019 14:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346229 - head/sys/dev/usb/controller X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/controller X-SVN-Commit-Revision: 346229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5594283BF6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 14:32:20 -0000 Author: hselasky Date: Mon Apr 15 14:32:19 2019 New Revision: 346229 URL: https://svnweb.freebsd.org/changeset/base/346229 Log: Fix spelling. Submitted by: Dmitry Luhtionov MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/controller/ehci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Mon Apr 15 13:41:53 2019 (r346228) +++ head/sys/dev/usb/controller/ehci_pci.c Mon Apr 15 14:32:19 2019 (r346229) @@ -181,7 +181,7 @@ ehci_pci_match(device_t self) case 0x8d2d8086: return ("Intel Wellsburg USB 2.0 controller"); case 0x9c268086: - return ("Intel Lynx Point LP USB 2.0 controller USB"); + return ("Intel Lynx Point-LP USB 2.0 controller USB"); case 0x00e01033: return ("NEC uPD 72010x USB 2.0 controller"); From owner-svn-src-all@freebsd.org Mon Apr 15 14:54:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DFA31575F8B; Mon, 15 Apr 2019 14:54:49 +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 1179E84973; Mon, 15 Apr 2019 14:54:49 +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 BA3D798C7; Mon, 15 Apr 2019 14:54:48 +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 x3FEsmda089487; Mon, 15 Apr 2019 14:54:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FEsmCC089485; Mon, 15 Apr 2019 14:54:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151454.x3FEsmCC089485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 14:54: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: r346230 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 346230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1179E84973 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 14:54:49 -0000 Author: mav Date: Mon Apr 15 14:54:48 2019 New Revision: 346230 URL: https://svnweb.freebsd.org/changeset/base/346230 Log: MFC r339775 (by imp): Put a workaround in for command timeout malfunctioning At least one NVMe drive has a bug that makeing the Command Time Out PCIe feature unreliable. The workaround is to disable this feature. The driver wouldn't deal correctly with a timeout anyway. Only do this for drives that are known bad. Modified: stable/12/sys/dev/nvme/nvme.c stable/12/sys/dev/nvme/nvme_private.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme.c ============================================================================== --- stable/12/sys/dev/nvme/nvme.c Mon Apr 15 14:32:19 2019 (r346229) +++ stable/12/sys/dev/nvme/nvme.c Mon Apr 15 14:54:48 2019 (r346230) @@ -106,6 +106,7 @@ static struct _pcsid { 0x05401c5f, 0, 0, "Memblaze Pblaze4", QUIRK_DELAY_B4_CHK_RDY }, { 0xa821144d, 0, 0, "Samsung PM1725", QUIRK_DELAY_B4_CHK_RDY }, { 0xa822144d, 0, 0, "Samsung PM1725a", QUIRK_DELAY_B4_CHK_RDY }, + { 0x01161179, 0, 0, "Toshiba XG5", QUIRK_DISABLE_TIMEOUT }, { 0x00000000, 0, 0, NULL } }; @@ -276,6 +277,25 @@ nvme_attach(device_t dev) if (status != 0) { nvme_ctrlr_destruct(ctrlr, dev); return (status); + } + + /* + * Some drives do not implement the completion timeout feature + * correctly. There's a WAR from the manufacturer to just disable it. + * The driver wouldn't respond correctly to a timeout anyway. + */ + if (ep->quirks & QUIRK_DISABLE_TIMEOUT) { + int ptr; + uint16_t devctl2; + + status = pci_find_cap(dev, PCIY_EXPRESS, &ptr); + if (status) { + device_printf(dev, "Can't locate PCIe capability?"); + return (status); + } + devctl2 = pci_read_config(dev, ptr + PCIER_DEVICE_CTL2, sizeof(devctl2)); + devctl2 |= PCIEM_CTL2_COMP_TIMO_DISABLE; + pci_write_config(dev, ptr + PCIER_DEVICE_CTL2, devctl2, sizeof(devctl2)); } /* Modified: stable/12/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/12/sys/dev/nvme/nvme_private.h Mon Apr 15 14:32:19 2019 (r346229) +++ stable/12/sys/dev/nvme/nvme_private.h Mon Apr 15 14:54:48 2019 (r346230) @@ -247,7 +247,8 @@ struct nvme_controller { uint32_t ready_timeout_in_ms; uint32_t quirks; -#define QUIRK_DELAY_B4_CHK_RDY 1 /* Can't touch MMIO on disable */ +#define QUIRK_DELAY_B4_CHK_RDY 1 /* Can't touch MMIO on disable */ +#define QUIRK_DISABLE_TIMEOUT 2 /* Disable broken completion timeout feature */ bus_space_tag_t bus_tag; bus_space_handle_t bus_handle; From owner-svn-src-all@freebsd.org Mon Apr 15 14:57:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 517EE1576027; Mon, 15 Apr 2019 14:57:01 +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 AC10284B0D; Mon, 15 Apr 2019 14:57:00 +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 B5E3D98C8; Mon, 15 Apr 2019 14:56:59 +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 x3FEux58089687; Mon, 15 Apr 2019 14:56:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FEuxV0089686; Mon, 15 Apr 2019 14:56:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151456.x3FEuxV0089686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 14:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346231 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 346231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AC10284B0D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 14:57:01 -0000 Author: mav Date: Mon Apr 15 14:56:59 2019 New Revision: 346231 URL: https://svnweb.freebsd.org/changeset/base/346231 Log: MFC r340412 (by imp): Use atomic_load_acq_int() here too to poll done, ala r328521 Modified: stable/12/sys/dev/nvme/nvme_ns.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ns.c Mon Apr 15 14:54:48 2019 (r346230) +++ stable/12/sys/dev/nvme/nvme_ns.c Mon Apr 15 14:56:59 2019 (r346231) @@ -533,11 +533,11 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t if (!mtx_initialized(&ns->lock)) mtx_init(&ns->lock, "nvme ns lock", NULL, MTX_DEF); - status.done = FALSE; + status.done = 0; nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data, nvme_completion_poll_cb, &status); - while (status.done == FALSE) - DELAY(5); + while (!atomic_load_acq_int(&status.done)) + pause("nvme", 1); if (nvme_completion_is_error(&status.cpl)) { nvme_printf(ctrlr, "nvme_identify_namespace failed\n"); return (ENXIO); From owner-svn-src-all@freebsd.org Mon Apr 15 14:57:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAD51157609C; Mon, 15 Apr 2019 14:57:51 +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 5A44A84C5A; Mon, 15 Apr 2019 14:57:51 +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 36C8F98C9; Mon, 15 Apr 2019 14:57:51 +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 x3FEvpl6089795; Mon, 15 Apr 2019 14:57:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FEvp2K089794; Mon, 15 Apr 2019 14:57:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151457.x3FEvp2K089794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 14:57: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: r346232 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 346232 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5A44A84C5A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 14:57:51 -0000 Author: mav Date: Mon Apr 15 14:57:50 2019 New Revision: 346232 URL: https://svnweb.freebsd.org/changeset/base/346232 Log: MFC r340481 (by imp): Remove do-nothing nvme_modevent. nvme_modevent no longer does anything interesting, remove it. Modified: stable/12/sys/dev/nvme/nvme.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme.c ============================================================================== --- stable/12/sys/dev/nvme/nvme.c Mon Apr 15 14:56:59 2019 (r346231) +++ stable/12/sys/dev/nvme/nvme.c Mon Apr 15 14:57:50 2019 (r346232) @@ -61,7 +61,6 @@ static int nvme_probe(device_t); static int nvme_attach(device_t); static int nvme_detach(device_t); static int nvme_shutdown(device_t); -static int nvme_modevent(module_t mod, int type, void *arg); static devclass_t nvme_devclass; @@ -80,7 +79,7 @@ static driver_t nvme_pci_driver = { sizeof(struct nvme_controller), }; -DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, nvme_modevent, 0); +DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, NULL, NULL); MODULE_VERSION(nvme, 1); MODULE_DEPEND(nvme, cam, 1, 1, 1); @@ -181,16 +180,6 @@ nvme_uninit(void) SYSUNINIT(nvme_unregister, SI_SUB_DRIVERS, SI_ORDER_SECOND, nvme_uninit, NULL); -static void -nvme_load(void) -{ -} - -static void -nvme_unload(void) -{ -} - static int nvme_shutdown(device_t dev) { @@ -198,24 +187,6 @@ nvme_shutdown(device_t dev) ctrlr = DEVICE2SOFTC(dev); nvme_ctrlr_shutdown(ctrlr); - - return (0); -} - -static int -nvme_modevent(module_t mod, int type, void *arg) -{ - - switch (type) { - case MOD_LOAD: - nvme_load(); - break; - case MOD_UNLOAD: - nvme_unload(); - break; - default: - break; - } return (0); } From owner-svn-src-all@freebsd.org Mon Apr 15 14:58:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76BBB1576152; Mon, 15 Apr 2019 14:58:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 11EF084DAB; Mon, 15 Apr 2019 14:58:41 +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 E305B98CA; Mon, 15 Apr 2019 14:58:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FEweQw089903; Mon, 15 Apr 2019 14:58:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FEweS8089902; Mon, 15 Apr 2019 14:58:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151458.x3FEweS8089902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 14:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346233 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 346233 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 11EF084DAB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 14:58:41 -0000 Author: mav Date: Mon Apr 15 14:58:40 2019 New Revision: 346233 URL: https://svnweb.freebsd.org/changeset/base/346233 Log: MFC r341710 (by imp): Even though they are reserved, cdw2 and cdw3 can be set via nvme-cli (and soon nvmecontrol). Go ahead and copy them into rsvd2 and rsvd3. Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Mon Apr 15 14:57:50 2019 (r346232) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Mon Apr 15 14:58:40 2019 (r346233) @@ -1075,6 +1075,8 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr /* Assume userspace already converted to little-endian */ req->cmd.opc = pt->cmd.opc; req->cmd.fuse = pt->cmd.fuse; + req->cmd.rsvd2 = pt->cmd.rsvd2; + req->cmd.rsvd3 = pt->cmd.rsvd3; req->cmd.cdw10 = pt->cmd.cdw10; req->cmd.cdw11 = pt->cmd.cdw11; req->cmd.cdw12 = pt->cmd.cdw12; From owner-svn-src-all@freebsd.org Mon Apr 15 15:00:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E501576213; Mon, 15 Apr 2019 15:00:14 +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 6E10F84F13; Mon, 15 Apr 2019 15:00:14 +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 4C79598CF; Mon, 15 Apr 2019 15:00:14 +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 x3FF0E2e090104; Mon, 15 Apr 2019 15:00:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FF0Eg3090103; Mon, 15 Apr 2019 15:00:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151500.x3FF0Eg3090103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 15:00:14 +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: r346234 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 346234 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E10F84F13 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 15:00:14 -0000 Author: mav Date: Mon Apr 15 15:00:13 2019 New Revision: 346234 URL: https://svnweb.freebsd.org/changeset/base/346234 Log: MFC r342862 (by chuck): Add NVMe drive to NOIOB quirk list Dell-branded Intel P4600 NVMe drives benefit from NVMe 1.3's NOIOB feature. Unfortunately just like Intel DC P4500s, they don't advertise themselves as benefiting from this... This changes adds P4600s to the existing list of old drives which benefit from striping. PR: 233969 Modified: stable/12/sys/dev/nvme/nvme_ns.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ns.c Mon Apr 15 14:58:40 2019 (r346233) +++ stable/12/sys/dev/nvme/nvme_ns.c Mon Apr 15 15:00:13 2019 (r346234) @@ -514,6 +514,7 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t case 0x09538086: /* Intel DC PC3500 */ case 0x0a538086: /* Intel DC PC3520 */ case 0x0a548086: /* Intel DC PC4500 */ + case 0x0a558086: /* Dell Intel P4600 */ if (ctrlr->cdata.vs[3] != 0) ns->stripesize = (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; From owner-svn-src-all@freebsd.org Mon Apr 15 15:01:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FEDD15762CC; Mon, 15 Apr 2019 15:01:34 +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 1EE8785244; Mon, 15 Apr 2019 15:01:34 +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 EF84C9A21; Mon, 15 Apr 2019 15:01:33 +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 x3FF1XRo090249; Mon, 15 Apr 2019 15:01:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FF1XuD090246; Mon, 15 Apr 2019 15:01:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151501.x3FF1XuD090246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 15:01:33 +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: r346235 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 346235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1EE8785244 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 15:01:34 -0000 Author: mav Date: Mon Apr 15 15:01:32 2019 New Revision: 346235 URL: https://svnweb.freebsd.org/changeset/base/346235 Log: MFC r344640 (by imp): Remove #ifdef code to support FreeBSD versions that haven't been supported in years. A number of changes have been made to the driver that likely wouldn't work on those older versions that aren't properly ifdef'd and it's project policy to GC such code once it is stale. Modified: stable/12/sys/dev/nvme/nvme_private.h stable/12/sys/dev/nvme/nvme_qpair.c stable/12/sys/dev/nvme/nvme_test.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/12/sys/dev/nvme/nvme_private.h Mon Apr 15 15:00:13 2019 (r346234) +++ stable/12/sys/dev/nvme/nvme_private.h Mon Apr 15 15:01:32 2019 (r346235) @@ -349,11 +349,6 @@ struct nvme_controller { (val & 0xFFFFFFFF00000000ULL) >> 32); \ } while (0); -#if __FreeBSD_version < 800054 -#define wmb() __asm volatile("sfence" ::: "memory") -#define mb() __asm volatile("mfence" ::: "memory") -#endif - #define nvme_printf(ctrlr, fmt, args...) \ device_printf(ctrlr->dev, fmt, ##args) Modified: stable/12/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_qpair.c Mon Apr 15 15:00:13 2019 (r346234) +++ stable/12/sys/dev/nvme/nvme_qpair.c Mon Apr 15 15:01:32 2019 (r346235) @@ -823,13 +823,8 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, st ctrlr = qpair->ctrlr; if (req->timeout) -#if __FreeBSD_version >= 800030 callout_reset_curcpu(&tr->timer, ctrlr->timeout_period * hz, nvme_timeout, tr); -#else - callout_reset(&tr->timer, ctrlr->timeout_period * hz, - nvme_timeout, tr); -#endif /* Copy the command from the tracker to the submission queue. */ memcpy(&qpair->cmd[qpair->sq_tail], &req->cmd, sizeof(req->cmd)); Modified: stable/12/sys/dev/nvme/nvme_test.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_test.c Mon Apr 15 15:00:13 2019 (r346234) +++ stable/12/sys/dev/nvme/nvme_test.c Mon Apr 15 15:01:32 2019 (r346235) @@ -94,9 +94,7 @@ nvme_ns_bio_test(void *arg) struct timeval t; uint64_t io_completed = 0, offset; uint32_t idx; -#if __FreeBSD_version >= 900017 int ref; -#endif buf = malloc(io_test->size, M_NVME, M_WAITOK); idx = atomic_fetchadd_int(&io_test->td_idx, 1); @@ -118,11 +116,7 @@ nvme_ns_bio_test(void *arg) bio->bio_bcount = io_test->size; if (io_test->flags & NVME_TEST_FLAG_REFTHREAD) { -#if __FreeBSD_version >= 900017 csw = dev_refthread(dev, &ref); -#else - csw = dev_refthread(dev); -#endif } else csw = dev->si_devsw; @@ -133,11 +127,7 @@ nvme_ns_bio_test(void *arg) mtx_unlock(mtx); if (io_test->flags & NVME_TEST_FLAG_REFTHREAD) { -#if __FreeBSD_version >= 900017 dev_relthread(dev, ref); -#else - dev_relthread(dev); -#endif } if ((bio->bio_flags & BIO_ERROR) || (bio->bio_resid > 0)) @@ -166,11 +156,7 @@ nvme_ns_bio_test(void *arg) atomic_subtract_int(&io_test->td_active, 1); mb(); -#if __FreeBSD_version >= 800000 kthread_exit(); -#else - kthread_exit(0); -#endif } static void @@ -246,11 +232,7 @@ nvme_ns_io_test(void *arg) atomic_subtract_int(&io_test->td_active, 1); mb(); -#if __FreeBSD_version >= 800004 kthread_exit(); -#else - kthread_exit(0); -#endif } void @@ -287,13 +269,8 @@ nvme_ns_test(struct nvme_namespace *ns, u_long cmd, ca getmicrouptime(&io_test_internal->start); for (i = 0; i < io_test->num_threads; i++) -#if __FreeBSD_version >= 800004 kthread_add(fn, io_test_internal, NULL, NULL, 0, 0, "nvme_io_test[%d]", i); -#else - kthread_create(fn, io_test_internal, - NULL, 0, 0, "nvme_io_test[%d]", i); -#endif tsleep(io_test_internal, 0, "nvme_test", io_test->time * 2 * hz); From owner-svn-src-all@freebsd.org Mon Apr 15 15:02:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FD5B157646D; Mon, 15 Apr 2019 15:02:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 B90EF853FE; Mon, 15 Apr 2019 15:02:19 +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 AE3869A62; Mon, 15 Apr 2019 15:02:19 +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 x3FF2Jq3095095; Mon, 15 Apr 2019 15:02:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FF2IV7095089; Mon, 15 Apr 2019 15:02:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151502.x3FF2IV7095089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 15:02: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: r346236 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 346236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B90EF853FE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 15:02:20 -0000 Author: mav Date: Mon Apr 15 15:02:18 2019 New Revision: 346236 URL: https://svnweb.freebsd.org/changeset/base/346236 Log: MFC r344642 (by imp): Unconditionally support unmapped BIOs. This was another shim for supporting older kernels. However, all supported versions of FreeBSD have unmapped I/Os (as do several that have gone EOL), remove it. It's unlikely the driver would work on the older kernels anyway at this point. Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c stable/12/sys/dev/nvme/nvme_ns.c stable/12/sys/dev/nvme/nvme_private.h stable/12/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Mon Apr 15 15:01:32 2019 (r346235) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Mon Apr 15 15:02:18 2019 (r346236) @@ -1056,11 +1056,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr buf->b_data = pt->buf; buf->b_bufsize = pt->len; buf->b_iocmd = pt->is_read ? BIO_READ : BIO_WRITE; -#ifdef NVME_UNMAPPED_BIO_SUPPORT if (vmapbuf(buf, 1) < 0) { -#else - if (vmapbuf(buf) < 0) { -#endif ret = EFAULT; goto err; } Modified: stable/12/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ns.c Mon Apr 15 15:01:32 2019 (r346235) +++ stable/12/sys/dev/nvme/nvme_ns.c Mon Apr 15 15:02:18 2019 (r346236) @@ -357,10 +357,8 @@ nvme_construct_child_bios(struct bio *bp, uint32_t ali caddr_t data; uint32_t rem_bcount; int i; -#ifdef NVME_UNMAPPED_BIO_SUPPORT struct vm_page **ma; uint32_t ma_offset; -#endif *num_bios = nvme_get_num_segments(bp->bio_offset, bp->bio_bcount, alignment); @@ -373,10 +371,8 @@ nvme_construct_child_bios(struct bio *bp, uint32_t ali cur_offset = bp->bio_offset; rem_bcount = bp->bio_bcount; data = bp->bio_data; -#ifdef NVME_UNMAPPED_BIO_SUPPORT ma_offset = bp->bio_ma_offset; ma = bp->bio_ma; -#endif for (i = 0; i < *num_bios; i++) { child = child_bios[i]; @@ -386,7 +382,6 @@ nvme_construct_child_bios(struct bio *bp, uint32_t ali child->bio_bcount = min(rem_bcount, alignment - (cur_offset & (alignment - 1))); child->bio_flags = bp->bio_flags; -#ifdef NVME_UNMAPPED_BIO_SUPPORT if (bp->bio_flags & BIO_UNMAPPED) { child->bio_ma_offset = ma_offset; child->bio_ma = ma; @@ -398,9 +393,7 @@ nvme_construct_child_bios(struct bio *bp, uint32_t ali ma += child->bio_ma_n; if (ma_offset != 0) ma -= 1; - } else -#endif - { + } else { child->bio_data = data; data += child->bio_bcount; } @@ -599,9 +592,7 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t if (res != 0) return (ENXIO); -#ifdef NVME_UNMAPPED_BIO_SUPPORT ns->cdev->si_flags |= SI_UNMAPPED; -#endif return (0); } Modified: stable/12/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/12/sys/dev/nvme/nvme_private.h Mon Apr 15 15:01:32 2019 (r346235) +++ stable/12/sys/dev/nvme/nvme_private.h Mon Apr 15 15:02:18 2019 (r346236) @@ -112,16 +112,6 @@ MALLOC_DECLARE(M_NVME); #define CACHE_LINE_SIZE (64) #endif -/* - * Use presence of the BIO_UNMAPPED flag to determine whether unmapped I/O - * support and the bus_dmamap_load_bio API are available on the target - * kernel. This will ease porting back to earlier stable branches at a - * later point. - */ -#ifdef BIO_UNMAPPED -#define NVME_UNMAPPED_BIO_SUPPORT -#endif - extern uma_zone_t nvme_request_zone; extern int32_t nvme_retry_count; @@ -134,9 +124,7 @@ struct nvme_completion_poll_status { #define NVME_REQUEST_VADDR 1 #define NVME_REQUEST_NULL 2 /* For requests with no payload. */ #define NVME_REQUEST_UIO 3 -#ifdef NVME_UNMAPPED_BIO_SUPPORT #define NVME_REQUEST_BIO 4 -#endif #define NVME_REQUEST_CCB 5 struct nvme_request { @@ -506,14 +494,8 @@ nvme_allocate_request_bio(struct bio *bio, nvme_cb_fn_ req = _nvme_allocate_request(cb_fn, cb_arg); if (req != NULL) { -#ifdef NVME_UNMAPPED_BIO_SUPPORT req->type = NVME_REQUEST_BIO; req->u.bio = bio; -#else - req->type = NVME_REQUEST_VADDR; - req->u.payload = bio->bio_data; - req->payload_size = bio->bio_bcount; -#endif } return (req); } Modified: stable/12/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_qpair.c Mon Apr 15 15:01:32 2019 (r346235) +++ stable/12/sys/dev/nvme/nvme_qpair.c Mon Apr 15 15:02:18 2019 (r346236) @@ -954,7 +954,6 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, s case NVME_REQUEST_NULL: nvme_qpair_submit_tracker(tr->qpair, tr); break; -#ifdef NVME_UNMAPPED_BIO_SUPPORT case NVME_REQUEST_BIO: KASSERT(req->u.bio->bio_bcount <= qpair->ctrlr->max_xfer_size, ("bio->bio_bcount (%jd) exceeds max_xfer_size (%d)\n", @@ -966,7 +965,6 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, s nvme_printf(qpair->ctrlr, "bus_dmamap_load_bio returned 0x%x!\n", err); break; -#endif case NVME_REQUEST_CCB: err = bus_dmamap_load_ccb(tr->qpair->dma_tag_payload, tr->payload_dma_map, req->u.payload, From owner-svn-src-all@freebsd.org Mon Apr 15 15:09:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B019215767E5; Mon, 15 Apr 2019 15:09:26 +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 5246F858B1; Mon, 15 Apr 2019 15:09:26 +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 2BC269A74; Mon, 15 Apr 2019 15:09:26 +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 x3FF9QBf095518; Mon, 15 Apr 2019 15:09:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FF9Qgc095517; Mon, 15 Apr 2019 15:09:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151509.x3FF9Qgc095517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 15:09: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: r346237 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 346237 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5246F858B1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 15:09:26 -0000 Author: mav Date: Mon Apr 15 15:09:25 2019 New Revision: 346237 URL: https://svnweb.freebsd.org/changeset/base/346237 Log: MFC r344736 (by imp): Add ABORTED_BY_REQUEST to the list of things we look at DNR bit and tell why to comment (code already does this) Modified: stable/12/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_qpair.c Mon Apr 15 15:02:18 2019 (r346236) +++ stable/12/sys/dev/nvme/nvme_qpair.c Mon Apr 15 15:09:25 2019 (r346237) @@ -331,7 +331,8 @@ nvme_completion_is_retry(const struct nvme_completion * TODO: spec is not clear how commands that are aborted due * to TLER will be marked. So for now, it seems * NAMESPACE_NOT_READY is the only case where we should - * look at the DNR bit. + * look at the DNR bit. Requests failed with ABORTED_BY_REQUEST + * set the DNR bit correctly since the driver controls that. */ switch (sct) { case NVME_SCT_GENERIC: From owner-svn-src-all@freebsd.org Mon Apr 15 15:33:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 861671576EE7 for ; Mon, 15 Apr 2019 15:33:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE3DC86458 for ; Mon, 15 Apr 2019 15:33:10 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1555341420; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=M2K28/+2ojCZJedOmeYvEtdOqKqtgr5oR18VkR4R8Q0m9KmDxqRv/HeyG8mLwtSM9zRN87D/u49W4 uX2/2slUpbPyeyczBJGog1O4GgawE/pMmi2qleB0T4/7nmKFdW6rTFfrnkXtZZt3D7bPMmsu6iTWtz fWkbP1VnxGzUeSyDuWg++JxWs+6BieJfLNuqEMg7KR31tvjLILsG9MoBaCuAN6IuCc02rwoLAor8fV z5PaBdrxpYyEtip9BH4rjTTvXn6Ygnj7BBnMZCz3L/K3v7KfM+IpfRX3PKSOvOJ6WIA4GWG2a/A3ob 72FH6se2r73S2fsKl1E4gFLQgwEnPmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=09IfUBE5Q80BU6BoxJIVaIsJrTbq5kMDO1OzWX+fweI=; b=PC8UOsxsp5b1CatHYsM6ILUT3RSSq7J3pnpdj5cvCtX97RGn8ZLQyvV3Ov+Q8Mvv3AqDo9CUKscNT x9JPMG4wJqybikdCyM9Ds/sYJqF2exm38FriQjC8uITaREkO2N3yKm2atnThh6s/xLUTJVjbORUZzt JhCv9yG4r1BZa1DcwYcYG4CcBozObgS1hyXuir0KRwxDVEALGz6/eSj9mm/i2I1wpvCY+o0SOP7m8M iWlMtAmiXbT0eWfcz/X6qQ20Jd+SbZTLgKt9kG8Ae5DkBNnRMl7lEhFPiRpqezNkwqWZUQlh971Vcv jKsWVqIUyFGLb8opfb8xIwGjHCfupEg== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=09IfUBE5Q80BU6BoxJIVaIsJrTbq5kMDO1OzWX+fweI=; b=OAv0OfssZJFrp/yEHAwWCWyvUWNPtkmnQGWuavLmgFh6/hJ/vHZDUeeSnBF75O5e7FpTMEFCek91Z R7d+NpahjeGnavEN6Td9oJXQJeJ8I+WypLEpZvX1dIWT9bR57mSZkuAqc2oyrqTAxC17hsqkspSfUt BchhEEsLo+D3yMkrFer/qvpYYcIZf59390EebBpLLM6hjg6hOMbWNxBiKNiMRIj+cACFIAfsTZowdX eG03Zk7xh0thl4/Fj7AyPQBJrtqxP/8JpZWlxL89vOndHz5jPM90w5rZkOiNyEjHNd+mLs+6Fze//f 6uytCCFzRqQLge0yzutJlVq47SAbW+Q== X-MHO-RoutePath: aGlwcGll X-MHO-User: 82ca62ea-5f91-11e9-919f-112c64a8cf29 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 82ca62ea-5f91-11e9-919f-112c64a8cf29; Mon, 15 Apr 2019 15:16:58 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3FFGv6i039357; Mon, 15 Apr 2019 09:16:57 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <39cdbdfbedfce8f2f45ed5be0511d3a8b8f9720a.camel@freebsd.org> Subject: Re: svn commit: r346096 - head/sys/arm/conf From: Ian Lepore To: Svatopluk Kraus , Emmanuel Vadot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 15 Apr 2019 09:16:57 -0600 In-Reply-To: References: <201904101927.x3AJREvt013138@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: EE3DC86458 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 15:33:11 -0000 On Thu, 2019-04-11 at 21:23 +0200, Svatopluk Kraus wrote: > I understand the reason for GENERIC. But are we so blind that we will > delete everything that is not GENERIC? In other words, why to delete > nice specific KERNEL configurations for boards we support when only > reason I see is that GENERIC is so cool for some people? > > Svatopluk Kraus > > I completely agree with this. We had a plan for removing board- specific configs that had been rolled into GENERIC, and it did not involve just deleting them without providing any alternative to people who have custom configs based on them. That plan's execution has stalled, but that's not a good reason for this abrupt deletion without any warning. I think these deletions fall into two categories: 1. Configs for hardware that isn't adequately supported anymore. 2. Configs for popular supported hardware which can use GENERIC. We need to figure out which ones count as #2 and restore them until we've implemented our original plan for phasing them out. I think those would be: BEAGLEBONE PANDABOARD RPI2 For the others, we need to evaluate: if we are removing the only config file that refers to some chunks of sys/arm code, shouldn't we be removing that code too? For example, removing AML8726 probably implies that all of arm/amlogic/* can be deleted. -- Ian > > On Wed, Apr 10, 2019 at 9:27 PM Emmanuel Vadot > wrote: > > > > Author: manu > > Date: Wed Apr 10 19:27:14 2019 > > New Revision: 346096 > > URL: https://svnweb.freebsd.org/changeset/base/346096 > > > > Log: > > arm: kernel: Remove old kernel configs > > > > Follow up to r346095 > > All those kernels are either not working or the release have > > switched > > to GENERIC > > > > Deleted: > > head/sys/arm/conf/AML8726 > > head/sys/arm/conf/BEAGLEBONE > > head/sys/arm/conf/CHROMEBOOK > > head/sys/arm/conf/CHROMEBOOK-PEACH-PIT > > head/sys/arm/conf/CHROMEBOOK-PEACH-PIT.hints > > head/sys/arm/conf/CHROMEBOOK-SNOW > > head/sys/arm/conf/CHROMEBOOK-SPRING > > head/sys/arm/conf/CHROMEBOOK.hints > > head/sys/arm/conf/EXYNOS5.common > > head/sys/arm/conf/EXYNOS5250 > > head/sys/arm/conf/EXYNOS5420 > > head/sys/arm/conf/ODROIDC1 > > head/sys/arm/conf/PANDABOARD > > head/sys/arm/conf/PANDABOARD.hints > > head/sys/arm/conf/RADXA > > head/sys/arm/conf/RADXA-LITE > > head/sys/arm/conf/RK3188 > > head/sys/arm/conf/RPI2 > > > > From owner-svn-src-all@freebsd.org Mon Apr 15 15:35:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEA401576F84; Mon, 15 Apr 2019 15:35:43 +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 915408662A; Mon, 15 Apr 2019 15:35:43 +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 52FA49FC4; Mon, 15 Apr 2019 15:35:43 +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 x3FFZhra011476; Mon, 15 Apr 2019 15:35:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FFZhP3011475; Mon, 15 Apr 2019 15:35:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151535.x3FFZhP3011475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 15:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346238 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346238 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 915408662A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 15:35:44 -0000 Author: mav Date: Mon Apr 15 15:35:42 2019 New Revision: 346238 URL: https://svnweb.freebsd.org/changeset/base/346238 Log: MFC r337273 (by jhibbits): nvme(4): Add bus_dmamap_sync() at the end of the request path Summary: Some architectures, in this case powerpc64, need explicit synchronization barriers vs device accesses. Prior to this change, when running 'make buildworld -j72' on a 18-core (72-thread) POWER9, I would see controller resets often. With this change, I don't see these resets messages, though another tester still does, for yet to be determined reasons, so this may not be a complete fix. Additionally, I see a ~5-10% speed up in buildworld times, likely due to not needing to reset the controller. Modified: stable/11/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 15:09:25 2019 (r346237) +++ stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 15:35:42 2019 (r346238) @@ -321,9 +321,13 @@ nvme_qpair_complete_tracker(struct nvme_qpair *qpair, req->retries++; nvme_qpair_submit_tracker(qpair, tr); } else { - if (req->type != NVME_REQUEST_NULL) + if (req->type != NVME_REQUEST_NULL) { + bus_dmamap_sync(qpair->dma_tag_payload, + tr->payload_dma_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(qpair->dma_tag_payload, tr->payload_dma_map); + } nvme_free_request(req); tr->req = NULL; @@ -407,6 +411,8 @@ nvme_qpair_process_completions(struct nvme_qpair *qpai */ return (false); + bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); while (1) { cpl = &qpair->cpl[qpair->cq_head]; @@ -749,7 +755,16 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, st if (++qpair->sq_tail == qpair->num_entries) qpair->sq_tail = 0; + bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); +#ifndef __powerpc__ + /* + * powerpc's bus_dmamap_sync() already includes a heavyweight sync, but + * no other archs do. + */ wmb(); +#endif + nvme_mmio_write_4(qpair->ctrlr, doorbell[qpair->id].sq_tdbl, qpair->sq_tail); @@ -800,6 +815,8 @@ nvme_payload_map(void *arg, bus_dma_segment_t *seg, in tr->req->cmd.prp2 = 0; } + bus_dmamap_sync(tr->qpair->dma_tag_payload, tr->payload_dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); nvme_qpair_submit_tracker(tr->qpair, tr); } From owner-svn-src-all@freebsd.org Mon Apr 15 16:23:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F437157815A; Mon, 15 Apr 2019 16:23:58 +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 2658A8842A; Mon, 15 Apr 2019 16:23:58 +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 DC75FA851; Mon, 15 Apr 2019 16:23:57 +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 x3FGNvkS038129; Mon, 15 Apr 2019 16:23:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FGNvOI038127; Mon, 15 Apr 2019 16:23:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151623.x3FGNvOI038127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 16:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346239 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346239 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2658A8842A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 16:23:58 -0000 Author: mav Date: Mon Apr 15 16:23:57 2019 New Revision: 346239 URL: https://svnweb.freebsd.org/changeset/base/346239 Log: MFC r339775: Put a workaround in for command timeout malfunctioning At least one NVMe drive has a bug that makeing the Command Time Out PCIe feature unreliable. The workaround is to disable this feature. The driver wouldn't deal correctly with a timeout anyway. Only do this for drives that are known bad. Modified: stable/11/sys/dev/nvme/nvme.c stable/11/sys/dev/nvme/nvme_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme.c ============================================================================== --- stable/11/sys/dev/nvme/nvme.c Mon Apr 15 15:35:42 2019 (r346238) +++ stable/11/sys/dev/nvme/nvme.c Mon Apr 15 16:23:57 2019 (r346239) @@ -104,6 +104,7 @@ static struct _pcsid { 0x05401c5f, 0, 0, "Memblaze Pblaze4", QUIRK_DELAY_B4_CHK_RDY }, { 0xa821144d, 0, 0, "Samsung PM1725", QUIRK_DELAY_B4_CHK_RDY }, { 0xa822144d, 0, 0, "Samsung PM1725a", QUIRK_DELAY_B4_CHK_RDY }, + { 0x01161179, 0, 0, "Toshiba XG5", QUIRK_DISABLE_TIMEOUT }, { 0x00000000, 0, 0, NULL } }; @@ -263,6 +264,25 @@ nvme_attach(device_t dev) if (status != 0) { nvme_ctrlr_destruct(ctrlr, dev); return (status); + } + + /* + * Some drives do not implement the completion timeout feature + * correctly. There's a WAR from the manufacturer to just disable it. + * The driver wouldn't respond correctly to a timeout anyway. + */ + if (ep->quirks & QUIRK_DISABLE_TIMEOUT) { + int ptr; + uint16_t devctl2; + + status = pci_find_cap(dev, PCIY_EXPRESS, &ptr); + if (status) { + device_printf(dev, "Can't locate PCIe capability?"); + return (status); + } + devctl2 = pci_read_config(dev, ptr + PCIER_DEVICE_CTL2, sizeof(devctl2)); + devctl2 |= PCIEM_CTL2_COMP_TIMO_DISABLE; + pci_write_config(dev, ptr + PCIER_DEVICE_CTL2, devctl2, sizeof(devctl2)); } /* Modified: stable/11/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/11/sys/dev/nvme/nvme_private.h Mon Apr 15 15:35:42 2019 (r346238) +++ stable/11/sys/dev/nvme/nvme_private.h Mon Apr 15 16:23:57 2019 (r346239) @@ -245,7 +245,8 @@ struct nvme_controller { uint32_t ready_timeout_in_ms; uint32_t quirks; -#define QUIRK_DELAY_B4_CHK_RDY 1 /* Can't touch MMIO on disable */ +#define QUIRK_DELAY_B4_CHK_RDY 1 /* Can't touch MMIO on disable */ +#define QUIRK_DISABLE_TIMEOUT 2 /* Disable broken completion timeout feature */ bus_space_tag_t bus_tag; bus_space_handle_t bus_handle; From owner-svn-src-all@freebsd.org Mon Apr 15 16:24:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D7701578192; Mon, 15 Apr 2019 16:24:27 +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 A6ACC8853E; Mon, 15 Apr 2019 16:24:26 +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 8328EA852; Mon, 15 Apr 2019 16:24:26 +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 x3FGOQmk038211; Mon, 15 Apr 2019 16:24:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FGOQBv038210; Mon, 15 Apr 2019 16:24:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151624.x3FGOQBv038210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 16:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346240 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346240 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A6ACC8853E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 16:24:27 -0000 Author: mav Date: Mon Apr 15 16:24:26 2019 New Revision: 346240 URL: https://svnweb.freebsd.org/changeset/base/346240 Log: MFC r340412: Use atomic_load_acq_int() here too to poll done, ala r328521 Modified: stable/11/sys/dev/nvme/nvme_ns.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_ns.c Mon Apr 15 16:23:57 2019 (r346239) +++ stable/11/sys/dev/nvme/nvme_ns.c Mon Apr 15 16:24:26 2019 (r346240) @@ -516,11 +516,11 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t if (!mtx_initialized(&ns->lock)) mtx_init(&ns->lock, "nvme ns lock", NULL, MTX_DEF); - status.done = FALSE; + status.done = 0; nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data, nvme_completion_poll_cb, &status); - while (status.done == FALSE) - DELAY(5); + while (!atomic_load_acq_int(&status.done)) + pause("nvme", 1); if (nvme_completion_is_error(&status.cpl)) { nvme_printf(ctrlr, "nvme_identify_namespace failed\n"); return (ENXIO); From owner-svn-src-all@freebsd.org Mon Apr 15 16:25:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7248215781F8; Mon, 15 Apr 2019 16:25:01 +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 131E68866C; Mon, 15 Apr 2019 16:25:01 +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 E4A51A853; Mon, 15 Apr 2019 16:25:00 +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 x3FGP0ts038303; Mon, 15 Apr 2019 16:25:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FGP0Ol038302; Mon, 15 Apr 2019 16:25:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151625.x3FGP0Ol038302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 16:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346241 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346241 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 131E68866C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 16:25:01 -0000 Author: mav Date: Mon Apr 15 16:25:00 2019 New Revision: 346241 URL: https://svnweb.freebsd.org/changeset/base/346241 Log: MFC r340481 (by imp): Remove do-nothing nvme_modevent. nvme_modevent no longer does anything interesting, remove it. Modified: stable/11/sys/dev/nvme/nvme.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme.c ============================================================================== --- stable/11/sys/dev/nvme/nvme.c Mon Apr 15 16:24:26 2019 (r346240) +++ stable/11/sys/dev/nvme/nvme.c Mon Apr 15 16:25:00 2019 (r346241) @@ -59,7 +59,6 @@ static int nvme_probe(device_t); static int nvme_attach(device_t); static int nvme_detach(device_t); static int nvme_shutdown(device_t); -static int nvme_modevent(module_t mod, int type, void *arg); static devclass_t nvme_devclass; @@ -78,7 +77,7 @@ static driver_t nvme_pci_driver = { sizeof(struct nvme_controller), }; -DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, nvme_modevent, 0); +DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, NULL, NULL); MODULE_VERSION(nvme, 1); MODULE_DEPEND(nvme, cam, 1, 1, 1); @@ -179,16 +178,6 @@ nvme_uninit(void) SYSUNINIT(nvme_unregister, SI_SUB_DRIVERS, SI_ORDER_SECOND, nvme_uninit, NULL); -static void -nvme_load(void) -{ -} - -static void -nvme_unload(void) -{ -} - static int nvme_shutdown(device_t dev) { @@ -196,24 +185,6 @@ nvme_shutdown(device_t dev) ctrlr = DEVICE2SOFTC(dev); nvme_ctrlr_shutdown(ctrlr); - - return (0); -} - -static int -nvme_modevent(module_t mod, int type, void *arg) -{ - - switch (type) { - case MOD_LOAD: - nvme_load(); - break; - case MOD_UNLOAD: - nvme_unload(); - break; - default: - break; - } return (0); } From owner-svn-src-all@freebsd.org Mon Apr 15 16:27:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 263F315782BD; Mon, 15 Apr 2019 16:27:07 +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 BEB7F887FB; Mon, 15 Apr 2019 16:27:06 +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 95C7EA854; Mon, 15 Apr 2019 16:27:06 +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 x3FGR6pC038467; Mon, 15 Apr 2019 16:27:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FGR6H9038466; Mon, 15 Apr 2019 16:27:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151627.x3FGR6H9038466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 16:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346242 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346242 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BEB7F887FB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 16:27:07 -0000 Author: mav Date: Mon Apr 15 16:27:06 2019 New Revision: 346242 URL: https://svnweb.freebsd.org/changeset/base/346242 Log: MFC r342862 (by chuck): Add NVMe drive to NOIOB quirk list Dell-branded Intel P4600 NVMe drives benefit from NVMe 1.3's NOIOB feature. Unfortunately just like Intel DC P4500s, they don't advertise themselves as benefiting from this... This changes adds P4600s to the existing list of old drives which benefit from striping. Modified: stable/11/sys/dev/nvme/nvme_ns.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_ns.c Mon Apr 15 16:25:00 2019 (r346241) +++ stable/11/sys/dev/nvme/nvme_ns.c Mon Apr 15 16:27:06 2019 (r346242) @@ -497,6 +497,7 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t case 0x09538086: /* Intel DC PC3500 */ case 0x0a538086: /* Intel DC PC3520 */ case 0x0a548086: /* Intel DC PC4500 */ + case 0x0a558086: /* Dell Intel P4600 */ if (ctrlr->cdata.vs[3] != 0) ns->stripesize = (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; From owner-svn-src-all@freebsd.org Mon Apr 15 16:27:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E355157835D; Mon, 15 Apr 2019 16:27:54 +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 1740288A18; Mon, 15 Apr 2019 16:27:54 +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 E901FA857; Mon, 15 Apr 2019 16:27:53 +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 x3FGRrUn038707; Mon, 15 Apr 2019 16:27:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FGRrLq038702; Mon, 15 Apr 2019 16:27:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151627.x3FGRrLq038702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 16:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346243 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346243 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1740288A18 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 16:27:54 -0000 Author: mav Date: Mon Apr 15 16:27:53 2019 New Revision: 346243 URL: https://svnweb.freebsd.org/changeset/base/346243 Log: MFC r344640 (by imp): Remove #ifdef code to support FreeBSD versions that haven't been supported in years. A number of changes have been made to the driver that likely wouldn't work on those older versions that aren't properly ifdef'd and it's project policy to GC such code once it is stale. Modified: stable/11/sys/dev/nvme/nvme_private.h stable/11/sys/dev/nvme/nvme_qpair.c stable/11/sys/dev/nvme/nvme_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/11/sys/dev/nvme/nvme_private.h Mon Apr 15 16:27:06 2019 (r346242) +++ stable/11/sys/dev/nvme/nvme_private.h Mon Apr 15 16:27:53 2019 (r346243) @@ -347,11 +347,6 @@ struct nvme_controller { (val & 0xFFFFFFFF00000000UL) >> 32); \ } while (0); -#if __FreeBSD_version < 800054 -#define wmb() __asm volatile("sfence" ::: "memory") -#define mb() __asm volatile("mfence" ::: "memory") -#endif - #define nvme_printf(ctrlr, fmt, args...) \ device_printf(ctrlr->dev, fmt, ##args) Modified: stable/11/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 16:27:06 2019 (r346242) +++ stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 16:27:53 2019 (r346243) @@ -741,13 +741,8 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, st ctrlr = qpair->ctrlr; if (req->timeout) -#if __FreeBSD_version >= 800030 callout_reset_curcpu(&tr->timer, ctrlr->timeout_period * hz, nvme_timeout, tr); -#else - callout_reset(&tr->timer, ctrlr->timeout_period * hz, - nvme_timeout, tr); -#endif /* Copy the command from the tracker to the submission queue. */ memcpy(&qpair->cmd[qpair->sq_tail], &req->cmd, sizeof(req->cmd)); Modified: stable/11/sys/dev/nvme/nvme_test.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_test.c Mon Apr 15 16:27:06 2019 (r346242) +++ stable/11/sys/dev/nvme/nvme_test.c Mon Apr 15 16:27:53 2019 (r346243) @@ -92,9 +92,7 @@ nvme_ns_bio_test(void *arg) struct timeval t; uint64_t io_completed = 0, offset; uint32_t idx; -#if __FreeBSD_version >= 900017 int ref; -#endif buf = malloc(io_test->size, M_NVME, M_WAITOK); idx = atomic_fetchadd_int(&io_test->td_idx, 1); @@ -116,11 +114,7 @@ nvme_ns_bio_test(void *arg) bio->bio_bcount = io_test->size; if (io_test->flags & NVME_TEST_FLAG_REFTHREAD) { -#if __FreeBSD_version >= 900017 csw = dev_refthread(dev, &ref); -#else - csw = dev_refthread(dev); -#endif } else csw = dev->si_devsw; @@ -131,11 +125,7 @@ nvme_ns_bio_test(void *arg) mtx_unlock(mtx); if (io_test->flags & NVME_TEST_FLAG_REFTHREAD) { -#if __FreeBSD_version >= 900017 dev_relthread(dev, ref); -#else - dev_relthread(dev); -#endif } if ((bio->bio_flags & BIO_ERROR) || (bio->bio_resid > 0)) @@ -164,11 +154,7 @@ nvme_ns_bio_test(void *arg) atomic_subtract_int(&io_test->td_active, 1); mb(); -#if __FreeBSD_version >= 800000 kthread_exit(); -#else - kthread_exit(0); -#endif } static void @@ -244,11 +230,7 @@ nvme_ns_io_test(void *arg) atomic_subtract_int(&io_test->td_active, 1); mb(); -#if __FreeBSD_version >= 800004 kthread_exit(); -#else - kthread_exit(0); -#endif } void @@ -285,13 +267,8 @@ nvme_ns_test(struct nvme_namespace *ns, u_long cmd, ca getmicrouptime(&io_test_internal->start); for (i = 0; i < io_test->num_threads; i++) -#if __FreeBSD_version >= 800004 kthread_add(fn, io_test_internal, NULL, NULL, 0, 0, "nvme_io_test[%d]", i); -#else - kthread_create(fn, io_test_internal, - NULL, 0, 0, "nvme_io_test[%d]", i); -#endif tsleep(io_test_internal, 0, "nvme_test", io_test->time * 2 * hz); From owner-svn-src-all@freebsd.org Mon Apr 15 16:28:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEDA815783CA; Mon, 15 Apr 2019 16:28:26 +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 604FC88B57; Mon, 15 Apr 2019 16:28:26 +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 3C7EBA858; Mon, 15 Apr 2019 16:28:26 +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 x3FGSQRo038824; Mon, 15 Apr 2019 16:28:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FGSPkq038816; Mon, 15 Apr 2019 16:28:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151628.x3FGSPkq038816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 16:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346244 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346244 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 604FC88B57 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 16:28:27 -0000 Author: mav Date: Mon Apr 15 16:28:25 2019 New Revision: 346244 URL: https://svnweb.freebsd.org/changeset/base/346244 Log: MFC r344642 (by imp): Unconditionally support unmapped BIOs. This was another shim for supporting older kernels. However, all supported versions of FreeBSD have unmapped I/Os (as do several that have gone EOL), remove it. It's unlikely the driver would work on the older kernels anyway at this point. Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c stable/11/sys/dev/nvme/nvme_ns.c stable/11/sys/dev/nvme/nvme_private.h stable/11/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_ctrlr.c Mon Apr 15 16:27:53 2019 (r346243) +++ stable/11/sys/dev/nvme/nvme_ctrlr.c Mon Apr 15 16:28:25 2019 (r346244) @@ -986,11 +986,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr buf->b_data = pt->buf; buf->b_bufsize = pt->len; buf->b_iocmd = pt->is_read ? BIO_READ : BIO_WRITE; -#ifdef NVME_UNMAPPED_BIO_SUPPORT if (vmapbuf(buf, 1) < 0) { -#else - if (vmapbuf(buf) < 0) { -#endif ret = EFAULT; goto err; } Modified: stable/11/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_ns.c Mon Apr 15 16:27:53 2019 (r346243) +++ stable/11/sys/dev/nvme/nvme_ns.c Mon Apr 15 16:28:25 2019 (r346244) @@ -346,10 +346,8 @@ nvme_construct_child_bios(struct bio *bp, uint32_t ali caddr_t data; uint32_t rem_bcount; int i; -#ifdef NVME_UNMAPPED_BIO_SUPPORT struct vm_page **ma; uint32_t ma_offset; -#endif *num_bios = nvme_get_num_segments(bp->bio_offset, bp->bio_bcount, alignment); @@ -362,10 +360,8 @@ nvme_construct_child_bios(struct bio *bp, uint32_t ali cur_offset = bp->bio_offset; rem_bcount = bp->bio_bcount; data = bp->bio_data; -#ifdef NVME_UNMAPPED_BIO_SUPPORT ma_offset = bp->bio_ma_offset; ma = bp->bio_ma; -#endif for (i = 0; i < *num_bios; i++) { child = child_bios[i]; @@ -375,7 +371,6 @@ nvme_construct_child_bios(struct bio *bp, uint32_t ali child->bio_bcount = min(rem_bcount, alignment - (cur_offset & (alignment - 1))); child->bio_flags = bp->bio_flags; -#ifdef NVME_UNMAPPED_BIO_SUPPORT if (bp->bio_flags & BIO_UNMAPPED) { child->bio_ma_offset = ma_offset; child->bio_ma = ma; @@ -387,9 +382,7 @@ nvme_construct_child_bios(struct bio *bp, uint32_t ali ma += child->bio_ma_n; if (ma_offset != 0) ma -= 1; - } else -#endif - { + } else { child->bio_data = data; data += child->bio_bcount; } @@ -575,9 +568,7 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t if (res != 0) return (ENXIO); -#ifdef NVME_UNMAPPED_BIO_SUPPORT ns->cdev->si_flags |= SI_UNMAPPED; -#endif return (0); } Modified: stable/11/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/11/sys/dev/nvme/nvme_private.h Mon Apr 15 16:27:53 2019 (r346243) +++ stable/11/sys/dev/nvme/nvme_private.h Mon Apr 15 16:28:25 2019 (r346244) @@ -110,16 +110,6 @@ MALLOC_DECLARE(M_NVME); #define CACHE_LINE_SIZE (64) #endif -/* - * Use presence of the BIO_UNMAPPED flag to determine whether unmapped I/O - * support and the bus_dmamap_load_bio API are available on the target - * kernel. This will ease porting back to earlier stable branches at a - * later point. - */ -#ifdef BIO_UNMAPPED -#define NVME_UNMAPPED_BIO_SUPPORT -#endif - extern uma_zone_t nvme_request_zone; extern int32_t nvme_retry_count; @@ -132,9 +122,7 @@ struct nvme_completion_poll_status { #define NVME_REQUEST_VADDR 1 #define NVME_REQUEST_NULL 2 /* For requests with no payload. */ #define NVME_REQUEST_UIO 3 -#ifdef NVME_UNMAPPED_BIO_SUPPORT #define NVME_REQUEST_BIO 4 -#endif #define NVME_REQUEST_CCB 5 struct nvme_request { @@ -504,14 +492,8 @@ nvme_allocate_request_bio(struct bio *bio, nvme_cb_fn_ req = _nvme_allocate_request(cb_fn, cb_arg); if (req != NULL) { -#ifdef NVME_UNMAPPED_BIO_SUPPORT req->type = NVME_REQUEST_BIO; req->u.bio = bio; -#else - req->type = NVME_REQUEST_VADDR; - req->u.payload = bio->bio_data; - req->payload_size = bio->bio_bcount; -#endif } return (req); } Modified: stable/11/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 16:27:53 2019 (r346243) +++ stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 16:28:25 2019 (r346244) @@ -872,7 +872,6 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, s case NVME_REQUEST_NULL: nvme_qpair_submit_tracker(tr->qpair, tr); break; -#ifdef NVME_UNMAPPED_BIO_SUPPORT case NVME_REQUEST_BIO: KASSERT(req->u.bio->bio_bcount <= qpair->ctrlr->max_xfer_size, ("bio->bio_bcount (%jd) exceeds max_xfer_size (%d)\n", @@ -884,7 +883,6 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, s nvme_printf(qpair->ctrlr, "bus_dmamap_load_bio returned 0x%x!\n", err); break; -#endif case NVME_REQUEST_CCB: err = bus_dmamap_load_ccb(tr->qpair->dma_tag_payload, tr->payload_dma_map, req->u.payload, From owner-svn-src-all@freebsd.org Mon Apr 15 16:29:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1919A15784ED; Mon, 15 Apr 2019 16:29:49 +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 B303F88DF3; Mon, 15 Apr 2019 16:29:48 +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 63872A85A; Mon, 15 Apr 2019 16:29:48 +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 x3FGTmvl039162; Mon, 15 Apr 2019 16:29:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FGTmgj039161; Mon, 15 Apr 2019 16:29:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151629.x3FGTmgj039161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 16:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346245 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346245 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B303F88DF3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 16:29:49 -0000 Author: mav Date: Mon Apr 15 16:29:47 2019 New Revision: 346245 URL: https://svnweb.freebsd.org/changeset/base/346245 Log: MFC r344736 (by imp): Add ABORTED_BY_REQUEST to the list of things we look at DNR bit and tell why to comment (code already does this) Modified: stable/11/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 16:28:25 2019 (r346244) +++ stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 16:29:47 2019 (r346245) @@ -255,7 +255,8 @@ nvme_completion_is_retry(const struct nvme_completion * TODO: spec is not clear how commands that are aborted due * to TLER will be marked. So for now, it seems * NAMESPACE_NOT_READY is the only case where we should - * look at the DNR bit. + * look at the DNR bit. Requests failed with ABORTED_BY_REQUEST + * set the DNR bit correctly since the driver controls that. */ switch (cpl->status.sct) { case NVME_SCT_GENERIC: From owner-svn-src-all@freebsd.org Mon Apr 15 16:57:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD2CB1578D4C; Mon, 15 Apr 2019 16:57:28 +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 470AD89C11; Mon, 15 Apr 2019 16:57:28 +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 212B0AD8D; Mon, 15 Apr 2019 16:57:28 +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 x3FGvRAO055000; Mon, 15 Apr 2019 16:57:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FGvRIf054999; Mon, 15 Apr 2019 16:57:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151657.x3FGvRIf054999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 16:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346246 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346246 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 470AD89C11 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 16:57:28 -0000 Author: mav Date: Mon Apr 15 16:57:27 2019 New Revision: 346246 URL: https://svnweb.freebsd.org/changeset/base/346246 Log: MFC part of r334200: - Add missing nvme_notify_fail_consumers() call on controller detach. With nvd(4) driver fixes merged it should now handle detach properly. The rest of r334200 seems too invasive and depending to be MFC'd. Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_ctrlr.c Mon Apr 15 16:29:47 2019 (r346245) +++ stable/11/sys/dev/nvme/nvme_ctrlr.c Mon Apr 15 16:57:27 2019 (r346246) @@ -1226,6 +1226,8 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev if (ctrlr->resource == NULL) goto nores; + nvme_notify_fail_consumers(ctrlr); + for (i = 0; i < NVME_MAX_NAMESPACES; i++) nvme_ns_destruct(&ctrlr->ns[i]); From owner-svn-src-all@freebsd.org Mon Apr 15 17:14:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 166B515792F6; Mon, 15 Apr 2019 17:14:52 +0000 (UTC) (envelope-from gallatin@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 B14558A53A; Mon, 15 Apr 2019 17:14:51 +0000 (UTC) (envelope-from gallatin@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 8E58EB0F7; Mon, 15 Apr 2019 17:14:51 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FHEp1K065060; Mon, 15 Apr 2019 17:14:51 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FHEpDM065058; Mon, 15 Apr 2019 17:14:51 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201904151714.x3FHEpDM065058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Mon, 15 Apr 2019 17:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346247 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 346247 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B14558A53A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 17:14:52 -0000 Author: gallatin Date: Mon Apr 15 17:14:50 2019 New Revision: 346247 URL: https://svnweb.freebsd.org/changeset/base/346247 Log: mlx5en: Enable new pfil(9) KPI ethernet filtering hooks This allows efficient filtering at packet ingress on mlx5en. Note that the packets are filtered (and potentially dropped) *before* the driver has committed to (re)allocating an mbuf for the packet. Dropped packets are treated essentially the same as an error. Nothing is allocated, and the existing buffer is recycled. This allows us to drop malicious packets at close to line rate with very little CPU use. Reviewed by: hselasky, slavash, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19063 Modified: head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Mon Apr 15 16:57:27 2019 (r346246) +++ head/sys/dev/mlx5/mlx5_en/en.h Mon Apr 15 17:14:50 2019 (r346247) @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -838,6 +839,7 @@ struct mlx5e_priv { struct mlx5e_clbr_point clbr_points[2]; u_int clbr_gen; + struct pfil_head *pfil; struct mlx5e_channel channel[]; }; Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Apr 15 16:57:27 2019 (r346246) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Apr 15 17:14:50 2019 (r346247) @@ -3664,6 +3664,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) struct sysctl_oid_list *child; int ncv = mdev->priv.eq_table.num_comp_vectors; char unit[16]; + struct pfil_head_args pa; int err; int i; u32 eth_proto_cap; @@ -3898,6 +3899,12 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) callout_init(&priv->tstmp_clbr, CALLOUT_DIRECT); mlx5e_reset_calibration_callout(priv); + pa.pa_version = PFIL_VERSION; + pa.pa_flags = PFIL_IN; + pa.pa_type = PFIL_TYPE_ETHERNET; + pa.pa_headname = ifp->if_xname; + priv->pfil = pfil_head_register(&pa); + return (priv); #ifdef RATELIMIT @@ -3972,6 +3979,12 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp if_printf(priv->ifp, "Waiting for all unlimited connections " "to terminate\n"); pause("W", hz); + } + + /* deregister pfil */ + if (priv->pfil != NULL) { + pfil_head_unregister(priv->pfil); + priv->pfil = NULL; } /* unregister device */ Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Mon Apr 15 16:57:27 2019 (r346246) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Mon Apr 15 17:14:50 2019 (r346247) @@ -430,15 +430,18 @@ mlx5e_decompress_cqes(struct mlx5e_cq *cq) static int mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) { - int i; + struct pfil_head *pfil; + int i, rv; + CURVNET_SET_QUIET(rq->ifp->if_vnet); + pfil = rq->channel->priv->pfil; for (i = 0; i < budget; i++) { struct mlx5e_rx_wqe *wqe; struct mlx5_cqe64 *cqe; struct mbuf *mb; __be16 wqe_counter_be; u16 wqe_counter; - u32 byte_cnt; + u32 byte_cnt, seglen; cqe = mlx5e_get_cqe(&rq->cq); if (!cqe) @@ -462,6 +465,39 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) rq->stats.wqe_err++; goto wq_ll_pop; } + if (pfil != NULL && PFIL_HOOKED_IN(pfil)) { + seglen = MIN(byte_cnt, MLX5E_MAX_RX_BYTES); + rv = pfil_run_hooks(rq->channel->priv->pfil, + rq->mbuf[wqe_counter].data, rq->ifp, + seglen | PFIL_MEMPTR | PFIL_IN, NULL); + + switch (rv) { + case PFIL_DROPPED: + case PFIL_CONSUMED: + /* + * Filter dropped or consumed it. In + * either case, we can just recycle + * buffer; there is no more work to do. + */ + rq->stats.packets++; + goto wq_ll_pop; + case PFIL_REALLOCED: + /* + * Filter copied it; recycle buffer + * and receive the new mbuf allocated + * by the Filter + */ + mb = pfil_mem2mbuf(rq->mbuf[wqe_counter].data); + goto rx_common; + default: + /* + * The Filter said it was OK, so + * receive like normal. + */ + KASSERT(rv == PFIL_PASS, + ("Filter returned %d!\n", rv)); + } + } if ((MHLEN - MLX5E_NET_IP_ALIGN) >= byte_cnt && (mb = m_gethdr(M_NOWAIT, MT_DATA)) != NULL) { #if (MLX5E_MAX_RX_SEGS != 1) @@ -480,7 +516,7 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) bus_dmamap_unload(rq->dma_tag, rq->mbuf[wqe_counter].dma_map); } - +rx_common: mlx5e_build_rx_mbuf(cqe, rq, mb, byte_cnt); rq->stats.bytes += byte_cnt; rq->stats.packets++; @@ -499,6 +535,7 @@ wq_ll_pop: mlx5_wq_ll_pop(&rq->wq, wqe_counter_be, &wqe->next.next_wqe_index); } + CURVNET_RESTORE(); mlx5_cqwq_update_db_record(&rq->cq.wq); From owner-svn-src-all@freebsd.org Mon Apr 15 17:32:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ACEF1579AD7; Mon, 15 Apr 2019 17:32:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 C29998AFF0; Mon, 15 Apr 2019 17:32:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B06C1B465; Mon, 15 Apr 2019 17:32:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FHWckA075968; Mon, 15 Apr 2019 17:32:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FHWcb9075967; Mon, 15 Apr 2019 17:32:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201904151732.x3FHWcb9075967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 15 Apr 2019 17:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346248 - head/sys/dev/usb/controller X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/controller X-SVN-Commit-Revision: 346248 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C29998AFF0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 17:32:39 -0000 Author: hselasky Date: Mon Apr 15 17:32:38 2019 New Revision: 346248 URL: https://svnweb.freebsd.org/changeset/base/346248 Log: Remove superfluous USB keyword. Discussed with: danfe@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/controller/ehci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Mon Apr 15 17:14:50 2019 (r346247) +++ head/sys/dev/usb/controller/ehci_pci.c Mon Apr 15 17:32:38 2019 (r346248) @@ -181,7 +181,7 @@ ehci_pci_match(device_t self) case 0x8d2d8086: return ("Intel Wellsburg USB 2.0 controller"); case 0x9c268086: - return ("Intel Lynx Point-LP USB 2.0 controller USB"); + return ("Intel Lynx Point-LP USB 2.0 controller"); case 0x00e01033: return ("NEC uPD 72010x USB 2.0 controller"); From owner-svn-src-all@freebsd.org Mon Apr 15 17:54:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E62F157A01C; Mon, 15 Apr 2019 17:54:42 +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 A3A0B8BC02; Mon, 15 Apr 2019 17:54:41 +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 89399B800; Mon, 15 Apr 2019 17:54:41 +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 x3FHsfDS086840; Mon, 15 Apr 2019 17:54:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FHsfCT086838; Mon, 15 Apr 2019 17:54:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904151754.x3FHsfCT086838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 15 Apr 2019 17:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346249 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 346249 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A3A0B8BC02 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 17:54:42 -0000 Author: mav Date: Mon Apr 15 17:54:40 2019 New Revision: 346249 URL: https://svnweb.freebsd.org/changeset/base/346249 Log: MFC r330760: Add new opcodes and statuses from NVMe 1.3a. Modified: stable/11/sys/dev/nvme/nvme.h stable/11/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme.h ============================================================================== --- stable/11/sys/dev/nvme/nvme.h Mon Apr 15 17:32:38 2019 (r346248) +++ stable/11/sys/dev/nvme/nvme.h Mon Apr 15 17:54:40 2019 (r346249) @@ -316,10 +316,31 @@ enum nvme_generic_command_status_code { NVME_SC_ABORTED_MISSING_FUSED = 0x0a, NVME_SC_INVALID_NAMESPACE_OR_FORMAT = 0x0b, NVME_SC_COMMAND_SEQUENCE_ERROR = 0x0c, + NVME_SC_INVALID_SGL_SEGMENT_DESCR = 0x0d, + NVME_SC_INVALID_NUMBER_OF_SGL_DESCR = 0x0e, + NVME_SC_DATA_SGL_LENGTH_INVALID = 0x0f, + NVME_SC_METADATA_SGL_LENGTH_INVALID = 0x10, + NVME_SC_SGL_DESCRIPTOR_TYPE_INVALID = 0x11, + NVME_SC_INVALID_USE_OF_CMB = 0x12, + NVME_SC_PRP_OFFET_INVALID = 0x13, + NVME_SC_ATOMIC_WRITE_UNIT_EXCEEDED = 0x14, + NVME_SC_OPERATION_DENIED = 0x15, + NVME_SC_SGL_OFFSET_INVALID = 0x16, + /* 0x17 - reserved */ + NVME_SC_HOST_ID_INCONSISTENT_FORMAT = 0x18, + NVME_SC_KEEP_ALIVE_TIMEOUT_EXPIRED = 0x19, + NVME_SC_KEEP_ALIVE_TIMEOUT_INVALID = 0x1a, + NVME_SC_ABORTED_DUE_TO_PREEMPT = 0x1b, + NVME_SC_SANITIZE_FAILED = 0x1c, + NVME_SC_SANITIZE_IN_PROGRESS = 0x1d, + NVME_SC_SGL_DATA_BLOCK_GRAN_INVALID = 0x1e, + NVME_SC_NOT_SUPPORTED_IN_CMB = 0x1f, NVME_SC_LBA_OUT_OF_RANGE = 0x80, NVME_SC_CAPACITY_EXCEEDED = 0x81, NVME_SC_NAMESPACE_NOT_READY = 0x82, + NVME_SC_RESERVATION_CONFLICT = 0x83, + NVME_SC_FORMAT_IN_PROGRESS = 0x84, }; /* command specific status codes */ @@ -336,6 +357,29 @@ enum nvme_command_specific_status_code { NVME_SC_INVALID_LOG_PAGE = 0x09, NVME_SC_INVALID_FORMAT = 0x0a, NVME_SC_FIRMWARE_REQUIRES_RESET = 0x0b, + NVME_SC_INVALID_QUEUE_DELETION = 0x0c, + NVME_SC_FEATURE_NOT_SAVEABLE = 0x0d, + NVME_SC_FEATURE_NOT_CHANGEABLE = 0x0e, + NVME_SC_FEATURE_NOT_NS_SPECIFIC = 0x0f, + NVME_SC_FW_ACT_REQUIRES_NVMS_RESET = 0x10, + NVME_SC_FW_ACT_REQUIRES_RESET = 0x11, + NVME_SC_FW_ACT_REQUIRES_TIME = 0x12, + NVME_SC_FW_ACT_PROHIBITED = 0x13, + NVME_SC_OVERLAPPING_RANGE = 0x14, + NVME_SC_NS_INSUFFICIENT_CAPACITY = 0x15, + NVME_SC_NS_ID_UNAVAILABLE = 0x16, + /* 0x17 - reserved */ + NVME_SC_NS_ALREADY_ATTACHED = 0x18, + NVME_SC_NS_IS_PRIVATE = 0x19, + NVME_SC_NS_NOT_ATTACHED = 0x1a, + NVME_SC_THIN_PROV_NOT_SUPPORTED = 0x1b, + NVME_SC_CTRLR_LIST_INVALID = 0x1c, + NVME_SC_SELT_TEST_IN_PROGRESS = 0x1d, + NVME_SC_BOOT_PART_WRITE_PROHIB = 0x1e, + NVME_SC_INVALID_CTRLR_ID = 0x1f, + NVME_SC_INVALID_SEC_CTRLR_STATE = 0x20, + NVME_SC_INVALID_NUM_OF_CTRLR_RESRC = 0x21, + NVME_SC_INVALID_RESOURCE_ID = 0x22, NVME_SC_CONFLICTING_ATTRIBUTES = 0x80, NVME_SC_INVALID_PROTECTION_INFO = 0x81, @@ -351,6 +395,7 @@ enum nvme_media_error_status_code { NVME_SC_REFERENCE_TAG_CHECK_ERROR = 0x84, NVME_SC_COMPARE_FAILURE = 0x85, NVME_SC_ACCESS_DENIED = 0x86, + NVME_SC_DEALLOCATED_OR_UNWRITTEN = 0x87, }; /* admin opcodes */ @@ -372,11 +417,20 @@ enum nvme_admin_opcode { /* 0x0e-0x0f - reserved */ NVME_OPC_FIRMWARE_ACTIVATE = 0x10, NVME_OPC_FIRMWARE_IMAGE_DOWNLOAD = 0x11, + NVME_OPC_DEVICE_SELF_TEST = 0x14, NVME_OPC_NAMESPACE_ATTACHMENT = 0x15, + NVME_OPC_KEEP_ALIVE = 0x18, + NVME_OPC_DIRECTIVE_SEND = 0x19, + NVME_OPC_DIRECTIVE_RECEIVE = 0x1a, + NVME_OPC_VIRTUALIZATION_MANAGEMENT = 0x1c, + NVME_OPC_NVME_MI_SEND = 0x1d, + NVME_OPC_NVME_MI_RECEIVE = 0x1e, + NVME_OPC_DOORBELL_BUFFER_CONFIG = 0x7c, NVME_OPC_FORMAT_NVM = 0x80, NVME_OPC_SECURITY_SEND = 0x81, NVME_OPC_SECURITY_RECEIVE = 0x82, + NVME_OPC_SANITIZE = 0x84, }; /* nvme nvm opcodes */ @@ -387,8 +441,17 @@ enum nvme_nvm_opcode { /* 0x03 - reserved */ NVME_OPC_WRITE_UNCORRECTABLE = 0x04, NVME_OPC_COMPARE = 0x05, - /* 0x06-0x07 - reserved */ + /* 0x06 - reserved */ + NVME_OPC_WRITE_ZEROES = 0x08, + /* 0x07 - reserved */ NVME_OPC_DATASET_MANAGEMENT = 0x09, + /* 0x0a-0x0c - reserved */ + NVME_OPC_RESERVATION_REGISTER = 0x0d, + NVME_OPC_RESERVATION_REPORT = 0x0e, + /* 0x0f-0x10 - reserved */ + NVME_OPC_RESERVATION_ACQUIRE = 0x11, + /* 0x12-0x14 - reserved */ + NVME_OPC_RESERVATION_RELEASE = 0x15, }; enum nvme_feature { Modified: stable/11/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 17:32:38 2019 (r346248) +++ stable/11/sys/dev/nvme/nvme_qpair.c Mon Apr 15 17:54:40 2019 (r346249) @@ -57,9 +57,19 @@ static struct nvme_opcode_string admin_opcode[] = { { NVME_OPC_ASYNC_EVENT_REQUEST, "ASYNC EVENT REQUEST" }, { NVME_OPC_FIRMWARE_ACTIVATE, "FIRMWARE ACTIVATE" }, { NVME_OPC_FIRMWARE_IMAGE_DOWNLOAD, "FIRMWARE IMAGE DOWNLOAD" }, + { NVME_OPC_DEVICE_SELF_TEST, "DEVICE SELF-TEST" }, + { NVME_OPC_NAMESPACE_ATTACHMENT, "NAMESPACE ATTACHMENT" }, + { NVME_OPC_KEEP_ALIVE, "KEEP ALIVE" }, + { NVME_OPC_DIRECTIVE_SEND, "DIRECTIVE SEND" }, + { NVME_OPC_DIRECTIVE_RECEIVE, "DIRECTIVE RECEIVE" }, + { NVME_OPC_VIRTUALIZATION_MANAGEMENT, "VIRTUALIZATION MANAGEMENT" }, + { NVME_OPC_NVME_MI_SEND, "NVME-MI SEND" }, + { NVME_OPC_NVME_MI_RECEIVE, "NVME-MI RECEIVE" }, + { NVME_OPC_DOORBELL_BUFFER_CONFIG, "DOORBELL BUFFER CONFIG" }, { NVME_OPC_FORMAT_NVM, "FORMAT NVM" }, { NVME_OPC_SECURITY_SEND, "SECURITY SEND" }, { NVME_OPC_SECURITY_RECEIVE, "SECURITY RECEIVE" }, + { NVME_OPC_SANITIZE, "SANITIZE" }, { 0xFFFF, "ADMIN COMMAND" } }; @@ -69,7 +79,12 @@ static struct nvme_opcode_string io_opcode[] = { { NVME_OPC_READ, "READ" }, { NVME_OPC_WRITE_UNCORRECTABLE, "WRITE UNCORRECTABLE" }, { NVME_OPC_COMPARE, "COMPARE" }, + { NVME_OPC_WRITE_ZEROES, "WRITE ZEROES" }, { NVME_OPC_DATASET_MANAGEMENT, "DATASET MANAGEMENT" }, + { NVME_OPC_RESERVATION_REGISTER, "RESERVATION REGISTER" }, + { NVME_OPC_RESERVATION_REPORT, "RESERVATION REPORT" }, + { NVME_OPC_RESERVATION_ACQUIRE, "RESERVATION ACQUIRE" }, + { NVME_OPC_RESERVATION_RELEASE, "RESERVATION RELEASE" }, { 0xFFFF, "IO COMMAND" } }; @@ -125,6 +140,7 @@ nvme_io_qpair_print_command(struct nvme_qpair *qpair, case NVME_OPC_READ: case NVME_OPC_WRITE_UNCORRECTABLE: case NVME_OPC_COMPARE: + case NVME_OPC_WRITE_ZEROES: nvme_printf(qpair->ctrlr, "%s sqid:%d cid:%d nsid:%d " "lba:%llu len:%d\n", get_io_opcode_string(cmd->opc), qpair->id, cmd->cid, @@ -134,6 +150,10 @@ nvme_io_qpair_print_command(struct nvme_qpair *qpair, break; case NVME_OPC_FLUSH: case NVME_OPC_DATASET_MANAGEMENT: + case NVME_OPC_RESERVATION_REGISTER: + case NVME_OPC_RESERVATION_REPORT: + case NVME_OPC_RESERVATION_ACQUIRE: + case NVME_OPC_RESERVATION_RELEASE: nvme_printf(qpair->ctrlr, "%s sqid:%d cid:%d nsid:%d\n", get_io_opcode_string(cmd->opc), qpair->id, cmd->cid, cmd->nsid); @@ -175,9 +195,30 @@ static struct nvme_status_string generic_status[] = { { NVME_SC_ABORTED_MISSING_FUSED, "ABORTED - MISSING FUSED" }, { NVME_SC_INVALID_NAMESPACE_OR_FORMAT, "INVALID NAMESPACE OR FORMAT" }, { NVME_SC_COMMAND_SEQUENCE_ERROR, "COMMAND SEQUENCE ERROR" }, + { NVME_SC_INVALID_SGL_SEGMENT_DESCR, "INVALID SGL SEGMENT DESCRIPTOR" }, + { NVME_SC_INVALID_NUMBER_OF_SGL_DESCR, "INVALID NUMBER OF SGL DESCRIPTORS" }, + { NVME_SC_DATA_SGL_LENGTH_INVALID, "DATA SGL LENGTH INVALID" }, + { NVME_SC_METADATA_SGL_LENGTH_INVALID, "METADATA SGL LENGTH INVALID" }, + { NVME_SC_SGL_DESCRIPTOR_TYPE_INVALID, "SGL DESCRIPTOR TYPE INVALID" }, + { NVME_SC_INVALID_USE_OF_CMB, "INVALID USE OF CONTROLLER MEMORY BUFFER" }, + { NVME_SC_PRP_OFFET_INVALID, "PRP OFFET INVALID" }, + { NVME_SC_ATOMIC_WRITE_UNIT_EXCEEDED, "ATOMIC WRITE UNIT EXCEEDED" }, + { NVME_SC_OPERATION_DENIED, "OPERATION DENIED" }, + { NVME_SC_SGL_OFFSET_INVALID, "SGL OFFSET INVALID" }, + { NVME_SC_HOST_ID_INCONSISTENT_FORMAT, "HOST IDENTIFIER INCONSISTENT FORMAT" }, + { NVME_SC_KEEP_ALIVE_TIMEOUT_EXPIRED, "KEEP ALIVE TIMEOUT EXPIRED" }, + { NVME_SC_KEEP_ALIVE_TIMEOUT_INVALID, "KEEP ALIVE TIMEOUT INVALID" }, + { NVME_SC_ABORTED_DUE_TO_PREEMPT, "COMMAND ABORTED DUE TO PREEMPT AND ABORT" }, + { NVME_SC_SANITIZE_FAILED, "SANITIZE FAILED" }, + { NVME_SC_SANITIZE_IN_PROGRESS, "SANITIZE IN PROGRESS" }, + { NVME_SC_SGL_DATA_BLOCK_GRAN_INVALID, "SGL_DATA_BLOCK_GRANULARITY_INVALID" }, + { NVME_SC_NOT_SUPPORTED_IN_CMB, "COMMAND NOT SUPPORTED FOR QUEUE IN CMB" }, + { NVME_SC_LBA_OUT_OF_RANGE, "LBA OUT OF RANGE" }, { NVME_SC_CAPACITY_EXCEEDED, "CAPACITY EXCEEDED" }, { NVME_SC_NAMESPACE_NOT_READY, "NAMESPACE NOT READY" }, + { NVME_SC_RESERVATION_CONFLICT, "RESERVATION CONFLICT" }, + { NVME_SC_FORMAT_IN_PROGRESS, "FORMAT IN PROGRESS" }, { 0xFFFF, "GENERIC" } }; @@ -193,6 +234,29 @@ static struct nvme_status_string command_specific_stat { NVME_SC_INVALID_LOG_PAGE, "INVALID LOG PAGE" }, { NVME_SC_INVALID_FORMAT, "INVALID FORMAT" }, { NVME_SC_FIRMWARE_REQUIRES_RESET, "FIRMWARE REQUIRES RESET" }, + { NVME_SC_INVALID_QUEUE_DELETION, "INVALID QUEUE DELETION" }, + { NVME_SC_FEATURE_NOT_SAVEABLE, "FEATURE IDENTIFIER NOT SAVEABLE" }, + { NVME_SC_FEATURE_NOT_CHANGEABLE, "FEATURE NOT CHANGEABLE" }, + { NVME_SC_FEATURE_NOT_NS_SPECIFIC, "FEATURE NOT NAMESPACE SPECIFIC" }, + { NVME_SC_FW_ACT_REQUIRES_NVMS_RESET, "FIRMWARE ACTIVATION REQUIRES NVM SUBSYSTEM RESET" }, + { NVME_SC_FW_ACT_REQUIRES_RESET, "FIRMWARE ACTIVATION REQUIRES RESET" }, + { NVME_SC_FW_ACT_REQUIRES_TIME, "FIRMWARE ACTIVATION REQUIRES MAXIMUM TIME VIOLATION" }, + { NVME_SC_FW_ACT_PROHIBITED, "FIRMWARE ACTIVATION PROHIBITED" }, + { NVME_SC_OVERLAPPING_RANGE, "OVERLAPPING RANGE" }, + { NVME_SC_NS_INSUFFICIENT_CAPACITY, "NAMESPACE INSUFFICIENT CAPACITY" }, + { NVME_SC_NS_ID_UNAVAILABLE, "NAMESPACE IDENTIFIER UNAVAILABLE" }, + { NVME_SC_NS_ALREADY_ATTACHED, "NAMESPACE ALREADY ATTACHED" }, + { NVME_SC_NS_IS_PRIVATE, "NAMESPACE IS PRIVATE" }, + { NVME_SC_NS_NOT_ATTACHED, "NS NOT ATTACHED" }, + { NVME_SC_THIN_PROV_NOT_SUPPORTED, "THIN PROVISIONING NOT SUPPORTED" }, + { NVME_SC_CTRLR_LIST_INVALID, "CONTROLLER LIST INVALID" }, + { NVME_SC_SELT_TEST_IN_PROGRESS, "DEVICE SELT-TEST IN PROGRESS" }, + { NVME_SC_BOOT_PART_WRITE_PROHIB, "BOOT PARTITION WRITE PROHIBITED" }, + { NVME_SC_INVALID_CTRLR_ID, "INVALID CONTROLLER IDENTIFIER" }, + { NVME_SC_INVALID_SEC_CTRLR_STATE, "INVALID SECONDARY CONTROLLER STATE" }, + { NVME_SC_INVALID_NUM_OF_CTRLR_RESRC, "INVALID NUMBER OF CONTROLLER RESOURCES" }, + { NVME_SC_INVALID_RESOURCE_ID, "INVALID RESOURCE IDENTIFIER" }, + { NVME_SC_CONFLICTING_ATTRIBUTES, "CONFLICTING ATTRIBUTES" }, { NVME_SC_INVALID_PROTECTION_INFO, "INVALID PROTECTION INFO" }, { NVME_SC_ATTEMPTED_WRITE_TO_RO_PAGE, "WRITE TO RO PAGE" }, @@ -207,6 +271,7 @@ static struct nvme_status_string media_error_status[] { NVME_SC_REFERENCE_TAG_CHECK_ERROR, "REFERENCE TAG CHECK ERROR" }, { NVME_SC_COMPARE_FAILURE, "COMPARE FAILURE" }, { NVME_SC_ACCESS_DENIED, "ACCESS DENIED" }, + { NVME_SC_DEALLOCATED_OR_UNWRITTEN, "DEALLOCATED OR UNWRITTEN LOGICAL BLOCK" }, { 0xFFFF, "MEDIA ERROR" } }; From owner-svn-src-all@freebsd.org Mon Apr 15 18:40:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 893F2157AE56; Mon, 15 Apr 2019 18:40:38 +0000 (UTC) (envelope-from cem@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 356C58D333; Mon, 15 Apr 2019 18:40:38 +0000 (UTC) (envelope-from cem@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 20AC3C183; Mon, 15 Apr 2019 18:40:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FIecJY009253; Mon, 15 Apr 2019 18:40:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FIeaEQ009242; Mon, 15 Apr 2019 18:40:36 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201904151840.x3FIeaEQ009242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 15 Apr 2019 18:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys X-SVN-Commit-Revision: 346250 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 356C58D333 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 18:40:38 -0000 Author: cem Date: Mon Apr 15 18:40:36 2019 New Revision: 346250 URL: https://svnweb.freebsd.org/changeset/base/346250 Log: random(4): Block read_random(9) on initial seeding read_random() is/was used, mostly without error checking, in a lot of very sensitive places in the kernel -- including seeding the widely used arc4random(9). Most uses, especially arc4random(9), should block until the device is seeded rather than proceeding with a bogus or empty seed. I did not spy any obvious kernel consumers where blocking would be inappropriate (in the sense that lack of entropy would be ok -- I did not investigate locking angle thoroughly). In many instances, arc4random_buf(9) or that family of APIs would be more appropriate anyway; that work was done in r345865. A minor cleanup was made to the implementation of the READ_RANDOM function: instead of using a variable-length array on the stack to temporarily store all full random blocks sufficient to satisfy the requested 'len', only store a single block on the stack. This has some benefit in terms of reducing stack usage, reducing memcpy overhead and reducing devrandom output leakage via the stack. Additionally, the stack block is now safely zeroed if it was used. One caveat of this change is that the kern.arandom sysctl no longer returns zero bytes immediately if the random device is not seeded. This means that FreeBSD-specific userspace applications which attempted to handle an unseeded random device may be broken by this change. If such behavior is needed, it can be replaced by the more portable getrandom(2) GRND_NONBLOCK option. On any typical FreeBSD system, entropy is persisted on read/write media and used to seed the random device very early in boot, and blocking is never a problem. This change primarily impacts the behavior of /dev/random on embedded systems with read-only media that do not configure "nodevice random". We toggle the default from 'charge on blindly with no entropy' to 'block indefinitely.' This default is safer, but may cause frustration. Embedded system designers using FreeBSD have several options. The most obvious is to plan to have a small writable NVRAM or NAND to persist entropy, like larger systems. Early entropy can be fed from any loader, or by writing directly to /dev/random during boot. Some embedded SoCs now provide a fast hardware entropy source; this would also work for quickly seeding Fortuna. A 3rd option would be creating an embedded-specific, more simplistic random module, like that designed by DJB in [1] (this design still requires a small rewritable media for forward secrecy). Finally, the least preferred option might be "nodevice random", although I plan to remove this in a subsequent revision. To help developers emulate the behavior of these embedded systems on ordinary workstations, the tunable kern.random.block_seeded_status was added. When set to 1, it blocks the random device. I attempted to document this change in random.4 and random.9 and ran into a bunch of out-of-date or irrelevant or inaccurate content and ended up rototilling those documents more than I intended to. Sorry. I think they're in a better state now. PR: 230875 Reviewed by: delphij, markm (earlier version) Approved by: secteam(delphij), devrandom(markm) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D19744 Modified: head/share/man/man4/random.4 head/share/man/man9/random.9 head/sys/dev/random/fortuna.c head/sys/dev/random/random_harvestq.c head/sys/dev/random/random_infra.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/kern/kern_mib.c head/sys/libkern/arc4random.c head/sys/sys/random.h Modified: head/share/man/man4/random.4 ============================================================================== --- head/share/man/man4/random.4 Mon Apr 15 17:54:40 2019 (r346249) +++ head/share/man/man4/random.4 Mon Apr 15 18:40:36 2019 (r346250) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 26, 2018 +.Dd April 15, 2019 .Dt RANDOM 4 .Os .Sh NAME @@ -32,63 +32,44 @@ .Sh SYNOPSIS .Cd "device random" .Cd "options RANDOM_LOADABLE" +.Cd "options RANDOM_ENABLE_ETHER" .Cd "options RANDOM_ENABLE_UMA" .Sh DESCRIPTION The .Nm -device -returns an endless supply of random bytes when read. -It also accepts and reads data -as any ordinary file. +device returns an endless supply of random bytes when read. .Pp The generator will start in an .Em unseeded -state, and will block reads until -it is seeded for the first time. -This may cause trouble at system boot -when keys and the like -are generated from -.Nm -so steps should be taken to ensure a -seeding as soon as possible. +state, and will block reads until it is seeded for the first time. .Pp -It is also possible -to read random bytes -by using the KERN_ARND sysctl. -On the command line -this could be done by +To provide prompt access to the random device at boot time, +.Fx +automatically persists some entropy data in +.Pa /boot/entropy +for the loader to provide to the kernel. +Additional entropy is regularly saved in +.Pa /var/db/entropy . +This saved entropy is sufficient to unblock the random device on devices with +writeable media. .Pp -.Dl "sysctl -x -B 16 kern.arandom" +Embedded applications without writable media must determine their own scheme +for re-seeding the random device on boot, or accept that the device +will remain unseeded and block reads indefinitely. +See +.Sx SECURITY CONSIDERATIONS +for more detail. .Pp -This sysctl will not return -random bytes unless -the -.Nm -device is seeded. +In addition to +.Xr read 2 , +the direct output of the abstract kernel entropy device can be read with +.Xr getrandom 2 , +.Xr getentropy 3 , +or the +.Xr sysctl 8 +pseudo-variable +.Va kern.arandom . .Pp -This initial seeding -of random number generators -is a bootstrapping problem -that needs very careful attention. -In some cases, -it may be difficult -to find enough randomness -to seed a random number generator -until a system is fully operational, -but the system requires random numbers -to become fully operational. -It is (or more accurately should be) -critically important that the -.Nm -device is seeded -before the first time it is used. -In the case where a dummy or "blocking-only" -device is used, -it is the responsibility -of the system architect -to ensure that no blocking reads -hold up critical processes. -.Pp To see the current settings of the software .Nm device, use the command line: @@ -97,17 +78,20 @@ device, use the command line: .Pp which results in something like: .Bd -literal -offset indent +kern.random.block_seeded_status: 0 kern.random.fortuna.minpoolsize: 64 -kern.random.harvest.mask_symbolic: [HIGH_PERFORMANCE], ... ,CACHED -kern.random.harvest.mask_bin: 00111111111 -kern.random.harvest.mask: 511 +kern.random.harvest.mask_symbolic: ENABLEDSOURCE,[DISABLEDSOURCE],...,CACHED +kern.random.harvest.mask_bin: 00000010000000111011111 +kern.random.harvest.mask: 66015 +kern.random.use_chacha20_cipher: 0 kern.random.random_sources: 'Intel Secure Key RNG' .Ed .Pp Other than -.Dl kern.random.fortuna.minpoolsize +.Va kern.random.block_seeded_status , +.Va kern.random.fortuna.minpoolsize , and -.Dl kern.random.harvest.mask +.Va kern.random.harvest.mask , all settings are read-only. .Pp The @@ -137,17 +121,66 @@ and .Va kern.random.harvest.mask_symbolic sysctls can be used to confirm -that the choices are correct. -Note that disabled items +settings in a human readable form. +Disabled items in the latter item are listed in square brackets. See .Xr random_harvest 9 for more on the harvesting of entropy. +.Sh FILES +.Bl -tag -width ".Pa /dev/urandom" +.It Pa /dev/random +.It Pa /dev/urandom +.El +.Sh SEE ALSO +.Xr getrandom 2 , +.Xr arc4random 3 , +.Xr getentropy 3 , +.Xr random 3 , +.Xr sysctl 8 , +.Xr random 9 +.Rs +.%A Ferguson +.%A Schneier +.%A Kohno +.%B Cryptography Engineering +.%I Wiley +.%O ISBN 978-0-470-47424-2 +.Re +.Sh HISTORY +A +.Nm +device appeared in +.Fx 2.2 . +The implementation was changed to the +.Em Yarrow algorithm in +.Fx 5.0 . +In +.Fx 11.0 , +the Fortuna algorithm was introduced as the default. +In +.Fx 12.0 , +Yarrow was removed entirely. +.Sh AUTHORS +.An -nosplit +The current +.Nm +code was authored by +.An Mark R V Murray , +with significant contributions from many people. .Pp +The +.Em Fortuna +algorithm was designed by +.An Niels Ferguson , +.An Bruce Schneier , +and +.An Tadayoshi Kohno . +.Sh CAVEATS When .Cd "options RANDOM_LOADABLE" -is used, +is enabled, the .Pa /dev/random device is not created @@ -155,13 +188,9 @@ until an "algorithm module" is loaded. The only module built by default is .Em random_fortuna . -The -.Em random_yarrow -module was removed in -.Fx 12 . -Note that this loadable module -is slightly less efficient -than its compiled-in equivalent. +Loadable random modules +are less efficient +than their compiled-in equivalents. This is because some functions must be locked against load and unload events, @@ -170,174 +199,40 @@ to allow for removal. .Pp When .Cd "options RANDOM_ENABLE_UMA" -is used, +is enabled, the .Pa /dev/random device will obtain entropy from the zone allocator. -This is potentially very high rate, -and if so will be of questionable use. -If this is the case, -use of this option -is not recommended. -Determining this is not trivial, -so experimenting and measurement -using tools such as -.Xr dtrace 1 -will be required. -.Sh RANDOMNESS -The use of randomness in the field of computing -is a rather subtle issue because randomness means -different things to different people. -Consider generating a password randomly, -simulating a coin tossing experiment or -choosing a random back-off period when a server does not respond. -Each of these tasks requires random numbers, -but the random numbers in each case have different requirements. +This is a very high rate source with significant performance impact. +Therefore, it is disabled by default. .Pp -Generation of passwords, session keys and the like -requires cryptographic randomness. -A cryptographic random number generator should be designed -so that its output is difficult to guess, -even if a lot of auxiliary information is known -(such as when it was seeded, subsequent or previous output, and so on). -On -.Fx , -seeding for cryptographic random number generators is provided by the +When +.Cd "options RANDOM_ENABLE_ETHER" +is enabled, the .Nm -device, -which provides real randomness. -The -.Xr arc4random 3 -library call provides a pseudo-random sequence -which is generally reckoned to be suitable for -simple cryptographic use. -The OpenSSL library also provides functions for managing randomness -via functions such as -.Xr RAND_bytes 3 -and -.Xr RAND_add 3 . -Note that OpenSSL uses the -.Nm -device for seeding automatically. +device will obtain entropy from +.Vt mbuf +structures passing through the network stack. +This source is both extremely expensive and a poor source of entropy, so it is +disabled by default. +.Sh SECURITY CONSIDERATIONS +The initial seeding +of random number generators +is a bootstrapping problem +that needs very careful attention. +When writable media is available, the +.Em Fortuna +paper describes a robust system for rapidly reseeding the device. .Pp -Randomness for simulation is required in engineering or -scientific software and games. -The first requirement of these applications is -that the random numbers produced conform to some well-known, -usually uniform, distribution. -The sequence of numbers should also appear numerically uncorrelated, -as simulation often assumes independence of its random inputs. -Often it is desirable to reproduce -the results of a simulation exactly, -so that if the generator is seeded in the same way, -it should produce the same results. -A peripheral concern for simulation is -the speed of a random number generator. +In some embedded cases, it may be difficult to find enough randomness to seed a +random number generator until a system is fully operational. +In these cases, is the responsibility of the system architect to ensure that +blocking is acceptable, or that the random device is seeded. +(This advice does not apply to typical consumer systems.) .Pp -Another issue in simulation is -the size of the state associated with the random number generator, and -how frequently it repeats itself. -For example, -a program which shuffles a pack of cards should have 52!\& possible outputs, -which requires the random number generator to have 52!\& starting states. -This means the seed should have at least log_2(52!) ~ 226 bits of state -if the program is to stand a chance of outputting all possible sequences, -and the program needs some unbiased way of generating these bits. -Again, -the +To emulate embedded systems, developers may set the +.Va kern.random.block_seeded_status +tunable to 1 to verify boot does not require early availability of the .Nm -device could be used for seeding here, -but in practice, smaller seeds are usually considered acceptable. -.Pp -.Fx -provides two families of functions which are considered -suitable for simulation. -The -.Xr random 3 -family of functions provides a random integer -between 0 to -.if t 2\u\s731\s10\d\(mi1. -.if n (2**31)\(mi1. -The functions -.Xr srandom 3 , -.Xr initstate 3 -and -.Xr setstate 3 -are provided for deterministically setting -the state of the generator and -the function -.Xr srandomdev 3 -is provided for setting the state via the -.Nm device. -The -.Xr drand48 3 -family of functions are also provided, -which provide random floating point numbers in various ranges. -.Pp -Randomness that is used for collision avoidance -(for example, in certain network protocols) -has slightly different semantics again. -It is usually expected that the numbers will be uniform, -as this produces the lowest chances of collision. -Here again, -the seeding of the generator is very important, -as it is required that different instances of -the generator produce independent sequences. -However, the guessability or reproducibility of the sequence is unimportant, -unlike the previous cases. -.Pp -.Fx -does also provide the traditional -.Xr rand 3 -library call, -for compatibility purposes. -However, -it is known to be poor for simulation and -absolutely unsuitable for cryptographic purposes, -so its use is discouraged. -.Sh FILES -.Bl -tag -width ".Pa /dev/random" -.It Pa /dev/random -.El -.Sh SEE ALSO -.Xr arc4random 3 , -.Xr drand48 3 , -.Xr rand 3 , -.Xr RAND_add 3 , -.Xr RAND_bytes 3 , -.Xr random 3 , -.Xr sysctl 8 , -.Xr random 9 -.Rs -.%A Ferguson -.%A Schneier -.%A Kohno -.%B Cryptography Engineering -.%I Wiley -.%O ISBN 978-0-470-47424-2 -.Re -.Sh HISTORY -A -.Nm -device appeared in -.Fx 2.2 . -The current software implementation, -introduced in -.Fx 10.0 , -is by -.An Mark R V Murray , -and is an implementation of the -.Em Fortuna -algorithm by Ferguson -.Em et al . -It replaces the previous -.Em Yarrow -implementation, -introduced in -.Fx 5.0 . -The Yarrow algorithm -is no longer supported -by its authors, -and is therefore no longer available. Modified: head/share/man/man9/random.9 ============================================================================== --- head/share/man/man9/random.9 Mon Apr 15 17:54:40 2019 (r346249) +++ head/share/man/man9/random.9 Mon Apr 15 18:40:36 2019 (r346250) @@ -26,12 +26,13 @@ .\" .\" $FreeBSD$ .\" " -.Dd July 16, 2015 +.Dd April 15, 2019 .Dt RANDOM 9 .Os .Sh NAME .Nm arc4rand , .Nm arc4random , +.Nm arc4random_buf , .Nm random , .Nm read_random , .Nm read_random_uio , @@ -39,86 +40,72 @@ .Nd supply pseudo-random numbers .Sh SYNOPSIS .In sys/libkern.h +.Ft uint32_t +.Fn arc4random "void" .Ft void -.Fn srandom "u_long seed" -.Ft u_long -.Fn random "void" +.Fn arc4random_buf "void *ptr" "size_t len" .Ft void .Fn arc4rand "void *ptr" "u_int length" "int reseed" -.Ft uint32_t -.Fn arc4random "void" .Pp .In sys/random.h -.Ft int +.Ft void .Fn read_random "void *buffer" "int count" .Ft int .Fn read_random_uio "struct uio *uio" "bool nonblock" +.Ss LEGACY ROUTINES +.In sys/libkern.h +.Ft void +.Fn srandom "u_long seed" +.Ft u_long +.Fn random "void" .Sh DESCRIPTION The -.Fn random -function will by default produce -a sequence of numbers -that can be duplicated -by calling -.Fn srandom -with some constant -as the -.Fa seed . -The -.Fn srandom -function may be called with any arbitrary -.Fa seed -value to get slightly more unpredictable numbers. -It is important to remember that the -.Fn random -function is entirely predictable, -and is therefore not of use where -knowledge of the sequence of numbers -may be of benefit to an attacker. +.Fn arc4random +and +.Fn arc4random_buf +functions will return very good quality random numbers, suited for +security-related purposes. +Both are wrappers around the underlying +.Fn arc4rand +interface. +.Fn arc4random +returns a 32-bit random value, while +.Fn arc4random_buf +fills +.Fa ptr +with +.Fa len +bytes of random data. .Pp The .Fn arc4rand -function will return very good quality random numbers, -better suited -for security-related purposes. -The random numbers from -.Fn arc4rand -are seeded from the entropy device -if it is available. -Automatic reseeds happen -after a certain timeinterval -and after a certain number of bytes -have been delivered. -A forced reseed -can be forced -by passing a non-zero -value in the +CSPRNG +is seeded from the +.Xr random 4 +kernel abstract entropy device. +Automatic reseeding happens at unspecified time and bytes (of output) +intervals. +A reseed can be forced by passing a non-zero .Fa reseed -argument. +value. .Pp The .Fn read_random -function is used to return entropy directly from the entropy device -if it has been loaded. -If the entropy device is not loaded, then -the +function is used to read entropy directly from the kernel abstract entropy +device. +.Fn read_random +blocks if and until the entropy device is seeded. +The provided .Fa buffer -is ignored -and zero is returned. -The -.Fa buffer is filled with no more than .Fa count bytes. It is strongly advised that .Fn read_random -is not used; -instead use +is not used directly; +instead, use the .Fn arc4rand -unless it is -necessary to know -that no entropy -has been returned. +family of functions. .Pp The .Fn read_random_uio @@ -129,50 +116,35 @@ on The .Fa uio argument points to a buffer where random data should be stored. -This function only returns data if the random device is seeded. -It blocks if unseeded, -except when the +If .Fa nonblock -argument is true. +is true and the random device is not seeded, this function does not return any +data. +Otherwise, this function may block interruptibly until the random device is seeded. +If the function is interrupted before the random device is seeded, no data is +returned. .Pp -All the bits returned by -.Fn random , -.Fn arc4rand , -.Fn read_random , -and -.Fn read_random_uio -are usable. -For example, -.Sq Li random()&01 -will produce a random binary value. -.Pp -The -.Fn arc4random -is a convenience function which calls -.Fn arc4rand -to return a 32 bit pseudo-random integer. +The legacy +.Fn random +function will produce a sequence of numbers that can be duplicated by calling +.Fn srandom +with some constant as the +.Fa seed . +The legacy +.Fn srandom +function may be called with any +.Fa seed +value. +It is strongly advised that the +.Fn random +function not be used to generate random numbers. +See +.Sx SECURITY CONSIDERATIONS . .Sh RETURN VALUES The -.Fn random -function uses -a non-linear additive feedback random number generator -employing a default table -of size 31 -containing long integers -to return successive pseudo-random -numbers in the range from 0 to -.if t 2\u\s731\s10\d\(mi1. -.if n (2**31)\(mi1. -The period of this random number generator -is very large, -approximately -.if t 16\(mu(2\u\s731\s10\d\(mi1). -.if n 16*((2**31)\(mi1). -.Pp -The .Fn arc4rand -function uses the RC4 algorithm -to generate successive pseudo-random bytes. +function uses the Chacha20 algorithm to generate a pseudo-random sequence of +bytes. The .Fn arc4random function uses @@ -191,6 +163,23 @@ the number of bytes placed in .Fn read_random_uio returns zero when successful, otherwise an error code is returned. +.Pp +The legacy +.Fn random +function uses +a non-linear additive feedback random number generator +employing a default table +of size 31 +containing long integers +to return successive pseudo-random +numbers in the range from 0 to +.if t 2\u\s731\s10\d\(mi1. +.if n (2**31)\(mi1. +The period of this random number generator +is very large, +approximately +.if t 16\(mu(2\u\s731\s10\d\(mi1). +.if n 16*((2**31)\(mi1). .Sh ERRORS .Fn read_random_uio may fail if: @@ -210,3 +199,19 @@ wrote .An Mark R V Murray wrote .Fn read_random . +.Sh SECURITY CONSIDERATIONS +Do not use +.Fn random +or +.Fn srandom +in new code. +.Pp +It is important to remember that the +.Fn random +function is entirely predictable. +It is easy for attackers to predict future output of +.Fn random +by recording some generated values. +We cannot emphasize strongly enough that +.Fn random +must not be used to generate values that are intended to be unpredictable. Modified: head/sys/dev/random/fortuna.c ============================================================================== --- head/sys/dev/random/fortuna.c Mon Apr 15 17:54:40 2019 (r346249) +++ head/sys/dev/random/fortuna.c Mon Apr 15 18:40:36 2019 (r346250) @@ -451,16 +451,22 @@ random_fortuna_read(uint8_t *buf, u_int bytecount) RANDOM_RESEED_UNLOCK(); } +#ifdef _KERNEL +static bool block_seeded_status = false; +SYSCTL_BOOL(_kern_random, OID_AUTO, block_seeded_status, CTLFLAG_RWTUN, + &block_seeded_status, 0, + "If non-zero, pretend Fortuna is in an unseeded state. By setting " + "this as a tunable, boot can be tested as if the random device is " + "unavailable."); +#endif + bool random_fortuna_seeded(void) { #ifdef _KERNEL - /* When set, act as if we are not seeded. */ - KFAIL_POINT_CODE(DEBUG_FP, random_fortuna_seeded, { - if (RETURN_VALUE != 0) - fortuna_state.fs_counter = UINT128_ZERO; - }); + if (block_seeded_status) + return (false); #endif return (!uint128_is_zero(fortuna_state.fs_counter)); Modified: head/sys/dev/random/random_harvestq.c ============================================================================== --- head/sys/dev/random/random_harvestq.c Mon Apr 15 17:54:40 2019 (r346249) +++ head/sys/dev/random/random_harvestq.c Mon Apr 15 18:40:36 2019 (r346250) @@ -421,11 +421,6 @@ random_harvestq_prime(void *unused __unused) if (keyfile != NULL) { data = preload_fetch_addr(keyfile); size = preload_fetch_size(keyfile); - /* skip the first bit of the stash so others like arc4 can also have some. */ - if (size > RANDOM_CACHED_SKIP_START) { - data += RANDOM_CACHED_SKIP_START; - size -= RANDOM_CACHED_SKIP_START; - } /* Trim the size. If the admin has a file with a funny size, we lose some. Tough. */ size -= (size % sizeof(event.he_entropy)); if (data != NULL && size != 0) { Modified: head/sys/dev/random/random_infra.c ============================================================================== --- head/sys/dev/random/random_infra.c Mon Apr 15 17:54:40 2019 (r346249) +++ head/sys/dev/random/random_infra.c Mon Apr 15 18:40:36 2019 (r346250) @@ -57,12 +57,18 @@ struct random_algorithm *p_random_alg_context = &rando #if defined(RANDOM_LOADABLE) +static void +null_read_random(void *dummy __unused, u_int dummy2 __unused) +{ + panic("%s: no random module is loaded", __func__); +} + struct random_readers { int (*read_random_uio)(struct uio *, bool); - u_int (*read_random)(void *, u_int); + void (*read_random)(void *, u_int); } random_reader_context = { (int (*)(struct uio *, bool))nullop, - (u_int (*)(void *, u_int))nullop, + null_read_random, }; struct sx randomdev_config_lock; @@ -76,7 +82,7 @@ random_infra_sysinit(void *dummy __unused) SYSINIT(random_device_h_init, SI_SUB_RANDOM, SI_ORDER_FIRST, random_infra_sysinit, NULL); void -random_infra_init(int (*p_random_read_uio)(struct uio *, bool), u_int (*p_random_read)(void *, u_int)) +random_infra_init(int (*p_random_read_uio)(struct uio *, bool), void (*p_random_read)(void *, u_int)) { RANDOM_CONFIG_X_LOCK(); @@ -91,7 +97,7 @@ random_infra_uninit(void) RANDOM_CONFIG_X_LOCK(); random_reader_context.read_random_uio = (int (*)(struct uio *, bool))nullop; - random_reader_context.read_random = (u_int (*)(void *, u_int))nullop; + random_reader_context.read_random = null_read_random; RANDOM_CONFIG_X_UNLOCK(); } @@ -114,15 +120,13 @@ read_random_uio(struct uio *uio, bool nonblock) return (retval); } -u_int +void read_random(void *buf, u_int len) { - u_int retval; RANDOM_CONFIG_S_LOCK(); - retval = random_reader_context.read_random(buf, len); + random_reader_context.read_random(buf, len); RANDOM_CONFIG_S_UNLOCK(); - return (retval); } #endif /* defined(RANDOM_LOADABLE) */ Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Mon Apr 15 17:54:40 2019 (r346249) +++ head/sys/dev/random/randomdev.c Mon Apr 15 18:40:36 2019 (r346250) @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); #define READ_RANDOM_UIO _read_random_uio #define READ_RANDOM _read_random static int READ_RANDOM_UIO(struct uio *, bool); -static u_int READ_RANDOM(void *, u_int); +static void READ_RANDOM(void *, u_int); #else #define READ_RANDOM_UIO read_random_uio #define READ_RANDOM read_random @@ -124,11 +124,53 @@ randomdev_read(struct cdev *dev __unused, struct uio * return (READ_RANDOM_UIO(uio, (flags & O_NONBLOCK) != 0)); } +/* + * If the random device is not seeded, blocks until it is seeded. + * + * Returns zero when the random device is seeded. + * + * If the 'interruptible' parameter is true, and the device is unseeded, this + * routine may be interrupted. If interrupted, it will return either ERESTART + * or EINTR. + */ +#define SEEDWAIT_INTERRUPTIBLE true +#define SEEDWAIT_UNINTERRUPTIBLE false +static int +randomdev_wait_until_seeded(bool interruptible) +{ + int error, spamcount, slpflags; + + slpflags = interruptible ? PCATCH : 0; + + error = 0; + spamcount = 0; + while (!p_random_alg_context->ra_seeded()) { + /* keep tapping away at the pre-read until we seed/unblock. */ + p_random_alg_context->ra_pre_read(); + /* Only bother the console every 10 seconds or so */ + if (spamcount == 0) + printf("random: %s unblock wait\n", __func__); + spamcount = (spamcount + 1) % 100; + error = tsleep(&random_alg_context, slpflags, "randseed", + hz / 10); + if (error == ERESTART || error == EINTR) { + KASSERT(interruptible, + ("unexpected wake of non-interruptible sleep")); + break; + } + /* Squash tsleep timeout condition */ + if (error == EWOULDBLOCK) + error = 0; + KASSERT(error == 0, ("unexpected tsleep error %d", error)); + } + return (error); +} + int READ_RANDOM_UIO(struct uio *uio, bool nonblock) { uint8_t *random_buf; - int error, spamcount; + int error; ssize_t read_len, total_read, c; /* 16 MiB takes about 0.08 s CPU time on my 2017 AMD Zen CPU */ #define SIGCHK_PERIOD (16 * 1024 * 1024) @@ -140,26 +182,13 @@ READ_RANDOM_UIO(struct uio *uio, bool nonblock) random_buf = malloc(PAGE_SIZE, M_ENTROPY, M_WAITOK); p_random_alg_context->ra_pre_read(); error = 0; - spamcount = 0; /* (Un)Blocking logic */ - while (!p_random_alg_context->ra_seeded()) { - if (nonblock) { + if (!p_random_alg_context->ra_seeded()) { + if (nonblock) error = EWOULDBLOCK; - break; - } - /* keep tapping away at the pre-read until we seed/unblock. */ - p_random_alg_context->ra_pre_read(); - /* Only bother the console every 10 seconds or so */ - if (spamcount == 0) - printf("random: %s unblock wait\n", __func__); - spamcount = (spamcount + 1)%100; - error = tsleep(&random_alg_context, PCATCH, "randseed", hz/10); - if (error == ERESTART || error == EINTR) - break; - /* Squash tsleep timeout condition */ - if (error == EWOULDBLOCK) - error = 0; - KASSERT(error == 0, ("unexpected tsleep error %d", error)); + else + error = randomdev_wait_until_seeded( + SEEDWAIT_INTERRUPTIBLE); } if (error == 0) { read_rate_increment((uio->uio_resid + sizeof(uint32_t))/sizeof(uint32_t)); @@ -210,30 +239,36 @@ READ_RANDOM_UIO(struct uio *uio, bool nonblock) * It cannot assumed that random_buf is a multiple of * RANDOM_BLOCKSIZE bytes. */ -u_int +void READ_RANDOM(void *random_buf, u_int len) { - u_int read_len; - uint8_t local_buf[len + RANDOM_BLOCKSIZE]; + u_int read_directly_len; KASSERT(random_buf != NULL, ("No suitable random buffer in %s", __func__)); p_random_alg_context->ra_pre_read(); - /* (Un)Blocking logic; if not seeded, return nothing. */ - if (p_random_alg_context->ra_seeded()) { - read_rate_increment((len + sizeof(uint32_t))/sizeof(uint32_t)); - if (len > 0) { - /* - * Belt-and-braces. - * Round up the read length to a crypto block size multiple, - * which is what the underlying generator is expecting. - */ - read_len = roundup(len, RANDOM_BLOCKSIZE); - p_random_alg_context->ra_read(local_buf, read_len); - memcpy(random_buf, local_buf, len); - } - } else - len = 0; - return (len); + /* (Un)Blocking logic */ + if (!p_random_alg_context->ra_seeded()) + (void)randomdev_wait_until_seeded(SEEDWAIT_UNINTERRUPTIBLE); + read_rate_increment(roundup2(len, sizeof(uint32_t))); + if (len == 0) + return; + /* + * The underlying generator expects multiples of + * RANDOM_BLOCKSIZE. + */ + read_directly_len = rounddown(len, RANDOM_BLOCKSIZE); + if (read_directly_len > 0) + p_random_alg_context->ra_read(random_buf, read_directly_len); + if (read_directly_len < len) { + uint8_t remainder_buf[RANDOM_BLOCKSIZE]; + + p_random_alg_context->ra_read(remainder_buf, + sizeof(remainder_buf)); + memcpy((char *)random_buf + read_directly_len, remainder_buf, + len - read_directly_len); + + explicit_bzero(remainder_buf, sizeof(remainder_buf)); + } } static __inline void Modified: head/sys/dev/random/randomdev.h ============================================================================== --- head/sys/dev/random/randomdev.h Mon Apr 15 17:54:40 2019 (r346249) +++ head/sys/dev/random/randomdev.h Mon Apr 15 18:40:36 2019 (r346250) @@ -118,7 +118,7 @@ extern struct sx randomdev_config_lock; #define RANDOM_CONFIG_S_LOCK(x) sx_slock(&randomdev_config_lock) #define RANDOM_CONFIG_S_UNLOCK(x) sx_sunlock(&randomdev_config_lock) #define RANDOM_CONFIG_DEINIT_LOCK(x) sx_destroy(&randomdev_config_lock) -void random_infra_init(int (*)(struct uio *, bool), u_int (*)(void *, u_int)); +void random_infra_init(int (*)(struct uio *, bool), void (*)(void *, u_int)); void random_infra_uninit(void); #endif Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Mon Apr 15 17:54:40 2019 (r346249) +++ head/sys/kern/kern_mib.c Mon Apr 15 18:40:36 2019 (r346250) @@ -159,15 +159,8 @@ sysctl_kern_arnd(SYSCTL_HANDLER_ARGS) char buf[256]; size_t len; - /*- - * This is one of the very few legitimate uses of read_random(9). - * Use of arc4random(9) is not recommended as that will ignore - * an unsafe (i.e. unseeded) random(4). - * - * If random(4) is not seeded, then this returns 0, so the - * sysctl will return a zero-length buffer. - */ - len = read_random(buf, MIN(req->oldlen, sizeof(buf))); + len = MIN(req->oldlen, sizeof(buf)); + read_random(buf, len); return (SYSCTL_OUT(req, buf, len)); } Modified: head/sys/libkern/arc4random.c ============================================================================== --- head/sys/libkern/arc4random.c Mon Apr 15 17:54:40 2019 (r346249) +++ head/sys/libkern/arc4random.c Mon Apr 15 18:40:36 2019 (r346250) @@ -56,7 +56,6 @@ MALLOC_DEFINE(M_CHACHA20RANDOM, "chacha20random", "cha struct chacha20_s { struct mtx mtx; int numbytes; - int first_time_done; time_t t_reseed; u_int8_t m_buffer[CHACHA20_BUFFER_SIZE]; struct chacha_ctx ctx; @@ -73,35 +72,17 @@ static struct chacha20_s *chacha20inst = NULL; * Mix up the current context. */ static void -chacha20_randomstir(struct chacha20_s* chacha20) +chacha20_randomstir(struct chacha20_s *chacha20) { struct timeval tv_now; - size_t n, size; - u_int8_t key[CHACHA20_KEYBYTES], *data; - caddr_t keyfile; + u_int8_t key[CHACHA20_KEYBYTES]; /* - * This is making the best of what may be an insecure - * Situation. If the loader(8) did not have an entropy - * stash from the previous shutdown to load, then we will - * be improperly seeded. The answer is to make sure there - * is an entropy stash at shutdown time. + * If the loader(8) did not have an entropy stash from the previous *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Apr 15 18:49:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21606157B1DE; Mon, 15 Apr 2019 18:49:05 +0000 (UTC) (envelope-from cem@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 B4C5C8DAC7; Mon, 15 Apr 2019 18:49:04 +0000 (UTC) (envelope-from cem@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 92430C23B; Mon, 15 Apr 2019 18:49:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FIn45A014503; Mon, 15 Apr 2019 18:49:04 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FIn4GS014502; Mon, 15 Apr 2019 18:49:04 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201904151849.x3FIn4GS014502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 15 Apr 2019 18:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346251 - head/lib/libc/stdlib X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/lib/libc/stdlib X-SVN-Commit-Revision: 346251 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B4C5C8DAC7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 18:49:05 -0000 Author: cem Date: Mon Apr 15 18:49:04 2019 New Revision: 346251 URL: https://svnweb.freebsd.org/changeset/base/346251 Log: random.3: Clarify confusing summary random.3 is only "better" in contrast to rand.3. Both are non-cryptographic pseudo-random number generators. The opening blurbs of each's DESCRIPTION section does emphasize this, and correctly directs unfamiliar developers to arc4random(3). However, the summary (".Nd" or Name description) of random.3 conflicted in tone and message with that warning. Resolve the conflict by clarifying in the Nd section that random(3) is non-cryptographic and pseudo-random. Elide the "better" qualifier which implied a comparison but did not provide a specific object to contrast. Sponsored by: Dell EMC Isilon Modified: head/lib/libc/stdlib/random.3 Modified: head/lib/libc/stdlib/random.3 ============================================================================== --- head/lib/libc/stdlib/random.3 Mon Apr 15 18:40:36 2019 (r346250) +++ head/lib/libc/stdlib/random.3 Mon Apr 15 18:49:04 2019 (r346251) @@ -28,7 +28,7 @@ .\" @(#)random.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 26, 2016 +.Dd April 15, 2019 .Dt RANDOM 3 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nm srandomdev , .Nm initstate , .Nm setstate -.Nd better random number generator; routines for changing generators +.Nd non-cryptographic pseudorandom number generator; routines for changing generators .Sh LIBRARY .Lb libc .Sh SYNOPSIS From owner-svn-src-all@freebsd.org Mon Apr 15 18:53:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 043E4157B4D0; Mon, 15 Apr 2019 18:53:30 +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 9ED9E8DFBF; Mon, 15 Apr 2019 18:53:29 +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 613E5C3DE; Mon, 15 Apr 2019 18:53:29 +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 x3FIrTem019505; Mon, 15 Apr 2019 18:53:29 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FIrSXI019502; Mon, 15 Apr 2019 18:53:28 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904151853.x3FIrSXI019502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 15 Apr 2019 18:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346252 - in head/usr.sbin/cron: cron crontab X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/usr.sbin/cron: cron crontab X-SVN-Commit-Revision: 346252 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9ED9E8DFBF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 18:53:30 -0000 Author: kevans Date: Mon Apr 15 18:53:28 2019 New Revision: 346252 URL: https://svnweb.freebsd.org/changeset/base/346252 Log: cron(8): Add MAILFROM ability for crontabs This changes the sender mail address in a similar fashion to how MAILTO may change the recipient. The default from address remains unchanged. MFC after: 1 week Modified: head/usr.sbin/cron/cron/cron.8 head/usr.sbin/cron/cron/do_command.c head/usr.sbin/cron/crontab/crontab.5 Modified: head/usr.sbin/cron/cron/cron.8 ============================================================================== --- head/usr.sbin/cron/cron/cron.8 Mon Apr 15 18:49:04 2019 (r346251) +++ head/usr.sbin/cron/cron/cron.8 Mon Apr 15 18:53:28 2019 (r346252) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2017 +.Dd April 15, 2019 .Dt CRON 8 .Os .Sh NAME @@ -79,6 +79,9 @@ commands, any output is mailed to the owner of the cro named in the .Ev MAILTO environment variable in the crontab, if such exists). +The from address of this mail may be set with the +.Ev MAILFROM +environment variable. .Pp Additionally, .Nm Modified: head/usr.sbin/cron/cron/do_command.c ============================================================================== --- head/usr.sbin/cron/cron/do_command.c Mon Apr 15 18:49:04 2019 (r346251) +++ head/usr.sbin/cron/cron/do_command.c Mon Apr 15 18:53:28 2019 (r346252) @@ -93,7 +93,7 @@ child_process(e, u) { int stdin_pipe[2], stdout_pipe[2]; register char *input_data; - char *usernm, *mailto; + char *usernm, *mailto, *mailfrom; int children = 0; # if defined(LOGIN_CAP) struct passwd *pwd; @@ -111,6 +111,7 @@ child_process(e, u) */ usernm = env_get("LOGNAME", e->envp); mailto = env_get("MAILTO", e->envp); + mailfrom = env_get("MAILFROM", e->envp); #ifdef PAM /* use PAM to see if the user's account is available, @@ -503,8 +504,12 @@ child_process(e, u) warn("%s", MAILCMD); (void) _exit(ERROR_EXIT); } - fprintf(mail, "From: Cron Daemon <%s@%s>\n", - usernm, hostname); + if (mailfrom == NULL || *mailfrom == '\0') + fprintf(mail, "From: Cron Daemon <%s@%s>\n", + usernm, hostname); + else + fprintf(mail, "From: Cron Daemon <%s>\n", + mailfrom); fprintf(mail, "To: %s\n", mailto); fprintf(mail, "Subject: Cron <%s@%s> %s\n", usernm, first_word(hostname, "."), Modified: head/usr.sbin/cron/crontab/crontab.5 ============================================================================== --- head/usr.sbin/cron/crontab/crontab.5 Mon Apr 15 18:49:04 2019 (r346251) +++ head/usr.sbin/cron/crontab/crontab.5 Mon Apr 15 18:53:28 2019 (r346252) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2018 +.Dd April 15, 2019 .Dt CRONTAB 5 .Os .Sh NAME @@ -116,6 +116,9 @@ If .Ev MAILTO is defined (and non-empty), mail is sent to the user so named. +If +.Ev MAILFROM +is defined (and non-empty), its value will be used as the from address. .Ev MAILTO may also be used to direct mail to multiple recipients by separating recipient users with a comma. From owner-svn-src-all@freebsd.org Mon Apr 15 18:54:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5B55157B56B for ; Mon, 15 Apr 2019 18:54:58 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC2F8E114 for ; Mon, 15 Apr 2019 18:54:58 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 0F18CBB6F for ; Mon, 15 Apr 2019 18:54:58 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f46.google.com with SMTP id t30so13905181lfd.8 for ; Mon, 15 Apr 2019 11:54:57 -0700 (PDT) X-Gm-Message-State: APjAAAVFwjjYacBPJz+8YjqDniisuZCct1ZIIT8Tq02MYPnJ4lFw3TxK LgtILeody+yN/1/CJbpYdqTUMKMSDpu5+psbqPQ= X-Received: by 2002:ac2:53a4:: with SMTP id j4mt30451170lfh.106.1555354496614; Mon, 15 Apr 2019 11:54:56 -0700 (PDT) MIME-Version: 1.0 References: <201904151853.x3FIrSXI019502@repo.freebsd.org> In-Reply-To: <201904151853.x3FIrSXI019502@repo.freebsd.org> From: Kyle Evans Date: Mon, 15 Apr 2019 13:54:39 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346252 - in head/usr.sbin/cron: cron crontab Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6CC2F8E114 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 18:54:58 -0000 On Mon, Apr 15, 2019 at 1:53 PM Kyle Evans wrote: > > Author: kevans > Date: Mon Apr 15 18:53:28 2019 > New Revision: 346252 > URL: https://svnweb.freebsd.org/changeset/base/346252 > > Log: > cron(8): Add MAILFROM ability for crontabs > > This changes the sender mail address in a similar fashion to how MAILTO may > change the recipient. The default from address remains unchanged. > > MFC after: 1 week > I failed to ^C this in time to add: PR: 140304 From owner-svn-src-all@freebsd.org Mon Apr 15 19:21:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 384E9157C2C4; Mon, 15 Apr 2019 19:21:46 +0000 (UTC) (envelope-from pkubaj@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 008B28F485; Mon, 15 Apr 2019 19:21:46 +0000 (UTC) (envelope-from pkubaj@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 D20D1C8B4; Mon, 15 Apr 2019 19:21:45 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3FJLjNg034641; Mon, 15 Apr 2019 19:21:45 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FJLjcP034640; Mon, 15 Apr 2019 19:21:45 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <201904151921.x3FJLjcP034640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Mon, 15 Apr 2019 19:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346253 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 346253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 008B28F485 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 19:21:46 -0000 Author: pkubaj (ports committer) Date: Mon Apr 15 19:21:45 2019 New Revision: 346253 URL: https://svnweb.freebsd.org/changeset/base/346253 Log: Add myself to committer list. Approved by: tcberner (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Mon Apr 15 18:53:28 2019 (r346252) +++ head/share/misc/committers-ports.dot Mon Apr 15 19:21:45 2019 (r346253) @@ -217,6 +217,7 @@ pgollucci [label="Philip M. Gollucci\npgollucci@FreeBS philip [label="Philip Paeps\nphilip@FreeBSD.org\n2005/10/19"] pi [label="Kurt Jaeger\npi@FreeBSD.org\n2014/03/14"] pizzamig [label="Luca Pizzamiglio\npizzamig@FreeBSD.org\n2017/08/25"] +pkubaj [label="Piotr Kubaj\npkubaj@FreeBSD.org\n2019/04/14"] rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2006/06/23"] rakuco [label="Raphael Kubo da Costa\nrakuco@FreeBSD.org\n2011/08/22"] rene [label="Rene Ladan\nrene@FreeBSD.org\n2010/04/11"] @@ -519,6 +520,7 @@ ler -> leres lifanov -> ultima linimon -> hrs +linimon -> pkubaj lioux -> pat @@ -555,6 +557,7 @@ mat -> thierry mat -> tobik mat -> woodsb02 mat -> rigoletto +mat -> pkubaj matthew -> leres matthew -> lifanov @@ -719,6 +722,7 @@ tcberner -> fernape tcberner -> arrowd tcberner -> rigoletto tcberner -> kai +tcberner -> pkubaj thierry -> jadawin thierry -> riggs From owner-svn-src-all@freebsd.org Mon Apr 15 19:26:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B49F0157C421 for ; Mon, 15 Apr 2019 19:26:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 310848F74F for ; Mon, 15 Apr 2019 19:26:32 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1555356385; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=RovXHPtX2EBTpHR+WLf/ZLFi7FuhzV61sb3sQzaLE11IsXdSbQGc0U/bOWqF01/Exq42T1jA7VMNI eCsNW8KU3EfJRKrL4f6tezwLrzWYMh941We2gh0NhuuvXss4FTAnOA9X4FcQtHekBkscOLjWozwcU2 IoxdA3/5+2wILS9zJ2to2ZLblof8bzHSyfa0SmFtQaEjAg0kvJALuYnd2HfVJOIUjD6SnYSwkA80NI YsQpzdL4Jj/TusiRjCo6ewB5tCcJ4akE1BZ/2/Lf3WlN1MOhAgfMW/VxFQOyAic7fDVY0p2LCUIjjg ATREhuN3c6gnjEyKPgxZQ7pbCxEaxuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=6BGyUiTjdkbuNqFq/TaItP4XPq3mKjVsS68RHxYHZOU=; b=qMznv9r9SVW0IU5OmFafdOHSxznWd2P1pVh7tN3C8yN2pRGHTsJNFEzvnjqtoHG1XPzWDLKoh3HeA rYyAib82NxNd5IwCGTe8Fd8IxfTEVuY6Bu7H4kBv/ATmg4x7VYiFKU9t7ZpscfvPV+qNDWd2TauVMK aTqH3OYeKRyCPCS+J7OW6YUJ3L6zX9uBs39sm9+/7wLZj9w900CEyIz2Ck/QKuAURDUETVMAuu0uKJ iHhRCRmPtbP1ctUJvO74jOObr+9O5dPypC01l4VOF26Z3TL7OlhespvgmKsa8iZ4Xur6jv+DhVeoAc bZqX/LK95QB9jLdvaYnTSYm96MTsZBw== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=6BGyUiTjdkbuNqFq/TaItP4XPq3mKjVsS68RHxYHZOU=; b=d5+N68dzUowS8eDoNY1j8AptOJfdmCUGfoyf8x/PdYaQyFuoGzq+kbofN77W+tHdrrSxFITpNulko OYGJNy58TB4z2D/9HHer4vQzyRkgGc5NPNlnIgV2hmdSUceaqpvlorJUvJHrIcY7GmZq2vP5UdjtbZ vwURjVF+fQwrDyKTzJoDSZLz1v5Wi8uIxS9q1tyrOLQ5WGghiWtceqkD1OYVb1hSe5rhtzk16pvEtz XjmA32BKw3i0wd0Bew+/o2skc5jSwvVLBZF/IcOT1u7To5Rq5FQ/GpIBX/UZPIBOt7O/WPoiEBdE2T O5NzOg2H1EKJm0mbnQjG9cXa/DsQBzQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 5946b379-5fb4-11e9-908b-352056dbf2de X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id 5946b379-5fb4-11e9-908b-352056dbf2de; Mon, 15 Apr 2019 19:26:22 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3FJQK1h040045; Mon, 15 Apr 2019 13:26:20 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r346252 - in head/usr.sbin/cron: cron crontab From: Ian Lepore To: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 15 Apr 2019 13:26:20 -0600 In-Reply-To: <201904151853.x3FIrSXI019502@repo.freebsd.org> References: <201904151853.x3FIrSXI019502@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 310848F74F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 19:26:33 -0000 On Mon, 2019-04-15 at 18:53 +0000, Kyle Evans wrote: > Author: kevans > Date: Mon Apr 15 18:53:28 2019 > New Revision: 346252 > URL: https://svnweb.freebsd.org/changeset/base/346252 > > Log: > cron(8): Add MAILFROM ability for crontabs > > This changes the sender mail address in a similar fashion to how MAILTO may > change the recipient. The default from address remains unchanged. > > MFC after: 1 week > > Modified: > head/usr.sbin/cron/cron/cron.8 > head/usr.sbin/cron/cron/do_command.c > head/usr.sbin/cron/crontab/crontab.5 > Is this going to allow normal users to spoof the From: using private crontabs? That sounds mildly dangerous. -- Ian > Modified: head/usr.sbin/cron/cron/cron.8 > ===================================================================== > ========= > --- head/usr.sbin/cron/cron/cron.8 Mon Apr 15 18:49:04 2019 (r346 > 251) > +++ head/usr.sbin/cron/cron/cron.8 Mon Apr 15 18:53:28 2019 (r346 > 252) > @@ -17,7 +17,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 19, 2017 > +.Dd April 15, 2019 > .Dt CRON 8 > .Os > .Sh NAME > @@ -79,6 +79,9 @@ commands, any output is mailed to the owner of the > cro > named in the > .Ev MAILTO > environment variable in the crontab, if such exists). > +The from address of this mail may be set with the > +.Ev MAILFROM > +environment variable. > .Pp > Additionally, > .Nm > > Modified: head/usr.sbin/cron/cron/do_command.c > ===================================================================== > ========= > --- head/usr.sbin/cron/cron/do_command.c Mon Apr 15 18:49:04 > 2019 (r346251) > +++ head/usr.sbin/cron/cron/do_command.c Mon Apr 15 18:53:28 > 2019 (r346252) > @@ -93,7 +93,7 @@ child_process(e, u) > { > int stdin_pipe[2], stdout_pipe[2]; > register char *input_data; > - char *usernm, *mailto; > + char *usernm, *mailto, *mailfrom; > int children = 0; > # if defined(LOGIN_CAP) > struct passwd *pwd; > @@ -111,6 +111,7 @@ child_process(e, u) > */ > usernm = env_get("LOGNAME", e->envp); > mailto = env_get("MAILTO", e->envp); > + mailfrom = env_get("MAILFROM", e->envp); > > #ifdef PAM > /* use PAM to see if the user's account is available, > @@ -503,8 +504,12 @@ child_process(e, u) > warn("%s", MAILCMD); > (void) _exit(ERROR_EXIT); > } > - fprintf(mail, "From: Cron Daemon > <%s@%s>\n", > - usernm, hostname); > + if (mailfrom == NULL || *mailfrom == > '\0') > + fprintf(mail, "From: Cron > Daemon <%s@%s>\n", > + usernm, hostname); > + else > + fprintf(mail, "From: Cron > Daemon <%s>\n", > + mailfrom); > fprintf(mail, "To: %s\n", mailto); > fprintf(mail, "Subject: Cron <%s@%s> > %s\n", > usernm, first_word(hostname, > "."), > > Modified: head/usr.sbin/cron/crontab/crontab.5 > ===================================================================== > ========= > --- head/usr.sbin/cron/crontab/crontab.5 Mon Apr 15 18:49:04 > 2019 (r346251) > +++ head/usr.sbin/cron/crontab/crontab.5 Mon Apr 15 18:53:28 > 2019 (r346252) > @@ -17,7 +17,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd June 6, 2018 > +.Dd April 15, 2019 > .Dt CRONTAB 5 > .Os > .Sh NAME > @@ -116,6 +116,9 @@ If > .Ev MAILTO > is defined (and non-empty), mail is > sent to the user so named. > +If > +.Ev MAILFROM > +is defined (and non-empty), its value will be used as the from > address. > .Ev MAILTO > may also be used to direct mail to multiple recipients > by separating recipient users with a comma. > From owner-svn-src-all@freebsd.org Mon Apr 15 19:44:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6811B157CA06; Mon, 15 Apr 2019 19:44:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09D01900F6; Mon, 15 Apr 2019 19:44:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 95139C100; Mon, 15 Apr 2019 19:44:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f171.google.com with SMTP id k8so16829046lja.8; Mon, 15 Apr 2019 12:44:23 -0700 (PDT) X-Gm-Message-State: APjAAAWogPwY1fp+ECX7c86vKphf2JoBEqXhWOswgcXyewDSiFxgbrtG hfFNr+rpx4wyZekk6EPAIFSNywupdt4ZA3XUXCg= X-Google-Smtp-Source: APXvYqwOXYpd3W0JDA95iUsk4jrqGHzPyTuBKd1CJX6Id0L1EAaGsMbPSIO5TT7srz7hse3g/XxsvhqPuaod2OxhxKM= X-Received: by 2002:a2e:6a14:: with SMTP id f20mr43030003ljc.65.1555357462247; Mon, 15 Apr 2019 12:44:22 -0700 (PDT) MIME-Version: 1.0 References: <201904151853.x3FIrSXI019502@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Mon, 15 Apr 2019 14:44:03 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346252 - in head/usr.sbin/cron: cron crontab To: Ian Lepore Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 09D01900F6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 19:44:24 -0000 On Mon, Apr 15, 2019 at 2:26 PM Ian Lepore wrote: > > On Mon, 2019-04-15 at 18:53 +0000, Kyle Evans wrote: > > Author: kevans > > Date: Mon Apr 15 18:53:28 2019 > > New Revision: 346252 > > URL: https://svnweb.freebsd.org/changeset/base/346252 > > > > Log: > > cron(8): Add MAILFROM ability for crontabs > > > > This changes the sender mail address in a similar fashion to how MAILTO may > > change the recipient. The default from address remains unchanged. > > > > MFC after: 1 week > > > > Modified: > > head/usr.sbin/cron/cron/cron.8 > > head/usr.sbin/cron/cron/do_command.c > > head/usr.sbin/cron/crontab/crontab.5 > > > > Is this going to allow normal users to spoof the From: using private > crontabs? That sounds mildly dangerous. > > -- Ian I think my description here was lacking- this is a per-crontab environment variable, so yes: a user may spoof the from address in a private crontab for jobs within that crontab. I don't know how much of a security concern this is, but I peaked at cronie [1] after you brought this up and observed that their implementation is effectively the same restriction-wise, but with sanity checking for both mailfrom/mailto values. [1] https://github.com/cronie-crond/cronie/blob/master/src/do_command.c From owner-svn-src-all@freebsd.org Mon Apr 15 21:20:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19DF5157E5D5; Mon, 15 Apr 2019 21:20:07 +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 B0A3593401; Mon, 15 Apr 2019 21:20:06 +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 9F8B1DB98; Mon, 15 Apr 2019 21:20:06 +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 x3FLK6Aa095196; Mon, 15 Apr 2019 21:20:06 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3FLK6N8095195; Mon, 15 Apr 2019 21:20:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904152120.x3FLK6N8095195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 15 Apr 2019 21:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346254 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 346254 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B0A3593401 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 21:20:07 -0000 Author: kevans Date: Mon Apr 15 21:20:06 2019 New Revision: 346254 URL: https://svnweb.freebsd.org/changeset/base/346254 Log: config(8): replace opteq with a call to strcasecmp This obscures the comparison slightly less; when option name appear in files, they are case-insensitive. MFC after: 1 week Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Mon Apr 15 19:21:45 2019 (r346253) +++ head/usr.sbin/config/mkmakefile.c Mon Apr 15 21:20:06 2019 (r346254) @@ -62,7 +62,6 @@ static void do_rules(FILE *); static void do_xxfiles(char *, FILE *); static void do_objs(FILE *); static void do_before_depend(FILE *); -static int opteq(const char *, const char *); static void read_files(void); static void sanitize_envline(char *result, const char *src); static bool preprocess(char *line, char *result); @@ -565,7 +564,8 @@ next: goto nextparam; } SLIST_FOREACH(op, &opt, op_next) - if (op->op_value == 0 && opteq(op->op_name, wd)) { + if (op->op_value == 0 && + strcasecmp(op->op_name, wd) == 0) { if (not) match = 0; goto nextparam; @@ -625,23 +625,6 @@ read_files(void) tnl = STAILQ_NEXT(nl, f_next); free(nl->f_name); free(nl); - } -} - -static int -opteq(const char *cp, const char *dp) -{ - char c, d; - - for (; ; cp++, dp++) { - if (*cp != *dp) { - c = isupper(*cp) ? tolower(*cp) : *cp; - d = isupper(*dp) ? tolower(*dp) : *dp; - if (c != d) - return (0); - } - if (*cp == 0) - return (1); } } From owner-svn-src-all@freebsd.org Mon Apr 15 23:34:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6A92158067A; Mon, 15 Apr 2019 23:34:37 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6936796FF6; Mon, 15 Apr 2019 23:34:37 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f42.google.com with SMTP id f6so16124998iop.3; Mon, 15 Apr 2019 16:34:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6534R8IMbkKBj/k90kOsweS8NqFWXQkz7n3CggVJo3o=; b=qP4xjSmJj/lGBxnujdJfXoqoSJ5dq65dqk3P5jetLXBuEkAXWIQj7JUPUq7XlmGilG 7VNK/B1+GJqUulmvdBmgaO+dJ3BDai3HxlkImHjkQxaZ+QdAOViPh9xI5dJOdTK+gkEO Zzxh5JdCM+HLMX2J78tOro6DUSHv3B0l+vWU/78LOcKU6qgwK0YodmMUMVceJOYHp973 55lHRDjaNgiWh3curJ51T1+xTmKZfuxWnyFjYEqOo1TXhDaS+GfCczT1P91UcAp/IyQs ZRgIIiLGFVK2ZF214daVMBwGB3SNMYXa+CappUdr1KuzYY9OiSP+NuitMBz/p1cJaiG4 nRag== X-Gm-Message-State: APjAAAWxV5gxFwP7x1YanbEyFnMieEVsTTOQ0LnCmjlpwjVDVyuibuDU zYsrlAFSV3sgClySe11HsIL/OUX2Bu3JWfRtDnZkVgwf X-Google-Smtp-Source: APXvYqzUTFV3A/SdG3+x9QGqZFqCYfjjxF10dESzd4cYNSmiP6z+iYNDna9lIO+19ue7thQQ4fO8xY5xHpOVWgUk1AM= X-Received: by 2002:a5e:9e0d:: with SMTP id i13mr54108057ioq.156.1555367738051; Mon, 15 Apr 2019 15:35:38 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> In-Reply-To: <201904151840.x3FIeaEQ009242@repo.freebsd.org> From: Ed Maste Date: Mon, 15 Apr 2019 18:35:26 -0400 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6936796FF6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.92)[-0.922,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 23:34:38 -0000 On Mon, 15 Apr 2019 at 14:40, Conrad Meyer wrote: > > Author: cem > Date: Mon Apr 15 18:40:36 2019 > New Revision: 346250 > URL: https://svnweb.freebsd.org/changeset/base/346250 > > Log: > random(4): Block read_random(9) on initial seeding Because Gerald (one of the FreeBSD Foundation's co-op students for this term) is not on the svn mailing list I'll bring his report from GitHub[1] over here: As probably also seen from the official CI (https://ci.freebsd.org/job/FreeBSD-head-riscv64-test/), this commit prevents booting on both arm and arm64. Condensed Error log (arm64 Pine A64-LTS) random: randomdev_wait_until_seeded unblock wait panic: _sleep: curthread not running cpuid = 0 time = 1 KDB: stack backtrace: <...> randomdev_wait_until_seeded() at read_random+0x50 pc = 0xffff00000021b850 lr = 0xffff00000021b930 sp = 0xffff000000010a00 fp = 0xffff000000010a40 read_random() at arc4rand+0x168 pc = 0xffff00000021b930 lr = 0xffff00000049ae5c sp = 0xffff000000010a50 fp = 0xffff000000010af0 arc4rand() at __stack_chk_init+0x18 pc = 0xffff00000049ae5c lr = 0xffff0000003f0558 sp = 0xffff000000010b00 fp = 0xffff000000010b40 <....> [1] https://github.com/freebsd/freebsd/commit/654aeb58dd40d3db3af91ce26c9c31d1b02cee5f#commitcomment-33187782 From owner-svn-src-all@freebsd.org Tue Apr 16 00:01:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 533851580D97; Tue, 16 Apr 2019 00:01:16 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4D30978F1; Tue, 16 Apr 2019 00:01:15 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lj1-x235.google.com with SMTP id k8so17347881lja.8; Mon, 15 Apr 2019 17:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lFkm5IXG0ETABlNsyxhSNYu8cRbT+FBp5mDzpwFupwY=; b=Yp+n58ETYKd+l/MzqcIzfnzr6tNG7tDgKbz7gCPiVshTzY3gaUWDNkYTfm9hr6zydJ nWqhO/mQqY3N8VwBUFiBIAxvnlmHFMDryIXaxraEumBF0Ha1Bqlan4CGNW7otE9Wl2Bh 5vo2LS2WtGVRDt04KLMzECXmado4zE9zpAMXlD2wLwsglCoRdPR3Pv3UZISttdZBblmD /FIk4PxqReFLg6ATVVQt+eeZIvlQQ+9vhSpkGydjEj/icaQeXakvtJ1YwTSufyTMUn7p 16RV7S72FonAni6+qwvV9SVW+UAh2Vzi3ZKKmnQFC9fb4SGJTUR/aRzDWgGlIQtbVfwE fZZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lFkm5IXG0ETABlNsyxhSNYu8cRbT+FBp5mDzpwFupwY=; b=uFsPRRTIVzR8HlPHTxKEHtFw3ad/vh/croqbp9NGb/uBvzYacVmoSHhGoMOUWo6Bhk TZecsSPMcjpUGOXM2Z4K+9MJkyV2JhVOCe5O14g0m7OIUx6Vo9/Q0UWNuL5W+//TC6qt 1+pA06Hii7yjSPqsG5CcgwEAVragAMA5N2Dc5clFjMx8RhBivJH8oIfTg8nOxTCXIbAV ANlPvKslxm/pIdr3GKP12fpnoanu1LkhagEKvXxuS46mJO/oYqAgFeZLERSyqMw/GxFI KjzddXCZvdCFGaMDJn3OsUK3Csb+pgGcDsc07uQEkVs6NBZ4xOAK7wZZUVUZu2XFTuEV pp9Q== X-Gm-Message-State: APjAAAXiVJF0LMIAZa1+1nbdVlMRNNDfA7il5nmFukF2ny4IEnNQ0e49 BPfegGkcnIyQUIUHtJjJdkyGlsUlpywBHYRnlKTWSQ== X-Google-Smtp-Source: APXvYqzOcwTzqIEtR9q+Psd8BT3V0bjdD11CGF+M9UurBnIMsSRt3c9+vj0mhTTv1Y0cYZzyNvjtcX2lAKQTtTWOQpM= X-Received: by 2002:a2e:808e:: with SMTP id i14mr43588957ljg.103.1555372873489; Mon, 15 Apr 2019 17:01:13 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> In-Reply-To: From: Justin Hibbits Date: Mon, 15 Apr 2019 19:01:05 -0500 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Ed Maste Cc: Conrad Meyer , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: B4D30978F1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.92)[-0.921,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 00:01:16 -0000 On Mon, Apr 15, 2019, 18:34 Ed Maste wrote: > On Mon, 15 Apr 2019 at 14:40, Conrad Meyer wrote: > > > > Author: cem > > Date: Mon Apr 15 18:40:36 2019 > > New Revision: 346250 > > URL: https://svnweb.freebsd.org/changeset/base/346250 > > > > Log: > > random(4): Block read_random(9) on initial seeding > > Because Gerald (one of the FreeBSD Foundation's co-op students for > this term) is not on the svn mailing list I'll bring his report from > GitHub[1] over here: > > As probably also seen from the official CI > (https://ci.freebsd.org/job/FreeBSD-head-riscv64-test/), this commit > prevents booting on both arm and arm64. > > Condensed Error log (arm64 Pine A64-LTS) > > random: randomdev_wait_until_seeded unblock wait > panic: _sleep: curthread not running > cpuid = 0 > time = 1 > KDB: stack backtrace: > <...> > randomdev_wait_until_seeded() at read_random+0x50 > pc = 0xffff00000021b850 lr = 0xffff00000021b930 > sp = 0xffff000000010a00 fp = 0xffff000000010a40 > > read_random() at arc4rand+0x168 > pc = 0xffff00000021b930 lr = 0xffff00000049ae5c > sp = 0xffff000000010a50 fp = 0xffff000000010af0 > > arc4rand() at __stack_chk_init+0x18 > pc = 0xffff00000049ae5c lr = 0xffff0000003f0558 > sp = 0xffff000000010b00 fp = 0xffff000000010b40 > > <....> > > [1] > https://github.com/freebsd/freebsd/commit/654aeb58dd40d3db3af91ce26c9c31d1b02cee5f#commitcomment-33187782 Given the discussion over there it would probably also fail on powernv, which also does not use loader. - Justin > > From owner-svn-src-all@freebsd.org Tue Apr 16 00:41:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8614415819DE; Tue, 16 Apr 2019 00:41:23 +0000 (UTC) (envelope-from bdrewery@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 2F50369EE9; Tue, 16 Apr 2019 00:41:23 +0000 (UTC) (envelope-from bdrewery@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 0A8CF18025; Tue, 16 Apr 2019 00:41:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3G0fMFN002419; Tue, 16 Apr 2019 00:41:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G0fMdq002418; Tue, 16 Apr 2019 00:41:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201904160041.x3G0fMdq002418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 16 Apr 2019 00:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346255 - head/usr.bin/jot X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/usr.bin/jot X-SVN-Commit-Revision: 346255 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2F50369EE9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 00:41:23 -0000 Author: bdrewery Date: Tue Apr 16 00:41:22 2019 New Revision: 346255 URL: https://svnweb.freebsd.org/changeset/base/346255 Log: Fix 'jot -r 0 start end' to work. This allows an endless stream of random data within the given bounds. It already worked if a seed was provided as the 4th argument but not if one was left out. In collaboration with: jhb MFC after: 2 weeks Relnotes: yes Modified: head/usr.bin/jot/jot.c Modified: head/usr.bin/jot/jot.c ============================================================================== --- head/usr.bin/jot/jot.c Mon Apr 15 21:20:06 2019 (r346254) +++ head/usr.bin/jot/jot.c Tue Apr 16 00:41:22 2019 (r346255) @@ -263,12 +263,15 @@ main(int argc, char **argv) mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER: - if (reps == 0) - errx(1, "infinite sequences cannot be bounded"); - else if (reps == 1) - s = 0.0; - else - s = (ender - begin) / (reps - 1); + if (!randomize) { + if (reps == 0) + errx(1, "infinite sequences cannot " + "be bounded"); + else if (reps == 1) + s = 0.0; + else + s = (ender - begin) / (reps - 1); + } mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER | HAVE_STEP: From owner-svn-src-all@freebsd.org Tue Apr 16 00:53:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2730A1581FE8; Tue, 16 Apr 2019 00:53:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f180.google.com (mail-it1-f180.google.com [209.85.166.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B637D6AD17; Tue, 16 Apr 2019 00:53:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f180.google.com with SMTP id f22so29917028ita.3; Mon, 15 Apr 2019 17:53:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=sEBtxyScHp8FekuWo2GXX+oION1nLrUincxhp2eL/XA=; b=uLRyR9hXEjYQ0UQeXD+mRFO1moiIbmVsMwXTciE5R2gznTCrNH5pyAqKJc7QbgcZI/ bXwwfhkBqKWlp6Z6BcXs6pk1RzCcjU/td6yBKTtY8qfRqrnCCl+8UbXdSqvrnEMHIzvM i/Dwe1RbwcRmqbLO8U64gqJT5P5v/KmGokMzp7UDu/BPYrMJz9eUpAXOaV4aMSh1qbn4 fZxziMo2BA+6EsupMXDIbK7ALLzrf9wUtHnPsQvSEKAhcYxs7r9iQuWV/IfjCEkzzf7k 2Dn+VtK+dBjpZ51e3F/U3ugB1uZSkmNaLBtnsJLix+kkr3DurYPYcl8zd2Qu6kR4/Mun XYng== X-Gm-Message-State: APjAAAVHVwYBV6Z2rBKgu4ajVLl9IU1I0vALWsxCRY7pZa63wOT1dx2H YeYjgqixOcKq6nQH0n+XE2+VxqlG X-Google-Smtp-Source: APXvYqxac1DvS/I+gZFs4Wf9zd5pNJYVMfqglkmiSJMNbW9NWoJSPYskQkWaVq0qgs9vYgRx5CSNVw== X-Received: by 2002:a02:1a45:: with SMTP id 66mr53336755jai.124.1555376008970; Mon, 15 Apr 2019 17:53:28 -0700 (PDT) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com. [209.85.166.49]) by smtp.gmail.com with ESMTPSA id x187sm9014852itb.39.2019.04.15.17.53.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 17:53:28 -0700 (PDT) Received: by mail-io1-f49.google.com with SMTP id v4so16248352ioj.5; Mon, 15 Apr 2019 17:53:28 -0700 (PDT) X-Received: by 2002:a6b:7b08:: with SMTP id l8mr1037567iop.33.1555376008600; Mon, 15 Apr 2019 17:53:28 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 15 Apr 2019 17:53:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Justin Hibbits Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: B637D6AD17 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 00:53:36 -0000 Hi Justin, On Mon, Apr 15, 2019 at 5:01 PM Justin Hibbits wrote: > Given the discussion over there it would probably also fail on powernv, which also does not use loader. Does power use bsdinstall (which populates /boot/entropy at install time via usr.sbin/bsdinstall/scripts/entropy) and install the libexec/rc/rc.d/random rc script (which re-emits new /boot/entropy on every startup)? If so, it should be ok. The problem is new installs that don't use bsdinstall or otherwise provide initial /boot/entropy. E.g., the CI infrastructure for Riscv/Arm is/was generating minimal filesystem images and not populating /boot/entropy. Best, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 00:55:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4757158209A; Tue, 16 Apr 2019 00:55:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f180.google.com (mail-it1-f180.google.com [209.85.166.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3397D6AE76; Tue, 16 Apr 2019 00:55:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f180.google.com with SMTP id w15so29919028itc.0; Mon, 15 Apr 2019 17:55:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=RINATsYN6udViLNcMKYz7FUgSg61bd9c6wDE0o5HnG4=; b=Wtq2Sa590GmpVQogIa5YcBT5wj8L189wX2eLDjeYELRyIpP8WrtaCgbHSfdm8v1yBS HDU+08SqIfpSHkHY1G/I6WMr32fxls8maceZWLFezVac4iy99r5tOEHOvnkaWL7c5EVd wr3cVlcQ9YL1ikHVh244dhrFkxcOOHHAcZvEnDJm7AGG0SqHQ2B7OAkaWieastmj1uH9 7kme9ueg5L5KwCnHs/XDQCxwaOvdds0fFnsKHUGaiiGI5epayRL4RovILla28aF310hZ zsRc7eRufxzJYorHOor8kjCTQa4nqB6hBI3vgy5yXnhqspXNdqGHptRAOBwLC1W0cRTQ OeVQ== X-Gm-Message-State: APjAAAVyi+qAzliHBl0/MRg3pohnNxyx81c5X3/BLZLKnkaHiVP554rS LZC2QZGLmqnDpRO2rv1RMbxUIjpu X-Google-Smtp-Source: APXvYqwYJTc9YDRRhZy0CcaVYzgvwu1V+02crWNyN8fLEK3lfIUjwrPiccHJTn068tWXfDXmyDeFTA== X-Received: by 2002:a24:5ec2:: with SMTP id h185mr27777256itb.19.1555376106930; Mon, 15 Apr 2019 17:55:06 -0700 (PDT) Received: from mail-it1-f182.google.com (mail-it1-f182.google.com. [209.85.166.182]) by smtp.gmail.com with ESMTPSA id w184sm8807530ita.9.2019.04.15.17.55.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 17:55:06 -0700 (PDT) Received: by mail-it1-f182.google.com with SMTP id a190so13574171ite.4; Mon, 15 Apr 2019 17:55:06 -0700 (PDT) X-Received: by 2002:a24:4584:: with SMTP id c4mr28414249itd.163.1555376106636; Mon, 15 Apr 2019 17:55:06 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 15 Apr 2019 17:54:56 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Justin Hibbits Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 3397D6AE76 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 00:55:08 -0000 On Mon, Apr 15, 2019 at 5:53 PM Conrad Meyer wrote: > E.g., the CI infrastructure for > Riscv/Arm is/was generating minimal filesystem images and not > populating /boot/entropy. I should add, I say "is/was" because I have a PR out which may address the problem: https://github.com/freebsd/freebsd-ci/pull/31 Best, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 01:03:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6592615825C6; Tue, 16 Apr 2019 01:03:33 +0000 (UTC) (envelope-from ngie@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 0D5446B4D9; Tue, 16 Apr 2019 01:03:33 +0000 (UTC) (envelope-from ngie@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 DA5BD183F1; Tue, 16 Apr 2019 01:03:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3G13WQd015304; Tue, 16 Apr 2019 01:03:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G13WBo015302; Tue, 16 Apr 2019 01:03:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904160103.x3G13WBo015302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 16 Apr 2019 01:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346256 - stable/11/tests/sys/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/tests/sys/netmap X-SVN-Commit-Revision: 346256 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0D5446B4D9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 01:03:33 -0000 Author: ngie Date: Tue Apr 16 01:03:32 2019 New Revision: 346256 URL: https://svnweb.freebsd.org/changeset/base/346256 Log: MFC r345644,r346061: r345644 (by olivier): Skip this test if if_tap module is not available PR: 236842 r346061: Polish netmap(4) testcases a bit 1. Not all kernels have netmap(4) support. Check for netmap(4) support before attempting to run the tests via the `PLAIN_REQUIRE_KERNEL_MODULE(..)` macro. 2. Libraries shouldn't be added to LDFLAGS; they should be added to LIBADD instead. This allows the build system to evaluate dependencies for sanity. 3. Sort some of the Makefile variables per bsd.README. 1., in particular, will resolve failures when running this testcase on kernels lacking netmap(4) support, e.g., the i386 GENERIC kernels on ^/stable/11 and ^/stable/12. PR: 237129 Modified: stable/11/tests/sys/netmap/Makefile stable/11/tests/sys/netmap/ctrl-api-test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/netmap/Makefile ============================================================================== --- stable/11/tests/sys/netmap/Makefile Tue Apr 16 00:41:22 2019 (r346255) +++ stable/11/tests/sys/netmap/Makefile Tue Apr 16 01:03:32 2019 (r346256) @@ -6,8 +6,10 @@ TESTSDIR= ${TESTSBASE}/sys/netmap TEST_METADATA+= required_user="root" TEST_METADATA+= is_exclusive=true -LDFLAGS+= -lpthread PLAIN_TESTS_C+= ctrl-api-test + +CFLAGS+= -I${SRCTOP}/tests +LIBADD+= pthread WARNS?= 6 Modified: stable/11/tests/sys/netmap/ctrl-api-test.c ============================================================================== --- stable/11/tests/sys/netmap/ctrl-api-test.c Tue Apr 16 00:41:22 2019 (r346255) +++ stable/11/tests/sys/netmap/ctrl-api-test.c Tue Apr 16 01:03:32 2019 (r346256) @@ -48,9 +48,15 @@ #include #include +#ifdef __FreeBSD__ +#include "freebsd_test_suite/macros.h" +#endif + + #ifdef __linux__ #include #else + static int eventfd(int x __unused, int y __unused) { @@ -1784,6 +1790,11 @@ main(int argc, char **argv) int list = 0; int opt; int i; + +#ifdef __FreeBSD__ + PLAIN_REQUIRE_KERNEL_MODULE("if_tap", 0); + PLAIN_REQUIRE_KERNEL_MODULE("netmap", 0); +#endif memset(&ctx_, 0, sizeof(ctx_)); From owner-svn-src-all@freebsd.org Tue Apr 16 01:03:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89A001582602; Tue, 16 Apr 2019 01:03:42 +0000 (UTC) (envelope-from ngie@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 2984A6B5A5; Tue, 16 Apr 2019 01:03:42 +0000 (UTC) (envelope-from ngie@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 D2CAE183F4; Tue, 16 Apr 2019 01:03:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3G13cOp015379; Tue, 16 Apr 2019 01:03:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G13cnw015377; Tue, 16 Apr 2019 01:03:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904160103.x3G13cnw015377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 16 Apr 2019 01:03: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: r346257 - stable/12/tests/sys/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/12/tests/sys/netmap X-SVN-Commit-Revision: 346257 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2984A6B5A5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 01:03:42 -0000 Author: ngie Date: Tue Apr 16 01:03:38 2019 New Revision: 346257 URL: https://svnweb.freebsd.org/changeset/base/346257 Log: MFC r345644,r346061: r345644 (by olivier): Skip this test if if_tap module is not available PR: 236842 r346061: Polish netmap(4) testcases a bit 1. Not all kernels have netmap(4) support. Check for netmap(4) support before attempting to run the tests via the `PLAIN_REQUIRE_KERNEL_MODULE(..)` macro. 2. Libraries shouldn't be added to LDFLAGS; they should be added to LIBADD instead. This allows the build system to evaluate dependencies for sanity. 3. Sort some of the Makefile variables per bsd.README. 1., in particular, will resolve failures when running this testcase on kernels lacking netmap(4) support, e.g., the i386 GENERIC kernels on ^/stable/11 and ^/stable/12. PR: 237129 Modified: stable/12/tests/sys/netmap/Makefile stable/12/tests/sys/netmap/ctrl-api-test.c Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/netmap/Makefile ============================================================================== --- stable/12/tests/sys/netmap/Makefile Tue Apr 16 01:03:32 2019 (r346256) +++ stable/12/tests/sys/netmap/Makefile Tue Apr 16 01:03:38 2019 (r346257) @@ -6,8 +6,10 @@ TESTSDIR= ${TESTSBASE}/sys/netmap TEST_METADATA+= required_user="root" TEST_METADATA+= is_exclusive=true -LDFLAGS+= -lpthread PLAIN_TESTS_C+= ctrl-api-test + +CFLAGS+= -I${SRCTOP}/tests +LIBADD+= pthread WARNS?= 6 Modified: stable/12/tests/sys/netmap/ctrl-api-test.c ============================================================================== --- stable/12/tests/sys/netmap/ctrl-api-test.c Tue Apr 16 01:03:32 2019 (r346256) +++ stable/12/tests/sys/netmap/ctrl-api-test.c Tue Apr 16 01:03:38 2019 (r346257) @@ -48,9 +48,15 @@ #include #include +#ifdef __FreeBSD__ +#include "freebsd_test_suite/macros.h" +#endif + + #ifdef __linux__ #include #else + static int eventfd(int x __unused, int y __unused) { @@ -1830,6 +1836,11 @@ main(int argc, char **argv) int list = 0; int opt; int i; + +#ifdef __FreeBSD__ + PLAIN_REQUIRE_KERNEL_MODULE("if_tap", 0); + PLAIN_REQUIRE_KERNEL_MODULE("netmap", 0); +#endif memset(&ctx_, 0, sizeof(ctx_)); From owner-svn-src-all@freebsd.org Tue Apr 16 02:12:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFD951583FF5; Tue, 16 Apr 2019 02:12:39 +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 8DCFD6D6FB; Tue, 16 Apr 2019 02:12:39 +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 50DED18FD1; Tue, 16 Apr 2019 02:12:39 +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 x3G2CdPf051500; Tue, 16 Apr 2019 02:12:39 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G2CdYb051499; Tue, 16 Apr 2019 02:12:39 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201904160212.x3G2CdYb051499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 16 Apr 2019 02:12:39 +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: r346258 - 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: 346258 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8DCFD6D6FB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 02:12:40 -0000 Author: rmacklem Date: Tue Apr 16 02:12:38 2019 New Revision: 346258 URL: https://svnweb.freebsd.org/changeset/base/346258 Log: MFC: r345818, r345828 Fix a race in the RPCSEC_GSS server code that caused crashes. When a new client structure was allocated, it was added to the list so that it was visible to other threads before the expiry time was initialized, with only a single reference count. The caller would increment the reference count, but it was possible for another thread to decrement the reference count to zero and free the structure before the caller incremented the reference count. This could occur because the expiry time was still set to zero when the new client structure was inserted in the list and the list was unlocked. This patch fixes the race by initializing the reference count to two and initializing all fields, including the expiry time, before inserting it in the list. 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 Tue Apr 16 01:03:38 2019 (r346257) +++ stable/12/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Tue Apr 16 02:12:38 2019 (r346258) @@ -562,19 +562,18 @@ svc_rpc_gss_create_client(void) client = mem_alloc(sizeof(struct svc_rpc_gss_client)); memset(client, 0, sizeof(struct svc_rpc_gss_client)); - refcount_init(&client->cl_refs, 1); + + /* + * Set the initial value of cl_refs to two. One for the caller + * and the other to hold onto the client structure until it expires. + */ + refcount_init(&client->cl_refs, 2); sx_init(&client->cl_lock, "GSS-client"); getcredhostid(curthread->td_ucred, &hostid); client->cl_id.ci_hostid = hostid; getboottime(&boottime); client->cl_id.ci_boottime = boottime.tv_sec; client->cl_id.ci_id = svc_rpc_gss_next_clientid++; - list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; - sx_xlock(&svc_rpc_gss_lock); - TAILQ_INSERT_HEAD(list, client, cl_link); - TAILQ_INSERT_HEAD(&svc_rpc_gss_clients, client, cl_alllink); - svc_rpc_gss_client_count++; - sx_xunlock(&svc_rpc_gss_lock); /* * Start the client off with a short expiration time. We will @@ -584,6 +583,12 @@ svc_rpc_gss_create_client(void) client->cl_locked = FALSE; client->cl_expiration = time_uptime + 5*60; + list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; + sx_xlock(&svc_rpc_gss_lock); + TAILQ_INSERT_HEAD(list, client, cl_link); + TAILQ_INSERT_HEAD(&svc_rpc_gss_clients, client, cl_alllink); + svc_rpc_gss_client_count++; + sx_xunlock(&svc_rpc_gss_lock); return (client); } @@ -1281,7 +1286,6 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) goto out; } client = svc_rpc_gss_create_client(); - refcount_acquire(&client->cl_refs); } else { struct svc_rpc_gss_clientid *p; if (gc.gc_handle.length != sizeof(*p)) { From owner-svn-src-all@freebsd.org Tue Apr 16 02:28:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C43BF158498F; Tue, 16 Apr 2019 02:28:36 +0000 (UTC) (envelope-from mw@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 6C6696E033; Tue, 16 Apr 2019 02:28:36 +0000 (UTC) (envelope-from mw@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 484D41918D; Tue, 16 Apr 2019 02:28:36 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3G2Satd057158; Tue, 16 Apr 2019 02:28:36 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G2SZIg057157; Tue, 16 Apr 2019 02:28:35 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201904160228.x3G2SZIg057157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Tue, 16 Apr 2019 02:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346259 - head/sys/dev/tpm X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/tpm X-SVN-Commit-Revision: 346259 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6C6696E033 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 02:28:37 -0000 Author: mw Date: Tue Apr 16 02:28:35 2019 New Revision: 346259 URL: https://svnweb.freebsd.org/changeset/base/346259 Log: tpm: Prevent session hijack Check caller thread id before allowing to read the buffer to make sure that it can only be accessed by the thread that did the associated write to the TPM. Submitted by: Kornel Duleba Reviewed by: delphij Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D19713 Modified: head/sys/dev/tpm/tpm20.c head/sys/dev/tpm/tpm20.h Modified: head/sys/dev/tpm/tpm20.c ============================================================================== --- head/sys/dev/tpm/tpm20.c Tue Apr 16 02:12:38 2019 (r346258) +++ head/sys/dev/tpm/tpm20.c Tue Apr 16 02:28:35 2019 (r346259) @@ -77,6 +77,10 @@ tpm20_read(struct cdev *dev, struct uio *uio, int flag callout_stop(&sc->discard_buffer_callout); sx_xlock(&sc->dev_lock); + if (sc->owner_tid != uio->uio_td->td_tid) { + sx_xunlock(&sc->dev_lock); + return (EPERM); + } bytes_to_transfer = MIN(sc->pending_data_length, uio->uio_resid); if (bytes_to_transfer > 0) { @@ -128,9 +132,11 @@ tpm20_write(struct cdev *dev, struct uio *uio, int fla result = sc->transmit(sc, byte_count); - if (result == 0) + if (result == 0) { callout_reset(&sc->discard_buffer_callout, TPM_READ_TIMEOUT / tick, tpm20_discard_buffer, sc); + sc->owner_tid = uio->uio_td->td_tid; + } sx_xunlock(&sc->dev_lock); return (result); Modified: head/sys/dev/tpm/tpm20.h ============================================================================== --- head/sys/dev/tpm/tpm20.h Tue Apr 16 02:12:38 2019 (r346258) +++ head/sys/dev/tpm/tpm20.h Tue Apr 16 02:28:35 2019 (r346259) @@ -120,6 +120,7 @@ struct tpm_sc { uint8_t *buf; size_t pending_data_length; + lwpid_t owner_tid; struct callout discard_buffer_callout; #ifdef TPM_HARVEST From owner-svn-src-all@freebsd.org Tue Apr 16 02:38:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2438C158503E; Tue, 16 Apr 2019 02:38:41 +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 A63A76E7C6; Tue, 16 Apr 2019 02:38:40 +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 631791934D; Tue, 16 Apr 2019 02:38:40 +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 x3G2ceBD062161; Tue, 16 Apr 2019 02:38:40 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G2ceiS062160; Tue, 16 Apr 2019 02:38:40 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201904160238.x3G2ceiS062160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 16 Apr 2019 02:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346260 - stable/11/sys/rpc/rpcsec_gss X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/sys/rpc/rpcsec_gss X-SVN-Commit-Revision: 346260 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A63A76E7C6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 02:38:41 -0000 Author: rmacklem Date: Tue Apr 16 02:38:39 2019 New Revision: 346260 URL: https://svnweb.freebsd.org/changeset/base/346260 Log: MFC: r345818, r345828 Fix a race in the RPCSEC_GSS server code that caused crashes. When a new client structure was allocated, it was added to the list so that it was visible to other threads before the expiry time was initialized, with only a single reference count. The caller would increment the reference count, but it was possible for another thread to decrement the reference count to zero and free the structure before the caller incremented the reference count. This could occur because the expiry time was still set to zero when the new client structure was inserted in the list and the list was unlocked. This patch fixes the race by initializing the reference count to two and initializing all fields, including the expiry time, before inserting it in the list. Modified: stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Tue Apr 16 02:28:35 2019 (r346259) +++ stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Tue Apr 16 02:38:39 2019 (r346260) @@ -559,19 +559,18 @@ svc_rpc_gss_create_client(void) client = mem_alloc(sizeof(struct svc_rpc_gss_client)); memset(client, 0, sizeof(struct svc_rpc_gss_client)); - refcount_init(&client->cl_refs, 1); + + /* + * Set the initial value of cl_refs to two. One for the caller + * and the other to hold onto the client structure until it expires. + */ + refcount_init(&client->cl_refs, 2); sx_init(&client->cl_lock, "GSS-client"); getcredhostid(curthread->td_ucred, &hostid); client->cl_id.ci_hostid = hostid; getboottime(&boottime); client->cl_id.ci_boottime = boottime.tv_sec; client->cl_id.ci_id = svc_rpc_gss_next_clientid++; - list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; - sx_xlock(&svc_rpc_gss_lock); - TAILQ_INSERT_HEAD(list, client, cl_link); - TAILQ_INSERT_HEAD(&svc_rpc_gss_clients, client, cl_alllink); - svc_rpc_gss_client_count++; - sx_xunlock(&svc_rpc_gss_lock); /* * Start the client off with a short expiration time. We will @@ -581,6 +580,12 @@ svc_rpc_gss_create_client(void) client->cl_locked = FALSE; client->cl_expiration = time_uptime + 5*60; + list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; + sx_xlock(&svc_rpc_gss_lock); + TAILQ_INSERT_HEAD(list, client, cl_link); + TAILQ_INSERT_HEAD(&svc_rpc_gss_clients, client, cl_alllink); + svc_rpc_gss_client_count++; + sx_xunlock(&svc_rpc_gss_lock); return (client); } @@ -1278,7 +1283,6 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) goto out; } client = svc_rpc_gss_create_client(); - refcount_acquire(&client->cl_refs); } else { struct svc_rpc_gss_clientid *p; if (gc.gc_handle.length != sizeof(*p)) { From owner-svn-src-all@freebsd.org Tue Apr 16 02:46:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6750F1585444; Tue, 16 Apr 2019 02:46:23 +0000 (UTC) (envelope-from mw@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 08B536EE38; Tue, 16 Apr 2019 02:46:23 +0000 (UTC) (envelope-from mw@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 EB31819515; Tue, 16 Apr 2019 02:46:22 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3G2kMm8067429; Tue, 16 Apr 2019 02:46:22 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G2kMpk067425; Tue, 16 Apr 2019 02:46:22 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201904160246.x3G2kMpk067425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Tue, 16 Apr 2019 02:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346261 - head/sys/dev/tpm X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/tpm X-SVN-Commit-Revision: 346261 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 08B536EE38 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 02:46:23 -0000 Author: mw Date: Tue Apr 16 02:46:21 2019 New Revision: 346261 URL: https://svnweb.freebsd.org/changeset/base/346261 Log: Improve tpm20 style No functional changes to the code are applied. Submitted by: Kornel Duleba Obtained from: Semihalf Sponsored by: Stormshield Modified: head/sys/dev/tpm/tpm20.c head/sys/dev/tpm/tpm20.h head/sys/dev/tpm/tpm_crb.c head/sys/dev/tpm/tpm_tis.c Modified: head/sys/dev/tpm/tpm20.c ============================================================================== --- head/sys/dev/tpm/tpm20.c Tue Apr 16 02:38:39 2019 (r346260) +++ head/sys/dev/tpm/tpm20.c Tue Apr 16 02:46:21 2019 (r346261) @@ -142,7 +142,8 @@ tpm20_write(struct cdev *dev, struct uio *uio, int fla return (result); } -static void tpm20_discard_buffer(void *arg) +static void +tpm20_discard_buffer(void *arg) { struct tpm_sc *sc; @@ -304,9 +305,10 @@ tpm20_save_state(device_t dev, bool suspend) { struct tpm_sc *sc; uint8_t save_cmd[] = { - 0x80, 0x01, /* TPM_ST_NO_SESSIONS tag*/ + 0x80, 0x01, /* TPM_ST_NO_SESSIONS tag*/ 0x00, 0x00, 0x00, 0x0C, /* cmd length */ - 0x00, 0x00, 0x01, 0x45, 0x00, 0x00 /* cmd TPM_CC_Shutdown */ + 0x00, 0x00, 0x01, 0x45, /* cmd TPM_CC_Shutdown */ + 0x00, 0x00 /* TPM_SU_STATE */ }; sc = device_get_softc(dev); @@ -315,7 +317,7 @@ tpm20_save_state(device_t dev, bool suspend) * Inform the TPM whether we are going to suspend or reboot/shutdown. */ if (suspend) - save_cmd[11] = 1; /* TPM_SU_STATE */ + save_cmd[11] = 1; /* TPM_SU_STATE */ if (sc == NULL || sc->buf == NULL) return (0); Modified: head/sys/dev/tpm/tpm20.h ============================================================================== --- head/sys/dev/tpm/tpm20.h Tue Apr 16 02:38:39 2019 (r346260) +++ head/sys/dev/tpm/tpm20.h Tue Apr 16 02:46:21 2019 (r346261) @@ -26,7 +26,7 @@ */ #ifndef _TPM20_H_ -#define _TPM20_H_ +#define _TPM20_H_ #include __FBSDID("$FreeBSD$"); @@ -60,46 +60,46 @@ __FBSDID("$FreeBSD$"); #define BIT(x) (1 << (x)) /* Timeouts in us */ -#define TPM_TIMEOUT_A 750000 -#define TPM_TIMEOUT_B 2000000 -#define TPM_TIMEOUT_C 200000 -#define TPM_TIMEOUT_D 30000 +#define TPM_TIMEOUT_A 750000 +#define TPM_TIMEOUT_B 2000000 +#define TPM_TIMEOUT_C 200000 +#define TPM_TIMEOUT_D 30000 /* * Generating RSA key pair takes ~(10-20s), which is significantly longer than * any timeout defined in spec. Because of that we need a new one. */ -#define TPM_TIMEOUT_LONG 40000000 +#define TPM_TIMEOUT_LONG 40000000 /* List of commands that require TPM_TIMEOUT_LONG time to complete */ -#define TPM_CC_CreatePrimary 0x00000131 +#define TPM_CC_CreatePrimary 0x00000131 #define TPM_CC_Create 0x00000153 #define TPM_CC_CreateLoaded 0x00000191 /* List of commands that require only TPM_TIMEOUT_C time to complete */ -#define TPM_CC_SequenceComplete 0x0000013e -#define TPM_CC_Startup 0x00000144 -#define TPM_CC_SequenceUpdate 0x0000015c -#define TPM_CC_GetCapability 0x0000017a -#define TPM_CC_PCR_Extend 0x00000182 -#define TPM_CC_EventSequenceComplete 0x00000185 -#define TPM_CC_HashSequenceStart 0x00000186 +#define TPM_CC_SequenceComplete 0x0000013e +#define TPM_CC_Startup 0x00000144 +#define TPM_CC_SequenceUpdate 0x0000015c +#define TPM_CC_GetCapability 0x0000017a +#define TPM_CC_PCR_Extend 0x00000182 +#define TPM_CC_EventSequenceComplete 0x00000185 +#define TPM_CC_HashSequenceStart 0x00000186 /* Timeout before data in read buffer is discarded */ -#define TPM_READ_TIMEOUT 500000 +#define TPM_READ_TIMEOUT 500000 -#define TPM_BUFSIZE 0x1000 +#define TPM_BUFSIZE 0x1000 -#define TPM_HEADER_SIZE 10 +#define TPM_HEADER_SIZE 10 -#define TPM_CDEV_NAME "tpm0" -#define TPM_CDEV_PERM_FLAG 0600 +#define TPM_CDEV_NAME "tpm0" +#define TPM_CDEV_PERM_FLAG 0600 -#define TPM2_START_METHOD_ACPI 2 -#define TPM2_START_METHOD_TIS 6 -#define TPM2_START_METHOD_CRB 7 -#define TPM2_START_METHOD_CRB_ACPI 8 +#define TPM2_START_METHOD_ACPI 2 +#define TPM2_START_METHOD_TIS 6 +#define TPM2_START_METHOD_CRB 7 +#define TPM2_START_METHOD_CRB_ACPI 8 struct tpm_sc { device_t dev; Modified: head/sys/dev/tpm/tpm_crb.c ============================================================================== --- head/sys/dev/tpm/tpm_crb.c Tue Apr 16 02:38:39 2019 (r346260) +++ head/sys/dev/tpm/tpm_crb.c Tue Apr 16 02:46:21 2019 (r346261) @@ -34,47 +34,47 @@ __FBSDID("$FreeBSD$"); * CRB register space as defined in * TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22 */ -#define TPM_LOC_STATE 0x0 -#define TPM_LOC_CTRL 0x8 -#define TPM_LOC_STS 0xC -#define TPM_CRB_INTF_ID 0x30 -#define TPM_CRB_CTRL_EXT 0x38 -#define TPM_CRB_CTRL_REQ 0x40 -#define TPM_CRB_CTRL_STS 0x44 -#define TPM_CRB_CTRL_CANCEL 0x48 -#define TPM_CRB_CTRL_START 0x4C -#define TPM_CRB_INT_ENABLE 0x50 -#define TPM_CRB_INT_STS 0x54 -#define TPM_CRB_CTRL_CMD_SIZE 0x58 -#define TPM_CRB_CTRL_CMD_LADDR 0x5C -#define TPM_CRB_CTRL_CMD_HADDR 0x60 -#define TPM_CRB_CTRL_RSP_SIZE 0x64 -#define TPM_CRB_CTRL_RSP_ADDR 0x68 -#define TPM_CRB_CTRL_RSP_HADDR 0x6c -#define TPM_CRB_DATA_BUFFER 0x80 +#define TPM_LOC_STATE 0x0 +#define TPM_LOC_CTRL 0x8 +#define TPM_LOC_STS 0xC +#define TPM_CRB_INTF_ID 0x30 +#define TPM_CRB_CTRL_EXT 0x38 +#define TPM_CRB_CTRL_REQ 0x40 +#define TPM_CRB_CTRL_STS 0x44 +#define TPM_CRB_CTRL_CANCEL 0x48 +#define TPM_CRB_CTRL_START 0x4C +#define TPM_CRB_INT_ENABLE 0x50 +#define TPM_CRB_INT_STS 0x54 +#define TPM_CRB_CTRL_CMD_SIZE 0x58 +#define TPM_CRB_CTRL_CMD_LADDR 0x5C +#define TPM_CRB_CTRL_CMD_HADDR 0x60 +#define TPM_CRB_CTRL_RSP_SIZE 0x64 +#define TPM_CRB_CTRL_RSP_ADDR 0x68 +#define TPM_CRB_CTRL_RSP_HADDR 0x6c +#define TPM_CRB_DATA_BUFFER 0x80 -#define TPM_LOC_STATE_ESTB BIT(0) -#define TPM_LOC_STATE_ASSIGNED BIT(1) -#define TPM_LOC_STATE_ACTIVE_MASK 0x9C -#define TPM_LOC_STATE_VALID BIT(7) +#define TPM_LOC_STATE_ESTB BIT(0) +#define TPM_LOC_STATE_ASSIGNED BIT(1) +#define TPM_LOC_STATE_ACTIVE_MASK 0x9C +#define TPM_LOC_STATE_VALID BIT(7) -#define TPM_CRB_INTF_ID_TYPE_CRB 0x1 -#define TPM_CRB_INTF_ID_TYPE 0x7 +#define TPM_CRB_INTF_ID_TYPE_CRB 0x1 +#define TPM_CRB_INTF_ID_TYPE 0x7 -#define TPM_LOC_CTRL_REQUEST BIT(0) -#define TPM_LOC_CTRL_RELINQUISH BIT(1) +#define TPM_LOC_CTRL_REQUEST BIT(0) +#define TPM_LOC_CTRL_RELINQUISH BIT(1) -#define TPM_CRB_CTRL_REQ_GO_READY BIT(0) -#define TPM_CRB_CTRL_REQ_GO_IDLE BIT(1) +#define TPM_CRB_CTRL_REQ_GO_READY BIT(0) +#define TPM_CRB_CTRL_REQ_GO_IDLE BIT(1) -#define TPM_CRB_CTRL_STS_ERR_BIT BIT(0) -#define TPM_CRB_CTRL_STS_IDLE_BIT BIT(1) +#define TPM_CRB_CTRL_STS_ERR_BIT BIT(0) +#define TPM_CRB_CTRL_STS_IDLE_BIT BIT(1) -#define TPM_CRB_CTRL_CANCEL_CMD BIT(0) +#define TPM_CRB_CTRL_CANCEL_CMD BIT(0) -#define TPM_CRB_CTRL_START_CMD BIT(0) +#define TPM_CRB_CTRL_START_CMD BIT(0) -#define TPM_CRB_INT_ENABLE_BIT BIT(31) +#define TPM_CRB_INT_ENABLE_BIT BIT(31) struct tpmcrb_sc { struct tpm_sc base; Modified: head/sys/dev/tpm/tpm_tis.c ============================================================================== --- head/sys/dev/tpm/tpm_tis.c Tue Apr 16 02:38:39 2019 (r346260) +++ head/sys/dev/tpm/tpm_tis.c Tue Apr 16 02:46:21 2019 (r346261) @@ -34,45 +34,45 @@ __FBSDID("$FreeBSD$"); * TIS register space as defined in * TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22 */ -#define TPM_ACCESS 0x0 -#define TPM_INT_ENABLE 0x8 -#define TPM_INT_VECTOR 0xc -#define TPM_INT_STS 0x10 -#define TPM_INTF_CAPS 0x14 -#define TPM_STS 0x18 -#define TPM_DATA_FIFO 0x24 -#define TPM_INTF_ID 0x30 -#define TPM_XDATA_FIFO 0x80 -#define TPM_DID_VID 0xF00 -#define TPM_RID 0xF04 +#define TPM_ACCESS 0x0 +#define TPM_INT_ENABLE 0x8 +#define TPM_INT_VECTOR 0xc +#define TPM_INT_STS 0x10 +#define TPM_INTF_CAPS 0x14 +#define TPM_STS 0x18 +#define TPM_DATA_FIFO 0x24 +#define TPM_INTF_ID 0x30 +#define TPM_XDATA_FIFO 0x80 +#define TPM_DID_VID 0xF00 +#define TPM_RID 0xF04 -#define TPM_ACCESS_LOC_REQ BIT(1) -#define TPM_ACCESS_LOC_Seize BIT(3) -#define TPM_ACCESS_LOC_ACTIVE BIT(5) -#define TPM_ACCESS_LOC_RELINQUISH BIT(5) -#define TPM_ACCESS_VALID BIT(7) +#define TPM_ACCESS_LOC_REQ BIT(1) +#define TPM_ACCESS_LOC_Seize BIT(3) +#define TPM_ACCESS_LOC_ACTIVE BIT(5) +#define TPM_ACCESS_LOC_RELINQUISH BIT(5) +#define TPM_ACCESS_VALID BIT(7) -#define TPM_INT_ENABLE_GLOBAL_ENABLE BIT(31) -#define TPM_INT_ENABLE_CMD_RDY BIT(7) -#define TPM_INT_ENABLE_LOC_CHANGE BIT(2) -#define TPM_INT_ENABLE_STS_VALID BIT(1) -#define TPM_INT_ENABLE_DATA_AVAIL BIT(0) +#define TPM_INT_ENABLE_GLOBAL_ENABLE BIT(31) +#define TPM_INT_ENABLE_CMD_RDY BIT(7) +#define TPM_INT_ENABLE_LOC_CHANGE BIT(2) +#define TPM_INT_ENABLE_STS_VALID BIT(1) +#define TPM_INT_ENABLE_DATA_AVAIL BIT(0) -#define TPM_INT_STS_CMD_RDY BIT(7) -#define TPM_INT_STS_LOC_CHANGE BIT(2) -#define TPM_INT_STS_VALID BIT(1) -#define TPM_INT_STS_DATA_AVAIL BIT(0) +#define TPM_INT_STS_CMD_RDY BIT(7) +#define TPM_INT_STS_LOC_CHANGE BIT(2) +#define TPM_INT_STS_VALID BIT(1) +#define TPM_INT_STS_DATA_AVAIL BIT(0) -#define TPM_INTF_CAPS_VERSION 0x70000000 -#define TPM_INTF_CAPS_TPM20 0x30000000 +#define TPM_INTF_CAPS_VERSION 0x70000000 +#define TPM_INTF_CAPS_TPM20 0x30000000 -#define TPM_STS_VALID BIT(7) -#define TPM_STS_CMD_RDY BIT(6) -#define TPM_STS_CMD_START BIT(5) -#define TPM_STS_DATA_AVAIL BIT(4) -#define TPM_STS_DATA_EXPECTED BIT(3) -#define TPM_STS_BURST_MASK 0xFFFF00 -#define TPM_STS_BURST_OFFSET 0x8 +#define TPM_STS_VALID BIT(7) +#define TPM_STS_CMD_RDY BIT(6) +#define TPM_STS_CMD_START BIT(5) +#define TPM_STS_DATA_AVAIL BIT(4) +#define TPM_STS_DATA_EXPECTED BIT(3) +#define TPM_STS_BURST_MASK 0xFFFF00 +#define TPM_STS_BURST_OFFSET 0x8 static int tpmtis_transmit(struct tpm_sc *sc, size_t length); @@ -93,6 +93,7 @@ static bool tpmtis_go_ready(struct tpm_sc *sc); static bool tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, uint32_t mask, uint32_t val, int32_t timeout); + static uint16_t tpmtis_wait_for_burst(struct tpm_sc *sc); char *tpmtis_ids[] = {"MSFT0101", NULL}; From owner-svn-src-all@freebsd.org Tue Apr 16 02:48:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF587158550B; Tue, 16 Apr 2019 02:48:05 +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 527D06EFAF; Tue, 16 Apr 2019 02:48:05 +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 2892B1951A; Tue, 16 Apr 2019 02:48:05 +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 x3G2m50P067537; Tue, 16 Apr 2019 02:48:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G2m5p0067536; Tue, 16 Apr 2019 02:48:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201904160248.x3G2m5p0067536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 16 Apr 2019 02:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r346262 - stable/10/sys/rpc/rpcsec_gss X-SVN-Group: stable-10 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/10/sys/rpc/rpcsec_gss X-SVN-Commit-Revision: 346262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 527D06EFAF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 02:48:06 -0000 Author: rmacklem Date: Tue Apr 16 02:48:04 2019 New Revision: 346262 URL: https://svnweb.freebsd.org/changeset/base/346262 Log: MFC: r345818, r345828 Fix a race in the RPCSEC_GSS server code that caused crashes. When a new client structure was allocated, it was added to the list so that it was visible to other threads before the expiry time was initialized, with only a single reference count. The caller would increment the reference count, but it was possible for another thread to decrement the reference count to zero and free the structure before the caller incremented the reference count. This could occur because the expiry time was still set to zero when the new client structure was inserted in the list and the list was unlocked. This patch fixes the race by initializing the reference count to two and initializing all fields, including the expiry time, before inserting it in the list. Modified: stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Tue Apr 16 02:46:21 2019 (r346261) +++ stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Tue Apr 16 02:48:04 2019 (r346262) @@ -543,18 +543,17 @@ svc_rpc_gss_create_client(void) client = mem_alloc(sizeof(struct svc_rpc_gss_client)); memset(client, 0, sizeof(struct svc_rpc_gss_client)); - refcount_init(&client->cl_refs, 1); + + /* + * Set the initial value of cl_refs to two. One for the caller + * and the other to hold onto the client structure until it expires. + */ + refcount_init(&client->cl_refs, 2); sx_init(&client->cl_lock, "GSS-client"); getcredhostid(curthread->td_ucred, &hostid); client->cl_id.ci_hostid = hostid; client->cl_id.ci_boottime = boottime.tv_sec; client->cl_id.ci_id = svc_rpc_gss_next_clientid++; - list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; - sx_xlock(&svc_rpc_gss_lock); - TAILQ_INSERT_HEAD(list, client, cl_link); - TAILQ_INSERT_HEAD(&svc_rpc_gss_clients, client, cl_alllink); - svc_rpc_gss_client_count++; - sx_xunlock(&svc_rpc_gss_lock); /* * Start the client off with a short expiration time. We will @@ -564,6 +563,12 @@ svc_rpc_gss_create_client(void) client->cl_locked = FALSE; client->cl_expiration = time_uptime + 5*60; + list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; + sx_xlock(&svc_rpc_gss_lock); + TAILQ_INSERT_HEAD(list, client, cl_link); + TAILQ_INSERT_HEAD(&svc_rpc_gss_clients, client, cl_alllink); + svc_rpc_gss_client_count++; + sx_xunlock(&svc_rpc_gss_lock); return (client); } @@ -1261,7 +1266,6 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) goto out; } client = svc_rpc_gss_create_client(); - refcount_acquire(&client->cl_refs); } else { struct svc_rpc_gss_clientid *p; if (gc.gc_handle.length != sizeof(*p)) { From owner-svn-src-all@freebsd.org Tue Apr 16 04:12:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC52C1588343; Tue, 16 Apr 2019 04:12:42 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 8A8447269A; Tue, 16 Apr 2019 04:12:42 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6121F1A565; Tue, 16 Apr 2019 04:12:42 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3G4Cge2015093; Tue, 16 Apr 2019 04:12:42 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G4CgN2015092; Tue, 16 Apr 2019 04:12:42 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201904160412.x3G4CgN2015092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Tue, 16 Apr 2019 04:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346263 - head/contrib/tcpdump X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/contrib/tcpdump X-SVN-Commit-Revision: 346263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8A8447269A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 04:12:43 -0000 Author: oshogbo Date: Tue Apr 16 04:12:41 2019 New Revision: 346263 URL: https://svnweb.freebsd.org/changeset/base/346263 Log: tcpdump: disable Capsicum if -E option is provided. The -E is used to provide a secret for decrypting IPsec. The secret may be provided through command line or as the file. The problem is that tcpdump doesn't support yet opening files in capability mode and the file may contain a list of the files to open. As a workaround, for now, let's just disable capsicum if the -E the option is provided. PR: 236819 MFC after: 2 weeks Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Tue Apr 16 02:48:04 2019 (r346262) +++ head/contrib/tcpdump/tcpdump.c Tue Apr 16 04:12:41 2019 (r346263) @@ -2063,7 +2063,8 @@ main(int argc, char **argv) } #ifdef HAVE_CAPSICUM - cansandbox = (VFileName == NULL && zflag == NULL); + cansandbox = (VFileName == NULL && zflag == NULL && + ndo->ndo_espsecret == NULL); #ifdef HAVE_CASPER cansandbox = (cansandbox && (ndo->ndo_nflag || capdns != NULL)); #else From owner-svn-src-all@freebsd.org Tue Apr 16 05:11:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B16E9158944E; Tue, 16 Apr 2019 05:11:40 +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 4F5E57429D; Tue, 16 Apr 2019 05:11:40 +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 2B4DC1AF4C; Tue, 16 Apr 2019 05:11:40 +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 x3G5Be0J043627; Tue, 16 Apr 2019 05:11:40 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G5BdGv043626; Tue, 16 Apr 2019 05:11:39 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201904160511.x3G5BdGv043626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 16 Apr 2019 05:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346264 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 346264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F5E57429D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 05:11:40 -0000 Author: cy Date: Tue Apr 16 05:11:39 2019 New Revision: 346264 URL: https://svnweb.freebsd.org/changeset/base/346264 Log: Document when I received my commit bits. Modified: head/share/misc/committers-ports.dot head/share/misc/committers-src.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Apr 16 04:12:41 2019 (r346263) +++ head/share/misc/committers-ports.dot Tue Apr 16 05:11:39 2019 (r346264) @@ -84,6 +84,7 @@ cperciva [label="Colin Percival\ncperciva@FreeBSD.org\ crees [label="Chris Rees\ncrees@FreeBSD.org\n2011/06/11"] cs [label="Carlo Strub\ncs@FreeBSD.org\n2011/09/13"] culot [label="Frederic Culot\nculot@FreeBSD.org\n2010/10/16"] +cy [label="Cy Schubert\ncy@FreeBSD.org\n2001/11/13"] daichi [label="Daichi Goto\ndaichi@FreeBSD.org\n2002/10/17"] danfe [label="Alexey Dokuchaev\ndanfe@FreeBSD.org\n2004/08/20"] danilo [label="Danilo E. Gondolfo\ndanilo@FreeBSD.org\n2013/09/23"] Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Tue Apr 16 04:12:41 2019 (r346263) +++ head/share/misc/committers-src.dot Tue Apr 16 05:11:39 2019 (r346264) @@ -143,6 +143,7 @@ cognet [label="Olivier Houchard\ncognet@FreeBSD.org\n2 cokane [label="Coleman Kane\ncokane@FreeBSD.org\n2000/06/19"] cperciva [label="Colin Percival\ncperciva@FreeBSD.org\n2004/01/20"] csjp [label="Christian S.J. Peron\ncsjp@FreeBSD.org\n2004/05/04"] +cy [label="Cy Schubert\ncy@FreeBSD.org\n2013/04/23"] dab [label="David Bright\ndab@FreeBSD.org\n2016/10/24"] das [label="David Schultz\ndas@FreeBSD.org\n2003/02/21"] davide [label="Davide Italiano\ndavide@FreeBSD.org\n2012/01/27"] From owner-svn-src-all@freebsd.org Tue Apr 16 09:42:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DA5A156B920; Tue, 16 Apr 2019 09:42:43 +0000 (UTC) (envelope-from peterj@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 C0C1E845CB; Tue, 16 Apr 2019 09:42:42 +0000 (UTC) (envelope-from peterj@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 9C9991DDAA; Tue, 16 Apr 2019 09:42:42 +0000 (UTC) (envelope-from peterj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3G9gg9w086683; Tue, 16 Apr 2019 09:42:42 GMT (envelope-from peterj@FreeBSD.org) Received: (from peterj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G9gg2S086682; Tue, 16 Apr 2019 09:42:42 GMT (envelope-from peterj@FreeBSD.org) Message-Id: <201904160942.x3G9gg2S086682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peterj set sender to peterj@FreeBSD.org using -f From: Peter Jeremy Date: Tue, 16 Apr 2019 09:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346265 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: peterj X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 346265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C0C1E845CB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 09:42:43 -0000 Author: peterj Date: Tue Apr 16 09:42:42 2019 New Revision: 346265 URL: https://svnweb.freebsd.org/changeset/base/346265 Log: Fix cpufreq(4) on RPI-B Since r324184 the root node compatible for the original Raspberry Pi is "brcm,bcm2835", add it to the compatible list of bcm2835_cpufreq. Tested On: RPi1 Model B Note that the default Das U-Boot FDT does not include a cpus clause so actually adding a bcm2835_cpufreq device requires adding a FDT overlay defining the cpu. Approved by: grog, jhb (mentors) MFC after: 3 days Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Tue Apr 16 05:11:39 2019 (r346264) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Tue Apr 16 09:42:42 2019 (r346265) @@ -126,6 +126,7 @@ static struct ofw_compat_data compat_data[] = { { "broadcom,bcm2835-vc", 1 }, { "broadcom,bcm2708-vc", 1 }, { "brcm,bcm2709", 1 }, + { "brcm,bcm2835", 1 }, { "brcm,bcm2836", 1 }, { "brcm,bcm2837", 1 }, { NULL, 0 } From owner-svn-src-all@freebsd.org Tue Apr 16 09:44:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C74B156B9F7; Tue, 16 Apr 2019 09:44:47 +0000 (UTC) (envelope-from peterj@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 32D828474E; Tue, 16 Apr 2019 09:44:47 +0000 (UTC) (envelope-from peterj@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 087951DDAC; Tue, 16 Apr 2019 09:44:47 +0000 (UTC) (envelope-from peterj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3G9ikTM086826; Tue, 16 Apr 2019 09:44:46 GMT (envelope-from peterj@FreeBSD.org) Received: (from peterj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3G9ik8g086825; Tue, 16 Apr 2019 09:44:46 GMT (envelope-from peterj@FreeBSD.org) Message-Id: <201904160944.x3G9ik8g086825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peterj set sender to peterj@FreeBSD.org using -f From: Peter Jeremy Date: Tue, 16 Apr 2019 09:44:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346266 - head/sys/arm/conf X-SVN-Group: head X-SVN-Commit-Author: peterj X-SVN-Commit-Paths: head/sys/arm/conf X-SVN-Commit-Revision: 346266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 32D828474E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 09:44:47 -0000 Author: peterj Date: Tue Apr 16 09:44:46 2019 New Revision: 346266 URL: https://svnweb.freebsd.org/changeset/base/346266 Log: Specify correct Ethernet phy for RPI-B Correct a typo in the RPI-B ethernet config - the RPi-B includes a SMC LAN9512 USB bridge and Ethernet 10/100 NIC/phy. The phy part of this is supported by smscphy. Tested On: RPi1 Model B Approved by: grog, jhb (mentors) MFC after: 3 days Modified: head/sys/arm/conf/RPI-B Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Tue Apr 16 09:42:42 2019 (r346265) +++ head/sys/arm/conf/RPI-B Tue Apr 16 09:44:46 2019 (r346266) @@ -77,7 +77,7 @@ device da device umass # USB ethernet support -device smcphy +device smscphy device mii device smsc From owner-svn-src-all@freebsd.org Tue Apr 16 11:20:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1E66156E825; Tue, 16 Apr 2019 11:20:14 +0000 (UTC) (envelope-from fsu@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 53B9487A63; Tue, 16 Apr 2019 11:20:14 +0000 (UTC) (envelope-from fsu@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 2D6E11ED29; Tue, 16 Apr 2019 11:20:14 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GBKEsB036423; Tue, 16 Apr 2019 11:20:14 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GBKBhN036407; Tue, 16 Apr 2019 11:20:11 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201904161120.x3GBKBhN036407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Tue, 16 Apr 2019 11:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346267 - head/sys/fs/ext2fs X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/sys/fs/ext2fs X-SVN-Commit-Revision: 346267 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 53B9487A63 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 11:20:15 -0000 Author: fsu Date: Tue Apr 16 11:20:10 2019 New Revision: 346267 URL: https://svnweb.freebsd.org/changeset/base/346267 Log: ext2fs: Initial version of DTrace support. Reviewed by: pfg, gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19848 Modified: head/sys/fs/ext2fs/ext2_alloc.c head/sys/fs/ext2fs/ext2_csum.c head/sys/fs/ext2fs/ext2_extattr.c head/sys/fs/ext2fs/ext2_extents.h head/sys/fs/ext2fs/ext2_extern.h head/sys/fs/ext2fs/ext2_hash.c head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/ext2fs/ext2_inode_cnv.c head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_subr.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/fs.h Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_alloc.c Tue Apr 16 11:20:10 2019 (r346267) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,23 @@ #include #include +SDT_PROVIDER_DEFINE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , alloc, trace, "int", "char*"); +SDT_PROBE_DEFINE3(ext2fs, , alloc, ext2_reallocblks_realloc, + "ino_t", "e2fs_lbn_t", "e2fs_lbn_t"); +SDT_PROBE_DEFINE1(ext2fs, , alloc, ext2_reallocblks_bap, "uint32_t"); +SDT_PROBE_DEFINE1(ext2fs, , alloc, ext2_reallocblks_blkno, "e2fs_daddr_t"); +SDT_PROBE_DEFINE2(ext2fs, , alloc, ext2_b_bitmap_validate_error, "char*", "int"); +SDT_PROBE_DEFINE3(ext2fs, , alloc, ext2_nodealloccg_bmap_corrupted, + "int", "daddr_t", "char*"); +SDT_PROBE_DEFINE2(ext2fs, , alloc, ext2_blkfree_bad_block, "ino_t", "e4fs_daddr_t"); +SDT_PROBE_DEFINE2(ext2fs, , alloc, ext2_vfree_doublefree, "char*", "ino_t"); + static daddr_t ext2_alloccg(struct inode *, int, daddr_t, int); static daddr_t ext2_clusteralloc(struct inode *, int, daddr_t, int); static u_long ext2_dirpref(struct inode *); @@ -128,8 +146,7 @@ ext2_alloc(struct inode *ip, daddr_t lbn, e4fs_daddr_t } nospace: EXT2_UNLOCK(ump); - ext2_fserr(fs, cred->cr_uid, "filesystem full"); - uprintf("\n%s: write failed, filesystem is full\n", fs->e2fs_fsmnt); + SDT_PROBE2(ext2fs, , alloc, trace, 1, "cannot allocate data block"); return (ENOSPC); } @@ -147,8 +164,10 @@ ext2_alloc_meta(struct inode *ip) EXT2_LOCK(ip->i_ump); blk = ext2_hashalloc(ip, ino_to_cg(fs, ip->i_number), 0, fs->e2fs_bsize, ext2_alloccg); - if (0 == blk) + if (0 == blk) { EXT2_UNLOCK(ip->i_ump); + SDT_PROBE2(ext2fs, , alloc, trace, 1, "cannot allocate meta block"); + } return (blk); } @@ -289,10 +308,8 @@ ext2_reallocblks(struct vop_reallocblks_args *ap) * block pointers in the inode and indirect blocks associated * with the file. */ -#ifdef DEBUG - printf("realloc: ino %ju, lbns %jd-%jd\n\told:", - (uintmax_t)ip->i_number, (intmax_t)start_lbn, (intmax_t)end_lbn); -#endif /* DEBUG */ + SDT_PROBE3(ext2fs, , alloc, ext2_reallocblks_realloc, + ip->i_number, start_lbn, end_lbn); blkno = newblk; for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->e2fs_fpb) { if (i == ssize) { @@ -303,9 +320,7 @@ ext2_reallocblks(struct vop_reallocblks_args *ap) if (buflist->bs_children[i]->b_blkno != fsbtodb(fs, *bap)) panic("ext2_reallocblks: alloc mismatch"); #endif -#ifdef DEBUG - printf(" %d,", *bap); -#endif /* DEBUG */ + SDT_PROBE1(ext2fs, , alloc, ext2_reallocblks_bap, *bap); *bap++ = blkno; } /* @@ -341,20 +356,13 @@ ext2_reallocblks(struct vop_reallocblks_args *ap) /* * Last, free the old blocks and assign the new blocks to the buffers. */ -#ifdef DEBUG - printf("\n\tnew:"); -#endif /* DEBUG */ for (blkno = newblk, i = 0; i < len; i++, blkno += fs->e2fs_fpb) { ext2_blkfree(ip, dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->e2fs_bsize); buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno); -#ifdef DEBUG - printf(" %d,", blkno); -#endif /* DEBUG */ + SDT_PROBE1(ext2fs, , alloc, ext2_reallocblks_blkno, blkno); } -#ifdef DEBUG - printf("\n"); -#endif /* DEBUG */ + return (0); fail: @@ -481,8 +489,7 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred noinodes: EXT2_UNLOCK(ump); - ext2_fserr(fs, cred->cr_uid, "out of inodes"); - uprintf("\n%s: create/symlink failed, no inodes free\n", fs->e2fs_fsmnt); + SDT_PROBE2(ext2fs, , alloc, trace, 1, "out of inodes"); return (ENOSPC); } @@ -959,21 +966,24 @@ ext2_b_bitmap_validate(struct m_ext2fs *fs, struct buf /* Check block bitmap block number */ offset = e2fs_gd_get_b_bitmap(gd) - group_first_block; if (offset >= max_bit || !isset(bp->b_data, offset)) { - printf("ext2fs: bad block bitmap, group %d\n", cg); + SDT_PROBE2(ext2fs, , alloc, ext2_b_bitmap_validate_error, + "bad block bitmap, group", cg); return (EINVAL); } /* Check inode bitmap block number */ offset = e2fs_gd_get_i_bitmap(gd) - group_first_block; if (offset >= max_bit || !isset(bp->b_data, offset)) { - printf("ext2fs: bad inode bitmap, group %d\n", cg); + SDT_PROBE2(ext2fs, , alloc, ext2_b_bitmap_validate_error, + "bad inode bitmap", cg); return (EINVAL); } /* Check inode table */ offset = e2fs_gd_get_i_tables(gd) - group_first_block; if (offset >= max_bit || offset + fs->e2fs_itpg >= max_bit) { - printf("ext2fs: bad inode table, group %d\n", cg); + SDT_PROBE2(ext2fs, , alloc, ext2_b_bitmap_validate_error, + "bad inode table, group", cg); return (EINVAL); } @@ -1350,9 +1360,8 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipr start = 0; loc = memcchr(&ibp[start], 0xff, len); if (loc == NULL) { - printf("ext2fs: inode bitmap corrupted: " - "cg = %d, ipref = %lld, fs = %s - run fsck\n", - cg, (long long)ipref, fs->e2fs_fsmnt); + SDT_PROBE3(ext2fs, , alloc, ext2_nodealloccg_bmap_corrupted, + cg, ipref, fs->e2fs_fsmnt); brelse(bp); EXT2_LOCK(ump); return (0); @@ -1401,9 +1410,7 @@ ext2_blkfree(struct inode *ip, e4fs_daddr_t bno, long ump = ip->i_ump; cg = dtog(fs, bno); if (bno >= fs->e2fs_bcount) { - printf("bad block %lld, ino %ju\n", (long long)bno, - (uintmax_t)ip->i_number); - ext2_fserr(fs, ip->i_uid, "bad block"); + SDT_PROBE2(ext2fs, , alloc, ext2_blkfree_bad_block, ip->i_number, bno); return; } error = bread(ip->i_devvp, @@ -1416,9 +1423,8 @@ ext2_blkfree(struct inode *ip, e4fs_daddr_t bno, long bbp = (char *)bp->b_data; bno = dtogd(fs, bno); if (isclr(bbp, bno)) { - printf("block = %lld, fs = %s\n", + panic("ext2_blkfree: freeing free block %lld, fs=%s", (long long)bno, fs->e2fs_fsmnt); - panic("ext2_blkfree: freeing free block"); } clrbit(bbp, bno); EXT2_LOCK(ump); @@ -1464,8 +1470,8 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) ibp = (char *)bp->b_data; ino = (ino - 1) % fs->e2fs->e2fs_ipg; if (isclr(ibp, ino)) { - printf("ino = %ju, fs = %s\n", - ino, fs->e2fs_fsmnt); + SDT_PROBE2(ext2fs, , alloc, ext2_vfree_doublefree, + fs->e2fs_fsmnt, ino); if (fs->e2fs_ronly == 0) panic("ext2_vfree: freeing free inode"); } @@ -1513,26 +1519,12 @@ ext2_mapsearch(struct m_ext2fs *fs, char *bbp, daddr_t start = 0; loc = memcchr(&bbp[start], 0xff, len); if (loc == NULL) { - printf("start = %d, len = %d, fs = %s\n", + panic("ext2_mapsearch: map corrupted: start=%d, len=%d, fs=%s", start, len, fs->e2fs_fsmnt); - panic("ext2_mapsearch: map corrupted"); /* NOTREACHED */ } } return ((loc - bbp) * NBBY + ffs(~*loc) - 1); -} - -/* - * Fserr prints the name of a filesystem with an error diagnostic. - * - * The form of the error message is: - * fs: error message - */ -void -ext2_fserr(struct m_ext2fs *fs, uid_t uid, char *cp) -{ - - log(LOG_ERR, "uid %u on %s: %s\n", uid, fs->e2fs_fsmnt, cp); } int Modified: head/sys/fs/ext2fs/ext2_csum.c ============================================================================== --- head/sys/fs/ext2fs/ext2_csum.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_csum.c Tue Apr 16 11:20:10 2019 (r346267) @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,14 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , trace, csum, "int", "char*"); + #define EXT2_BG_INODE_BITMAP_CSUM_HI_END \ (offsetof(struct ext2_gd, ext4bgd_i_bmap_csum_hi) + \ sizeof(uint16_t)) @@ -134,8 +143,7 @@ ext2_extattr_blk_csum_verify(struct inode *ip, struct if (EXT2_HAS_RO_COMPAT_FEATURE(ip->i_e2fs, EXT2F_ROCOMPAT_METADATA_CKSUM) && (header->h_checksum != ext2_extattr_blk_csum(ip, ip->i_facl, header))) { - printf("WARNING: bad extattr csum detected, ip=%lu - run fsck\n", - (unsigned long)ip->i_number); + SDT_PROBE2(ext2fs, , trace, csum, 1, "bad extattr csum detected"); return (EIO); } @@ -351,8 +359,7 @@ ext2_dir_blk_csum_verify(struct inode *ip, struct buf error = ext2_dx_csum_verify(ip, ep); if (error) - printf("WARNING: bad directory csum detected, ip=%lu" - " - run fsck\n", (unsigned long)ip->i_number); + SDT_PROBE2(ext2fs, , trace, csum, 1, "bad directory csum detected"); return (error); } @@ -445,8 +452,7 @@ ext2_extent_blk_csum_verify(struct inode *ip, void *da calculated = ext2_extent_blk_csum(ip, ehp); if (provided != calculated) { - printf("WARNING: bad extent csum detected, ip=%lu - run fsck\n", - (unsigned long)ip->i_number); + SDT_PROBE2(ext2fs, , trace, csum, 1, "bad extent csum detected"); return (EIO); } @@ -491,8 +497,7 @@ ext2_gd_i_bitmap_csum_verify(struct m_ext2fs *fs, int calculated &= 0xFFFF; if (provided != calculated) { - printf("WARNING: bad inode bitmap csum detected, " - "cg=%d - run fsck\n", cg); + SDT_PROBE2(ext2fs, , trace, csum, 1, "bad inode bitmap csum detected"); return (EIO); } @@ -532,8 +537,7 @@ ext2_gd_b_bitmap_csum_verify(struct m_ext2fs *fs, int calculated &= 0xFFFF; if (provided != calculated) { - printf("WARNING: bad block bitmap csum detected, " - "cg=%d - run fsck\n", cg); + SDT_PROBE2(ext2fs, , trace, csum, 1, "bad block bitmap csum detected"); return (EIO); } @@ -629,7 +633,7 @@ ext2_ei_csum_verify(struct inode *ip, struct ext2fs_di if (!memcmp(ei, &ei_zero, sizeof(struct ext2fs_dinode))) return (0); - printf("WARNING: Bad inode %ju csum - run fsck\n", ip->i_number); + SDT_PROBE2(ext2fs, , trace, csum, 1, "bad inode csum"); return (EIO); } Modified: head/sys/fs/ext2fs/ext2_extattr.c ============================================================================== --- head/sys/fs/ext2fs/ext2_extattr.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_extattr.c Tue Apr 16 11:20:10 2019 (r346267) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -48,6 +49,14 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , trace, extattr, "int", "char*"); + static int ext2_extattr_attrnamespace_to_bsd(int attrnamespace) { @@ -89,9 +98,8 @@ ext2_extattr_name_to_bsd(int attrnamespace, const char * XXX: Not all linux namespaces are mapped to bsd for now, * return NULL, which will be converted to ENOTSUP on upper layer. */ -#ifdef EXT2FS_DEBUG - printf("can not convert ext2fs name to bsd: namespace=%d\n", attrnamespace); -#endif + SDT_PROBE2(ext2fs, , trace, extattr, 1, + "can not convert ext2fs name to bsd namespace"); return (NULL); } Modified: head/sys/fs/ext2fs/ext2_extents.h ============================================================================== --- head/sys/fs/ext2fs/ext2_extents.h Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_extents.h Tue Apr 16 11:20:10 2019 (r346267) @@ -129,7 +129,7 @@ int ext4_ext_remove_space(struct inode *ip, off_t leng int ext4_ext_get_blocks(struct inode *ip, int64_t iblock, unsigned long max_blocks, struct ucred *cred, struct buf **bpp, int *allocate, daddr_t *); -#ifdef EXT2FS_DEBUG +#ifdef EXT2FS_PRINT_EXTENTS void ext4_ext_print_extent_tree_status(struct inode *ip); #endif Modified: head/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- head/sys/fs/ext2fs/ext2_extern.h Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_extern.h Tue Apr 16 11:20:10 2019 (r346267) @@ -66,7 +66,6 @@ int ext2_bmaparray(struct vnode *, daddr_t, daddr_t *, int ext4_bmapext(struct vnode *, int32_t, int64_t *, int *, int *); void ext2_clusteracct(struct m_ext2fs *, char *, int, e4fs_daddr_t, int); void ext2_dirbad(struct inode *ip, doff_t offset, char *how); -void ext2_fserr(struct m_ext2fs *, uid_t, char *); int ext2_ei2i(struct ext2fs_dinode *, struct inode *); int ext2_getlbns(struct vnode *, daddr_t, struct indir *, int *); int ext2_i2ei(struct inode *, struct ext2fs_dinode *); @@ -80,7 +79,7 @@ int ext2_vfree(struct vnode *, ino_t, int); int ext2_vinit(struct mount *, struct vop_vector *, struct vnode **vpp); int ext2_lookup(struct vop_cachedlookup_args *); int ext2_readdir(struct vop_readdir_args *); -#ifdef EXT2FS_DEBUG +#ifdef EXT2FS_PRINT_EXTENTS void ext2_print_inode(struct inode *); #endif int ext2_direnter(struct inode *, Modified: head/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- head/sys/fs/ext2fs/ext2_hash.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_hash.c Tue Apr 16 11:20:10 2019 (r346267) @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -67,6 +68,14 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , trace, hash, "int", "char*"); + /* F, G, and H are MD4 functions */ #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) #define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) @@ -300,6 +309,7 @@ ext2_htree_hash(const char *name, int len, minor = hash[2]; break; default: + SDT_PROBE2(ext2fs, , trace, hash, 1, "unexpected hash version"); goto error; } Modified: head/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- head/sys/fs/ext2fs/ext2_htree.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_htree.c Tue Apr 16 11:20:10 2019 (r346267) @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -54,6 +55,14 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , trace, htree, "int", "char*"); + static void ext2_append_entry(char *block, uint32_t blksize, struct ext2fs_direct_2 *last_entry, struct ext2fs_direct_2 *new_entry, int csum_size); @@ -816,7 +825,8 @@ ext2_htree_add_entry(struct vnode *dvp, struct ext2fs_ if (ext2_htree_get_count(root_entires) == ext2_htree_get_limit(root_entires)) { - /* Directory index is full */ + SDT_PROBE2(ext2fs, , trace, htree, 1, + "directory index is full"); error = EIO; goto finish; } Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_inode.c Tue Apr 16 11:20:10 2019 (r346267) @@ -46,6 +46,7 @@ #include #include #include +#include #include #include Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode_cnv.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_inode_cnv.c Tue Apr 16 11:20:10 2019 (r346267) @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -40,10 +41,18 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , trace, inode_cnv, "int", "char*"); + #define XTIME_TO_NSEC(x) ((x & EXT3_NSEC_MASK) >> 2) #define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK) -#ifdef EXT2FS_DEBUG +#ifdef EXT2FS_PRINT_EXTENTS void ext2_print_inode(struct inode *in) { @@ -83,7 +92,7 @@ ext2_print_inode(struct inode *in) printf("\n"); } } -#endif /* EXT2FS_DEBUG */ +#endif /* EXT2FS_PRINT_EXTENTS */ /* * raw ext2 inode to inode @@ -96,12 +105,12 @@ ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip) if ((ip->i_number < EXT2_FIRST_INO(fs) && ip->i_number != EXT2_ROOTINO) || (ip->i_number < EXT2_ROOTINO) || (ip->i_number > fs->e2fs->e2fs_icount)) { - printf("ext2fs: bad inode number %ju\n", ip->i_number); + SDT_PROBE2(ext2fs, , trace, inode_cnv, 1, "bad inode number"); return (EINVAL); } if (ip->i_number == EXT2_ROOTINO && ei->e2di_nlink == 0) { - printf("ext2fs: root inode unallocated\n"); + SDT_PROBE2(ext2fs, , trace, inode_cnv, 1, "root inode unallocated"); return (EINVAL); } ip->i_nlink = ei->e2di_nlink; @@ -110,8 +119,8 @@ ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip) if (EXT2_INODE_SIZE(fs) > E2FS_REV0_INODE_SIZE) { if (E2FS_REV0_INODE_SIZE + ei->e2di_extra_isize > EXT2_INODE_SIZE(fs) || (ei->e2di_extra_isize & 3)) { - printf("ext2fs: bad extra inode size %u, inode size=%u\n", - ei->e2di_extra_isize, EXT2_INODE_SIZE(fs)); + SDT_PROBE2(ext2fs, , trace, inode_cnv, 1, + "bad extra inode size"); return (EINVAL); } } @@ -199,7 +208,7 @@ ext2_i2ei(struct inode *ip, struct ext2fs_dinode *ei) ei->e2di_flags |= (ip->i_flag & IN_E4EXTENTS) ? EXT4_EXTENTS : 0; if (ip->i_blocks > ~0U && !EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_HUGE_FILE)) { - ext2_fserr(fs, ip->i_uid, "i_blocks value is out of range"); + SDT_PROBE2(ext2fs, , trace, inode_cnv, 1, "i_blocks value is out of range"); return (EIO); } if (ip->i_blocks <= 0xffffffffffffULL) { Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_lookup.c Tue Apr 16 11:20:10 2019 (r346267) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -66,6 +67,18 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , lookup, trace, "int", "char*"); +SDT_PROBE_DEFINE4(ext2fs, , trace, ext2_dirbad_error, + "char*", "ino_t", "doff_t", "char*"); +SDT_PROBE_DEFINE5(ext2fs, , trace, ext2_dirbadentry_error, + "char*", "int", "uint32_t", "uint16_t", "uint8_t"); + #ifdef INVARIANTS static int dirchk = 1; #else @@ -810,10 +823,8 @@ ext2_dirbad(struct inode *ip, doff_t offset, char *how mp->mnt_stat.f_mntonname, (uintmax_t)ip->i_number, (long)offset, how); else - (void)printf("%s: bad dir ino %ju at offset %ld: %s\n", - mp->mnt_stat.f_mntonname, (uintmax_t)ip->i_number, - (long)offset, how); - + SDT_PROBE4(ext2fs, , trace, ext2_dirbad_error, + mp->mnt_stat.f_mntonname, ip->i_number, offset, how); } /* @@ -849,10 +860,9 @@ ext2_dirbadentry(struct vnode *dp, struct ext2fs_direc */ if (error_msg != NULL) { - printf("bad directory entry: %s\n", error_msg); - printf("offset=%d, inode=%lu, rec_len=%u, name_len=%u\n", - entryoffsetinblock, (unsigned long)de->e2d_ino, - de->e2d_reclen, de->e2d_namlen); + SDT_PROBE5(ext2fs, , trace, ext2_dirbadentry_error, + error_msg, entryoffsetinblock, + de->e2d_ino, de->e2d_reclen, de->e2d_namlen); } return error_msg == NULL ? 0 : 1; } @@ -1276,7 +1286,8 @@ ext2_checkpath(struct inode *source, struct inode *tar out: if (error == ENOTDIR) - printf("checkpath: .. not a directory\n"); + SDT_PROBE2(ext2fs, , lookup, trace, 1, + "checkpath: .. not a directory"); if (vp != NULL) vput(vp); return (error); Modified: head/sys/fs/ext2fs/ext2_subr.c ============================================================================== --- head/sys/fs/ext2fs/ext2_subr.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_subr.c Tue Apr 16 11:20:10 2019 (r346267) @@ -41,6 +41,7 @@ #include #include +#include #include #include #include Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_vfsops.c Tue Apr 16 11:20:10 2019 (r346267) @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -67,7 +68,17 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , vfsops, trace, "int", "char*"); +SDT_PROBE_DEFINE2(ext2fs, , vfsops, ext2_cg_validate_error, "char*", "int"); +SDT_PROBE_DEFINE1(ext2fs, , vfsops, ext2_compute_sb_data_error, "char*"); + static int ext2_flushfiles(struct mount *mp, int flags, struct thread *td); static int ext2_mountfs(struct vnode *, struct mount *); static int ext2_reload(struct mount *mp, struct thread *td); @@ -381,48 +392,54 @@ ext2_cg_validate(struct m_ext2fs *fs) b_bitmap = e2fs_gd_get_b_bitmap(gd); if (b_bitmap == 0) { - printf("ext2fs: cg %u: block bitmap is zero\n", i); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "block bitmap is zero", i); return (EINVAL); } if (b_bitmap <= last_cg_block) { - printf("ext2fs: cg %u: block bitmap overlaps gds\n", i); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "block bitmap overlaps gds", i); return (EINVAL); } if (b_bitmap < first_block || b_bitmap > last_block) { - printf("ext2fs: cg %u: block bitmap not in group, blk=%ju\n", - i, b_bitmap); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "block bitmap not in group", i); return (EINVAL); } i_bitmap = e2fs_gd_get_i_bitmap(gd); if (i_bitmap == 0) { - printf("ext2fs: cg %u: inode bitmap is zero\n", i); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "inode bitmap is zero", i); return (EINVAL); } if (i_bitmap <= last_cg_block) { - printf("ext2fs: cg %u: inode bitmap overlaps gds\n", i); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "inode bitmap overlaps gds", i); return (EINVAL); } if (i_bitmap < first_block || i_bitmap > last_block) { - printf("ext2fs: cg %u: inode bitmap not in group blk=%ju\n", - i, i_bitmap); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "inode bitmap not in group blk", i); return (EINVAL); } i_tables = e2fs_gd_get_i_tables(gd); if (i_tables == 0) { - printf("ext2fs: cg %u: inode table is zero\n", i); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "inode table is zero", i); return (EINVAL); } if (i_tables <= last_cg_block) { - printf("ext2fs: cg %u: inode talbes overlaps gds\n", i); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "inode talbes overlaps gds", i); return (EINVAL); } if (i_tables < first_block || i_tables + fs->e2fs_itpg - 1 > last_block) { - printf("ext2fs: cg %u: inode tables not in group blk=%ju\n", - i, i_tables); + SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error, + "inode tables not in group blk", i); return (EINVAL); } @@ -450,7 +467,8 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2f /* Check checksum features */ if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM) && EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) { - printf("ext2fs: incorrect checksum features combination\n"); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "incorrect checksum features combination"); return (EINVAL); } @@ -467,7 +485,8 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2f /* Check for block size = 1K|2K|4K */ if (es->e2fs_log_bsize > 2) { - printf("ext2fs: bad block size: %d\n", es->e2fs_log_bsize); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "bad block size"); return (EINVAL); } @@ -479,15 +498,15 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2f /* Check for fragment size */ if (es->e2fs_log_fsize > (EXT2_MAX_FRAG_LOG_SIZE - EXT2_MIN_BLOCK_LOG_SIZE)) { - printf("ext2fs: invalid log cluster size: %u\n", - es->e2fs_log_fsize); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "invalid log cluster size"); return (EINVAL); } fs->e2fs_fsize = EXT2_MIN_FRAG_SIZE << es->e2fs_log_fsize; if (fs->e2fs_fsize != fs->e2fs_bsize) { - printf("ext2fs: fragment size (%u) != block size %u\n", - fs->e2fs_fsize, fs->e2fs_bsize); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "fragment size != block size"); return (EINVAL); } @@ -495,8 +514,8 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2f /* Check reserved gdt blocks for future filesystem expansion */ if (es->e2fs_reserved_ngdb > (fs->e2fs_bsize / 4)) { - printf("ext2fs: number of reserved GDT blocks too large: %u\n", - es->e2fs_reserved_ngdb); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "number of reserved GDT blocks too large"); return (EINVAL); } @@ -509,8 +528,8 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2f * Check first ino. */ if (es->e2fs_first_ino < EXT2_FIRSTINO) { - printf("ext2fs: invalid first ino: %u\n", - es->e2fs_first_ino); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "invalid first ino"); return (EINVAL); } @@ -520,8 +539,8 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2f if (EXT2_INODE_SIZE(fs) < E2FS_REV0_INODE_SIZE || EXT2_INODE_SIZE(fs) > fs->e2fs_bsize || (fs->e2fs_isize & (fs->e2fs_isize - 1)) != 0) { - printf("ext2fs: invalid inode size %u\n", - fs->e2fs_isize); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "invalid inode size"); return (EINVAL); } } @@ -529,33 +548,36 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2f /* Check group descriptors */ if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT) && es->e3fs_desc_size != E2FS_64BIT_GD_SIZE) { - printf("ext2fs: unsupported 64bit descriptor size %u\n", - es->e3fs_desc_size); - return (EINVAL); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "unsupported 64bit descriptor size"); + return (EINVAL); } fs->e2fs_bpg = es->e2fs_bpg; fs->e2fs_fpg = es->e2fs_fpg; if (fs->e2fs_bpg == 0 || fs->e2fs_fpg == 0) { - printf("ext2fs: zero blocks/fragments per group\n"); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "zero blocks/fragments per group"); return (EINVAL); } if (fs->e2fs_bpg != fs->e2fs_bsize * 8) { - printf("ext2fs: non-standard group size unsupported %d\n", - fs->e2fs_bpg); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "non-standard group size unsupported"); return (EINVAL); } fs->e2fs_ipb = fs->e2fs_bsize / EXT2_INODE_SIZE(fs); if (fs->e2fs_ipb == 0 || fs->e2fs_ipb > fs->e2fs_bsize / E2FS_REV0_INODE_SIZE) { - printf("ext2fs: bad inodes per block size\n"); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "bad inodes per block size"); return (EINVAL); } fs->e2fs_ipg = es->e2fs_ipg; if (fs->e2fs_ipg < fs->e2fs_ipb || fs->e2fs_ipg > fs->e2fs_bsize * 8) { - printf("ext2fs: invalid inodes per group: %u\n", fs->e2fs_ipb); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "invalid inodes per group"); return (EINVAL); } @@ -571,25 +593,29 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2f } if (fs->e2fs_rbcount > fs->e2fs_bcount || fs->e2fs_fbcount > fs->e2fs_bcount) { - printf("ext2fs: invalid block count\n"); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "invalid block count"); return (EINVAL); } if (es->e2fs_first_dblock >= fs->e2fs_bcount) { - printf("ext2fs: first data block out of range\n"); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "first data block out of range"); return (EINVAL); } fs->e2fs_gcount = howmany(fs->e2fs_bcount - es->e2fs_first_dblock, EXT2_BLOCKS_PER_GROUP(fs)); if (fs->e2fs_gcount > ((uint64_t)1 << 32) - EXT2_DESCS_PER_BLOCK(fs)) { - printf("ext2fs: groups count too large: %u\n", fs->e2fs_gcount); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "groups count too large"); return (EINVAL); } /* Check for extra isize in big inodes. */ if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_EXTRA_ISIZE) && EXT2_INODE_SIZE(fs) < sizeof(struct ext2fs_dinode)) { - printf("ext2fs: no space for extra inode timestamps\n"); + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "no space for extra inode timestamps"); return (EINVAL); } @@ -1095,8 +1121,7 @@ ext2_sync(struct mount *mp, int waitfor) td = curthread; fs = ump->um_e2fs; if (fs->e2fs_fmod != 0 && fs->e2fs_ronly != 0) { /* XXX */ - printf("fs = %s\n", fs->e2fs_fsmnt); - panic("ext2_sync: rofs mod"); + panic("ext2_sync: rofs mod fs=%s", fs->e2fs_fsmnt); } /* @@ -1242,7 +1267,7 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, stru for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++) ip->i_db[i] = 0; } -#ifdef EXT2FS_DEBUG +#ifdef EXT2FS_PRINT_EXTENTS ext2_print_inode(ip); ext4_ext_print_extent_tree_status(ip); #endif Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/ext2_vnops.c Tue Apr 16 11:20:10 2019 (r346267) @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -92,6 +93,14 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , vnops, trace, "int", "char*"); + static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *); static void ext2_itimes_locked(struct vnode *); @@ -813,7 +822,8 @@ abortit: * not call us in that case. Temporarily just warn if they do. */ if (fvp == tvp) { - printf("ext2_rename: fvp == tvp (can't happen)\n"); + SDT_PROBE2(ext2fs, , vnops, trace, 1, + "rename: fvp == tvp (can't happen)"); error = 0; goto abortit; } Modified: head/sys/fs/ext2fs/fs.h ============================================================================== --- head/sys/fs/ext2fs/fs.h Tue Apr 16 09:44:46 2019 (r346266) +++ head/sys/fs/ext2fs/fs.h Tue Apr 16 11:20:10 2019 (r346267) @@ -164,6 +164,6 @@ /* * Use if additional debug logging is required. */ -/* #define EXT2FS_DEBUG */ +/* #define EXT2FS_PRINT_EXTENTS */ #endif /* !_FS_EXT2FS_FS_H_ */ From owner-svn-src-all@freebsd.org Tue Apr 16 11:30:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39BC8156EE71; Tue, 16 Apr 2019 11:30:42 +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 D1435882D5; Tue, 16 Apr 2019 11:30:41 +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 AE32E1EEE1; Tue, 16 Apr 2019 11:30:41 +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 x3GBUfUA042486; Tue, 16 Apr 2019 11:30:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GBUf8l042485; Tue, 16 Apr 2019 11:30:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904161130.x3GBUf8l042485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 16 Apr 2019 11:30: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: r346268 - stable/12/lib/libc/string X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/lib/libc/string X-SVN-Commit-Revision: 346268 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D1435882D5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 11:30:42 -0000 Author: emaste Date: Tue Apr 16 11:30:41 2019 New Revision: 346268 URL: https://svnweb.freebsd.org/changeset/base/346268 Log: MFC r346054: libc: update strstr implementation to match musl musl commits: 122d67f846cb0be2c9e1c3880db9eb9545bbe38c 0239cd0681e889a269fb7691f60e81ef8d081e6b 8f5a820d147da36bcdbddd201b35d293699dacd8 Submitted by: David CARLIER Obtained from: musl MFC after: 1 week Modified: stable/12/lib/libc/string/strstr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/string/strstr.c ============================================================================== --- stable/12/lib/libc/string/strstr.c Tue Apr 16 11:20:10 2019 (r346267) +++ stable/12/lib/libc/string/strstr.c Tue Apr 16 11:30:41 2019 (r346268) @@ -143,9 +143,8 @@ static char *twoway_strstr(const unsigned char *h, con /* Check last byte first; advance by shift on mismatch */ if (BITOP(byteset, h[l-1], &)) { k = l-shift[h[l-1]]; - //printf("adv by %zu (on %c) at [%s] (%zu;l=%zu)\n", k, h[l-1], h, shift[h[l-1]], l); if (k) { - if (mem0 && mem && k < p) k = l-p; + if (k < mem) k = mem; h += k; mem = 0; continue; From owner-svn-src-all@freebsd.org Tue Apr 16 11:37:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7682156F163; Tue, 16 Apr 2019 11:37:16 +0000 (UTC) (envelope-from fsu@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 8529A88825; Tue, 16 Apr 2019 11:37:16 +0000 (UTC) (envelope-from fsu@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 5E9931F09D; Tue, 16 Apr 2019 11:37:16 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GBbGpc046583; Tue, 16 Apr 2019 11:37:16 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GBbG0m046582; Tue, 16 Apr 2019 11:37:16 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201904161137.x3GBbG0m046582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Tue, 16 Apr 2019 11:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346269 - head/sys/fs/ext2fs X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/sys/fs/ext2fs X-SVN-Commit-Revision: 346269 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8529A88825 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 11:37:17 -0000 Author: fsu Date: Tue Apr 16 11:37:15 2019 New Revision: 346269 URL: https://svnweb.freebsd.org/changeset/base/346269 Log: ext2fs: Initial version of DTrace support. Commit forgotten file. Reviewed by: pfg, gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19848 Modified: head/sys/fs/ext2fs/ext2_extents.c Modified: head/sys/fs/ext2fs/ext2_extents.c ============================================================================== --- head/sys/fs/ext2fs/ext2_extents.c Tue Apr 16 11:30:41 2019 (r346268) +++ head/sys/fs/ext2fs/ext2_extents.c Tue Apr 16 11:37:15 2019 (r346269) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -46,9 +47,17 @@ #include #include +SDT_PROVIDER_DECLARE(ext2fs); +/* + * ext2fs trace probe: + * arg0: verbosity. Higher numbers give more verbose messages + * arg1: Textual message + */ +SDT_PROBE_DEFINE2(ext2fs, , trace, extents, "int", "char*"); + static MALLOC_DEFINE(M_EXT2EXTENTS, "ext2_extents", "EXT2 extents"); -#ifdef EXT2FS_DEBUG +#ifdef EXT2FS_PRINT_EXTENTS static void ext4_ext_print_extent(struct ext4_extent *ep) { @@ -230,22 +239,22 @@ ext4_ext_check_header(struct inode *ip, struct ext4_ex fs = ip->i_e2fs; if (eh->eh_magic != EXT4_EXT_MAGIC) { - error_msg = "invalid magic"; + error_msg = "header: invalid magic"; goto corrupted; } if (eh->eh_max == 0) { - error_msg = "invalid eh_max"; + error_msg = "header: invalid eh_max"; goto corrupted; } if (eh->eh_ecount > eh->eh_max) { - error_msg = "invalid eh_entries"; + error_msg = "header: invalid eh_entries"; goto corrupted; } return (0); corrupted: - ext2_fserr(fs, ip->i_uid, error_msg); + SDT_PROBE2(ext2fs, , trace, extents, 1, error_msg); return (EIO); } @@ -412,7 +421,7 @@ ext4_ext_find_extent(struct inode *ip, daddr_t block, ppos++; if (ppos > depth) { - ext2_fserr(fs, ip->i_uid, + SDT_PROBE2(ext2fs, , trace, extents, 1, "ppos > depth => extent corrupted"); error = EIO; brelse(bp); @@ -643,13 +652,13 @@ ext4_ext_insert_index(struct inode *ip, struct ext4_ex fs = ip->i_e2fs; if (lblk == path->ep_index->ei_blk) { - ext2_fserr(fs, ip->i_uid, + SDT_PROBE2(ext2fs, , trace, extents, 1, "lblk == index blk => extent corrupted"); return (EIO); } if (path->ep_header->eh_ecount >= path->ep_header->eh_max) { - ext2_fserr(fs, ip->i_uid, + SDT_PROBE2(ext2fs, , trace, extents, 1, "ecout > maxcount => extent corrupted"); return (EIO); } @@ -667,7 +676,7 @@ ext4_ext_insert_index(struct inode *ip, struct ext4_ex memmove(idx + 1, idx, len * sizeof(struct ext4_extent_index)); if (idx > EXT_MAX_INDEX(path->ep_header)) { - ext2_fserr(fs, ip->i_uid, + SDT_PROBE2(ext2fs, , trace, extents, 1, "index is out of range => extent corrupted"); return (EIO); } @@ -736,7 +745,7 @@ ext4_ext_split(struct inode *ip, struct ext4_extent_pa * We will split at current extent for now. */ if (path[depth].ep_ext > EXT_MAX_EXTENT(path[depth].ep_header)) { - ext2_fserr(fs, ip->i_uid, + SDT_PROBE2(ext2fs, , trace, extents, 1, "extent is out of range => extent corrupted"); return (EIO); } @@ -773,7 +782,7 @@ ext4_ext_split(struct inode *ip, struct ext4_extent_pa ex = EXT_FIRST_EXTENT(neh); if (path[depth].ep_header->eh_ecount != path[depth].ep_header->eh_max) { - ext2_fserr(fs, ip->i_uid, + SDT_PROBE2(ext2fs, , trace, extents, 1, "extents count out of range => extent corrupted"); error = EIO; goto cleanup; @@ -1362,7 +1371,7 @@ ext4_ext_rm_leaf(struct inode *ip, struct ext4_extent_ eh = path[depth].ep_header; if (!eh) { - ext2_fserr(ip->i_e2fs, ip->i_uid, + SDT_PROBE2(ext2fs, , trace, extents, 1, "bad header => extent corrupted"); return (EIO); } @@ -1449,7 +1458,8 @@ ext4_read_extent_tree_block(struct inode *ip, e4fs_dad eh = ext4_ext_block_header(bp->b_data); if (eh->eh_depth != depth) { - ext2_fserr(fs, ip->i_uid, "unexpected eh_depth"); + SDT_PROBE2(ext2fs, , trace, extents, 1, + "unexpected eh_depth"); goto err; } From owner-svn-src-all@freebsd.org Tue Apr 16 12:25:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C4461570D07; Tue, 16 Apr 2019 12:25:16 +0000 (UTC) (envelope-from trasz@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 4013D8A181; Tue, 16 Apr 2019 12:25:16 +0000 (UTC) (envelope-from trasz@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 27D1A1F919; Tue, 16 Apr 2019 12:25:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GCPFPw072251; Tue, 16 Apr 2019 12:25:15 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GCPF5K072250; Tue, 16 Apr 2019 12:25:15 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201904161225.x3GCPF5K072250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 16 Apr 2019 12:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346270 - head/cddl/usr.sbin/zfsd X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/cddl/usr.sbin/zfsd X-SVN-Commit-Revision: 346270 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4013D8A181 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 12:25:16 -0000 Author: trasz Date: Tue Apr 16 12:25:15 2019 New Revision: 346270 URL: https://svnweb.freebsd.org/changeset/base/346270 Log: Drop -g from CFLAGS for zfsd(8). No idea why it was ever there. Reviewed by: kib, ngie, asomers MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D19915 Modified: head/cddl/usr.sbin/zfsd/Makefile.common Modified: head/cddl/usr.sbin/zfsd/Makefile.common ============================================================================== --- head/cddl/usr.sbin/zfsd/Makefile.common Tue Apr 16 11:37:15 2019 (r346269) +++ head/cddl/usr.sbin/zfsd/Makefile.common Tue Apr 16 12:25:15 2019 (r346270) @@ -30,7 +30,7 @@ INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/ut INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs INCFLAGS+= -I${SRCTOP}/cddl/usr.sbin -CFLAGS+= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS} +CFLAGS+= -DNEED_SOLARIS_BOOLEAN ${INCFLAGS} LIBADD+= devdctl zfs zfs_core util geom bsdxml sbuf nvpair uutil From owner-svn-src-all@freebsd.org Tue Apr 16 12:39:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7698E15710C0; Tue, 16 Apr 2019 12:39:33 +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 170408A6F2; Tue, 16 Apr 2019 12:39:33 +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 054C01FAD8; Tue, 16 Apr 2019 12:39:33 +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 x3GCdWHq077602; Tue, 16 Apr 2019 12:39:32 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GCdWt8077597; Tue, 16 Apr 2019 12:39:32 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904161239.x3GCdWt8077597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Apr 2019 12:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346271 - in head/sys/arm/allwinner: . clkng X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/arm/allwinner: . clkng X-SVN-Commit-Revision: 346271 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 170408A6F2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 12:39:33 -0000 Author: manu Date: Tue Apr 16 12:39:31 2019 New Revision: 346271 URL: https://svnweb.freebsd.org/changeset/base/346271 Log: aw_rtc: Register the clocks Since latest DTS update the rtc is supposed to register two clocks : - osc32k (the 32k oscillator on the board that the RTC uses directly and that other peripheral can use) - iosc (the internal oscillator of the RTC when available which frequency depend on the SoC revision) Since we need the RTC before the proper clock control unit (because it uses those clocks) attach it a BUS_PASS_BUS + MIDDLE and attach the clock control unit at BUS_PASS_BUS + LAST for the SoC that requires it. Tested On: A20, H3, A64 MFC after: 1 month Modified: head/sys/arm/allwinner/aw_rtc.c head/sys/arm/allwinner/clkng/ccu_a31.c head/sys/arm/allwinner/clkng/ccu_a64.c head/sys/arm/allwinner/clkng/ccu_a83t.c head/sys/arm/allwinner/clkng/ccu_h3.c Modified: head/sys/arm/allwinner/aw_rtc.c ============================================================================== --- head/sys/arm/allwinner/aw_rtc.c Tue Apr 16 12:25:15 2019 (r346270) +++ head/sys/arm/allwinner/aw_rtc.c Tue Apr 16 12:39:31 2019 (r346271) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2019 Emmanuel Vadot * Copyright (c) 2016 Vladimir Belian * All rights reserved. * @@ -43,6 +44,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include "clock_if.h" @@ -62,7 +65,7 @@ __FBSDID("$FreeBSD$"); #define LOSC_MAGIC 0x16aa0000 #define LOSC_BUSY_MASK 0x00000380 -#define IS_SUN7I (sc->type == A20_RTC) +#define IS_SUN7I (sc->conf->is_a20 == true) #define YEAR_MIN (IS_SUN7I ? 1970 : 2010) #define YEAR_MAX (IS_SUN7I ? 2100 : 2073) @@ -92,27 +95,68 @@ __FBSDID("$FreeBSD$"); #define RTC_READ(sc, reg) bus_read_4((sc)->res, (reg)) #define RTC_WRITE(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) -#define IS_LEAP_YEAR(y) \ - (((y) % 400) == 0 || (((y) % 100) != 0 && ((y) % 4) == 0)) +#define IS_LEAP_YEAR(y) (((y) % 400) == 0 || (((y) % 100) != 0 && ((y) % 4) == 0)) -#define A10_RTC 1 -#define A20_RTC 2 -#define A31_RTC 3 +struct aw_rtc_conf { + uint64_t iosc_freq; + bus_size_t rtc_date; + bus_size_t rtc_time; + bus_size_t rtc_losc_sta; + bool is_a20; +}; +struct aw_rtc_conf a10_conf = { + .rtc_date = A10_RTC_DATE_REG, + .rtc_time = A10_RTC_TIME_REG, + .rtc_losc_sta = LOSC_CTRL_REG, +}; + +struct aw_rtc_conf a20_conf = { + .rtc_date = A10_RTC_DATE_REG, + .rtc_time = A10_RTC_TIME_REG, + .rtc_losc_sta = LOSC_CTRL_REG, + .is_a20 = true, +}; + +struct aw_rtc_conf a31_conf = { + .iosc_freq = 650000, /* between 600 and 700 Khz */ + .rtc_date = A31_RTC_DATE_REG, + .rtc_time = A31_RTC_TIME_REG, + .rtc_losc_sta = A31_LOSC_AUTO_SWT_STA, +}; + +struct aw_rtc_conf h3_conf = { + .iosc_freq = 16000000, + .rtc_date = A31_RTC_DATE_REG, + .rtc_time = A31_RTC_TIME_REG, + .rtc_losc_sta = A31_LOSC_AUTO_SWT_STA, +}; + static struct ofw_compat_data compat_data[] = { - { "allwinner,sun4i-a10-rtc", A10_RTC }, - { "allwinner,sun7i-a20-rtc", A20_RTC }, - { "allwinner,sun6i-a31-rtc", A31_RTC }, + { "allwinner,sun4i-a10-rtc", (uintptr_t) &a10_conf }, + { "allwinner,sun7i-a20-rtc", (uintptr_t) &a20_conf }, + { "allwinner,sun6i-a31-rtc", (uintptr_t) &a31_conf }, + { "allwinner,sun8i-h3-rtc", (uintptr_t) &h3_conf }, { NULL, 0 } }; struct aw_rtc_softc { struct resource *res; + struct aw_rtc_conf *conf; int type; - bus_size_t rtc_date; - bus_size_t rtc_time; }; +static struct clk_fixed_def aw_rtc_osc32k = { + .clkdef.id = 0, + .freq = 32768, +}; + +static struct clk_fixed_def aw_rtc_iosc = { + .clkdef.id = 2, +}; + +static void aw_rtc_install_clocks(struct aw_rtc_softc *sc, device_t dev); + static int aw_rtc_probe(device_t dev); static int aw_rtc_attach(device_t dev); static int aw_rtc_detach(device_t dev); @@ -140,9 +184,8 @@ static driver_t aw_rtc_driver = { static devclass_t aw_rtc_devclass; EARLY_DRIVER_MODULE(aw_rtc, simplebus, aw_rtc_driver, aw_rtc_devclass, 0, 0, - BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); + BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); - static int aw_rtc_probe(device_t dev) { @@ -161,7 +204,6 @@ static int aw_rtc_attach(device_t dev) { struct aw_rtc_softc *sc = device_get_softc(dev); - bus_size_t rtc_losc_sta; uint32_t val; int rid = 0; @@ -171,20 +213,7 @@ aw_rtc_attach(device_t dev) return (ENXIO); } - sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; - switch (sc->type) { - case A10_RTC: - case A20_RTC: - sc->rtc_date = A10_RTC_DATE_REG; - sc->rtc_time = A10_RTC_TIME_REG; - rtc_losc_sta = LOSC_CTRL_REG; - break; - case A31_RTC: - sc->rtc_date = A31_RTC_DATE_REG; - sc->rtc_time = A31_RTC_TIME_REG; - rtc_losc_sta = A31_LOSC_AUTO_SWT_STA; - break; - } + sc->conf = (struct aw_rtc_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; val = RTC_READ(sc, LOSC_CTRL_REG); val |= LOSC_AUTO_SW_EN; val |= LOSC_MAGIC | LOSC_GSM | LOSC_OSC_SRC; @@ -193,13 +222,15 @@ aw_rtc_attach(device_t dev) DELAY(100); if (bootverbose) { - val = RTC_READ(sc, rtc_losc_sta); + val = RTC_READ(sc, sc->conf->rtc_losc_sta); if ((val & LOSC_OSC_SRC) == 0) device_printf(dev, "Using internal oscillator\n"); else device_printf(dev, "Using external oscillator\n"); } + aw_rtc_install_clocks(sc, dev); + clock_register(dev, RTC_RES_US); return (0); @@ -212,6 +243,41 @@ aw_rtc_detach(device_t dev) return (EBUSY); } +static void +aw_rtc_install_clocks(struct aw_rtc_softc *sc, device_t dev) { + struct clkdom *clkdom; + const char **clknames; + phandle_t node; + int nclocks; + + node = ofw_bus_get_node(dev); + nclocks = ofw_bus_string_list_to_array(node, "clock-output-names", &clknames); + /* No clocks to export */ + if (nclocks <= 0) + return; + + if (nclocks != 3) { + device_printf(dev, "Having only %d clocks instead of 3, aborting\n", nclocks); + return; + } + + clkdom = clkdom_create(dev); + + aw_rtc_osc32k.clkdef.name = clknames[0]; + if (clknode_fixed_register(clkdom, &aw_rtc_osc32k) != 0) + device_printf(dev, "Cannot register osc32k clock\n"); + + aw_rtc_iosc.clkdef.name = clknames[2]; + aw_rtc_iosc.freq = sc->conf->iosc_freq; + if (clknode_fixed_register(clkdom, &aw_rtc_iosc) != 0) + device_printf(dev, "Cannot register iosc clock\n"); + + clkdom_finit(clkdom); + + if (bootverbose) + clkdom_dump(clkdom); +} + static int aw_rtc_gettime(device_t dev, struct timespec *ts) { @@ -219,11 +285,11 @@ aw_rtc_gettime(device_t dev, struct timespec *ts) struct clocktime ct; uint32_t rdate, rtime; - rdate = RTC_READ(sc, sc->rtc_date); - rtime = RTC_READ(sc, sc->rtc_time); + rdate = RTC_READ(sc, sc->conf->rtc_date); + rtime = RTC_READ(sc, sc->conf->rtc_time); if ((rtime & TIME_MASK) == 0) - rdate = RTC_READ(sc, sc->rtc_date); + rdate = RTC_READ(sc, sc->conf->rtc_date); ct.sec = GET_SEC_VALUE(rtime); ct.min = GET_MIN_VALUE(rtime); @@ -265,7 +331,7 @@ aw_rtc_settime(device_t dev, struct timespec *ts) DELAY(1); } /* reset time register to avoid unexpected date increment */ - RTC_WRITE(sc, sc->rtc_time, 0); + RTC_WRITE(sc, sc->conf->rtc_time, 0); rdate = SET_DAY_VALUE(ct.day) | SET_MON_VALUE(ct.mon) | SET_YEAR_VALUE(ct.year - YEAR_OFFSET) | @@ -281,7 +347,7 @@ aw_rtc_settime(device_t dev, struct timespec *ts) } DELAY(1); } - RTC_WRITE(sc, sc->rtc_date, rdate); + RTC_WRITE(sc, sc->conf->rtc_date, rdate); for (clk = 0; RTC_READ(sc, LOSC_CTRL_REG) & LOSC_BUSY_MASK; clk++) { if (clk > RTC_TIMEOUT) { @@ -290,7 +356,7 @@ aw_rtc_settime(device_t dev, struct timespec *ts) } DELAY(1); } - RTC_WRITE(sc, sc->rtc_time, rtime); + RTC_WRITE(sc, sc->conf->rtc_time, rtime); DELAY(RTC_TIMEOUT); Modified: head/sys/arm/allwinner/clkng/ccu_a31.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_a31.c Tue Apr 16 12:25:15 2019 (r346270) +++ head/sys/arm/allwinner/clkng/ccu_a31.c Tue Apr 16 12:39:31 2019 (r346271) @@ -973,4 +973,4 @@ DEFINE_CLASS_1(ccu_a31ng, ccu_a31ng_driver, ccu_a31ng_ sizeof(struct aw_ccung_softc), aw_ccung_driver); EARLY_DRIVER_MODULE(ccu_a31ng, simplebus, ccu_a31ng_driver, - ccu_a31ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); + ccu_a31ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST); Modified: head/sys/arm/allwinner/clkng/ccu_a64.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_a64.c Tue Apr 16 12:25:15 2019 (r346270) +++ head/sys/arm/allwinner/clkng/ccu_a64.c Tue Apr 16 12:39:31 2019 (r346271) @@ -825,4 +825,4 @@ DEFINE_CLASS_1(ccu_a64ng, ccu_a64ng_driver, ccu_a64ng_ sizeof(struct aw_ccung_softc), aw_ccung_driver); EARLY_DRIVER_MODULE(ccu_a64ng, simplebus, ccu_a64ng_driver, - ccu_a64ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); + ccu_a64ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST); Modified: head/sys/arm/allwinner/clkng/ccu_a83t.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_a83t.c Tue Apr 16 12:25:15 2019 (r346270) +++ head/sys/arm/allwinner/clkng/ccu_a83t.c Tue Apr 16 12:39:31 2019 (r346271) @@ -786,4 +786,4 @@ DEFINE_CLASS_1(ccu_a83tng, ccu_a83tng_driver, ccu_a83t sizeof(struct aw_ccung_softc), aw_ccung_driver); EARLY_DRIVER_MODULE(ccu_a83tng, simplebus, ccu_a83tng_driver, - ccu_a83tng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); + ccu_a83tng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST); Modified: head/sys/arm/allwinner/clkng/ccu_h3.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_h3.c Tue Apr 16 12:25:15 2019 (r346270) +++ head/sys/arm/allwinner/clkng/ccu_h3.c Tue Apr 16 12:39:31 2019 (r346271) @@ -787,4 +787,4 @@ DEFINE_CLASS_1(ccu_h3ng, ccu_h3ng_driver, ccu_h3ng_met sizeof(struct aw_ccung_softc), aw_ccung_driver); EARLY_DRIVER_MODULE(ccu_h3ng, simplebus, ccu_h3ng_driver, - ccu_h3ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); + ccu_h3ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST); From owner-svn-src-all@freebsd.org Tue Apr 16 12:40:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B98D1571165; Tue, 16 Apr 2019 12:40:50 +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 1152E8A87D; Tue, 16 Apr 2019 12:40:50 +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 DEF4C1FBF7; Tue, 16 Apr 2019 12:40: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 x3GCenc6078530; Tue, 16 Apr 2019 12:40:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GCenJW078529; Tue, 16 Apr 2019 12:40:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904161240.x3GCenJW078529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Apr 2019 12:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346272 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 346272 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1152E8A87D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 12:40:50 -0000 Author: manu Date: Tue Apr 16 12:40:49 2019 New Revision: 346272 URL: https://svnweb.freebsd.org/changeset/base/346272 Log: aw_syscon: Add a new compatible Since 5.0 DTS the syscon controller have a new compatible as it exports new subnodes, we currently only use it as a syscon provider so just add the new compatible. Tested On: H3 MFC after: 1 month Modified: head/sys/arm/allwinner/aw_syscon.c Modified: head/sys/arm/allwinner/aw_syscon.c ============================================================================== --- head/sys/arm/allwinner/aw_syscon.c Tue Apr 16 12:39:31 2019 (r346271) +++ head/sys/arm/allwinner/aw_syscon.c Tue Apr 16 12:40:49 2019 (r346272) @@ -52,6 +52,7 @@ static struct ofw_compat_data compat_data[] = { {"allwinner,sun50i-a64-system-control", 1}, {"allwinner,sun8i-a83t-system-controller", 1}, {"allwinner,sun8i-h3-system-controller", 1}, + {"allwinner,sun8i-h3-system-control", 1}, {NULL, 0} }; From owner-svn-src-all@freebsd.org Tue Apr 16 13:04:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 010CC1571990; Tue, 16 Apr 2019 13:04:02 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6358B4C0; Tue, 16 Apr 2019 13:04:00 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 882c15f1; Tue, 16 Apr 2019 15:03:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=7sI2AOBH9ed9QNhUI2VOlsiqxFg=; b=f6ec3m66Tef3wnb7NUT0xGCkw/Pi HDptPdgIwdNmQqBKKdOBVd1y3MAIwdWqte2YPbof2qVqpNo+kcU3pwpoTJNwMGig 4JmFWhpyRsm3Ghs7hCvLlEpu7BhaAZ5XqKWYq0xi5g3hXvawDHpK12c9yde6c1z3 a6lKT813OYGBF70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=SNjoxD5IGpg2L9xwaa0N8eZHx3k/CSNylln6tN0kWNHvnppDlEpAL3EG f7b2kgbyK5v5W/lodnpgy89CkrV4V4l3yVkuF6gqvGARvEWyoKgARRq9qwvX/uin BoqeXmvCgmuqIjmRtNWDi1SnqT/jxclXeN6uSXMOBglS99kITOw= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 55086c1a TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 16 Apr 2019 15:03:53 +0200 (CEST) Date: Tue, 16 Apr 2019 15:03:52 +0200 From: Emmanuel Vadot To: cem@freebsd.org Cc: Justin Hibbits , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys Message-Id: <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> In-Reply-To: References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0A6358B4C0 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.954,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 13:04:02 -0000 On Mon, 15 Apr 2019 17:54:56 -0700 Conrad Meyer wrote: > On Mon, Apr 15, 2019 at 5:53 PM Conrad Meyer wrote: > > E.g., the CI infrastructure for > > Riscv/Arm is/was generating minimal filesystem images and not > > populating /boot/entropy. > > I should add, I say "is/was" because I have a PR out which may address > the problem: https://github.com/freebsd/freebsd-ci/pull/31 > > Best, > Conrad It's not only CI, all release images (memstick, iso) don't have a /boot/entropy. Also all arm/arm64 image don't have this file too. If /boot/entropy is needed and isn't present loader(8) should gather some entropy and pass this to the kernel for the first boot. -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Tue Apr 16 13:18:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B00751571DB3 for ; Tue, 16 Apr 2019 13:18:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 485518BADE for ; Tue, 16 Apr 2019 13:18:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x834.google.com with SMTP id p20so23157557qtc.9 for ; Tue, 16 Apr 2019 06:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YYTVFVHGP1B8pLhMF/hQocYKm5q5B5l1WgRuLhJMQ8g=; b=N7MzRjF0KKpYM+9V2jx7TFaFza4vPwKi7f5vpV8MGuUBZ1z1xaHCFwiUPkC0Ssx1gy vyS5BNOWpaBXKl+/+o4+dNoc5BFQDargvhOHMlhR6HcWUw8eaPrwcjcgvVDfekFT5hs3 bq8v8aTKxhKWPgDOf7DrQWrgmqO+6z92NwoZbrhpJrLYBQfe7Cp9nR8/M2BW2KyWOoBZ +FMbnnBE6OLHeH2S4poBpqgw7hNv5oNfM8DP9VpswmRugnA5DTPWBVMrwTtPJ2RzU2oZ UwN2F55rB5Tql5HhpTPkkxwj9IRVbRngZsR3dSvt86rmCvmg3rZ5LiLRQTeP64FBzOJi OuPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YYTVFVHGP1B8pLhMF/hQocYKm5q5B5l1WgRuLhJMQ8g=; b=FTNcISKH20YVT5KqonkFZWOMVicg1EikL5WaumVbXHNKgopARFfKPtayFzWBBlgzLp iXsY0dhEeHu5+LR0MrcbUvRzACPnvsdBwl4pfV5ukMgU2vov/dPdMi0u/XSNVLmP9TmJ 15umF+yjxuyEydsYvudw1UTMa4LpEYxs9Go95tkacGOYWznPnXoVg1sCUuXdspJGyx1X EbsHuMhULKe7bR9BqHvl6NsquIUVOaP9fP1uWMwoYXysueXLMflA29AaWjomS0Deq6OB 7UwVCg0cODnTK+Jl2JE4zkAzZBVKoHnpmxKv1PUrx+miYuL/WS7KcrBGCAvo76Y+XUnU 1Nyw== X-Gm-Message-State: APjAAAWCrJnGjg2pdeQJxMeEyuB2022fqghjYxbhCuMiqwmoKo0/Oo7L jeCz1AQ9kwCZ729KH9XeD/0MoI0sngcE+eom143oHw== X-Google-Smtp-Source: APXvYqy2R6ruSXPPye4t9gDmY4d8Ecn4uTjx9G7WW1JpKb/BPkxt7+j8Qb55gUdmoE/7UwMZPlzOcSJmbGOr/ZgDStw= X-Received: by 2002:ac8:5493:: with SMTP id h19mr50937101qtq.23.1555420738542; Tue, 16 Apr 2019 06:18:58 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> In-Reply-To: <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> From: Warner Losh Date: Tue, 16 Apr 2019 07:18:46 -0600 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Emmanuel Vadot Cc: "Conrad E. Meyer" , Justin Hibbits , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 485518BADE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 13:18:59 -0000 On Tue, Apr 16, 2019, 7:04 AM Emmanuel Vadot wrote: > On Mon, 15 Apr 2019 17:54:56 -0700 > Conrad Meyer wrote: > > > On Mon, Apr 15, 2019 at 5:53 PM Conrad Meyer wrote: > > > E.g., the CI infrastructure for > > > Riscv/Arm is/was generating minimal filesystem images and not > > > populating /boot/entropy. > > > > I should add, I say "is/was" because I have a PR out which may address > > the problem: https://github.com/freebsd/freebsd-ci/pull/31 > > > > Best, > > Conrad > > It's not only CI, all release images (memstick, iso) don't have > a /boot/entropy. > Also all arm/arm64 image don't have this file too. > If /boot/entropy is needed and isn't present loader(8) should gather > some entropy and pass this to the kernel for the first boot. > Maybe we need to bootstrap the entropy file as part of buildworld. I'm not sure if the loader can find enough... Warner -- > Emmanuel Vadot > > From owner-svn-src-all@freebsd.org Tue Apr 16 13:20:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADA631571F06 for ; Tue, 16 Apr 2019 13:20:22 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 461958BC92 for ; Tue, 16 Apr 2019 13:20:22 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x82c.google.com with SMTP id k14so23231183qtb.0 for ; Tue, 16 Apr 2019 06:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7/HKjswzcI5RPNxTg/hAVI6NF3iPXMKNwF2/ITgGCj8=; b=e1+veL3HkNBpinLVZl+QSHd4j4JiY1ci/JXzgbHjzyunpQpznJPkP2lXMm+Pe11URC HXgZNdq3iKFuruhbO/Q0TUNZe1ElRpQIPRR4dfLDDzvswQxiA5+3fxckSXsbzhbmGZmS fOQsnCEjPxxNvCtQ0g7xDuA0uqTH3E5nIm1Wt4zRqEhplRKlkdXJER0sCebkvC/lb6EX vfF/aRxFyJZpTbGFM3X6CnBmDpUmsHAuEeaejBoN7cNVOhNoV5Xz+77XiGR5UhFX3+zU 9h++/d96AvB8R0leruHZkvapFvUdwhWPhdRpLsJGQtSctobV3ZrP38mKIud/nkRBA/x4 +4Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7/HKjswzcI5RPNxTg/hAVI6NF3iPXMKNwF2/ITgGCj8=; b=ulaOFrrt8tOYRviZnG4jaoe9RIIDoiuzUN6yI9GnZsymt/K8aDecwFYr5LQw3XmT2b QVPlalsXmHEn8x8T0yoqwimu21nqrwUcstfmE3BDOdk0uHDwit4NmgvN8c3JPZU9Ko+i Qjcy/9qUxusB8P3JQQahZjV6zamOpWSr44/Lb2WWSGn/UqXnuOJOhOaoIqsz7WjWF5QX GFqdqKLzYc3ZKRRczHmPR8uyIwvZpdYeXqEON9oZ6kjyP9gRWhdHF1SfxZKOMGHOcUw1 EvvdkyJk+yLN75qWwvFk0rLDk0fbffZnhl3uvhO+jg4PwAsjVNQckXXWHIGd2aRF7kx2 3wvw== X-Gm-Message-State: APjAAAXtHG63Skng/IqrH0NWgxCSDmCPVjTxrl3HtUdGCqGgYgDkf3hn J66dFrMugooPLbH+XKg5shDLQ7gK1XwIaA== X-Google-Smtp-Source: APXvYqx18N+YnmkU0qNoZ35oSmQD9+dGKq36lZH0tj64bZFQZiQ8OIqwxvCf3hfaaFOOfl/2yIi1Hg== X-Received: by 2002:ac8:33dd:: with SMTP id d29mr65183528qtb.320.1555420821685; Tue, 16 Apr 2019 06:20:21 -0700 (PDT) Received: from mutt-hbsd ([151.196.118.239]) by smtp.gmail.com with ESMTPSA id q51sm35502302qtc.38.2019.04.16.06.20.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2019 06:20:20 -0700 (PDT) Date: Tue, 16 Apr 2019 09:19:15 -0400 From: Shawn Webb To: Mariusz Zaborski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346263 - head/contrib/tcpdump Message-ID: <20190416131915.2ocot4nonnf3sl4a@mutt-hbsd> References: <201904160412.x3G4CgN2015092@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="epj5rmk7yofcyaoj" Content-Disposition: inline In-Reply-To: <201904160412.x3G4CgN2015092@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD HARDENEDBSD-13-CURRENT amd64 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: 461958BC92 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.988,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 13:20:22 -0000 --epj5rmk7yofcyaoj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 16, 2019 at 04:12:42AM +0000, Mariusz Zaborski wrote: > Author: oshogbo > Date: Tue Apr 16 04:12:41 2019 > New Revision: 346263 > URL: https://svnweb.freebsd.org/changeset/base/346263 >=20 > Log: > tcpdump: disable Capsicum if -E option is provided. > =20 > The -E is used to provide a secret for decrypting IPsec. > The secret may be provided through command line or as the file. > The problem is that tcpdump doesn't support yet opening files in capabi= lity mode > and the file may contain a list of the files to open. > =20 > As a workaround, for now, let's just disable capsicum if the -E > the option is provided. > =20 > PR: 236819 > MFC after: 2 weeks >=20 > Modified: > head/contrib/tcpdump/tcpdump.c >=20 > Modified: head/contrib/tcpdump/tcpdump.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/tcpdump/tcpdump.c Tue Apr 16 02:48:04 2019 (r346262) > +++ head/contrib/tcpdump/tcpdump.c Tue Apr 16 04:12:41 2019 (r346263) > @@ -2063,7 +2063,8 @@ main(int argc, char **argv) > } > =20 > #ifdef HAVE_CAPSICUM > - cansandbox =3D (VFileName =3D=3D NULL && zflag =3D=3D NULL); > + cansandbox =3D (VFileName =3D=3D NULL && zflag =3D=3D NULL && > + ndo->ndo_espsecret =3D=3D NULL); > #ifdef HAVE_CASPER > cansandbox =3D (cansandbox && (ndo->ndo_nflag || capdns !=3D NULL)); > #else Is there any documentation anywhere telling users that Capsicum support will be disabled under certain circumstances? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 --epj5rmk7yofcyaoj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAly11k0ACgkQ/y5nonf4 4fowyBAAosXBRr/wadcuilGpEb9c6ytfp+mBiubhDc2s3cNgth5yEIY9RxZBU1SS cshIWcTPdmyb063/0HLroBaqJZmnw3Rro+esu+Oirh+0rj3W1GSxqHE4yohr2iux Q1i8/C4wUVI7hvUHvs44/NqOxPhnOr34KL+YgQ6T8R7H1HVD+Jfh9Zo/apkUKBVC 5WorHPu9u9sxAyIQ16PZvS9TzbD/u4LzYSGABa78whk9IUU/MG9LBIC+kjwV9nBv ZpWrdfqIJsOzeY3BM8XYWqBXQdXCR0xQVrQm2h5Kx+9qB+93ptxx8TI2bi3CCZUd qtbjjvk0bHH6rIJWBNG+3qzt1ouGF9utHIHYkmb8RyUPKRx6UB8MBbV+a5C1Txry MSG7wwtcYz/73c4RAY5whI7DfHi/2sd1nbOfJcVcH3TObZQRMvr9PGE320RFMmK8 SpfBp7PkTjiSlwli6Ci6nqjg6mFcvFM24UvoJ/4aDjp0HNfAyWFEqr5kEtALBC4V WZFCLpNwwlhO0XTZBhJXqpDPRDO94z01cQVkv5OAPZNLm9SUSZnAHmHLyUs68yhI LzbRV1swUi80sI/7hC+YVT09tmbcFm3TVOqVvhXxBVcqUrY3J3+fufVRctTXFYWf HlCSfoG/l6RXmo1OYanEIW3DSSVYXcBgmjV6eZk0FL2cwyrdErA= =edr2 -----END PGP SIGNATURE----- --epj5rmk7yofcyaoj-- From owner-svn-src-all@freebsd.org Tue Apr 16 13:26:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9641615722CD; Tue, 16 Apr 2019 13:26:32 +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 38DF88C1B0; Tue, 16 Apr 2019 13:26:32 +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 2592F20344; Tue, 16 Apr 2019 13:26:32 +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 x3GDQVsT003309; Tue, 16 Apr 2019 13:26:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GDQV9J003308; Tue, 16 Apr 2019 13:26:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904161326.x3GDQV9J003308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 16 Apr 2019 13:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346273 - in head/sys: compat/freebsd32 kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 346273 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38DF88C1B0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 13:26:32 -0000 Author: emaste Date: Tue Apr 16 13:26:31 2019 New Revision: 346273 URL: https://svnweb.freebsd.org/changeset/base/346273 Log: correct readlinkat(2) return type r176215 corrected readlink(2)'s return type and the type of the last argument. readlink(2) was introduced in r177788 after being developed as part of Google Summer of Code 2007; it appears to have inherited the wrong return type. Man pages and header files were already ssize_t; update syscalls.master to match. PR: 197915 Submitted by: Henning Petersen MFC after: 2 weeks Modified: head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Tue Apr 16 12:40:49 2019 (r346272) +++ head/sys/compat/freebsd32/syscalls.master Tue Apr 16 13:26:31 2019 (r346273) @@ -963,7 +963,7 @@ uint32_t dev); } 499 AUE_OPENAT_RWTC NOPROTO { int openat(int fd, const char *path, \ int flag, mode_t mode); } -500 AUE_READLINKAT NOPROTO { int readlinkat(int fd, const char *path, \ +500 AUE_READLINKAT NOPROTO { ssize_t readlinkat(int fd, const char *path, \ char *buf, size_t bufsize); } 501 AUE_RENAMEAT NOPROTO { int renameat(int oldfd, const char *old, \ int newfd, const char *new); } Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Tue Apr 16 12:40:49 2019 (r346272) +++ head/sys/kern/syscalls.master Tue Apr 16 13:26:31 2019 (r346273) @@ -2716,7 +2716,7 @@ ); } 500 AUE_READLINKAT STD { - int readlinkat( + ssize_t readlinkat( int fd, _In_z_ const char *path, _Out_writes_bytes_(bufsize) char *buf, From owner-svn-src-all@freebsd.org Tue Apr 16 13:31:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA17F15726A3; Tue, 16 Apr 2019 13:31:17 +0000 (UTC) (envelope-from thj@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 736BB8C58B; Tue, 16 Apr 2019 13:31:17 +0000 (UTC) (envelope-from thj@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 4A6212038A; Tue, 16 Apr 2019 13:31:17 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GDVHxc006939; Tue, 16 Apr 2019 13:31:17 GMT (envelope-from thj@FreeBSD.org) Received: (from thj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GDVHbK006938; Tue, 16 Apr 2019 13:31:17 GMT (envelope-from thj@FreeBSD.org) Message-Id: <201904161331.x3GDVHbK006938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org using -f From: Tom Jones Date: Tue, 16 Apr 2019 13:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346274 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: thj X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 346274 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 736BB8C58B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 13:31:17 -0000 Author: thj Date: Tue Apr 16 13:31:16 2019 New Revision: 346274 URL: https://svnweb.freebsd.org/changeset/base/346274 Log: Update and clarify pflog man page The pflog0 interface is created when the module is loaded, this can be triggered by pf and pflogd being enabled or by kldloading the module. By default the interface would be pflog0, add the ifconfig stage of the example to make this example clearer. Reviewed by: kp, bz, bcr, jtl, 0mp Approved by: jtl (mentor), bz (mentor) Differential Revision: https://reviews.freebsd.org/D19861 Modified: head/share/man/man4/pflog.4 Modified: head/share/man/man4/pflog.4 ============================================================================== --- head/share/man/man4/pflog.4 Tue Apr 16 13:26:31 2019 (r346273) +++ head/share/man/man4/pflog.4 Tue Apr 16 13:31:16 2019 (r346274) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2007 +.Dd April 9, 2019 .Dt PFLOG 4 .Os .Sh NAME @@ -47,13 +47,18 @@ on the interface, or stored to disk using .Xr pflogd 8 . .Pp -The pflog0 interface is created automatically at boot if both +The pflog0 interface is created when the +.Nm +module is loaded; +further instances can be created using +.Xr ifconfig 8 . +The +.Nm +module is loaded automatically if both .Xr pf 4 and .Xr pflogd 8 -are enabled; -further instances can be created using -.Xr ifconfig 8 . +are enabled. .Pp Each packet retrieved on this interface has a header associated with it of length @@ -87,6 +92,8 @@ Create a interface and monitor all packets logged on it: .Bd -literal -offset indent +# ifconfig pflog create +pflog1 # ifconfig pflog1 up # tcpdump -n -e -ttt -i pflog1 .Ed From owner-svn-src-all@freebsd.org Tue Apr 16 14:07:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1A2C15733F3; Tue, 16 Apr 2019 14:07:15 +0000 (UTC) (envelope-from gjb@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 539E88D6F1; Tue, 16 Apr 2019 14:07:15 +0000 (UTC) (envelope-from gjb@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 43D8220A01; Tue, 16 Apr 2019 14:07:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GE7FhD024297; Tue, 16 Apr 2019 14:07:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GE7F9N024296; Tue, 16 Apr 2019 14:07:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201904161407.x3GE7F9N024296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 16 Apr 2019 14:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346275 - head/usr.sbin/portsnap/portsnap X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/usr.sbin/portsnap/portsnap X-SVN-Commit-Revision: 346275 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 539E88D6F1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 14:07:15 -0000 Author: gjb Date: Tue Apr 16 14:07:14 2019 New Revision: 346275 URL: https://svnweb.freebsd.org/changeset/base/346275 Log: Remove INDEX-10 reference, as 10.x is now EoL. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/portsnap/portsnap/portsnap.conf Modified: head/usr.sbin/portsnap/portsnap/portsnap.conf ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.conf Tue Apr 16 13:31:16 2019 (r346274) +++ head/usr.sbin/portsnap/portsnap/portsnap.conf Tue Apr 16 14:07:14 2019 (r346275) @@ -30,7 +30,6 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3 # REFUSE korean polish portuguese russian ukrainian vietnamese # List of INDEX files to build and the DESCRIBE file to use for each -#INDEX INDEX-10 DESCRIBE.10 #INDEX INDEX-11 DESCRIBE.11 #INDEX INDEX-12 DESCRIBE.12 INDEX INDEX-13 DESCRIBE.13 From owner-svn-src-all@freebsd.org Tue Apr 16 14:24:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D77A1573B85; Tue, 16 Apr 2019 14:24:08 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it1-x133.google.com (mail-it1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9028F8E190; Tue, 16 Apr 2019 14:24:07 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it1-x133.google.com with SMTP id 139so32769387ita.4; Tue, 16 Apr 2019 07:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UIGAeRLdsge4kEwVaDCVfmNGLXdC0M0ryWRahl6VSIw=; b=kIkYUFxrSZNdLhQududHgRN369JhELrXCYqwC+M5Fe2A9hHcYs4vz3ME08meRQgsuM GkPv1IOQMYOIhF+3RLrPQZBANDy/ve+Cbu+WF7ZCQpV1UXR3WUIJZA0Gx7HXEs9mqOlf YYjm0BtoyJp6aeRRtR/dTFq8MWnv3Lsbq17BcOjsuJKqp4ozJhoIHhl1HGXUFviV8n5r +P1VqZ9A6El2DOojtK5UeE+OOx5aCRNq6AvO4THEGU73SnSa8zEGDOqEB8/oRHuVBTvS HeoVe+x8DJYdxFx38s1NAB9z1PSd0/4VUku+SWAGD3kcPsnEciICyZ21BXlgz/fsYXg7 cHZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UIGAeRLdsge4kEwVaDCVfmNGLXdC0M0ryWRahl6VSIw=; b=NGmaAp/b5PLIipyw/DS17hvxTboAp0k8S8M+ONtOA4iXdAHFtGLeTYqcuOtSpxdcKD cggmmMzZhCtrigw7ds1bg8u9G2Njy3njEu846q+PpMRFM6mEpfZc1qACk7qxLLl4Ucbw GmmDpUUSipVLWZisVKsdoV8y/kgfy84YKTvkWt0ltAmP95voFlVxP2WjZFi7AkJ5UmSv aINoQfG8HsVAm4Kv4DHpC8uyqoWQjTlAeI9BCFJQnQTOGcqjcqBbwf2v3uEvZDii75O6 LFO3lahR3nP3iPvbuZC186BzUUTRKWgRwz8d7PZlEsjrTLEPGKyfWxygWbmF/klM71q4 6yhw== X-Gm-Message-State: APjAAAXQxgCPVkq4oB79EG7veG/hBCWZ5WPyPwsGOdsD4ELLHFObaJvX CUKwvvbbbQa1vcowhsAA+XtePfVJ/kQ= X-Google-Smtp-Source: APXvYqxLYPz4lWLE/s0+Zb4jfKx7lknfY8n6Tg25/HphNFVRrynX9r/haMBaP128Oo5qKyQhC/XxxQ== X-Received: by 2002:a02:a892:: with SMTP id l18mr15190694jam.28.1555424646371; Tue, 16 Apr 2019 07:24:06 -0700 (PDT) Received: from titan.knownspace (173-25-245-129.client.mchsi.com. [173.25.245.129]) by smtp.gmail.com with ESMTPSA id k11sm9388650itk.25.2019.04.16.07.24.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2019 07:24:06 -0700 (PDT) Date: Tue, 16 Apr 2019 09:24:02 -0500 From: Justin Hibbits To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys Message-ID: <20190416092402.4288bc90@titan.knownspace> In-Reply-To: References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 9028F8E190 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 14:24:08 -0000 Hi Conrad, On Mon, 15 Apr 2019 17:53:17 -0700 Conrad Meyer wrote: > Hi Justin, > > On Mon, Apr 15, 2019 at 5:01 PM Justin Hibbits > wrote: > > Given the discussion over there it would probably also fail on > > powernv, which also does not use loader. > > Does power use bsdinstall (which populates /boot/entropy at install > time via usr.sbin/bsdinstall/scripts/entropy) and install the > libexec/rc/rc.d/random rc script (which re-emits new /boot/entropy on > every startup)? If so, it should be ok. > > The problem is new installs that don't use bsdinstall or otherwise > provide initial /boot/entropy. E.g., the CI infrastructure for > Riscv/Arm is/was generating minimal filesystem images and not > populating /boot/entropy. > > Best, > Conrad It does use bsdinstall to install. How is entropy loaded at startup, which causes the problem noted in github? If it's loaded before filesystems get mounted, that could be a problem for us, because /boot is on a different filesystem (msdosfs, to be read by petitboot). Petitboot also does not have a way to preload modules, so all we have at startup, until spawning init, is the kernel. - Justin From owner-svn-src-all@freebsd.org Tue Apr 16 14:28:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D213D1573DC6; Tue, 16 Apr 2019 14:28:34 +0000 (UTC) (envelope-from bde@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 746FC8E54A; Tue, 16 Apr 2019 14:28:34 +0000 (UTC) (envelope-from bde@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 50AD320D7F; Tue, 16 Apr 2019 14:28:34 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GESYnN035248; Tue, 16 Apr 2019 14:28:34 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GESYT0035247; Tue, 16 Apr 2019 14:28:34 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201904161428.x3GESYT0035247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 16 Apr 2019 14:28:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346276 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 346276 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 746FC8E54A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 14:28:35 -0000 Author: bde Date: Tue Apr 16 14:28:33 2019 New Revision: 346276 URL: https://svnweb.freebsd.org/changeset/base/346276 Log: Fix a variable name in r346215. Clearing of the right of the screen was broken, except it worked accidentally in most cases where the virtual screen is larger than the physical screen. Modified: head/lib/libvgl/simple.c Modified: head/lib/libvgl/simple.c ============================================================================== --- head/lib/libvgl/simple.c Tue Apr 16 14:07:14 2019 (r346275) +++ head/lib/libvgl/simple.c Tue Apr 16 14:28:33 2019 (r346276) @@ -515,7 +515,7 @@ VGLClear(VGLBitmap *object, u_long color) for (i = 0; i < object->VXsize; i++) bcopy(&color, src.Bitmap + i * object->PixelBytes, object->PixelBytes); for (i = 0; i < object->VYsize; i++) - __VGLBitmapCopy(&src, 0, 0, object, 0, i, object->VYsize, 1); + __VGLBitmapCopy(&src, 0, 0, object, 0, i, object->VXsize, 1); break; case VIDBUF8X: From owner-svn-src-all@freebsd.org Tue Apr 16 14:29:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49BF21573E60; Tue, 16 Apr 2019 14:29:13 +0000 (UTC) (envelope-from gjb@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 E39558E694; Tue, 16 Apr 2019 14:29:12 +0000 (UTC) (envelope-from gjb@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 BD53D20D81; Tue, 16 Apr 2019 14:29:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GETCbV035321; Tue, 16 Apr 2019 14:29:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GETCJo035320; Tue, 16 Apr 2019 14:29:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201904161429.x3GETCJo035320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 16 Apr 2019 14:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346277 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Commit-Revision: 346277 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E39558E694 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 14:29:13 -0000 Author: gjb Date: Tue Apr 16 14:29:12 2019 New Revision: 346277 URL: https://svnweb.freebsd.org/changeset/base/346277 Log: Release notes documentation: - r335640, pcap(3) 1.9.0 (pre-release). - r338452, lastlogin(8) libxo(3) support. - r338475, traceroute(8) capsicum support. - r338707, pthread(3) POSIX compliance improvements. - r339446, jail(8) allow.read_msgbuf parameter addition. - r340369, TP-Link TL-WN321G uses run(4) instead of rum(4). - r340963, makewhatis(1) do not operate on read-only directories. - r341790, jail(8) '-e ' flag added. - r342254, vt(4) uk.macbook.kbd keymap addition. - r343118, trim(8) utility added. Keep sorted by revision number. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 16 14:28:33 2019 (r346276) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 16 14:29:12 2019 (r346277) @@ -161,6 +161,13 @@ Userland Configuration Changes + The &man.jail.8; utility has been + updated to include a new &man.jail.conf.5; parameter, + allow.read_msgbuf, which prevents jailed + processes and users from accessing the &man.dmesg.8; buffer. + This parameter is set to false by + default. + The system &man.crontab.5;, /etc/crontab, has been updated to set PATH for consistency with the &man.cron.8; @@ -183,25 +190,41 @@ which is used to specify the timestamp for build reproducibility. - The &man.last.1; utility has been - updated to include &man.libxo.3; support. - The &man.dd.1; utility has been updated to add a new statusoperand, progress, which reports the current status on a single line every second. + The &man.last.1; utility has been + updated to include &man.libxo.3; support. + + The &man.lastlogin.8; utility has been + updated to include &man.libxo.3; support. + + The &man.traceroute.8; utility has been + updated to include &man.libcasper.3; support. + The &man.diff.1; utility has been updated to implement -B and --ignore-blank-lines support. - The &man.fdisk.8; utility has been - updated to support sectors larger than 2048 bytes. + The &man.makewhatis.1; utility has been + updated to prevent operating within read-only + directories. + The &man.jail.8; utility has been + updated to add a new flag, -e, which takes + a &man.jail.conf.5; parameter as an argument and prints a list + of non-wildcard jails with the specified parameter. + The &man.ktrdump.8; utility has been updated to include the -l flag which enables "live" mode when specified. + The &man.trim.8; utility has been added, + which deletes content for blocks on flash-based storage + devices that use wear-leveling algorithms. + The &man.gzip.1; utility has been updated to add -l support for &man.xz.1; files. @@ -220,6 +243,9 @@ utilities have been updated to allow dashes in label names. + The &man.fdisk.8; utility has been + updated to support sectors larger than 2048 bytes. + The &man.sh.1; utility has been updated to add the pipefail option which simplifies checking the exit status of all commands in a pipeline. @@ -321,7 +347,11 @@ Runtime Libraries and API -   + The &man.pcap.3; library has been + updated to version 1.9.0 (pre-release). + + The &man.pthread.3; library has been + updated to improve POSIX compliance. @@ -396,7 +426,9 @@ Network Drivers -   + The TP-Link® TL-WN321G™ + network adapter now uses the &man.run.4; driver instead of the + &man.rum.4; driver. @@ -411,7 +443,9 @@ Hardware Support -   + The &man.vt.4; keyboard mapping has been + updated to include uk.macbook.kbd + support. From owner-svn-src-all@freebsd.org Tue Apr 16 14:40:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C134B1574296; Tue, 16 Apr 2019 14:40:59 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::608]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBEE98EC5A; Tue, 16 Apr 2019 14:40:57 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback13o.mail.yandex.net (mxback13o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::64]) by forward105o.mail.yandex.net (Yandex) with ESMTP id CE0B74200C29; Tue, 16 Apr 2019 17:40:44 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback13o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id DcOlWtERgz-eixe7TNJ; Tue, 16 Apr 2019 17:40:44 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1555425644; bh=LyeSBExoooDMdbkugMcPot7vAjUmHd2i5fq7SRyia1k=; h=In-Reply-To:From:Date:References:To:Subject:Message-ID; b=IkWymUMFGDSyfIl3YTl5h/wW/ujWLIKvmbSA+GBBigcKp9XBJ5+GU4CaAAfIDAAvL 0oi0uc/eag/ukC4O7K7riFK5XSoh5mIb4FCNT2O7ABlrA0kF761NjK/hDg4vdn1HzN Otgo0RhEHQwAu5grFcL6F30fah6OndqTWQn8LxFk= Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id MjrVIEt1Sd-ehaOSvrf; Tue, 16 Apr 2019 17:40:44 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en To: Slava Shwartsman , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812051425.wB5EP38T004562@repo.freebsd.org> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= mQENBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAG0JUFuZHJleSBWLiBFbHN1a292IDxidTdjaGVyQHlhbmRleC5ydT6JATgEEwECACIFAkwB F1kCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEAHF6gQQyKF6qmYIAI6ekfm1VA4T vqankI1ISE6ku4jV7UlpIQlEbE7/8n3Zd6teJ+pGOQhN5qk8QE7utdPdbktAzi+x7LIJVzUw 4TywZLXGrkP7VKYkfg6oyCGyzITghefQeJtr2TN4hYCkzPWpylkue8MtmqfZv/6royqwTbN+ +E09FQNvTgRUYJYTeQ1qOsxNRycwvw3dr2rOfuxShbzaHBB1pBIjGrMg8fC5pd65ACH5zuFV A0CoTNGMDrEZSfBkTW604UUHFFXeCoC3dwDZRKOWJ3GmMXns65Ai5YkA63BSHEE1Qle3VBhd cG1w0CB5FBV3pB27UVnf0jEbysrDqW4qN7XMRFSWNAy5AQ0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAYkBHwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: Date: Tue, 16 Apr 2019 17:39:47 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201812051425.wB5EP38T004562@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Gc4FCLxF5RLpVDUgQhYnJWt4CbwtXFWML" X-Rspamd-Queue-Id: EBEE98EC5A X-Spamd-Bar: --------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yandex.ru header.s=mail header.b=IkWymUMF; dmarc=pass (policy=none) header.from=yandex.ru; spf=pass (mx1.freebsd.org: domain of bu7cher@yandex.ru designates 2a02:6b8:0:1a2d::608 as permitted sender) smtp.mailfrom=bu7cher@yandex.ru X-Spamd-Result: default: False [-9.87 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0:1a2d::/64]; FREEMAIL_FROM(0.00)[yandex.ru]; HAS_ATTACHMENT(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[yandex.ru:+]; MX_GOOD(-0.01)[mx.yandex.ru,mx.yandex.ru,mx.yandex.ru,mx.yandex.ru,mx.yandex.ru]; DMARC_POLICY_ALLOW(-0.50)[yandex.ru,none]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[8.0.6.0.0.0.0.0.0.0.0.0.0.0.0.0.d.2.a.1.0.0.0.0.8.b.6.0.2.0.a.2.list.dnswl.org : 127.0.5.1]; ASN(0.00)[asn:13238, ipnet:2a02:6b8::/32, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yandex.ru.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[yandex.ru]; R_DKIM_ALLOW(-0.20)[yandex.ru:s=mail]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; IP_SCORE(-3.70)[ip: (-9.84), ipnet: 2a02:6b8::/32(-4.81), asn: 13238(-3.85), country: RU(0.00)] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 14:41:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Gc4FCLxF5RLpVDUgQhYnJWt4CbwtXFWML Content-Type: multipart/mixed; boundary="CkT7XhrlVpnZaZvea4uGJsDAgElFOplO3"; protected-headers="v1" From: "Andrey V. Elsukov" To: Slava Shwartsman , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en References: <201812051425.wB5EP38T004562@repo.freebsd.org> In-Reply-To: <201812051425.wB5EP38T004562@repo.freebsd.org> --CkT7XhrlVpnZaZvea4uGJsDAgElFOplO3 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05.12.2018 17:25, Slava Shwartsman wrote: > Author: slavash > Date: Wed Dec 5 14:25:03 2018 > New Revision: 341586 > URL: https://svnweb.freebsd.org/changeset/base/341586 >=20 > Log: > mlx5en: Implement backpressure indication. > =20 > The backpressure indication is implemented using an unlimited rate ty= pe of > mbuf send tag. When the upper layers typically the socket layer has o= btained such > a tag, it can then query the destination driver queue for the current= > amount of space available in the send queue. > =20 > A single mbuf send tag may be referenced multiple times and a refcoun= t has been added > to the mlx5e_priv structure to track its usage. Because the send tag = resides > in the mlx5e_channel structure, there is no need to wait for refcount= s to reach > zero until the mlx4en(4) driver is detached. The channels structure i= s persistant > during the lifetime of the mlx5en(4) driver it belongs to and can so = be accessed > without any need of synchronization. > =20 > The mlx5e_snd_tag structure was extended to contain a type field, bec= ause there are now > two different tag types which end up in the driver which need to be d= istinguished. > =20 > Submitted by: hselasky@ > Approved by: hselasky (mentor) > MFC after: 1 week > Sponsored by: Mellanox Technologies > @@ -587,27 +609,33 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) > struct mlx5e_sq *sq; > int ret; > =20 > - sq =3D mlx5e_select_queue(ifp, mb); > - if (unlikely(sq =3D=3D NULL)) { > -#ifdef RATELIMIT > - /* Check for route change */ > - if (mb->m_pkthdr.snd_tag !=3D NULL && > - mb->m_pkthdr.snd_tag->ifp !=3D ifp) { > + if (mb->m_pkthdr.snd_tag !=3D NULL) { > + sq =3D mlx5e_select_queue_by_send_tag(ifp, mb); > + if (unlikely(sq =3D=3D NULL)) { > + /* Check for route change */ > + if (mb->m_pkthdr.snd_tag->ifp !=3D ifp) { > + /* Free mbuf */ > + m_freem(mb); > + > + /* > + * Tell upper layers about route > + * change and to re-transmit this > + * packet: > + */ > + return (EAGAIN); > + } Hi, I just discovered something strange and found that this commit is the cause. The test system has mlx5en 100G interface. It has two vlans: vlan500 and vlan100. Via vlan500 it receives some packets flows. Then it routes these packets into vlan100. But packets are dropped in mlx5e_xmit() with EAGAIN error code. # dtrace -n 'fbt::ip6_output:return {printf("%d", arg1);}' dtrace: description 'fbt::ip6_output:return ' matched 1 probe CPU ID FUNCTION:NAME 23 54338 ip6_output:return 35 16 54338 ip6_output:return 35 21 54338 ip6_output:return 35 22 54338 ip6_output:return 35 24 54338 ip6_output:return 35 23 54338 ip6_output:return 35 14 54338 ip6_output:return 35 ^C # dtrace -n 'fbt::mlx5e_xmit:return {printf("%d", arg1);}' dtrace: description 'fbt::mlx5e_xmit:return ' matched 1 probe CPU ID FUNCTION:NAME 16 69030 mlx5e_xmit:return 35 23 69030 mlx5e_xmit:return 35 26 69030 mlx5e_xmit:return 35 25 69030 mlx5e_xmit:return 35 24 69030 mlx5e_xmit:return 35 21 69030 mlx5e_xmit:return 35 26 69030 mlx5e_xmit:return 35 ^C The kernel config is GENERIC. 13.0-CURRENT #9 r345758+82f3d57(svn_head)-dirty --=20 WBR, Andrey V. Elsukov --CkT7XhrlVpnZaZvea4uGJsDAgElFOplO3-- --Gc4FCLxF5RLpVDUgQhYnJWt4CbwtXFWML Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAly16TMACgkQAcXqBBDI oXoZfAf9Glf7TAruR75X9vsJ2J7jytk8xLTYCTW+U3kmjOToyIWEpmy1HNUDWN7p jjBvOijhFwZSXzV6mLL/Iy7D3xtomzl/a2Dn4sCKoM5TvYvHim2aQZtPlDnG3BI6 o4Qs705lnCl0li46Ilpmvv9wtdXCXqf9U9ayJe+3BPLojy/ryiXSrdT0EJyI0F3B d+pyntzQDw1EHlFXrn1paHiTkBjt1V+Hk7gwPP+w8jH6MnIj+Z2Awx6UpGbHfQ36 29JI087K98zG4AIadH0YPj0+myk2eVFzMSQj5Sr/LPU1HwPBtZzLVYD4zEjeRgKk GnzVIEoAWxkKU4Q3l2FgfM1csAMhWw== =yi8C -----END PGP SIGNATURE----- --Gc4FCLxF5RLpVDUgQhYnJWt4CbwtXFWML-- From owner-svn-src-all@freebsd.org Tue Apr 16 14:57:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E83631574B47; Tue, 16 Apr 2019 14:57:47 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f180.google.com (mail-it1-f180.google.com [209.85.166.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E4B58F763; Tue, 16 Apr 2019 14:57:46 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f180.google.com with SMTP id a190so16736465ite.4; Tue, 16 Apr 2019 07:57:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qgI0QyqwibCE0ZvWkvfD+/y6SpJv87l7WvMQTv9Ex3c=; b=XHtvChG/UsLGTvZj0u5worzJUw97ITQUzWPJ0rCP+t5CPutNjwykw9LlkWcbDOwWaa dWhlToCDzr3RGmXLo/uC6d3dXsqRlF9lAHwNQXsdOLOX28AKjd5hvNV9JVP5gPAOj802 ZmJqAIVnp5beA/gfMUBFU8EQVkPdz5E7vUK+pBTSeFz3Zp/E0oLqj8EWP9eDgHPCddjz G0bOUGiFuVEuHhrJ5DnHFCpPC25PufUTYGKeebdKp9Av1e4IIfBvVrPL9sphZFrzkE0j dCjXXfeumaAb7OBsa1Du9bu3G5oUqRVlOdNtn2TQ7jWVNjr29AaOoZApaJJ3Oza22j1t 8v5g== X-Gm-Message-State: APjAAAVYxbUgtII/1NZV2+4iQo8qaQjNbLZNRK6QZkthvVK9KbpWKNHv GMsdgH0OWgZUqyYoCUJEhLzE85Iq71IrqLxJY4W5MJ17 X-Google-Smtp-Source: APXvYqxckqxppr7BbijL9g8DmCTkl2bWGdA3/cT2/qgxZ/JdRjttFp/3b3r9AAboKdTxAzCt2lUEnK1Cn8RJtkQf1X4= X-Received: by 2002:a24:57cf:: with SMTP id u198mr24688898ita.162.1555426665718; Tue, 16 Apr 2019 07:57:45 -0700 (PDT) MIME-Version: 1.0 References: <201903262245.x2QMjfYS021850@repo.freebsd.org> In-Reply-To: <201903262245.x2QMjfYS021850@repo.freebsd.org> From: Ed Maste Date: Tue, 16 Apr 2019 10:57:33 -0400 Message-ID: Subject: Re: svn commit: r345562 - in head/sys: amd64/amd64 i386/i386 To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 0E4B58F763 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.180 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-5.50 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-2.73)[ip: (-7.50), ipnet: 209.85.128.0/17(-3.88), asn: 15169(-2.21), country: US(-0.06)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.77)[-0.766,0]; RCVD_IN_DNSWL_NONE(0.00)[180.166.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[180.166.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 14:57:48 -0000 On Tue, 26 Mar 2019 at 18:45, Conrad Meyer wrote: > > Author: cem > Date: Tue Mar 26 22:45:41 2019 > New Revision: 345562 > URL: https://svnweb.freebsd.org/changeset/base/345562 > > Log: > x86: Use XSAVEOPT for fpusave(), when available > > Remove redundant npxsave_core definition while here. > > Suggested by: Anton Rang > Reviewed by: kib, Anton Rang > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D19665 Note that this introduced failures in the i386 CI tests, PR 236936. Investigation is ongoing and taking some time, in part because the behaviour may be different between an i386 userland in an amd64 jail versus running on an i386 kernel. From owner-svn-src-all@freebsd.org Tue Apr 16 15:16:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5024157538A for ; Tue, 16 Apr 2019 15:16:45 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B1B068571 for ; Tue, 16 Apr 2019 15:16:45 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1555427796; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=i4UwSlCa+lM6otFPmou3JSN554jT4G3koQGMsCdKDSvOUVhCm260HjE/aTzjMXT9RekN3p8xNsUm6 W3Iug85DfLFn7AGoyBVFWeZmBBXkY2H8GFT89S9SrmcXga1ssH2B1okfHiw0F7VmRI1l8CNY48IpGn Sq4p264APabKeqSWae7a6RZ0DCC6jUkHQ4c5c6wfvknkKN135NF46xK1DmZPkgtxaRxwcPkUA+GSJS IBHzSL/YIXsMsXSKuGznlzb39CDhaIxT70yyI47+9Pjq7RjBq9q4+IBcfIWF4cwTcel4KnbkSXE1EJ mVIQw89EbxfyakJ5PzhRaNNCSgp6VYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=RtYJYwibZADEGZTRMuMfVAKnVWFMrOjQmbgUyJGSp9I=; b=flukJ9nTMI6vZJ7BS2OX5C8DE0IhCVYMnar+x0XH0fPxlNHrLVPDkLCJRuwXbLoQqZvLVGuNO5tTG FKOkGRaFuGUcGI5aNCAx1WjvXi8R++ZK8PlG7YS2WDo5ZOlwYrerVziGr2lZ6E0a6fom7gnH1VT5CV /maGHRczo8LslWwfH8yzlwg0Mk0X3T6VBVGgHFjr9O13cNy1JA2ipIg1BnsvD2Q58zC1tVfrNCI2C2 1YfbaW6bxNXRVqVzqF84Ibz6jnfuSxfCCSNb6cB7VdmtMJD35B6UglatF+X22p/nw200vE9bLkvMYX Qypst1JbbKxisonNse98qyMTT2o8h6g== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=RtYJYwibZADEGZTRMuMfVAKnVWFMrOjQmbgUyJGSp9I=; b=ZP0m42yLfR01nQCNCSN+ejuX0Np59QXezPU3tHryKUd/SYUbCXDRxqn5RzhGWp8YSxW7i6FwOMx86 FMNcesX46wbRF5K0xg5k5po9gZ9FfVvugJ67WxvzgtEcX/xhcy7Z2MgyH+V0Fog8zXBuBIxhLrIELJ ZTsmdkbSNvWjrZ51h4u0kIAhYcAYYAI2rgw88PySiMLR9M7s+4g7KBHnpJSsOEDr3EIH5nJc20D74T 2dduOfwCP+lmgDjJ7U/0VX9z8A+Nv5AqI4dIHERfkNuYZhEFEDqKwFNg2WLK+UAvZQOSwKzjEI9sCl jH57HbV+GtMKenxiShkP4GxQh2NfBxQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 9c987bc4-605a-11e9-803b-31925da7267c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id 9c987bc4-605a-11e9-803b-31925da7267c; Tue, 16 Apr 2019 15:16:32 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3GFGTG9043223; Tue, 16 Apr 2019 09:16:29 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <310a420ee0b9e12249979d89dc4fa0d4cac5a8dc.camel@freebsd.org> Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys From: Ian Lepore To: Warner Losh , Emmanuel Vadot Cc: "Conrad E. Meyer" , Justin Hibbits , src-committers , svn-src-all , svn-src-head Date: Tue, 16 Apr 2019 09:16:29 -0600 In-Reply-To: References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 2B1B068571 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:16:46 -0000 On Tue, 2019-04-16 at 07:18 -0600, Warner Losh wrote: > On Tue, Apr 16, 2019, 7:04 AM Emmanuel Vadot > wrote: > > > On Mon, 15 Apr 2019 17:54:56 -0700 > > Conrad Meyer wrote: > > > > > On Mon, Apr 15, 2019 at 5:53 PM Conrad Meyer > > > wrote: > > > > E.g., the CI infrastructure for > > > > Riscv/Arm is/was generating minimal filesystem images and not > > > > populating /boot/entropy. > > > > > > I should add, I say "is/was" because I have a PR out which may > > > address > > > the problem: https://github.com/freebsd/freebsd-ci/pull/31 > > > > > > Best, > > > Conrad > > > > It's not only CI, all release images (memstick, iso) don't have > > a /boot/entropy. > > Also all arm/arm64 image don't have this file too. > > If /boot/entropy is needed and isn't present loader(8) should > > gather > > some entropy and pass this to the kernel for the first boot. > > > > Maybe we need to bootstrap the entropy file as part of buildworld. > I'm not > sure if the loader can find enough... > > Isn't a file full of data which is distributed in identical form to everyone the exact opposite of entropy? -- Ian From owner-svn-src-all@freebsd.org Tue Apr 16 15:17:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FCBD157545E; Tue, 16 Apr 2019 15:17:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3294469A69; Tue, 16 Apr 2019 15:17:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f67.google.com with SMTP id b6so17964184iog.0; Tue, 16 Apr 2019 08:17:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=eFxP0v23LemMLdkZtcNbFOfwMKUt3TlaL94W1NiItWM=; b=WN/Wu+tUjve206M7vbpTtsIBM38hOqHqZ/bJpULZyqWHocwTbdmae9GLc0AklaYWx1 XRTEMjBaOATA2TDFV8rAQtMS1tLEEOp9X+Ep2Lx2Hl8VABLxJR1h/xMAbTwpRZo+WaR5 cllOFiH/ZzWn8VSTRSyjDq5dT/HcOoTwDq4laJwxzMsaih90DUtbZ+2uT/MPBhTqkKhC XrMfY2F8cFRLot75QlgN5bj7sNpp/Qr04OJRKPdCPwRn2FFn5BU/+2O3rCFmua9h83F2 LgU8U6Xyc/pTD++I2bIquI1CXUye8g93ceJz+oqTk45WjB3psg0ZXFbCs5a56EoH4MGh tY3Q== X-Gm-Message-State: APjAAAVHJqsny/9QgNhkmQUZ76GzGhkPkQtDMWXSo2SgnEOm5/PHO10O +wr0AZ5/qPTnivh63BkNJK656S5u X-Google-Smtp-Source: APXvYqzMtYOFmmXyhWwet7Z8Urm1HPQUr1LNgKlj5oJH7NMyu1hZ89kb7xgRxys+6AyAfR6Bzi6nhQ== X-Received: by 2002:a6b:3c0e:: with SMTP id k14mr55214266iob.162.1555427855314; Tue, 16 Apr 2019 08:17:35 -0700 (PDT) Received: from mail-it1-f174.google.com (mail-it1-f174.google.com. [209.85.166.174]) by smtp.gmail.com with ESMTPSA id t78sm9308473itb.39.2019.04.16.08.17.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 08:17:35 -0700 (PDT) Received: by mail-it1-f174.google.com with SMTP id y204so33599560itf.3; Tue, 16 Apr 2019 08:17:35 -0700 (PDT) X-Received: by 2002:a02:62ce:: with SMTP id d197mr22018379jac.91.1555427854989; Tue, 16 Apr 2019 08:17:34 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 08:17:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 3294469A69 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; TAGGED_FROM(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:17:38 -0000 On Tue, Apr 16, 2019 at 6:19 AM Warner Losh wrote: > On Tue, Apr 16, 2019, 7:04 AM Emmanuel Vadot wrote: >> It's not only CI, all release images (memstick, iso) don't have >> a /boot/entropy. >> Also all arm/arm64 image don't have this file too. >> If /boot/entropy is needed and isn't present loader(8) should gather >> some entropy and pass this to the kernel for the first boot. > > Maybe we need to bootstrap the entropy file as part of buildworld. I'm not sure if the loader can find enough... Well, one thing we should explicitly *not do* is distribute the same "entropy" to everyone in released images. So there is some difficulty here. Buildworld does not know if the target of the build is a one-off or a release image. Something like makerelease still seems inappropriately dangerous. The idea of loader-provided entropy is not that it generates the entropy itself, but that it can access the /boot/ filesystem to load entropy and pass it to the kernel as a fake module. I think we have identified that at least stack_chk_init was silently broken on a number of systems, using non-random stack guards. Now it's loudly broken. Ed has proposed a happy medium where we can check, in stack_chk_init, if the random device is seeded (via new KPI) and give users a big stick tunable to proceed without entropy or not. For now, I think we would default that to "proceed" just to unbreak CI and any other sharp corners. But the goal would be to default that to "panic" eventually. I don't know enough about stack_chk_init to determine how late it can be seeded. It seems to have come in in r180012 as a component of -fstack-protector. I will do a little investigating. Suggestions on appropriate reviewers welcome (I think ru@ is no longer with the project). Best regards, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 15:26:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E96E1575909; Tue, 16 Apr 2019 15:26:58 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f174.google.com (mail-it1-f174.google.com [209.85.166.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 819F66A1FD; Tue, 16 Apr 2019 15:26:57 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f174.google.com with SMTP id 139so33152525ita.4; Tue, 16 Apr 2019 08:26:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=R3QHdhBE0wAXJqEX/hbhoSxwoL1vm79cNBx5w96AjVE=; b=Cve3GZMzzXlRbfSj40Nyptg5R2EnBC4HvPhPDldT+h4OM+B7VAmzDGpvNhH9//F9bA +S0etiK9iYWZcEug8Hoc10ont5c2tGoskysgvS+cHrNdvA+Znsa5OAGX8FBs52wXc8A8 ZVYIXch5BPJKuTj1SCfHbCpZSRHAZWFZVIiG5wQdxlZOv/oAapQvCYz0m3u8ipGeQrTW MK6/sKfR6uLH8vkK2kMdPHmCg97R7P7PzRx+rw8wrhtnyN2tgm9fmxhSjroQ9nYmD6Fv FjCi4WC/4ELah76oN6S2eCTqxESdb/ykfucdN98ps66FkhfwmOKwMUKS5cQ8UxsgkT24 yNng== X-Gm-Message-State: APjAAAX8HtvPHLLpR7EfvSeIbbFs3vQkfuw9ndydQuoFSOqPxare4Ebb ie+JZS93Xf3+tVVuzhd//bXLCqvQ X-Google-Smtp-Source: APXvYqz3KSusL9pulV/t81jll4NgiO3RAw1cZqG45O+UAwEMMrRlPE0q3iC4lSpRbNHdr5wdvMYGBg== X-Received: by 2002:a24:3587:: with SMTP id k129mr27842723ita.55.1555428411158; Tue, 16 Apr 2019 08:26:51 -0700 (PDT) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com. [209.85.166.176]) by smtp.gmail.com with ESMTPSA id f197sm10226339itf.5.2019.04.16.08.26.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 08:26:50 -0700 (PDT) Received: by mail-it1-f176.google.com with SMTP id w15so33199612itc.0; Tue, 16 Apr 2019 08:26:50 -0700 (PDT) X-Received: by 2002:a24:f949:: with SMTP id l70mr30805365ith.116.1555428410134; Tue, 16 Apr 2019 08:26:50 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416092402.4288bc90@titan.knownspace> In-Reply-To: <20190416092402.4288bc90@titan.knownspace> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 08:26:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Justin Hibbits Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 819F66A1FD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:26:58 -0000 On Tue, Apr 16, 2019 at 7:24 AM Justin Hibbits wrote: > > Hi Conrad, > ... > [Power] does use bsdinstall to install. How is entropy loaded at startup, > which causes the problem noted in github? There are a couple very early load sources. loader(8) will load early-boot entropy from /boot/entropy and pass it to the kernel as a fake module (entropy_cache_load in loader.conf(5)), similar to cpu_microcode early load. The fallback option is random(4) itself groping into the filesystem during early auto-conf (SI_SUB_RANDOM:SI_ORDER_FOURTH, IIRC) to access /boot/entropy directly. > If it's loaded before > filesystems get mounted, that could be a problem for us, because /boot > is on a different filesystem (msdosfs, to be read by petitboot). > Petitboot also does not have a way to preload modules, so all we have > at startup, until spawning init, is the kernel. Yes, that seems potentially problematic. Can the Power kernel access the non-msdosfs root filesystem? Let's follow-up offline about PPC-specific early entropy seeding. I would much prefer we figure out a way to provide early entropy to Power than disabling or crippling every early random consumer on the arch. Do you know what the Linux folks do? On Power with darn, we could probably just spin in SI_ORDER_FOURTH until we have enough darn output to seed random. Similar for x86 CI images, I guess; though they do not have the loader problem, some people have non-bsdinstall installation methods. Thanks, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 15:31:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B33711575B63; Tue, 16 Apr 2019 15:31:24 +0000 (UTC) (envelope-from bde@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 530956A645; Tue, 16 Apr 2019 15:31:24 +0000 (UTC) (envelope-from bde@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 216A821824; Tue, 16 Apr 2019 15:31:24 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GFVNma070469; Tue, 16 Apr 2019 15:31:23 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GFVNY3070468; Tue, 16 Apr 2019 15:31:23 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201904161531.x3GFVNY3070468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 16 Apr 2019 15:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346278 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 346278 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 530956A645 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:31:25 -0000 Author: bde Date: Tue Apr 16 15:31:23 2019 New Revision: 346278 URL: https://svnweb.freebsd.org/changeset/base/346278 Log: Quick fix for slow clearing and context switches of large frame buffers with old kernels, by breaking the support for large frame buffers in the same way as for current kernels. Large frame buffers may be too large to map into kva, and the kernel (syscons) only uses the first screen page anyway, so r203535, r205557 and 248799 limit the buffer size in VESA modes to the first screen page, apparently without noticing that this breaks applications by using the same limit for user mappings as for kernel mappings. In vgl, this makes the virtual screen the same as the physical screen. However, this is almost a feature since clearing and switching large (usually mostly unused) frame buffers takes too long. E.g., on a 16 year old low-end AGP card it takes about 12 seconds to clear the 128MB frame buffer in old kernels that map it all and also map it with slow attributes (e.g., uncacheable). Older PCI cards are even slower, but usually have less memory. Newer PCIe cards are faster, but may have many GB of memory. Also, vgl malloc()s a shadow buffer with the same size as the frame buffer, so large frame buffers are even more wasteful in applications than in the kernel. Use the same limit in vgl as in newer kernels. Virtual screens and panning still work in non-VESA modes that have more than 1 page. The reduced buffer size in the kernel also breaks mmap() of the last physical page in modes where the reduced size is not a multiple of the physical page size. The same reduction in vgl only reduces the virtual screen size. Modified: head/lib/libvgl/main.c Modified: head/lib/libvgl/main.c ============================================================================== --- head/lib/libvgl/main.c Tue Apr 16 14:29:12 2019 (r346277) +++ head/lib/libvgl/main.c Tue Apr 16 15:31:23 2019 (r346278) @@ -264,6 +264,19 @@ VGLInit(int mode) else VGLBufSize = max(VGLAdpInfo.va_line_width*VGLModeInfo.vi_height, VGLAdpInfo.va_window_size)*VGLModeInfo.vi_planes; + /* + * The above is for old -CURRENT. Current -CURRENT since r203535 and/or + * r248799 restricts va_buffer_size to the displayed size in VESA modes to + * avoid wasting kva for mapping unused parts of the frame buffer. But all + * parts were usable here. Applying the same restriction to user mappings + * makes our virtualization useless and breaks our panning, but large frame + * buffers are also difficult for us to manage (clearing and switching may + * be too slow, and malloc() may fail). Restrict ourselves similarly to + * get the same efficiency and bugs for all kernels. + */ + if (0 && VGLModeInfo.vi_mode >= M_VESA_BASE) + VGLBufSize = 2*VGLAdpInfo.va_line_width*VGLModeInfo.vi_height* + VGLModeInfo.vi_planes; VGLBuf = malloc(VGLBufSize); if (VGLBuf == NULL) { VGLEnd(); From owner-svn-src-all@freebsd.org Tue Apr 16 15:31:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47FD01575B8F; Tue, 16 Apr 2019 15:31:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f172.google.com (mail-it1-f172.google.com [209.85.166.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD6A16A760; Tue, 16 Apr 2019 15:31:34 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f172.google.com with SMTP id x132so33678448itf.2; Tue, 16 Apr 2019 08:31:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=4sbyXwolrkHUV7cTHS3f1Y+K3pIcvwA6A8om3rlYO9s=; b=gehsSA5KYyDY06l83HIEO+Wug+yEsR1rzKd8oTHX7cNIKeJKSPm0ipReJ6KTu7TyBe XymzfLuk9Y3PHWtpkZMcu4auGHCav05hdGlexCbDab0ENDPYNWvFskT3+LpRQ44yJ27c ky0x9i/PJqCAy3PxsJxxyoq+SPBAaGK+lV8EWJ6pCUiX/2c3TqayVZfqVSONjsaVJVtn WQrW4ebFqyJMN/mvl7HYBNU16h72mswsO+ug4X4I9g5W69lEPB0V+mwYX7CC/0QUBqw5 XkQQEE/VWTsbvGscVkkQ0NCmaSErt3tQCLg/iFP40yxt1bhD9V+kJzn48+afKj3/hs4d do9A== X-Gm-Message-State: APjAAAVQ4p0TMuqMWymKlMqBmNLKMq2aEj4ravWCv2HrrrtPbJcnmE3G AKXdImGCwenKYesmHdhHAybBuo+m X-Google-Smtp-Source: APXvYqzWqnkP3wAkMMlBCDd2UzLMI2o66rlAV8m7IBAg9l983ouUtR6BFQ6Tza6+mMp9ccJxsgNHmg== X-Received: by 2002:a24:4e05:: with SMTP id r5mr29305996ita.63.1555428693722; Tue, 16 Apr 2019 08:31:33 -0700 (PDT) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com. [209.85.166.176]) by smtp.gmail.com with ESMTPSA id k18sm19741523iob.60.2019.04.16.08.31.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 08:31:33 -0700 (PDT) Received: by mail-it1-f176.google.com with SMTP id s3so18945116itk.1; Tue, 16 Apr 2019 08:31:33 -0700 (PDT) X-Received: by 2002:a02:a399:: with SMTP id y25mr58476299jak.58.1555428693409; Tue, 16 Apr 2019 08:31:33 -0700 (PDT) MIME-Version: 1.0 References: <201904160228.x3G2SZIg057157@repo.freebsd.org> In-Reply-To: <201904160228.x3G2SZIg057157@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 08:31:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346259 - head/sys/dev/tpm To: Marcin Wojtas Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: DD6A16A760 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.990,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:31:35 -0000 Hi Marcin, Isn't this check racy? Thread TIDs are allocated from a fixed range and can be recycled. Best, Conrad On Mon, Apr 15, 2019 at 7:28 PM Marcin Wojtas wrote: > > Author: mw > Date: Tue Apr 16 02:28:35 2019 > New Revision: 346259 > URL: https://svnweb.freebsd.org/changeset/base/346259 > > Log: > tpm: Prevent session hijack > > Check caller thread id before allowing to read the buffer > to make sure that it can only be accessed by the thread that > did the associated write to the TPM. > > Submitted by: Kornel Duleba > Reviewed by: delphij > Obtained from: Semihalf > Sponsored by: Stormshield > Differential Revision: https://reviews.freebsd.org/D19713 > > Modified: > head/sys/dev/tpm/tpm20.c > head/sys/dev/tpm/tpm20.h > > Modified: head/sys/dev/tpm/tpm20.c > ============================================================================== > --- head/sys/dev/tpm/tpm20.c Tue Apr 16 02:12:38 2019 (r346258) > +++ head/sys/dev/tpm/tpm20.c Tue Apr 16 02:28:35 2019 (r346259) > @@ -77,6 +77,10 @@ tpm20_read(struct cdev *dev, struct uio *uio, int flag > > callout_stop(&sc->discard_buffer_callout); > sx_xlock(&sc->dev_lock); > + if (sc->owner_tid != uio->uio_td->td_tid) { > + sx_xunlock(&sc->dev_lock); > + return (EPERM); > + } > > bytes_to_transfer = MIN(sc->pending_data_length, uio->uio_resid); > if (bytes_to_transfer > 0) { > @@ -128,9 +132,11 @@ tpm20_write(struct cdev *dev, struct uio *uio, int fla > > result = sc->transmit(sc, byte_count); > > - if (result == 0) > + if (result == 0) { > callout_reset(&sc->discard_buffer_callout, > TPM_READ_TIMEOUT / tick, tpm20_discard_buffer, sc); > + sc->owner_tid = uio->uio_td->td_tid; > + } > > sx_xunlock(&sc->dev_lock); > return (result); > > Modified: head/sys/dev/tpm/tpm20.h > ============================================================================== > --- head/sys/dev/tpm/tpm20.h Tue Apr 16 02:12:38 2019 (r346258) > +++ head/sys/dev/tpm/tpm20.h Tue Apr 16 02:28:35 2019 (r346259) > @@ -120,6 +120,7 @@ struct tpm_sc { > > uint8_t *buf; > size_t pending_data_length; > + lwpid_t owner_tid; > > struct callout discard_buffer_callout; > #ifdef TPM_HARVEST > From owner-svn-src-all@freebsd.org Tue Apr 16 15:33:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 129C41575CEF; Tue, 16 Apr 2019 15:33:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BA876AA58; Tue, 16 Apr 2019 15:33:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [176.74.212.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 731FD2600C9; Tue, 16 Apr 2019 17:33:19 +0200 (CEST) Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en To: "Andrey V. Elsukov" , Slava Shwartsman , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, John Baldwin References: <201812051425.wB5EP38T004562@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Tue, 16 Apr 2019 17:32:51 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 9BA876AA58 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:33:28 -0000 On 4/16/19 4:39 PM, Andrey V. Elsukov wrote: > On 05.12.2018 17:25, Slava Shwartsman wrote: >> Author: slavash >> Date: Wed Dec 5 14:25:03 2018 >> New Revision: 341586 >> URL: https://svnweb.freebsd.org/changeset/base/341586 >> >> Log: >> mlx5en: Implement backpressure indication. >> >> The backpressure indication is implemented using an unlimited rate type of >> mbuf send tag. When the upper layers typically the socket layer has obtained such >> a tag, it can then query the destination driver queue for the current >> amount of space available in the send queue. >> >> A single mbuf send tag may be referenced multiple times and a refcount has been added >> to the mlx5e_priv structure to track its usage. Because the send tag resides >> in the mlx5e_channel structure, there is no need to wait for refcounts to reach >> zero until the mlx4en(4) driver is detached. The channels structure is persistant >> during the lifetime of the mlx5en(4) driver it belongs to and can so be accessed >> without any need of synchronization. >> >> The mlx5e_snd_tag structure was extended to contain a type field, because there are now >> two different tag types which end up in the driver which need to be distinguished. >> >> Submitted by: hselasky@ >> Approved by: hselasky (mentor) >> MFC after: 1 week >> Sponsored by: Mellanox Technologies >> @@ -587,27 +609,33 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) >> struct mlx5e_sq *sq; >> int ret; >> >> - sq = mlx5e_select_queue(ifp, mb); >> - if (unlikely(sq == NULL)) { >> -#ifdef RATELIMIT >> - /* Check for route change */ >> - if (mb->m_pkthdr.snd_tag != NULL && >> - mb->m_pkthdr.snd_tag->ifp != ifp) { >> + if (mb->m_pkthdr.snd_tag != NULL) { >> + sq = mlx5e_select_queue_by_send_tag(ifp, mb); >> + if (unlikely(sq == NULL)) { >> + /* Check for route change */ >> + if (mb->m_pkthdr.snd_tag->ifp != ifp) { >> + /* Free mbuf */ >> + m_freem(mb); >> + >> + /* >> + * Tell upper layers about route >> + * change and to re-transmit this >> + * packet: >> + */ >> + return (EAGAIN); >> + } > > Hi, > > I just discovered something strange and found that this commit is the > cause. > The test system has mlx5en 100G interface. It has two vlans: vlan500 and > vlan100. > Via vlan500 it receives some packets flows. Then it routes these packets > into vlan100. > But packets are dropped in mlx5e_xmit() with EAGAIN error code. > > # dtrace -n 'fbt::ip6_output:return {printf("%d", arg1);}' > dtrace: description 'fbt::ip6_output:return ' matched 1 probe > CPU ID FUNCTION:NAME > 23 54338 ip6_output:return 35 > 16 54338 ip6_output:return 35 > 21 54338 ip6_output:return 35 > 22 54338 ip6_output:return 35 > 24 54338 ip6_output:return 35 > 23 54338 ip6_output:return 35 > 14 54338 ip6_output:return 35 > ^C > > # dtrace -n 'fbt::mlx5e_xmit:return {printf("%d", arg1);}' > dtrace: description 'fbt::mlx5e_xmit:return ' matched 1 probe > CPU ID FUNCTION:NAME > 16 69030 mlx5e_xmit:return 35 > 23 69030 mlx5e_xmit:return 35 > 26 69030 mlx5e_xmit:return 35 > 25 69030 mlx5e_xmit:return 35 > 24 69030 mlx5e_xmit:return 35 > 21 69030 mlx5e_xmit:return 35 > 26 69030 mlx5e_xmit:return 35 > ^C > > The kernel config is GENERIC. > 13.0-CURRENT #9 r345758+82f3d57(svn_head)-dirty > Hi, This might be a case where rcvif in the mbuf's pktheader is not cleared before the packet is fed back on the wire. John Baldwin is working on the send tags implementation, to eliminate the EAGAIN handling in the network drivers. --HPS From owner-svn-src-all@freebsd.org Tue Apr 16 15:38:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D63201575F7B; Tue, 16 Apr 2019 15:38:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B8326AD64; Tue, 16 Apr 2019 15:38:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f67.google.com with SMTP id p23so17964136iol.13; Tue, 16 Apr 2019 08:38:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=OUJgQGf+ZXyfyvyBDzEijMICKo/esjLnCmC4iMso6so=; b=Z7x8rJnhFsgkyONJW+Zyxf5U0nCTz4FnGVRcNFCnCsB254Kge3QPrY933c0c4aSPlL VClkWh4SaIDlbURIOm5xK62Ksjp7k64Jhb0mCVDVFzHzezF5Bo0b83o2LKEQzdq/yfLX V5cSmmncUfCjoGJ8edkxKwmQxlPuYQUfnMw46AQ3KutvKJP/ajzvyXS9z9ToN7j7n1ir 0c20/+O33g7092ckHEz9C1kCZvlk/CxVTbioi5yf8B8whafXxNQAk7dlqY6tQliRu2nF HKPyFY1/eYtJxN3BfxqTiS8XmVQ35PWhouU+PnznU2BseNPpJl9XnMqIR5NdyD/Tbqrr /5ig== X-Gm-Message-State: APjAAAX7Nm/clc0YQUZde5uTzZEvwLB20kIohIxKdjOgjxnduFynPcd1 NmrfMccv9zWeSrStkM4v5mUWMf9X X-Google-Smtp-Source: APXvYqwC70uQSuXJI6B6lufmEKe9HCRQGw6Yyo1+YQsEC63QkrAKDPh0qhn4tbwbdY5tFI5Uy6In4w== X-Received: by 2002:a5d:8757:: with SMTP id k23mr3627031iol.68.1555429083334; Tue, 16 Apr 2019 08:38:03 -0700 (PDT) Received: from mail-it1-f174.google.com (mail-it1-f174.google.com. [209.85.166.174]) by smtp.gmail.com with ESMTPSA id b82sm9976220itd.12.2019.04.16.08.38.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 08:38:03 -0700 (PDT) Received: by mail-it1-f174.google.com with SMTP id 139so33216721ita.4; Tue, 16 Apr 2019 08:38:03 -0700 (PDT) X-Received: by 2002:a05:660c:111:: with SMTP id w17mr30434544itj.62.1555429082960; Tue, 16 Apr 2019 08:38:02 -0700 (PDT) MIME-Version: 1.0 References: <201904160412.x3G4CgN2015092@repo.freebsd.org> <20190416131915.2ocot4nonnf3sl4a@mutt-hbsd> In-Reply-To: <20190416131915.2ocot4nonnf3sl4a@mutt-hbsd> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 08:37:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346263 - head/contrib/tcpdump To: Shawn Webb Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 5B8326AD64 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:38:05 -0000 On Tue, Apr 16, 2019 at 6:20 AM Shawn Webb wrote: > Is there any documentation anywhere telling users that Capsicum > support will be disabled under certain circumstances? Hi Shawn, I don't think documenting that makes much sense in general. It would be extremely burdensome to fully document and quickly become desynchronized from the code. It's comparable to OpenBSD pledging differently in different paths of programs. To me, "for now," suggests that this is perhaps a temporary workaround and maybe we can do something better in the future. Take care, Conrad P.S., When do you plan to update your Easy Feature Comparison page to reflect that FreeBSD has the same procfs and "boot hardening" as HBSD? From owner-svn-src-all@freebsd.org Tue Apr 16 15:38:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38AB91575FC3; Tue, 16 Apr 2019 15:38:42 +0000 (UTC) (envelope-from br@bsdpad.com) Received: from sc1.bsdpad.com (sc1.bsdpad.com [163.172.212.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEE3C6AE73; Tue, 16 Apr 2019 15:38:41 +0000 (UTC) (envelope-from br@bsdpad.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bsdpad.com; s=20190317; h=Subject:To:From; bh=OsYhejS53f94T0bxTqlhHLg1wLoDKuBQljywxkCpbj0=; b=QOkgq8Y7ZjCQ2xO1PCXt5MNLiy D8jnNvgOI5xW8PuHuPdYNe/2KkPE4rHNrGUJQmyQH0lNKGkDIGBAD7iq+TSs2iVvYCc9/f6LAkZKf dk0t0ASr3LVVfT9+tLLmVi6RdRPHlMhacvf52Utva9JvuYs9n2qH89XiWYJh+rJvD2VPMKzOf6Nvm 7pdNYg4KPewYKg2bck5xs6hhGNLYf9NKiDFe/UEK6SlhAEGJtXgYT80VAQdfZVXtsekZ3bUbwGL0J peWGjmpwG6t6ZL4sBMjPrkSonAX3dYzWDrN0XapxQdwas9cN/0CIqpSf1QtwE4Ds9tWK0E+P3sNNR pOjXt5Yw==; Received: from localhost ([127.0.0.1] helo=bsdpad.com) by sc1.bsdpad.com with smtp (Exim 4.91 (FreeBSD)) (envelope-from ) id 1hGQA4-0005Uh-O8; Tue, 16 Apr 2019 16:38:16 +0100 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Tue, 16 Apr 2019 16:38:16 +0100 (BST) Date: Tue, 16 Apr 2019 16:38:16 +0100 From: Ruslan Bukin To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys Message-ID: <20190416153816.GA20965@bsdpad.com> References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201904151840.x3FIeaEQ009242@repo.freebsd.org> User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: AEE3C6AE73 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:38:42 -0000 Hi I just got this: UART 16550 configured with options: baud = 115200 | freq = 50000000 bbl loader vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv rr vvvvvvvvvvvvvvvvvvvvvv rr vvvvvvvvvvvvvvvvvvvvvvvv rr rrrr vvvvvvvvvvvvvvvvvvvvvvvvvv rrrr rrrrrr vvvvvvvvvvvvvvvvvvvvvv rrrrrr rrrrrrrr vvvvvvvvvvvvvvvvvv rrrrrrrr rrrrrrrrrr vvvvvvvvvvvvvv rrrrrrrrrr rrrrrrrrrrrr vvvvvvvvvv rrrrrrrrrrrr rrrrrrrrrrrrrr vvvvvv rrrrrrrrrrrrrr rrrrrrrrrrrrrrrr vv rrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr INSTRUCTION SETS WANT TO BE FREE physmap[0] = 0x00000000c0000000 physmap[1] = 0x00000000c1200000 physmap[2] = 0x00000000c1300000 physmap[3] = 0x0000000100000000 pmap_bootstrap ffffffc0005c6000 c0000000 e00958 ffffffc0005c6000 100 physmap_idx 4 min_pa c0000000 max_pa 100000000 ---<>--- KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2019 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.0-CURRENT #496 999d9e9b642(master)-dirty: Tue Apr 16 16:23:48 BST 2019 br@pie:/usr/home/br/obj/usr/home/br/dev/freebsd-riscv/riscv.riscv64/sys/GENERIC riscv gcc version 8.2.0 (GCC) Preloaded elf64 kernel "kernel" at 0xffffffc000dfeda0. CPU(0): Unknown Implementer Unknown Processor random: randomdev_wait_until_seeded unblock wait t[0] == 0x0000000000000000 t[1] == 0x0000000000000000 t[2] == 0xffffffc0004e86d8 t[3] == 0x0000000000000000 t[4] == 0x0000000000000000 t[5] == 0x0000000000000000 t[6] == 0x0000000000000000 s[0] == 0xffffffc000003b00 s[1] == 0xffffffc000da5920 s[2] == 0xffffffc000da5920 s[3] == 0x0000000000000000 s[4] == 0x0000000000000000 s[5] == 0xffffffc0005cf4d0 s[6] == 0xffffffc0004fc948 s[7] == 0xffffffc000da5920 s[8] == 0x0000000000000000 s[9] == 0xffffffc000d45a80 s[10] == 0x0000000000000000 s[11] == 0x000000001999997c a[0] == 0xffffffc000da5920 a[1] == 0x0000000000000000 a[2] == 0xffffffc0004fc948 a[3] == 0x0000000000000900 a[4] == 0xffffffc000da5920 a[5] == 0x0000000000000000 a[6] == 0x0000000000000100 a[7] == 0x0000000000000001 sepc == 0xffffffc0001f8d3c sstatus == 0x8000000200006100 panic: Fatal page fault at 0xffffffc0001f8d3c: 0x00000000000018 time = 1 KDB: stack backtrace: db_trace_self() at db_read_token+0x5e2 pc = 0xffffffc0004c726a ra = 0xffffffc0000ca1de sp = 0xffffffc0000035f8 fp = 0xffffffc000003818 db_read_token() at kdb_backtrace+0x2e pc = 0xffffffc0000ca1de ra = 0xffffffc00024c9d2 sp = 0xffffffc000003818 fp = 0xffffffc000003828 kdb_backtrace() at vpanic+0x124 pc = 0xffffffc00024c9d2 ra = 0xffffffc000212aaa sp = 0xffffffc000003828 fp = 0xffffffc000003868 vpanic() at panic+0x22 pc = 0xffffffc000212aaa ra = 0xffffffc000212ae2 sp = 0xffffffc000003868 fp = 0xffffffc000003888 panic() at sysarch+0x3ba pc = 0xffffffc000212ae2 ra = 0xffffffc0004d2cfc sp = 0xffffffc000003888 fp = 0xffffffc000003998 sysarch() at do_trap_supervisor+0x4e pc = 0xffffffc0004d2cfc ra = 0xffffffc0004d2df6 sp = 0xffffffc000003998 fp = 0xffffffc0000039b8 do_trap_supervisor() at cpu_exception_handler_supervisor+0x68 pc = 0xffffffc0004d2df6 ra = 0xffffffc0004c78f8 sp = 0xffffffc0000039b8 fp = 0xffffffc000003b00 cpu_exception_handler_supervisor() at sleepq_add+0x46 pc = 0xffffffc0004c78f8 ra = 0xffffffc00025919e sp = 0xffffffc000003b00 fp = 0xffffffc000003b40 sleepq_add() at _sleep+0x2d0 pc = 0xffffffc00025919e ra = 0xffffffc00021b892 sp = 0xffffffc000003b40 fp = 0xffffffc000003be0 _sleep() at random_harvest_deregister_source+0x132 pc = 0xffffffc00021b892 ra = 0xffffffc0000ed172 sp = 0xffffffc000003be0 fp = 0xffffffc000003c50 random_harvest_deregister_source() at read_random+0xc4 pc = 0xffffffc0000ed172 ra = 0xffffffc0000ed752 sp = 0xffffffc000003c50 fp = 0xffffffc000003ca0 read_random() at vn_fsync_buf+0x594 pc = 0xffffffc0000ed752 ra = 0xffffffc0002caa40 sp = 0xffffffc000003ca0 fp = 0xffffffc000003d00 vn_fsync_buf() at arc4rand+0xd4 pc = 0xffffffc0002caa40 ra = 0xffffffc0002cac04 sp = 0xffffffc000003d00 fp = 0xffffffc000003d90 arc4rand() at sched_tdname+0x4c pc = 0xffffffc0002cac04 ra = 0xffffffc00023a290 sp = 0xffffffc000003d90 fp = 0xffffffc000003de0 sched_tdname() at mi_startup+0x20c pc = 0xffffffc00023a290 ra = 0xffffffc0001bb98e sp = 0xffffffc000003de0 fp = 0xffffffc000003e70 mi_startup() at 0xffffffc0000001a6 pc = 0xffffffc0001bb98e ra = 0xffffffc0000001a6 sp = 0xffffffc000003e70 fp = 0x00000000c0200000 KDB: enter: panic --- We don't have loader(8) support for RISC-V and we don't have any hardware with random number generators yet. Most of our fpga/hardware has no way to have rootfs at all (we use mdroot). We use BBL bootloader to boot freebsd. BBL embeds freebsd kernel to the BBL binary on a compile time (similar way how we embed mdroot to kernel). Once BBL initialized itself it jumps to the pre-defined address of payload which is freebsd kernel. So I'm pondering what is our current option, i.e. how to feed entropy in this case ? Thanks Ruslan On Mon, Apr 15, 2019 at 06:40:36PM +0000, Conrad Meyer wrote: > Author: cem > Date: Mon Apr 15 18:40:36 2019 > New Revision: 346250 > URL: https://svnweb.freebsd.org/changeset/base/346250 > > Log: > random(4): Block read_random(9) on initial seeding > > read_random() is/was used, mostly without error checking, in a lot of > very sensitive places in the kernel -- including seeding the widely used > arc4random(9). > > Most uses, especially arc4random(9), should block until the device is seeded > rather than proceeding with a bogus or empty seed. I did not spy any > obvious kernel consumers where blocking would be inappropriate (in the > sense that lack of entropy would be ok -- I did not investigate locking > angle thoroughly). In many instances, arc4random_buf(9) or that family > of APIs would be more appropriate anyway; that work was done in r345865. > > A minor cleanup was made to the implementation of the READ_RANDOM function: > instead of using a variable-length array on the stack to temporarily store > all full random blocks sufficient to satisfy the requested 'len', only store > a single block on the stack. This has some benefit in terms of reducing > stack usage, reducing memcpy overhead and reducing devrandom output leakage > via the stack. Additionally, the stack block is now safely zeroed if it was > used. > > One caveat of this change is that the kern.arandom sysctl no longer returns > zero bytes immediately if the random device is not seeded. This means that > FreeBSD-specific userspace applications which attempted to handle an > unseeded random device may be broken by this change. If such behavior is > needed, it can be replaced by the more portable getrandom(2) GRND_NONBLOCK > option. > > On any typical FreeBSD system, entropy is persisted on read/write media and > used to seed the random device very early in boot, and blocking is never a > problem. > > This change primarily impacts the behavior of /dev/random on embedded > systems with read-only media that do not configure "nodevice random". We > toggle the default from 'charge on blindly with no entropy' to 'block > indefinitely.' This default is safer, but may cause frustration. Embedded > system designers using FreeBSD have several options. The most obvious is to > plan to have a small writable NVRAM or NAND to persist entropy, like larger > systems. Early entropy can be fed from any loader, or by writing directly > to /dev/random during boot. Some embedded SoCs now provide a fast hardware > entropy source; this would also work for quickly seeding Fortuna. A 3rd > option would be creating an embedded-specific, more simplistic random > module, like that designed by DJB in [1] (this design still requires a small > rewritable media for forward secrecy). Finally, the least preferred option > might be "nodevice random", although I plan to remove this in a subsequent > revision. > > To help developers emulate the behavior of these embedded systems on > ordinary workstations, the tunable kern.random.block_seeded_status was > added. When set to 1, it blocks the random device. > > I attempted to document this change in random.4 and random.9 and ran into a > bunch of out-of-date or irrelevant or inaccurate content and ended up > rototilling those documents more than I intended to. Sorry. I think > they're in a better state now. > > PR: 230875 > Reviewed by: delphij, markm (earlier version) > Approved by: secteam(delphij), devrandom(markm) > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D19744 > > Modified: > head/share/man/man4/random.4 > head/share/man/man9/random.9 > head/sys/dev/random/fortuna.c > head/sys/dev/random/random_harvestq.c > head/sys/dev/random/random_infra.c > head/sys/dev/random/randomdev.c > head/sys/dev/random/randomdev.h > head/sys/kern/kern_mib.c > head/sys/libkern/arc4random.c > head/sys/sys/random.h > > Modified: head/share/man/man4/random.4 > ============================================================================== > --- head/share/man/man4/random.4 Mon Apr 15 17:54:40 2019 (r346249) > +++ head/share/man/man4/random.4 Mon Apr 15 18:40:36 2019 (r346250) > @@ -23,7 +23,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd August 26, 2018 > +.Dd April 15, 2019 > .Dt RANDOM 4 > .Os > .Sh NAME > @@ -32,63 +32,44 @@ > .Sh SYNOPSIS > .Cd "device random" > .Cd "options RANDOM_LOADABLE" > +.Cd "options RANDOM_ENABLE_ETHER" > .Cd "options RANDOM_ENABLE_UMA" > .Sh DESCRIPTION > The > .Nm > -device > -returns an endless supply of random bytes when read. > -It also accepts and reads data > -as any ordinary file. > +device returns an endless supply of random bytes when read. > .Pp > The generator will start in an > .Em unseeded > -state, and will block reads until > -it is seeded for the first time. > -This may cause trouble at system boot > -when keys and the like > -are generated from > -.Nm > -so steps should be taken to ensure a > -seeding as soon as possible. > +state, and will block reads until it is seeded for the first time. > .Pp > -It is also possible > -to read random bytes > -by using the KERN_ARND sysctl. > -On the command line > -this could be done by > +To provide prompt access to the random device at boot time, > +.Fx > +automatically persists some entropy data in > +.Pa /boot/entropy > +for the loader to provide to the kernel. > +Additional entropy is regularly saved in > +.Pa /var/db/entropy . > +This saved entropy is sufficient to unblock the random device on devices with > +writeable media. > .Pp > -.Dl "sysctl -x -B 16 kern.arandom" > +Embedded applications without writable media must determine their own scheme > +for re-seeding the random device on boot, or accept that the device > +will remain unseeded and block reads indefinitely. > +See > +.Sx SECURITY CONSIDERATIONS > +for more detail. > .Pp > -This sysctl will not return > -random bytes unless > -the > -.Nm > -device is seeded. > +In addition to > +.Xr read 2 , > +the direct output of the abstract kernel entropy device can be read with > +.Xr getrandom 2 , > +.Xr getentropy 3 , > +or the > +.Xr sysctl 8 > +pseudo-variable > +.Va kern.arandom . > .Pp > -This initial seeding > -of random number generators > -is a bootstrapping problem > -that needs very careful attention. > -In some cases, > -it may be difficult > -to find enough randomness > -to seed a random number generator > -until a system is fully operational, > -but the system requires random numbers > -to become fully operational. > -It is (or more accurately should be) > -critically important that the > -.Nm > -device is seeded > -before the first time it is used. > -In the case where a dummy or "blocking-only" > -device is used, > -it is the responsibility > -of the system architect > -to ensure that no blocking reads > -hold up critical processes. > -.Pp > To see the current settings of the software > .Nm > device, use the command line: > @@ -97,17 +78,20 @@ device, use the command line: > .Pp > which results in something like: > .Bd -literal -offset indent > +kern.random.block_seeded_status: 0 > kern.random.fortuna.minpoolsize: 64 > -kern.random.harvest.mask_symbolic: [HIGH_PERFORMANCE], ... ,CACHED > -kern.random.harvest.mask_bin: 00111111111 > -kern.random.harvest.mask: 511 > +kern.random.harvest.mask_symbolic: ENABLEDSOURCE,[DISABLEDSOURCE],...,CACHED > +kern.random.harvest.mask_bin: 00000010000000111011111 > +kern.random.harvest.mask: 66015 > +kern.random.use_chacha20_cipher: 0 > kern.random.random_sources: 'Intel Secure Key RNG' > .Ed > .Pp > Other than > -.Dl kern.random.fortuna.minpoolsize > +.Va kern.random.block_seeded_status , > +.Va kern.random.fortuna.minpoolsize , > and > -.Dl kern.random.harvest.mask > +.Va kern.random.harvest.mask , > all settings are read-only. > .Pp > The > @@ -137,17 +121,66 @@ and > .Va kern.random.harvest.mask_symbolic > sysctls > can be used to confirm > -that the choices are correct. > -Note that disabled items > +settings in a human readable form. > +Disabled items > in the latter item > are listed in square brackets. > See > .Xr random_harvest 9 > for more on the harvesting of entropy. > +.Sh FILES > +.Bl -tag -width ".Pa /dev/urandom" > +.It Pa /dev/random > +.It Pa /dev/urandom > +.El > +.Sh SEE ALSO > +.Xr getrandom 2 , > +.Xr arc4random 3 , > +.Xr getentropy 3 , > +.Xr random 3 , > +.Xr sysctl 8 , > +.Xr random 9 > +.Rs > +.%A Ferguson > +.%A Schneier > +.%A Kohno > +.%B Cryptography Engineering > +.%I Wiley > +.%O ISBN 978-0-470-47424-2 > +.Re > +.Sh HISTORY > +A > +.Nm > +device appeared in > +.Fx 2.2 . > +The implementation was changed to the > +.Em Yarrow algorithm in > +.Fx 5.0 . > +In > +.Fx 11.0 , > +the Fortuna algorithm was introduced as the default. > +In > +.Fx 12.0 , > +Yarrow was removed entirely. > +.Sh AUTHORS > +.An -nosplit > +The current > +.Nm > +code was authored by > +.An Mark R V Murray , > +with significant contributions from many people. > .Pp > +The > +.Em Fortuna > +algorithm was designed by > +.An Niels Ferguson , > +.An Bruce Schneier , > +and > +.An Tadayoshi Kohno . > +.Sh CAVEATS > When > .Cd "options RANDOM_LOADABLE" > -is used, > +is enabled, > the > .Pa /dev/random > device is not created > @@ -155,13 +188,9 @@ until an "algorithm module" > is loaded. > The only module built by default is > .Em random_fortuna . > -The > -.Em random_yarrow > -module was removed in > -.Fx 12 . > -Note that this loadable module > -is slightly less efficient > -than its compiled-in equivalent. > +Loadable random modules > +are less efficient > +than their compiled-in equivalents. > This is because some functions > must be locked against > load and unload events, > @@ -170,174 +199,40 @@ to allow for removal. > .Pp > When > .Cd "options RANDOM_ENABLE_UMA" > -is used, > +is enabled, > the > .Pa /dev/random > device will obtain entropy > from the zone allocator. > -This is potentially very high rate, > -and if so will be of questionable use. > -If this is the case, > -use of this option > -is not recommended. > -Determining this is not trivial, > -so experimenting and measurement > -using tools such as > -.Xr dtrace 1 > -will be required. > -.Sh RANDOMNESS > -The use of randomness in the field of computing > -is a rather subtle issue because randomness means > -different things to different people. > -Consider generating a password randomly, > -simulating a coin tossing experiment or > -choosing a random back-off period when a server does not respond. > -Each of these tasks requires random numbers, > -but the random numbers in each case have different requirements. > +This is a very high rate source with significant performance impact. > +Therefore, it is disabled by default. > .Pp > -Generation of passwords, session keys and the like > -requires cryptographic randomness. > -A cryptographic random number generator should be designed > -so that its output is difficult to guess, > -even if a lot of auxiliary information is known > -(such as when it was seeded, subsequent or previous output, and so on). > -On > -.Fx , > -seeding for cryptographic random number generators is provided by the > +When > +.Cd "options RANDOM_ENABLE_ETHER" > +is enabled, the > .Nm > -device, > -which provides real randomness. > -The > -.Xr arc4random 3 > -library call provides a pseudo-random sequence > -which is generally reckoned to be suitable for > -simple cryptographic use. > -The OpenSSL library also provides functions for managing randomness > -via functions such as > -.Xr RAND_bytes 3 > -and > -.Xr RAND_add 3 . > -Note that OpenSSL uses the > -.Nm > -device for seeding automatically. > +device will obtain entropy from > +.Vt mbuf > +structures passing through the network stack. > +This source is both extremely expensive and a poor source of entropy, so it is > +disabled by default. > +.Sh SECURITY CONSIDERATIONS > +The initial seeding > +of random number generators > +is a bootstrapping problem > +that needs very careful attention. > +When writable media is available, the > +.Em Fortuna > +paper describes a robust system for rapidly reseeding the device. > .Pp > -Randomness for simulation is required in engineering or > -scientific software and games. > -The first requirement of these applications is > -that the random numbers produced conform to some well-known, > -usually uniform, distribution. > -The sequence of numbers should also appear numerically uncorrelated, > -as simulation often assumes independence of its random inputs. > -Often it is desirable to reproduce > -the results of a simulation exactly, > -so that if the generator is seeded in the same way, > -it should produce the same results. > -A peripheral concern for simulation is > -the speed of a random number generator. > +In some embedded cases, it may be difficult to find enough randomness to seed a > +random number generator until a system is fully operational. > +In these cases, is the responsibility of the system architect to ensure that > +blocking is acceptable, or that the random device is seeded. > +(This advice does not apply to typical consumer systems.) > .Pp > -Another issue in simulation is > -the size of the state associated with the random number generator, and > -how frequently it repeats itself. > -For example, > -a program which shuffles a pack of cards should have 52!\& possible outputs, > -which requires the random number generator to have 52!\& starting states. > -This means the seed should have at least log_2(52!) ~ 226 bits of state > -if the program is to stand a chance of outputting all possible sequences, > -and the program needs some unbiased way of generating these bits. > -Again, > -the > +To emulate embedded systems, developers may set the > +.Va kern.random.block_seeded_status > +tunable to 1 to verify boot does not require early availability of the > .Nm > -device could be used for seeding here, > -but in practice, smaller seeds are usually considered acceptable. > -.Pp > -.Fx > -provides two families of functions which are considered > -suitable for simulation. > -The > -.Xr random 3 > -family of functions provides a random integer > -between 0 to > -.if t 2\u\s731\s10\d\(mi1. > -.if n (2**31)\(mi1. > -The functions > -.Xr srandom 3 , > -.Xr initstate 3 > -and > -.Xr setstate 3 > -are provided for deterministically setting > -the state of the generator and > -the function > -.Xr srandomdev 3 > -is provided for setting the state via the > -.Nm > device. > -The > -.Xr drand48 3 > -family of functions are also provided, > -which provide random floating point numbers in various ranges. > -.Pp > -Randomness that is used for collision avoidance > -(for example, in certain network protocols) > -has slightly different semantics again. > -It is usually expected that the numbers will be uniform, > -as this produces the lowest chances of collision. > -Here again, > -the seeding of the generator is very important, > -as it is required that different instances of > -the generator produce independent sequences. > -However, the guessability or reproducibility of the sequence is unimportant, > -unlike the previous cases. > -.Pp > -.Fx > -does also provide the traditional > -.Xr rand 3 > -library call, > -for compatibility purposes. > -However, > -it is known to be poor for simulation and > -absolutely unsuitable for cryptographic purposes, > -so its use is discouraged. > -.Sh FILES > -.Bl -tag -width ".Pa /dev/random" > -.It Pa /dev/random > -.El > -.Sh SEE ALSO > -.Xr arc4random 3 , > -.Xr drand48 3 , > -.Xr rand 3 , > -.Xr RAND_add 3 , > -.Xr RAND_bytes 3 , > -.Xr random 3 , > -.Xr sysctl 8 , > -.Xr random 9 > -.Rs > -.%A Ferguson > -.%A Schneier > -.%A Kohno > -.%B Cryptography Engineering > -.%I Wiley > -.%O ISBN 978-0-470-47424-2 > -.Re > -.Sh HISTORY > -A > -.Nm > -device appeared in > -.Fx 2.2 . > -The current software implementation, > -introduced in > -.Fx 10.0 , > -is by > -.An Mark R V Murray , > -and is an implementation of the > -.Em Fortuna > -algorithm by Ferguson > -.Em et al . > -It replaces the previous > -.Em Yarrow > -implementation, > -introduced in > -.Fx 5.0 . > -The Yarrow algorithm > -is no longer supported > -by its authors, > -and is therefore no longer available. > > Modified: head/share/man/man9/random.9 > ============================================================================== > --- head/share/man/man9/random.9 Mon Apr 15 17:54:40 2019 (r346249) > +++ head/share/man/man9/random.9 Mon Apr 15 18:40:36 2019 (r346250) > @@ -26,12 +26,13 @@ > .\" > .\" $FreeBSD$ > .\" " > -.Dd July 16, 2015 > +.Dd April 15, 2019 > .Dt RANDOM 9 > .Os > .Sh NAME > .Nm arc4rand , > .Nm arc4random , > +.Nm arc4random_buf , > .Nm random , > .Nm read_random , > .Nm read_random_uio , > @@ -39,86 +40,72 @@ > .Nd supply pseudo-random numbers > .Sh SYNOPSIS > .In sys/libkern.h > +.Ft uint32_t > +.Fn arc4random "void" > .Ft void > -.Fn srandom "u_long seed" > -.Ft u_long > -.Fn random "void" > +.Fn arc4random_buf "void *ptr" "size_t len" > .Ft void > .Fn arc4rand "void *ptr" "u_int length" "int reseed" > -.Ft uint32_t > -.Fn arc4random "void" > .Pp > .In sys/random.h > -.Ft int > +.Ft void > .Fn read_random "void *buffer" "int count" > .Ft int > .Fn read_random_uio "struct uio *uio" "bool nonblock" > +.Ss LEGACY ROUTINES > +.In sys/libkern.h > +.Ft void > +.Fn srandom "u_long seed" > +.Ft u_long > +.Fn random "void" > .Sh DESCRIPTION > The > -.Fn random > -function will by default produce > -a sequence of numbers > -that can be duplicated > -by calling > -.Fn srandom > -with some constant > -as the > -.Fa seed . > -The > -.Fn srandom > -function may be called with any arbitrary > -.Fa seed > -value to get slightly more unpredictable numbers. > -It is important to remember that the > -.Fn random > -function is entirely predictable, > -and is therefore not of use where > -knowledge of the sequence of numbers > -may be of benefit to an attacker. > +.Fn arc4random > +and > +.Fn arc4random_buf > +functions will return very good quality random numbers, suited for > +security-related purposes. > +Both are wrappers around the underlying > +.Fn arc4rand > +interface. > +.Fn arc4random > +returns a 32-bit random value, while > +.Fn arc4random_buf > +fills > +.Fa ptr > +with > +.Fa len > +bytes of random data. > .Pp > The > .Fn arc4rand > -function will return very good quality random numbers, > -better suited > -for security-related purposes. > -The random numbers from > -.Fn arc4rand > -are seeded from the entropy device > -if it is available. > -Automatic reseeds happen > -after a certain timeinterval > -and after a certain number of bytes > -have been delivered. > -A forced reseed > -can be forced > -by passing a non-zero > -value in the > +CSPRNG > +is seeded from the > +.Xr random 4 > +kernel abstract entropy device. > +Automatic reseeding happens at unspecified time and bytes (of output) > +intervals. > +A reseed can be forced by passing a non-zero > .Fa reseed > -argument. > +value. > .Pp > The > .Fn read_random > -function is used to return entropy directly from the entropy device > -if it has been loaded. > -If the entropy device is not loaded, then > -the > +function is used to read entropy directly from the kernel abstract entropy > +device. > +.Fn read_random > +blocks if and until the entropy device is seeded. > +The provided > .Fa buffer > -is ignored > -and zero is returned. > -The > -.Fa buffer > is filled with no more than > .Fa count > bytes. > It is strongly advised that > .Fn read_random > -is not used; > -instead use > +is not used directly; > +instead, use the > .Fn arc4rand > -unless it is > -necessary to know > -that no entropy > -has been returned. > +family of functions. > .Pp > The > .Fn read_random_uio > @@ -129,50 +116,35 @@ on > The > .Fa uio > argument points to a buffer where random data should be stored. > -This function only returns data if the random device is seeded. > -It blocks if unseeded, > -except when the > +If > .Fa nonblock > -argument is true. > +is true and the random device is not seeded, this function does not return any > +data. > +Otherwise, this function may block interruptibly until the random device is seeded. > +If the function is interrupted before the random device is seeded, no data is > +returned. > .Pp > -All the bits returned by > -.Fn random , > -.Fn arc4rand , > -.Fn read_random , > -and > -.Fn read_random_uio > -are usable. > -For example, > -.Sq Li random()&01 > -will produce a random binary value. > -.Pp > -The > -.Fn arc4random > -is a convenience function which calls > -.Fn arc4rand > -to return a 32 bit pseudo-random integer. > +The legacy > +.Fn random > +function will produce a sequence of numbers that can be duplicated by calling > +.Fn srandom > +with some constant as the > +.Fa seed . > +The legacy > +.Fn srandom > +function may be called with any > +.Fa seed > +value. > +It is strongly advised that the > +.Fn random > +function not be used to generate random numbers. > +See > +.Sx SECURITY CONSIDERATIONS . > .Sh RETURN VALUES > The > -.Fn random > -function uses > -a non-linear additive feedback random number generator > -employing a default table > -of size 31 > -containing long integers > -to return successive pseudo-random > -numbers in the range from 0 to > -.if t 2\u\s731\s10\d\(mi1. > -.if n (2**31)\(mi1. > -The period of this random number generator > -is very large, > -approximately > -.if t 16\(mu(2\u\s731\s10\d\(mi1). > -.if n 16*((2**31)\(mi1). > -.Pp > -The > .Fn arc4rand > -function uses the RC4 algorithm > -to generate successive pseudo-random bytes. > +function uses the Chacha20 algorithm to generate a pseudo-random sequence of > +bytes. > The > .Fn arc4random > function uses > @@ -191,6 +163,23 @@ the number of bytes placed in > .Fn read_random_uio > returns zero when successful, > otherwise an error code is returned. > +.Pp > +The legacy > +.Fn random > +function uses > +a non-linear additive feedback random number generator > +employing a default table > +of size 31 > +containing long integers > +to return successive pseudo-random > +numbers in the range from 0 to > +.if t 2\u\s731\s10\d\(mi1. > +.if n (2**31)\(mi1. > +The period of this random number generator > +is very large, > +approximately > +.if t 16\(mu(2\u\s731\s10\d\(mi1). > +.if n 16*((2**31)\(mi1). > .Sh ERRORS > .Fn read_random_uio > may fail if: > @@ -210,3 +199,19 @@ wrote > .An Mark R V Murray > wrote > .Fn read_random . > +.Sh SECURITY CONSIDERATIONS > +Do not use > +.Fn random > +or > +.Fn srandom > +in new code. > +.Pp > +It is important to remember that the > +.Fn random > +function is entirely predictable. > +It is easy for attackers to predict future output of > +.Fn random > +by recording some generated values. > +We cannot emphasize strongly enough that > +.Fn random > +must not be used to generate values that are intended to be unpredictable. > > Modified: head/sys/dev/random/fortuna.c > ============================================================================== > --- head/sys/dev/random/fortuna.c Mon Apr 15 17:54:40 2019 (r346249) > +++ head/sys/dev/random/fortuna.c Mon Apr 15 18:40:36 2019 (r346250) > @@ -451,16 +451,22 @@ random_fortuna_read(uint8_t *buf, u_int bytecount) > RANDOM_RESEED_UNLOCK(); > } > > +#ifdef _KERNEL > +static bool block_seeded_status = false; > +SYSCTL_BOOL(_kern_random, OID_AUTO, block_seeded_status, CTLFLAG_RWTUN, > + &block_seeded_status, 0, > + "If non-zero, pretend Fortuna is in an unseeded state. By setting " > + "this as a tunable, boot can be tested as if the random device is " > + "unavailable."); > +#endif > + > bool > random_fortuna_seeded(void) > { > > #ifdef _KERNEL > - /* When set, act as if we are not seeded. */ > - KFAIL_POINT_CODE(DEBUG_FP, random_fortuna_seeded, { > - if (RETURN_VALUE != 0) > - fortuna_state.fs_counter = UINT128_ZERO; > - }); > + if (block_seeded_status) > + return (false); > #endif > > return (!uint128_is_zero(fortuna_state.fs_counter)); > > Modified: head/sys/dev/random/random_harvestq.c > ============================================================================== > --- head/sys/dev/random/random_harvestq.c Mon Apr 15 17:54:40 2019 (r346249) > +++ head/sys/dev/random/random_harvestq.c Mon Apr 15 18:40:36 2019 (r346250) > @@ -421,11 +421,6 @@ random_harvestq_prime(void *unused __unused) > if (keyfile != NULL) { > data = preload_fetch_addr(keyfile); > size = preload_fetch_size(keyfile); > - /* skip the first bit of the stash so others like arc4 can also have some. */ > - if (size > RANDOM_CACHED_SKIP_START) { > - data += RANDOM_CACHED_SKIP_START; > - size -= RANDOM_CACHED_SKIP_START; > - } > /* Trim the size. If the admin has a file with a funny size, we lose some. Tough. */ > size -= (size % sizeof(event.he_entropy)); > if (data != NULL && size != 0) { > > Modified: head/sys/dev/random/random_infra.c > ============================================================================== > --- head/sys/dev/random/random_infra.c Mon Apr 15 17:54:40 2019 (r346249) > +++ head/sys/dev/random/random_infra.c Mon Apr 15 18:40:36 2019 (r346250) > @@ -57,12 +57,18 @@ struct random_algorithm *p_random_alg_context = &rando > > #if defined(RANDOM_LOADABLE) > > +static void > +null_read_random(void *dummy __unused, u_int dummy2 __unused) > +{ > + panic("%s: no random module is loaded", __func__); > +} > + > struct random_readers { > int (*read_random_uio)(struct uio *, bool); > - u_int (*read_random)(void *, u_int); > + void (*read_random)(void *, u_int); > } random_reader_context = { > (int (*)(struct uio *, bool))nullop, > - (u_int (*)(void *, u_int))nullop, > + null_read_random, > }; > > struct sx randomdev_config_lock; > @@ -76,7 +82,7 @@ random_infra_sysinit(void *dummy __unused) > SYSINIT(random_device_h_init, SI_SUB_RANDOM, SI_ORDER_FIRST, random_infra_sysinit, NULL); > > void > -random_infra_init(int (*p_random_read_uio)(struct uio *, bool), u_int (*p_random_read)(void *, u_int)) > +random_infra_init(int (*p_random_read_uio)(struct uio *, bool), void (*p_random_read)(void *, u_int)) > { > > RANDOM_CONFIG_X_LOCK(); > @@ -91,7 +97,7 @@ random_infra_uninit(void) > > RANDOM_CONFIG_X_LOCK(); > random_reader_context.read_random_uio = (int (*)(struct uio *, bool))nullop; > - random_reader_context.read_random = (u_int (*)(void *, u_int))nullop; > + random_reader_context.read_random = null_read_random; > RANDOM_CONFIG_X_UNLOCK(); > } > > @@ -114,15 +120,13 @@ read_random_uio(struct uio *uio, bool nonblock) > return (retval); > } > > -u_int > +void > read_random(void *buf, u_int len) > { > - u_int retval; > > RANDOM_CONFIG_S_LOCK(); > - retval = random_reader_context.read_random(buf, len); > + random_reader_context.read_random(buf, len); > RANDOM_CONFIG_S_UNLOCK(); > - return (retval); > } > > #endif /* defined(RANDOM_LOADABLE) */ > > Modified: head/sys/dev/random/randomdev.c > ============================================================================== > --- head/sys/dev/random/randomdev.c Mon Apr 15 17:54:40 2019 (r346249) > +++ head/sys/dev/random/randomdev.c Mon Apr 15 18:40:36 2019 (r346250) > @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); > #define READ_RANDOM_UIO _read_random_uio > #define READ_RANDOM _read_random > static int READ_RANDOM_UIO(struct uio *, bool); > -static u_int READ_RANDOM(void *, u_int); > +static void READ_RANDOM(void *, u_int); > #else > #define READ_RANDOM_UIO read_random_uio > #define READ_RANDOM read_random > @@ -124,11 +124,53 @@ randomdev_read(struct cdev *dev __unused, struct uio * > return (READ_RANDOM_UIO(uio, (flags & O_NONBLOCK) != 0)); > } > > +/* > + * If the random device is not seeded, blocks until it is seeded. > + * > + * Returns zero when the random device is seeded. > + * > + * If the 'interruptible' parameter is true, and the device is unseeded, this > + * routine may be interrupted. If interrupted, it will return either ERESTART > + * or EINTR. > + */ > +#define SEEDWAIT_INTERRUPTIBLE true > +#define SEEDWAIT_UNINTERRUPTIBLE false > +static int > +randomdev_wait_until_seeded(bool interruptible) > +{ > + int error, spamcount, slpflags; > + > + slpflags = interruptible ? PCATCH : 0; > + > + error = 0; > + spamcount = 0; > + while (!p_random_alg_context->ra_seeded()) { > + /* keep tapping away at the pre-read until we seed/unblock. */ > + p_random_alg_context->ra_pre_read(); > + /* Only bother the console every 10 seconds or so */ > + if (spamcount == 0) > + printf("random: %s unblock wait\n", __func__); > + spamcount = (spamcount + 1) % 100; > + error = tsleep(&random_alg_context, slpflags, "randseed", > + hz / 10); > + if (error == ERESTART || error == EINTR) { > + KASSERT(interruptible, > + ("unexpected wake of non-interruptible sleep")); > + break; > + } > + /* Squash tsleep timeout condition */ > + if (error == EWOULDBLOCK) > + error = 0; > + KASSERT(error == 0, ("unexpected tsleep error %d", error)); > + } > + return (error); > +} > + > int > READ_RANDOM_UIO(struct uio *uio, bool nonblock) > { > uint8_t *random_buf; > - int error, spamcount; > + int error; > ssize_t read_len, total_read, c; > /* 16 MiB takes about 0.08 s CPU time on my 2017 AMD Zen CPU */ > #define SIGCHK_PERIOD (16 * 1024 * 1024) > @@ -140,26 +182,13 @@ READ_RANDOM_UIO(struct uio *uio, bool nonblock) > random_buf = malloc(PAGE_SIZE, M_ENTROPY, M_WAITOK); > p_random_alg_context->ra_pre_read(); > error = 0; > - spamcount = 0; > /* (Un)Blocking logic */ > - while (!p_random_alg_context->ra_seeded()) { > - if (nonblock) { > + if (!p_random_alg_context->ra_seeded()) { > + if (nonblock) > error = EWOULDBLOCK; > - break; > - } > - /* keep tapping away at the pre-read until we seed/unblock. */ > - p_random_alg_context->ra_pre_read(); > - /* Only bother the console every 10 seconds or so */ > - if (spamcount == 0) > - printf("random: %s unblock wait\n", __func__); > - spamcount = (spamcount + 1)%100; > - error = tsleep(&random_alg_context, PCATCH, "randseed", hz/10); > - if (error == ERESTART || error == EINTR) > - break; > - /* Squash tsleep timeout condition */ > - if (error == EWOULDBLOCK) > - error = 0; > - KASSERT(error == 0, ("unexpected tsleep error %d", error)); > + else > + error = randomdev_wait_until_seeded( > + SEEDWAIT_INTERRUPTIBLE); > } > if (error == 0) { > read_rate_increment((uio->uio_resid + sizeof(uint32_t))/sizeof(uint32_t)); > @@ -210,30 +239,36 @@ READ_RANDOM_UIO(struct uio *uio, bool nonblock) > * It cannot assumed that random_buf is a multiple of > * RANDOM_BLOCKSIZE bytes. > */ > -u_int > +void > READ_RANDOM(void *random_buf, u_int len) > { > - u_int read_len; > - uint8_t local_buf[len + RANDOM_BLOCKSIZE]; > + u_int read_directly_len; > > KASSERT(random_buf != NULL, ("No suitable random buffer in %s", __func__)); > p_random_alg_context->ra_pre_read(); > - /* (Un)Blocking logic; if not seeded, return nothing. */ > - if (p_random_alg_context->ra_seeded()) { > - read_rate_increment((len + sizeof(uint32_t))/sizeof(uint32_t)); > - if (len > 0) { > - /* > - * Belt-and-braces. > - * Round up the read length to a crypto block size multiple, > - * which is what the underlying generator is expecting. > - */ > - read_len = roundup(len, RANDOM_BLOCKSIZE); > - p_random_alg_context->ra_read(local_buf, read_len); > - memcpy(random_buf, local_buf, len); > - } > - } else > - len = 0; > - return (len); > + /* (Un)Blocking logic */ > + if (!p_random_alg_context->ra_seeded()) > + (void)randomdev_wait_until_seeded(SEEDWAIT_UNINTERRUPTIBLE); > + read_rate_increment(roundup2(len, sizeof(uint32_t))); > + if (len == 0) > + return; > + /* > + * The underlying generator expects multiples of > + * RANDOM_BLOCKSIZE. > + */ > + read_directly_len = rounddown(len, RANDOM_BLOCKSIZE); > + if (read_directly_len > 0) > + p_random_alg_context->ra_read(random_buf, read_directly_len); > + if (read_directly_len < len) { > + uint8_t remainder_buf[RANDOM_BLOCKSIZE]; > + > + p_random_alg_context->ra_read(remainder_buf, > + sizeof(remainder_buf)); > + memcpy((char *)random_buf + read_directly_len, remainder_buf, > + len - read_directly_len); > + > + explicit_bzero(remainder_buf, sizeof(remainder_buf)); > + } > } > > static __inline void > > Modified: head/sys/dev/random/randomdev.h > ============================================================================== > --- head/sys/dev/random/randomdev.h Mon Apr 15 17:54:40 2019 (r346249) > +++ head/sys/dev/random/randomdev.h Mon Apr 15 18:40:36 2019 (r346250) > @@ -118,7 +118,7 @@ extern struct sx randomdev_config_lock; > #define RANDOM_CONFIG_S_LOCK(x) sx_slock(&randomdev_config_lock) > #define RANDOM_CONFIG_S_UNLOCK(x) sx_sunlock(&randomdev_config_lock) > #define RANDOM_CONFIG_DEINIT_LOCK(x) sx_destroy(&randomdev_config_lock) > -void random_infra_init(int (*)(struct uio *, bool), u_int (*)(void *, u_int)); > +void random_infra_init(int (*)(struct uio *, bool), void (*)(void *, u_int)); > void random_infra_uninit(void); > #endif > > > Modified: head/sys/kern/kern_mib.c > ============================================================================== > --- head/sys/kern/kern_mib.c Mon Apr 15 17:54:40 2019 (r346249) > +++ head/sys/kern/kern_mib.c Mon Apr 15 18:40:36 2019 (r346250) > @@ -159,15 +159,8 @@ sysctl_kern_arnd(SYSCTL_HANDLER_ARGS) > char buf[256]; > size_t len; > > - /*- > - * This is one of the very few legitimate uses of read_random(9). > - * Use of arc4random(9) is not recommended as that will ignore > - * an unsafe (i.e. unseeded) random(4). > - * > - * If random(4) is not seeded, then this returns 0, so the > - * sysctl will return a zero-length buffer. > - */ > - len = read_random(buf, MIN(req->oldlen, sizeof(buf))); > + len = MIN(req->oldlen, sizeof(buf)); > + read_random(buf, len); > return (SYSCTL_OUT(req, buf, len)); > } > > > Modified: head/sys/libkern/arc4random.c > ============================================================================== > --- head/sys/libkern/arc4random.c Mon Apr 15 17:54:40 2019 (r346249) > +++ head/sys/libkern/arc4random.c Mon Apr 15 18:40:36 2019 (r346250) > @@ -56,7 +56,6 @@ MALLOC_DEFINE(M_CHACHA20RANDOM, "chacha20random", "cha > struct chacha20_s { > struct mtx mtx; > int numbytes; > - int first_time_done; > time_t t_reseed; > u_int8_t m_buffer[CHACHA20_BUFFER_SIZE]; > struct chacha_ctx ctx; > @@ -73,35 +72,17 @@ static struct chacha20_s *chacha20inst = NULL; > * Mix up the current context. > */ > static void > -chacha20_randomstir(struct chacha20_s* chacha20) > +chacha20_randomstir(struct chacha20_s *chacha20) > { > struct timeval tv_now; > - size_t n, size; > - u_int8_t key[CHACHA20_KEYBYTES], *data; > - caddr_t keyfile; > + u_int8_t key[CHACHA20_KEYBYTES]; > > /* > - * This is making the best of what may be an insecure > - * Situation. If the loader(8) did not have an entropy > - * stash from the previous shutdown to load, then we will > - * be improperly seeded. The answer is to make sure there > - * is an entropy stash at shutdown time. > + * If the loader(8) did not have an entropy stash from the previous > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@freebsd.org Tue Apr 16 15:41:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1E1F1576121; Tue, 16 Apr 2019 15:41:46 +0000 (UTC) (envelope-from bde@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 75AE16B208; Tue, 16 Apr 2019 15:41:46 +0000 (UTC) (envelope-from bde@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 4EEF421B06; Tue, 16 Apr 2019 15:41:46 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GFfku7075690; Tue, 16 Apr 2019 15:41:46 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GFfksB075689; Tue, 16 Apr 2019 15:41:46 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201904161541.x3GFfksB075689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 16 Apr 2019 15:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346279 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 346279 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 75AE16B208 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:41:47 -0000 Author: bde Date: Tue Apr 16 15:41:45 2019 New Revision: 346279 URL: https://svnweb.freebsd.org/changeset/base/346279 Log: Oops, r346278 committed a test version with the change annulled. Modified: head/lib/libvgl/main.c Modified: head/lib/libvgl/main.c ============================================================================== --- head/lib/libvgl/main.c Tue Apr 16 15:31:23 2019 (r346278) +++ head/lib/libvgl/main.c Tue Apr 16 15:41:45 2019 (r346279) @@ -274,7 +274,7 @@ VGLInit(int mode) * be too slow, and malloc() may fail). Restrict ourselves similarly to * get the same efficiency and bugs for all kernels. */ - if (0 && VGLModeInfo.vi_mode >= M_VESA_BASE) + if (VGLModeInfo.vi_mode >= M_VESA_BASE) VGLBufSize = 2*VGLAdpInfo.va_line_width*VGLModeInfo.vi_height* VGLModeInfo.vi_planes; VGLBuf = malloc(VGLBufSize); From owner-svn-src-all@freebsd.org Tue Apr 16 15:47:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EF9915763CB for ; Tue, 16 Apr 2019 15:47:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB51E6B5B3 for ; Tue, 16 Apr 2019 15:47:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id b74so12433630qkg.9 for ; Tue, 16 Apr 2019 08:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yXo/n7JM9UYlXCXIK/ds0mxRC2XakamReHHMR9RM274=; b=vRmYeoQRc0NO1PNevhzTA9YkqpVQwLe25oTuLqeAfBJ90arUZi5EERy/ApxusgWnL3 TAd56gACc1iFhLPhKb7DILPNDMeSoMNnujGWfURSqRRTc7gpk4md+DoIlGjiWprvZYSO SB4o3FkIt6PdmLvJgv0LS1xjyWCALAYisjYQCgGum/qynG2Nly8mb1REW6Ys6O4ic/KE vmcvcryvrm1q/4frrSLLpLlUGDz++JBCkwIG8EZUI1b09g8XuyThG/nhCQ6sTQUV3U4o WLc/gMAnm8DxnummPojKtDdC6MCTa4SWps2ttqsSPZsZkrAWwuSG8zJB1AajQBQY3Xq/ igtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yXo/n7JM9UYlXCXIK/ds0mxRC2XakamReHHMR9RM274=; b=dO35Kj2Ha75bvctPa4WQ9WydVoXTs9x5ZNAI9qcij1mQP8NF5Yq05JVx5mYr1IkSoh 5njnjLiF2BMItCpbMAOVgLJV53iN7Y4rLKMxaNncaOvEq5I5czsqyrmzjP6YFYW2F4cA bzV9+8ylPUODOW42NJldUCIXbpe6kL2WMid+5QOL8l6uTJRAWrFKXP36E5jSTnetU9sZ nZlOBoBlQb2oNJcnLXgBn7IF6oLJH5XxMXbgQxEkhugP1FRk/tldoDFIrpj1MFjo3RAg MtwNzoB7ETGCfqUpLkZq/ROkmQe1/XYrBjeqTiVYYTYSDV0p38uhxzwXko+hJLfyqpgq V0eQ== X-Gm-Message-State: APjAAAVQOnH9pQH7pmfBwOk0WpOGpCFCuQGcQChjlfDJMuzosP2kHtn3 5pieVJk1n9aQRGJbfnIF/jc/73wcE/pcfeeXV1maKw== X-Google-Smtp-Source: APXvYqzGpZ8VeJsuGTs8DMlhfPfCWm0kr2Mom1WqsRTgunet+R8zSofQCsZnB73Fcch9S7nIk31hTKw4FU2kzNSdVdM= X-Received: by 2002:a37:9a54:: with SMTP id c81mr62693242qke.113.1555429638007; Tue, 16 Apr 2019 08:47:18 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> <310a420ee0b9e12249979d89dc4fa0d4cac5a8dc.camel@freebsd.org> In-Reply-To: <310a420ee0b9e12249979d89dc4fa0d4cac5a8dc.camel@freebsd.org> From: Warner Losh Date: Tue, 16 Apr 2019 09:47:07 -0600 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Ian Lepore Cc: Emmanuel Vadot , "Conrad E. Meyer" , Justin Hibbits , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: AB51E6B5B3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:47:19 -0000 On Tue, Apr 16, 2019 at 9:16 AM Ian Lepore wrote: > On Tue, 2019-04-16 at 07:18 -0600, Warner Losh wrote: > > On Tue, Apr 16, 2019, 7:04 AM Emmanuel Vadot > > wrote: > > > > > On Mon, 15 Apr 2019 17:54:56 -0700 > > > Conrad Meyer wrote: > > > > > > > On Mon, Apr 15, 2019 at 5:53 PM Conrad Meyer > > > > wrote: > > > > > E.g., the CI infrastructure for > > > > > Riscv/Arm is/was generating minimal filesystem images and not > > > > > populating /boot/entropy. > > > > > > > > I should add, I say "is/was" because I have a PR out which may > > > > address > > > > the problem: https://github.com/freebsd/freebsd-ci/pull/31 > > > > > > > > Best, > > > > Conrad > > > > > > It's not only CI, all release images (memstick, iso) don't have > > > a /boot/entropy. > > > Also all arm/arm64 image don't have this file too. > > > If /boot/entropy is needed and isn't present loader(8) should > > > gather > > > some entropy and pass this to the kernel for the first boot. > > > > > > > Maybe we need to bootstrap the entropy file as part of buildworld. > > I'm not > > sure if the loader can find enough... > > > > > Isn't a file full of data which is distributed in identical form to > everyone the exact opposite of entropy? > It's just to bootstrap entropy for installs. The CI stuff doesn't matter if that's the same since the CI images aren't exposed to the internet in any way that would make it matter. The normal install would have the same seeds of entropy, but diverge from there fairly quickly. The stuff that's used early in the install is the don't care sort of things that won't matter in the installer (which then creates it's own entropy that's different for every install). Warner From owner-svn-src-all@freebsd.org Tue Apr 16 15:48:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9184F1576447; Tue, 16 Apr 2019 15:48:29 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f182.google.com (mail-it1-f182.google.com [209.85.166.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E0F86B70D; Tue, 16 Apr 2019 15:48:29 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f182.google.com with SMTP id y10so33295445itc.1; Tue, 16 Apr 2019 08:48:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=c8OSmZizMKSpedgdZ2MjjS1Ff40fGdSwA9DCUazOA34=; b=rbXK5RYvAU9hjOJ4qKEsqB9DYbMQCh3lCjPVSvSdNUKfUgHGk9cfhAzv4469pBY0/m uR970pPtt7/lrPcuNRtMin8yx3U59fJRdjEcKukEUeJWNDMpd9nmXerzp8F1PSHhKFPD B8eaTlWYJrz3HJ6+8tDgB2B0WxQy0fASjAfL0I9Vtq0FuYRoeqYrliEPGJkbyKcDb8/i pRx0pmTR2WOiCKV9TMuBL8yiRAx640RmUvoxyXsDY19AFxZPStdds8Ky1PKB6FRYRQGp CXTB1WK54l79GDZtSPKYUE5jumyH4+njzZgodQyDvJaoGmsfmURNGXuhM6Umsbx1ow8O cSqw== X-Gm-Message-State: APjAAAUkN37EIF5KARwgi7MZmEQClxoMAt722fRC+pDIjM1CVEDSSkeY /aA3EeHb0AYOVJhEBy5dhr4Ol6VS X-Google-Smtp-Source: APXvYqzqpB/jGbvcszFPvJGLtlF/6otgk5kUsD1CglBI9gfl2i7pFUvutu+lnln5i8Q1aKNn7iqW7g== X-Received: by 2002:a24:2e06:: with SMTP id i6mr29810586ita.18.1555429707864; Tue, 16 Apr 2019 08:48:27 -0700 (PDT) Received: from mail-it1-f169.google.com (mail-it1-f169.google.com. [209.85.166.169]) by smtp.gmail.com with ESMTPSA id 25sm18245657iog.83.2019.04.16.08.48.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 08:48:27 -0700 (PDT) Received: by mail-it1-f169.google.com with SMTP id 139so33276160ita.4; Tue, 16 Apr 2019 08:48:27 -0700 (PDT) X-Received: by 2002:a05:660c:111:: with SMTP id w17mr30475578itj.62.1555429707511; Tue, 16 Apr 2019 08:48:27 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416153816.GA20965@bsdpad.com> In-Reply-To: <20190416153816.GA20965@bsdpad.com> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 08:48:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Ruslan Bukin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 1E0F86B70D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:48:29 -0000 Hi Ruslan, On Tue, Apr 16, 2019 at 8:38 AM Ruslan Bukin wrote: > > Hi I just got this: > > ... > _sleep() at random_harvest_deregister_source+0x132 > random_harvest_deregister_source() at read_random+0xc4 > read_random() at vn_fsync_buf+0x594 > vn_fsync_buf() at arc4rand+0xd4 > arc4rand() at sched_tdname+0x4c > sched_tdname() at mi_startup+0x20c > mi_startup() at 0xffffffc0000001a6 > KDB: enter: panic The stack is clearly bogus or missing some frames; can you attach GDB on this system (or an emulator) and get a full stack? The step(s) I'm missing are mi_startup -> sched_tdname, and sched_tdname -> arc4rand(). What's consuming random during early boot on riscv? (The vn_fsync_buf frame is also confusing and probably incorrect? A real stack would be helpful.) Maybe it's just __stack_chk_init, given mi_startup, like the other reproductions. I will need to take a step back from email to address that.) > We don't have loader(8) support for RISC-V and we don't have any hardware with random number generators yet. Most of our fpga/hardware has no way to have rootfs at all (we use mdroot). Is it possible to inject entropy into the mdroot? If not, it seems like anything that consumes random during early boot on riscv must be disabled. > We use BBL bootloader to boot freebsd. BBL embeds freebsd kernel to the BBL binary on a compile time (similar way how we embed mdroot to kernel). Once BBL initialized itself it jumps to the pre-defined address of payload which is freebsd kernel. > > So I'm pondering what is our current option, i.e. how to feed entropy in this case ? Can a running system rebuild the mdroot or BBL? Or do they reside on RO flash of some kind? If so, it would be possible to rewrite the BBL or mdroot with entropy injected for the next boot, I think. Otherwise, the straightforward solution is to simply disable anything that attempts to consume random early in boot on such devices with no hardware entropy source and no early filesystem access. Anything that is tripping on this was silently feeding itself with predictable, non-random data prior to this change. Best, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 15:50:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E121115764EF for ; Tue, 16 Apr 2019 15:50:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DFB76B874 for ; Tue, 16 Apr 2019 15:50:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72c.google.com with SMTP id g1so12441859qki.5 for ; Tue, 16 Apr 2019 08:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0g0RjS34/3cH4j/R9MxG0zJb0uG7JrC/U5HNj3Xk6g4=; b=yp7SZWxwvmWm9XApYkp2AswlIdDmAQZzoZvCwynMTf/GTP2qt0IJERcVJdNfmKYIhV FxhlLXrgpzP/0JPhxoD9jAlp5GvoTjVHl4a13fRAPWcByh/PrPnHnnydwpqgv5d4qJcH XB9NEPDyRJzDvZlLpDfSG9A80y0u78zSz2YJ8n90uHncPFbLzwJIbGa38ZGlUCCV4E/w X59QN38C0XD/u+T58qQ5iyGrq8BPwn1d5Udiuzf7FwYC+WaxNqvczy1BqOn95pm9fElq 9QGwmmeRLAanV/MTAJ5eZdQLNaJre9Jom7iC7FQXwWSuELgWHB7oUyNVDpv0oXIN7rqV +K4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0g0RjS34/3cH4j/R9MxG0zJb0uG7JrC/U5HNj3Xk6g4=; b=DtgUjxi5PhQiDNG/myTrFYA0jgujGtFJk6b7GZImDO9sVPC4qM+vUU39f0S9uC339M oY3UwwlQ1XPR7jPCC35d2bZZVjtLfkuubdQaUUxpiNAbbGDLHMFqyZLqV9oa4u12Bh/v q7YsiNVL88qyKB/Kkp14EHYusYkZAQEUGLbCPkk1xSWOtTfmnqLclf9jJ7HcU0M9Yp/X Tmt4uaRUSNRyZEvjc3zw09zu8CC2kS81yoomf9s6LSpg9qbBVnORxRMcbhnepEsR57sG BwJBaiNAOEMiRKzvySxfzaKPjd1r/u6XgIRl7P++odKfCwqKPMomzrx7xoqyOCyW3Own u1fw== X-Gm-Message-State: APjAAAVHvNigZhEh5WQp/BuhrBVYBj2zV+FoYR1t1bEU/0jbdgoyrFf8 UcfW6CZS084M67Cj2cBBQU4Nc8Fu7kPzIBN3pseiRg== X-Google-Smtp-Source: APXvYqxtkg52BRk3b62Q+e1D6syBnLgp4oySSIEilBjJGlOsLC9gJWXvIhqCWv7cTomDVjzby9lZg2nZvSl41/Amk5E= X-Received: by 2002:a37:9e0d:: with SMTP id h13mr63733955qke.135.1555429809011; Tue, 16 Apr 2019 08:50:09 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416092402.4288bc90@titan.knownspace> In-Reply-To: From: Warner Losh Date: Tue, 16 Apr 2019 09:49:58 -0600 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: "Conrad E. Meyer" Cc: Justin Hibbits , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 7DFB76B874 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:50:10 -0000 On Tue, Apr 16, 2019 at 9:27 AM Conrad Meyer wrote: > On Tue, Apr 16, 2019 at 7:24 AM Justin Hibbits > wrote: > > > > Hi Conrad, > > ... > > [Power] does use bsdinstall to install. How is entropy loaded at > startup, > > which causes the problem noted in github? > > There are a couple very early load sources. loader(8) will load > early-boot entropy from /boot/entropy and pass it to the kernel as a > fake module (entropy_cache_load in loader.conf(5)), similar to > cpu_microcode early load. > > The fallback option is random(4) itself groping into the filesystem > during early auto-conf (SI_SUB_RANDOM:SI_ORDER_FOURTH, IIRC) to access > /boot/entropy directly. > SI_SUB_RANDOM is too early. It's at 0x2160000, while SI_SUB_ROOT_CONF doesn't happen until 0xb000000. > > If it's loaded before > > filesystems get mounted, that could be a problem for us, because /boot > > is on a different filesystem (msdosfs, to be read by petitboot). > > Petitboot also does not have a way to preload modules, so all we have > > at startup, until spawning init, is the kernel. > > Yes, that seems potentially problematic. Can the Power kernel access > the non-msdosfs root filesystem? Let's follow-up offline about > PPC-specific early entropy seeding. I would much prefer we figure out > a way to provide early entropy to Power than disabling or crippling > every early random consumer on the arch. Do you know what the Linux > folks do? > > On Power with darn, we could probably just spin in SI_ORDER_FOURTH > until we have enough darn output to seed random. Similar for x86 CI > images, I guess; though they do not have the loader problem, some > people have non-bsdinstall installation methods. > They do have the loader problem because many means to generate an image don't generate /boot/entropy. Warner From owner-svn-src-all@freebsd.org Tue Apr 16 15:51:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B15FA15766E0; Tue, 16 Apr 2019 15:51:18 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 456F16BADF; Tue, 16 Apr 2019 15:51:18 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f45.google.com with SMTP id b6so18066666iog.0; Tue, 16 Apr 2019 08:51:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=CDAhlAC6bg+9IQ6xROzW8RwyDwhnObenLqsKLNx7A0o=; b=CkIkxMo+IR+n77YgzC47oAjwEjbzegJ4/bzgIsxWrx15tIqFowkNxgTwJ5zP8t3pWN 8zjDNHWRctncjogLbdVg8eZxygChCdbmjsaSu8m8n86ibKTrboeifd0NsbYwzD3G7ycs qIbHqPwLxPFQKrDTMTIoftIfDanmMmHSTD6YbpzL1/wjufYWfry7+PUpM1uiJmmZcIkb 1q48GDrupLd1PajXb+GEGuBTQia4u8uwHyXJrcA7RCSgWcWpBQMxP8c0im9ISS5LtjZV GM+ZCj5mAzwr7CNvQmFH5LschHp4TjDw1p2HTC4NJIdmzA+jP5UPHXtuHlo0hqWzsxgq NRvA== X-Gm-Message-State: APjAAAXUkYpjYXQ080N9xapMgyW1EcQlQ2ngTehHIbMh8cn9QVBVaU23 goeasNVIAGnB2jyiZGap9zR8D3VU X-Google-Smtp-Source: APXvYqwNF17r7+LVev4M9Het7slQFHv/hbkG0WgQk5i3p0u8eKgag9F8NeNocSyQONT4/rjORgTF6g== X-Received: by 2002:a5e:8706:: with SMTP id y6mr56655379ioj.160.1555429877047; Tue, 16 Apr 2019 08:51:17 -0700 (PDT) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com. [209.85.166.54]) by smtp.gmail.com with ESMTPSA id e11sm18586442iog.79.2019.04.16.08.51.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 08:51:16 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id x7so18041649ioh.4; Tue, 16 Apr 2019 08:51:16 -0700 (PDT) X-Received: by 2002:a6b:8b90:: with SMTP id n138mr8526677iod.75.1555429876655; Tue, 16 Apr 2019 08:51:16 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> <310a420ee0b9e12249979d89dc4fa0d4cac5a8dc.camel@freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 08:51:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 456F16BADF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:51:19 -0000 Hi Warner, On Tue, Apr 16, 2019 at 8:47 AM Warner Losh wrote: > On Tue, Apr 16, 2019 at 9:16 AM Ian Lepore wrote: >> Isn't a file full of data which is distributed in identical form to >> everyone the exact opposite of entropy? Ian has the right idea. > It's just to bootstrap entropy for installs. The CI stuff doesn't matter = if that's the same since the CI images aren't exposed to the internet in an= y way that would make it matter. The normal install would have the same see= ds of entropy, but diverge from there fairly quickly. The stuff that's used= early in the install is the don't care sort of things that won't matter in= the installer (which then creates it's own entropy that's different for ev= ery install). I agree that it would be safe, although potentially misleading and potentially dangerous, to create a fake entropy file for the installer images. We need to be careful *not* to embed such files in .img files which are installed by 'dd' directly to a disk or flash or VM, for example. It would be catastrophic to distribute the same entropy file to all FreeBSD AWS images. Best, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 15:52:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E38F15767F4; Tue, 16 Apr 2019 15:52:05 +0000 (UTC) (envelope-from bde@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 B68CB6BD76; Tue, 16 Apr 2019 15:52:04 +0000 (UTC) (envelope-from bde@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 931EC21CC3; Tue, 16 Apr 2019 15:52:04 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GFq4gO080991; Tue, 16 Apr 2019 15:52:04 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GFq4Bk080990; Tue, 16 Apr 2019 15:52:04 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201904161552.x3GFq4Bk080990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 16 Apr 2019 15:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346280 - head/lib/libvgl X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/libvgl X-SVN-Commit-Revision: 346280 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B68CB6BD76 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:52:05 -0000 Author: bde Date: Tue Apr 16 15:52:04 2019 New Revision: 346280 URL: https://svnweb.freebsd.org/changeset/base/346280 Log: Sigh, r346279 was also a test version with the reduced size doubled (so it was actually double the full size in current kernels where the reduction is null, so overran the mmapped() buffer). Modified: head/lib/libvgl/main.c Modified: head/lib/libvgl/main.c ============================================================================== --- head/lib/libvgl/main.c Tue Apr 16 15:41:45 2019 (r346279) +++ head/lib/libvgl/main.c Tue Apr 16 15:52:04 2019 (r346280) @@ -275,7 +275,7 @@ VGLInit(int mode) * get the same efficiency and bugs for all kernels. */ if (VGLModeInfo.vi_mode >= M_VESA_BASE) - VGLBufSize = 2*VGLAdpInfo.va_line_width*VGLModeInfo.vi_height* + VGLBufSize = VGLAdpInfo.va_line_width*VGLModeInfo.vi_height* VGLModeInfo.vi_planes; VGLBuf = malloc(VGLBufSize); if (VGLBuf == NULL) { From owner-svn-src-all@freebsd.org Tue Apr 16 15:54:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 187B41576A4D; Tue, 16 Apr 2019 15:54:18 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CD926C08F; Tue, 16 Apr 2019 15:54:17 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3GFsCGU095443; Tue, 16 Apr 2019 08:54:12 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3GFsCZF095442; Tue, 16 Apr 2019 08:54:12 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904161554.x3GFsCZF095442@gndrsh.dnsmgr.net> Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys In-Reply-To: To: Warner Losh Date: Tue, 16 Apr 2019 08:54:12 -0700 (PDT) CC: Ian Lepore , Emmanuel Vadot , "Conrad E. Meyer" , Justin Hibbits , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 7CD926C08F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.971,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:54:18 -0000 > On Tue, Apr 16, 2019 at 9:16 AM Ian Lepore wrote: > > > On Tue, 2019-04-16 at 07:18 -0600, Warner Losh wrote: > > > On Tue, Apr 16, 2019, 7:04 AM Emmanuel Vadot > > > wrote: > > > > > > > On Mon, 15 Apr 2019 17:54:56 -0700 > > > > Conrad Meyer wrote: > > > > > > > > > On Mon, Apr 15, 2019 at 5:53 PM Conrad Meyer > > > > > wrote: > > > > > > E.g., the CI infrastructure for > > > > > > Riscv/Arm is/was generating minimal filesystem images and not > > > > > > populating /boot/entropy. > > > > > > > > > > I should add, I say "is/was" because I have a PR out which may > > > > > address > > > > > the problem: https://github.com/freebsd/freebsd-ci/pull/31 > > > > > > > > > > Best, > > > > > Conrad > > > > > > > > It's not only CI, all release images (memstick, iso) don't have > > > > a /boot/entropy. > > > > Also all arm/arm64 image don't have this file too. > > > > If /boot/entropy is needed and isn't present loader(8) should > > > > gather > > > > some entropy and pass this to the kernel for the first boot. > > > > > > > > > > Maybe we need to bootstrap the entropy file as part of buildworld. > > > I'm not > > > sure if the loader can find enough... > > > > > > > > Isn't a file full of data which is distributed in identical form to > > everyone the exact opposite of entropy? > > > > It's just to bootstrap entropy for installs. The CI stuff doesn't matter if > that's the same since the CI images aren't exposed to the internet in any > way that would make it matter. Incorrect, the CI artifacts are publically avaliable. I infact have Makefiles that take any given CI build artifact set and create a VM from it, I use this for bisecting failures and other testing. > The normal install would have the same seeds > of entropy, but diverge from there fairly quickly. The stuff that's used > early in the install is the don't care sort of things that won't matter in > the installer (which then creates it's own entropy that's different for > every install). I have concerns here, if I use a distribution with a canned entropy in it to make a file system that is snapshotted, aka frozen in time, that its entropy would be repeatable. This file system is never run through any installer, it is, I believe, how most of the Cloud images are created. > Warner -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Apr 16 15:56:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDB3C1576AFF; Tue, 16 Apr 2019 15:56:32 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A8786C24B; Tue, 16 Apr 2019 15:56:32 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3GFuT7K095472; Tue, 16 Apr 2019 08:56:29 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3GFuTvO095471; Tue, 16 Apr 2019 08:56:29 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904161556.x3GFuTvO095471@gndrsh.dnsmgr.net> Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys In-Reply-To: To: cem@freebsd.org Date: Tue, 16 Apr 2019 08:56:29 -0700 (PDT) CC: Warner Losh , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 7A8786C24B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 15:56:33 -0000 [ Charset UTF-8 unsupported, converting... ] > Hi Warner, > > On Tue, Apr 16, 2019 at 8:47 AM Warner Losh wrote: > > On Tue, Apr 16, 2019 at 9:16 AM Ian Lepore wrote: > >> Isn't a file full of data which is distributed in identical form to > >> everyone the exact opposite of entropy? > > Ian has the right idea. > > > It's just to bootstrap entropy for installs. The CI stuff doesn't matter if that's the same since the CI images aren't exposed to the internet in any way that would make it matter. The normal install would have the same seeds of entropy, but diverge from there fairly quickly. The stuff that's used early in the install is the don't care sort of things that won't matter in the installer (which then creates it's own entropy that's different for every install). > > I agree that it would be safe, although potentially misleading and > potentially dangerous, to create a fake entropy file for the installer > images. We need to be careful *not* to embed such files in .img files > which are installed by 'dd' directly to a disk or flash or VM, for > example. It would be catastrophic to distribute the same entropy file > to all FreeBSD AWS images. Thank you Conrad, I'll bow out of any discussion now, you clearly have the same concern I do. > Best, > Conrad -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Apr 16 16:11:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F6631576F99; Tue, 16 Apr 2019 16:11:09 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::609]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72E356C922; Tue, 16 Apr 2019 16:11:07 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback13o.mail.yandex.net (mxback13o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::64]) by forward106o.mail.yandex.net (Yandex) with ESMTP id D8BA15060E5F; Tue, 16 Apr 2019 19:11:01 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback13o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id nq9NGzigDT-B1xOLfxd; Tue, 16 Apr 2019 19:11:01 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1555431061; bh=CayBpiN/tghrGu3DSIZX/HpfzZhpn2zJqbFzmn601L0=; h=In-Reply-To:From:Date:References:To:Subject:Message-ID; b=Wvq8zPido0O/W8eoJG+9PVurLzvCewchCzG4Z6d1nVTQim8tHNW6vbMv3iFPipLJH wGVvJgx/739GHvumbMOxOMCvceGQtlItpMPxBGIXSmqy8YU/C8VqauZJ8vjXdoXUc0 d9vXOyYEBCiE4uXQ39+ldHG6dXpna7bmdOauHk5w= Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id zC5C4JZGVt-B0oe5SxC; Tue, 16 Apr 2019 19:11:00 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en To: slavash@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, slavash@mellanox.com References: <201812051425.wB5EP38T004562@repo.freebsd.org> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= mQENBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAG0JUFuZHJleSBWLiBFbHN1a292IDxidTdjaGVyQHlhbmRleC5ydT6JATgEEwECACIFAkwB F1kCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEAHF6gQQyKF6qmYIAI6ekfm1VA4T vqankI1ISE6ku4jV7UlpIQlEbE7/8n3Zd6teJ+pGOQhN5qk8QE7utdPdbktAzi+x7LIJVzUw 4TywZLXGrkP7VKYkfg6oyCGyzITghefQeJtr2TN4hYCkzPWpylkue8MtmqfZv/6royqwTbN+ +E09FQNvTgRUYJYTeQ1qOsxNRycwvw3dr2rOfuxShbzaHBB1pBIjGrMg8fC5pd65ACH5zuFV A0CoTNGMDrEZSfBkTW604UUHFFXeCoC3dwDZRKOWJ3GmMXns65Ai5YkA63BSHEE1Qle3VBhd cG1w0CB5FBV3pB27UVnf0jEbysrDqW4qN7XMRFSWNAy5AQ0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAYkBHwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: <2a683ce4-5aec-8a15-592d-7193ee470d42@yandex.ru> Date: Tue, 16 Apr 2019 19:09:59 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZnDdBF2SYJtWFjqCLirAfbXbL0KINRfBs" X-Rspamd-Queue-Id: 72E356C922 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yandex.ru header.s=mail header.b=Wvq8zPid; dmarc=pass (policy=none) header.from=yandex.ru; spf=pass (mx1.freebsd.org: domain of bu7cher@yandex.ru designates 2a02:6b8:0:1a2d::609 as permitted sender) smtp.mailfrom=bu7cher@yandex.ru X-Spamd-Result: default: False [-4.92 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0:1a2d::/64]; FREEMAIL_FROM(0.00)[yandex.ru]; HAS_ATTACHMENT(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: mx.yandex.ru]; DKIM_TRACE(0.00)[yandex.ru:+]; DMARC_POLICY_ALLOW(-0.50)[yandex.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; FREEMAIL_ENVFROM(0.00)[yandex.ru]; RCVD_IN_DNSWL_LOW(-0.10)[9.0.6.0.0.0.0.0.0.0.0.0.0.0.0.0.d.2.a.1.0.0.0.0.8.b.6.0.2.0.a.2.list.dnswl.org : 127.0.5.1]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yandex.ru.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[yandex.ru:s=mail]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.29)[0.292,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 16:11:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ZnDdBF2SYJtWFjqCLirAfbXbL0KINRfBs Content-Type: multipart/mixed; boundary="P54kZfA7QLkFPIgrWBUzy7s9GAxkXvcWM"; protected-headers="v1" From: "Andrey V. Elsukov" To: slavash@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, slavash@mellanox.com Message-ID: <2a683ce4-5aec-8a15-592d-7193ee470d42@yandex.ru> Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en References: <201812051425.wB5EP38T004562@repo.freebsd.org> In-Reply-To: --P54kZfA7QLkFPIgrWBUzy7s9GAxkXvcWM Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 16.04.2019 18:26, Slava Shwartsman wrote: > Thanks for letting us know about this regression. > I would like to try to reproduce this issue in house. >=20 > Can you please share the exact steps to reproduce it? > - Can I reproduce the issue with B2B setup? > - What is the route command you used to make the route between the VLAN= s? > - What app are you using to generate the traffic? >=20 I think this can be reproduced on simple router, where single mce(4) interface is used as parent for several vlan(4) interfaces. E.g. [host1] vlan100 <--> mce0.100 [gateway] mce0.200 <--> vlan200 [host2] 10.0.0.1 10.0.0.254 192.168.0.254 192.168.0.1 gateway: sysctl net.inet.ip.forwarding=3D1 host1: route add 192.168.0.0/24 10.0.0.254 host2: route add 10.0.0.0/24 192.168.0.254 ping 10.0.0.1 I.e. you need to make setup, where ingress and egress interface is the same - mce0. --=20 WBR, Andrey V. Elsukov --P54kZfA7QLkFPIgrWBUzy7s9GAxkXvcWM-- --ZnDdBF2SYJtWFjqCLirAfbXbL0KINRfBs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAly1/lcACgkQAcXqBBDI oXrFkgf/djzppyUEiH/FG56Pr8TrF1j2AZ2J6uX4W+BgjwglqfQAr4zKi9LzUlOY oKxYX7jHXQp3WO1ETPMdh5bz1MwyPE4Kf9ybsyrFXqjl1J22t/jtst4iIqiLGOh2 Tgif07McRUkqk0CNSz0x1ti8ghnZYc+kf7uZefffdcAFZKoE0IzrMMiUwNhClAlN sPTcssiQ03A1dLiltcB6r/k3VN6Se9oGUWcOVHFeqcX0DBODcT3tYHARdkJNd9bH JBoOrCYMP1rIMexeqK7Z+s/QPIVI6jNuDIcpETSSoT+yrHt0fMZWFHOEfuLwNPcq NYBb91Xx1oNXNEKFol8T2SszhUl3gQ== =bntY -----END PGP SIGNATURE----- --ZnDdBF2SYJtWFjqCLirAfbXbL0KINRfBs-- From owner-svn-src-all@freebsd.org Tue Apr 16 16:33:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9916C1577465 for ; Tue, 16 Apr 2019 16:33:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E6416D4A1 for ; Tue, 16 Apr 2019 16:33:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72a.google.com with SMTP id c189so12541611qke.6 for ; Tue, 16 Apr 2019 09:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hSv5QYTgJ8vuuz6EDzVV3PinrDfGNtJFdph2p8Uo0eM=; b=ObmqjP/LBlfr2Atp7Yq7v+xk7g291tedU97zxr6BQYLGUVmUP3KSKC3BmuTZpuAEqH tFXOc3bNNLIxIevDtZF2F1uney+hbQDQdfkXe+Rw4LuAV2x9Y0QTmp00x7QlhUOJfqXe 90mBWSWONbygxh4fVhG5nDEHIJY0i2QRrwZD+v2dzbrTUT7lUwETRqpLJy1zoRuxmT77 kHwIJtqYiJqou1v6xj7LK8VGZnylME1MxeS5VnAM2rnvJbyqttxSE6/4nstSmTlOtLOQ 50TNm2JnB679eSXeGmeOjrWEszWI7BRYyZzM9q4AjVzsBUiHp0rCpCs9F+/3xLRLxTMq M4mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hSv5QYTgJ8vuuz6EDzVV3PinrDfGNtJFdph2p8Uo0eM=; b=cr8CEsCCqog6gV1U+4Slm6ppO/8AcZkjXWzvNVGXBr3cN0xGnASmLW/wM/gz/PFZ9N kW9Oa2Z0OkCoie7cUWLjaDKiJLRLSc71e/0QSmPgSJpXWCUIH4go+fNEQRwomztKJw+q 40i+PiA+JIhDk4ScbTXXJ7haxdgszJIkkb+6wEKmG5l+VAYVgIPuvgJFigzFbjvOHaT3 XZs+otEzeubyolfIdnPvtaTL8bQH6POn1qHGEm4MjYZ+2HxHd7yepw/N8Rup8LYxBWw3 5MysatGvgtLjuYdAtYQAKcLfrKohb74PfAMuT04Q9oPiN9MoVqhV4t2OtxD0ApgGNCHW Axbg== X-Gm-Message-State: APjAAAWWAdhgA7sn3F4jT669kDOdPDMibc4QsPwRgKLnp+zAujqePr6w Ol2mYaGewGy3jM9NKFX8mt3ugTrAM+u2n6N+c42gLQ== X-Google-Smtp-Source: APXvYqx1cVrE8upgVM7yL56pKGbuhDRtzRG5jMDyRrbUOVp8aeG1FsLQg7jGB9WG1hrSDgUrtJu/Gx1cvBOMqJpIJVY= X-Received: by 2002:a37:9e0d:: with SMTP id h13mr63940311qke.135.1555432386521; Tue, 16 Apr 2019 09:33:06 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> <310a420ee0b9e12249979d89dc4fa0d4cac5a8dc.camel@freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 16 Apr 2019 10:32:55 -0600 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: "Conrad E. Meyer" Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 2E6416D4A1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 16:33:07 -0000 On Tue, Apr 16, 2019 at 9:51 AM Conrad Meyer wrote: > Hi Warner, > > On Tue, Apr 16, 2019 at 8:47 AM Warner Losh wrote: > > On Tue, Apr 16, 2019 at 9:16 AM Ian Lepore wrote: > >> Isn't a file full of data which is distributed in identical form to > >> everyone the exact opposite of entropy? > > Ian has the right idea. > > > It's just to bootstrap entropy for installs. The CI stuff doesn't matter > if that's the same since the CI images aren't exposed to the internet in > any way that would make it matter. The normal install would have the same > seeds of entropy, but diverge from there fairly quickly. The stuff that's > used early in the install is the don't care sort of things that won't > matter in the installer (which then creates it's own entropy that's > different for every install). > > I agree that it would be safe, although potentially misleading and > potentially dangerous, to create a fake entropy file for the installer > images. We need to be careful *not* to embed such files in .img files > which are installed by 'dd' directly to a disk or flash or VM, for > example. It would be catastrophic to distribute the same entropy file > to all FreeBSD AWS images. > In that case, we're better off having a MD routine that gets called if there's no loader-provided entropy pool. It would be responsible for generating it in a MD defined way. It would handle it or call panic() based on the requirements of the environment. This would answer the issue with embedded systems that do not have any writable store (and requiring an NV store is not even an option to require, so don't go there). It would let hardware with RNG generate something. It would let hardware without get it from wherever which may be highly specific to different scenarios or make the conscious decision not to get it at all vs panic, etc. What we can't do is just hang if the loader can't provide an entropy pool. Warner From owner-svn-src-all@freebsd.org Tue Apr 16 16:33:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30D6615774AC; Tue, 16 Apr 2019 16:33:39 +0000 (UTC) (envelope-from slava.shwartsman@gmail.com) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A82D86D5E3; Tue, 16 Apr 2019 16:33:38 +0000 (UTC) (envelope-from slava.shwartsman@gmail.com) Received: by mail-wm1-f67.google.com with SMTP id a184so26208825wma.2; Tue, 16 Apr 2019 09:33:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xzoyuqJjN97oi8wOmjD+bZ5jJ4Q3yms0vJMbjXOZdek=; b=PAD2i4ni29as0oEejgfsieTUMifZmnrfvl1jA87DraB6lO+pOjX+N30ZzUWnkpQKl6 GAzXVc8PgTp9QNNt+stv6nFl2dhHPby2SHVdnTLI1wyeeujj+u/QY7wkNs4dqnsNumXq Qp0CMrj3oiE24PP33PppIN4VN4GthmIRTbty9mfSiLHb1P5XOxOIRLiRwedFTQK/cXR2 K3TQ0ey1GDmip6nGCO1qdTWNyLU1mbk1cPFc+3ULndM1eiXVNohlYIxCB4aZ3onkn/Qq Jskqk7u+62RWrVoho0X0jx8lWD+tOwlBHiDUXugTA+uGsgSJCI+ry14NJDg77FtgmPR1 LWGA== X-Gm-Message-State: APjAAAUTLq8hEdUYEF0s+hTecR/q7SF7fISGkMAMj0KaBvtT4Q8Ds3+D p6hceKYKYD5pZyC6P1VC73JOnb+r X-Google-Smtp-Source: APXvYqwvGhLoK3jeAtwZQgIsjdXaqrR8XrlT5x1870igppgBbaU+xhaiPi1ZZuVlLAUegrbMwJs+uA== X-Received: by 2002:a1c:ac07:: with SMTP id v7mr2667693wme.49.1555428391734; Tue, 16 Apr 2019 08:26:31 -0700 (PDT) Received: from [10.0.0.30] (bzq-79-181-3-237.red.bezeqint.net. [79.181.3.237]) by smtp.gmail.com with ESMTPSA id g12sm62178942wrw.40.2019.04.16.08.26.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 08:26:30 -0700 (PDT) Reply-To: slavash@FreeBSD.org Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en To: "Andrey V. Elsukov" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, slavash@mellanox.com References: <201812051425.wB5EP38T004562@repo.freebsd.org> From: Slava Shwartsman Message-ID: Date: Tue, 16 Apr 2019 18:26:28 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: A82D86D5E3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 16:33:39 -0000 On 16-Apr-19 17:39, Andrey V. Elsukov wrote: > On 05.12.2018 17:25, Slava Shwartsman wrote: >> Author: slavash >> Date: Wed Dec 5 14:25:03 2018 >> New Revision: 341586 >> URL: https://svnweb.freebsd.org/changeset/base/341586 >> >> Log: >> mlx5en: Implement backpressure indication. >> >> The backpressure indication is implemented using an unlimited rate type of >> mbuf send tag. When the upper layers typically the socket layer has obtained such >> a tag, it can then query the destination driver queue for the current >> amount of space available in the send queue. >> >> A single mbuf send tag may be referenced multiple times and a refcount has been added >> to the mlx5e_priv structure to track its usage. Because the send tag resides >> in the mlx5e_channel structure, there is no need to wait for refcounts to reach >> zero until the mlx4en(4) driver is detached. The channels structure is persistant >> during the lifetime of the mlx5en(4) driver it belongs to and can so be accessed >> without any need of synchronization. >> >> The mlx5e_snd_tag structure was extended to contain a type field, because there are now >> two different tag types which end up in the driver which need to be distinguished. >> >> Submitted by: hselasky@ >> Approved by: hselasky (mentor) >> MFC after: 1 week >> Sponsored by: Mellanox Technologies >> @@ -587,27 +609,33 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) >> struct mlx5e_sq *sq; >> int ret; >> >> - sq = mlx5e_select_queue(ifp, mb); >> - if (unlikely(sq == NULL)) { >> -#ifdef RATELIMIT >> - /* Check for route change */ >> - if (mb->m_pkthdr.snd_tag != NULL && >> - mb->m_pkthdr.snd_tag->ifp != ifp) { >> + if (mb->m_pkthdr.snd_tag != NULL) { >> + sq = mlx5e_select_queue_by_send_tag(ifp, mb); >> + if (unlikely(sq == NULL)) { >> + /* Check for route change */ >> + if (mb->m_pkthdr.snd_tag->ifp != ifp) { >> + /* Free mbuf */ >> + m_freem(mb); >> + >> + /* >> + * Tell upper layers about route >> + * change and to re-transmit this >> + * packet: >> + */ >> + return (EAGAIN); >> + } > > Hi, > > I just discovered something strange and found that this commit is the > cause. > The test system has mlx5en 100G interface. It has two vlans: vlan500 and > vlan100. > Via vlan500 it receives some packets flows. Then it routes these packets > into vlan100. > But packets are dropped in mlx5e_xmit() with EAGAIN error code. > > # dtrace -n 'fbt::ip6_output:return {printf("%d", arg1);}' > dtrace: description 'fbt::ip6_output:return ' matched 1 probe > CPU ID FUNCTION:NAME > 23 54338 ip6_output:return 35 > 16 54338 ip6_output:return 35 > 21 54338 ip6_output:return 35 > 22 54338 ip6_output:return 35 > 24 54338 ip6_output:return 35 > 23 54338 ip6_output:return 35 > 14 54338 ip6_output:return 35 > ^C > > # dtrace -n 'fbt::mlx5e_xmit:return {printf("%d", arg1);}' > dtrace: description 'fbt::mlx5e_xmit:return ' matched 1 probe > CPU ID FUNCTION:NAME > 16 69030 mlx5e_xmit:return 35 > 23 69030 mlx5e_xmit:return 35 > 26 69030 mlx5e_xmit:return 35 > 25 69030 mlx5e_xmit:return 35 > 24 69030 mlx5e_xmit:return 35 > 21 69030 mlx5e_xmit:return 35 > 26 69030 mlx5e_xmit:return 35 > ^C > > The kernel config is GENERIC. > 13.0-CURRENT #9 r345758+82f3d57(svn_head)-dirty > Hi Andrey, Thanks for letting us know about this regression. I would like to try to reproduce this issue in house. Can you please share the exact steps to reproduce it? - Can I reproduce the issue with B2B setup? - What is the route command you used to make the route between the VLANs? - What app are you using to generate the traffic? Slava From owner-svn-src-all@freebsd.org Tue Apr 16 16:49:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2330115777C3; Tue, 16 Apr 2019 16:49:35 +0000 (UTC) (envelope-from gallatin@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 BA12A6DB76; Tue, 16 Apr 2019 16:49:34 +0000 (UTC) (envelope-from gallatin@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 86F4922575; Tue, 16 Apr 2019 16:49:34 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GGnYpd008373; Tue, 16 Apr 2019 16:49:34 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GGnYNL008372; Tue, 16 Apr 2019 16:49:34 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201904161649.x3GGnYNL008372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Tue, 16 Apr 2019 16:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346281 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 346281 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BA12A6DB76 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 16:49:35 -0000 Author: gallatin Date: Tue Apr 16 16:49:34 2019 New Revision: 346281 URL: https://svnweb.freebsd.org/changeset/base/346281 Log: Replace cosqos with numa_domain in mbuf pkthdr The cosqos field was added nearly 6 years ago in r254804, and it is still unused by any in-tree consumers. I have a patchset that I'm working on which aligns many network resources by NUMA domain, including inps, inpcb lb group, tcp pacing, lagg output link selection, backing pages for sendfile, and more. It reduces cross-domain traffic by roughly 50% for a real web workload. This patchset relies on being able to store the numa domain in the mbuf, and grabbing the unused cosqos field for this purpose is the first step in starting to usptream it. Reviewed by: kib, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19862 Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Apr 16 15:52:04 2019 (r346280) +++ head/sys/sys/mbuf.h Tue Apr 16 16:49:34 2019 (r346281) @@ -98,6 +98,7 @@ struct mbuf; #define MLEN ((int)(MSIZE - MHSIZE)) #define MHLEN ((int)(MSIZE - MPKTHSIZE)) #define MINCLSIZE (MHLEN + 1) +#define M_NODOM 255 #ifdef _KERNEL /*- @@ -158,7 +159,7 @@ struct pkthdr { uint32_t flowid; /* packet's 4-tuple system */ uint32_t csum_flags; /* checksum and offload features */ uint16_t fibnum; /* this packet should use this fib */ - uint8_t cosqos; /* class/quality of service */ + uint8_t numa_domain; /* NUMA domain of recvd pkt */ uint8_t rsstype; /* hash type */ union { uint64_t rcv_tstmp; /* timestamp in ns */ @@ -405,33 +406,6 @@ struct mbuf { #define M_HASHTYPE_SET(m, v) ((m)->m_pkthdr.rsstype = (v)) #define M_HASHTYPE_TEST(m, v) (M_HASHTYPE_GET(m) == (v)) #define M_HASHTYPE_ISHASH(m) (M_HASHTYPE_GET(m) & M_HASHTYPE_HASHPROP) - -/* - * COS/QOS class and quality of service tags. - * It uses DSCP code points as base. - */ -#define QOS_DSCP_CS0 0x00 -#define QOS_DSCP_DEF QOS_DSCP_CS0 -#define QOS_DSCP_CS1 0x20 -#define QOS_DSCP_AF11 0x28 -#define QOS_DSCP_AF12 0x30 -#define QOS_DSCP_AF13 0x38 -#define QOS_DSCP_CS2 0x40 -#define QOS_DSCP_AF21 0x48 -#define QOS_DSCP_AF22 0x50 -#define QOS_DSCP_AF23 0x58 -#define QOS_DSCP_CS3 0x60 -#define QOS_DSCP_AF31 0x68 -#define QOS_DSCP_AF32 0x70 -#define QOS_DSCP_AF33 0x78 -#define QOS_DSCP_CS4 0x80 -#define QOS_DSCP_AF41 0x88 -#define QOS_DSCP_AF42 0x90 -#define QOS_DSCP_AF43 0x98 -#define QOS_DSCP_CS5 0xa0 -#define QOS_DSCP_EF 0xb8 -#define QOS_DSCP_CS6 0xc0 -#define QOS_DSCP_CS7 0xe0 /* * External mbuf storage buffer types. From owner-svn-src-all@freebsd.org Tue Apr 16 16:59:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F4DE1577B39; Tue, 16 Apr 2019 16:59:06 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f169.google.com (mail-it1-f169.google.com [209.85.166.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 149D86E053; Tue, 16 Apr 2019 16:59:05 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f169.google.com with SMTP id u65so33694342itc.2; Tue, 16 Apr 2019 09:59:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=RCa2k6BAxKIj/45lFE9HAL+53u7COk+Q6FpZY3LBolc=; b=hi+VIsJNuJD5Acpv6BekKaPtbPEp5aFTMcb/nnygUzoSg8RyHzHHSXHXvylCqwhW88 vO+adcMh2uTCfUr+nyyJKVR1BMvHySW/AaC7aXTs4ILUefao7hT+W2a6ZR2Ef0enohlU 288gub9EF4QbZpHPTpMVGTJN4CclpMBw+cjbeFNQR57s/M7aDr7j8zUuaxoX8Cwyi6S6 4IbeR4odbZgDAsrmODJxw/DYYttv01Xz1wkYnUxzLfT7zzksoqZtO0oSljudw42UqHNo tvFHpwTUdiQGwClNLuK/8dHZQSlxJ7Opc0/vaEgyM7wXcbkYiP1nKib23DRhyoyDoA8N bL1Q== X-Gm-Message-State: APjAAAUpxoMOi8CqDeXBB4DmZkF6hHUioZUrIMDcT7YWOEycRjW39qSn Foeord0vUvm2aBMS8aC6g30BBG2/ X-Google-Smtp-Source: APXvYqxu1ruG+1X0LxqD+igqKWYNU33XANYLI/d+z1yHzNSSPaCYvUwekzYcSov6QkhCTq0qrqmd6Q== X-Received: by 2002:a05:6638:110:: with SMTP id x16mr17016376jao.75.1555433944512; Tue, 16 Apr 2019 09:59:04 -0700 (PDT) Received: from mail-it1-f181.google.com (mail-it1-f181.google.com. [209.85.166.181]) by smtp.gmail.com with ESMTPSA id b1sm9645632itd.12.2019.04.16.09.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 09:59:04 -0700 (PDT) Received: by mail-it1-f181.google.com with SMTP id x132so34176539itf.2; Tue, 16 Apr 2019 09:59:04 -0700 (PDT) X-Received: by 2002:a02:62ce:: with SMTP id d197mr94169jac.91.1555433944153; Tue, 16 Apr 2019 09:59:04 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> <310a420ee0b9e12249979d89dc4fa0d4cac5a8dc.camel@freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 09:58:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Warner Losh Cc: "Conrad E. Meyer" , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 149D86E053 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 16:59:06 -0000 On Tue, Apr 16, 2019 at 9:33 AM Warner Losh wrote: > In that case, we're better off having a MD routine that gets called if there's no loader-provided entropy pool. Yes, this is more or less the same plan I had. There's no need to add anything MD specific; we already abstract MD random sources behind the harvest mechanism. > (and requiring an NV store is not even an option to require, so don't go there). Systems lacking both an NV store and an entropy source available during mi_startup (i.e., not interrupts...) cannot safely provide entropy in early boot. On those systems, we must disable random consumption during early boot. > What we can't do is just hang if the loader can't provide an entropy pool. I think we're all on the same page there. Best, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 17:12:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07D3615782D3; Tue, 16 Apr 2019 17:12:20 +0000 (UTC) (envelope-from cem@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 A093B6E9BF; Tue, 16 Apr 2019 17:12:19 +0000 (UTC) (envelope-from cem@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 6128A22A69; Tue, 16 Apr 2019 17:12:19 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GHCJFn020585; Tue, 16 Apr 2019 17:12:19 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GHCHiw020577; Tue, 16 Apr 2019 17:12:17 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201904161712.x3GHCHiw020577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 16 Apr 2019 17:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346282 - in head: . share/man/man9 sys/dev/random sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: . share/man/man9 sys/dev/random sys/sys X-SVN-Commit-Revision: 346282 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A093B6E9BF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:12:20 -0000 Author: cem Date: Tue Apr 16 17:12:17 2019 New Revision: 346282 URL: https://svnweb.freebsd.org/changeset/base/346282 Log: random(4): Add is_random_seeded(9) KPI The imagined use is for early boot consumers of random to be able to make decisions based on whether random is available yet or not. One such consumer seems to be __stack_chk_init(), which runs immediately after random is initialized. A follow-up patch will attempt to address that. Reported by: many Reviewed by: delphij (except man page) Approved by: secteam(delphij) Differential Revision: https://reviews.freebsd.org/D19926 Modified: head/UPDATING head/share/man/man9/Makefile head/share/man/man9/random.9 head/sys/dev/random/random_infra.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/sys/param.h head/sys/sys/random.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Apr 16 16:49:34 2019 (r346281) +++ head/UPDATING Tue Apr 16 17:12:17 2019 (r346282) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20190416: + The loadable random module KPI has changed; the random_infra_init() + routine now requires a 3rd function pointer for a bool (*)(void) + method that returns true if the random device is seeded (and + therefore unblocked). + 20190404: r345895 reverts r320698. This implies that an nfsuserd(8) daemon built from head sources between r320757 (July 6, 2017) and Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Apr 16 16:49:34 2019 (r346281) +++ head/share/man/man9/Makefile Tue Apr 16 17:12:17 2019 (r346282) @@ -1668,6 +1668,7 @@ MLINKS+=psignal.9 gsignal.9 \ psignal.9 tdsignal.9 MLINKS+=random.9 arc4rand.9 \ random.9 arc4random.9 \ + random.9 is_random_seeded.9 \ random.9 read_random.9 \ random.9 read_random_uio.9 \ random.9 srandom.9 Modified: head/share/man/man9/random.9 ============================================================================== --- head/share/man/man9/random.9 Tue Apr 16 16:49:34 2019 (r346281) +++ head/share/man/man9/random.9 Tue Apr 16 17:12:17 2019 (r346282) @@ -26,13 +26,14 @@ .\" .\" $FreeBSD$ .\" " -.Dd April 15, 2019 +.Dd April 16, 2019 .Dt RANDOM 9 .Os .Sh NAME .Nm arc4rand , .Nm arc4random , .Nm arc4random_buf , +.Nm is_random_seeded , .Nm random , .Nm read_random , .Nm read_random_uio , @@ -48,6 +49,8 @@ .Fn arc4rand "void *ptr" "u_int length" "int reseed" .Pp .In sys/random.h +.Ft bool +.Fn is_random_seeded "void" .Ft void .Fn read_random "void *buffer" "int count" .Ft int @@ -106,6 +109,13 @@ is not used directly; instead, use the .Fn arc4rand family of functions. +.Pp +The +.Fn is_random_seeded +function can be used to check in advance if +.Fn read_random +will block. +(If random is seeded, it will not block.) .Pp The .Fn read_random_uio Modified: head/sys/dev/random/random_infra.c ============================================================================== --- head/sys/dev/random/random_infra.c Tue Apr 16 16:49:34 2019 (r346281) +++ head/sys/dev/random/random_infra.c Tue Apr 16 17:12:17 2019 (r346282) @@ -63,12 +63,20 @@ null_read_random(void *dummy __unused, u_int dummy2 __ panic("%s: no random module is loaded", __func__); } +static bool +null_is_random_seeded(void) +{ + return (false); +} + struct random_readers { int (*read_random_uio)(struct uio *, bool); void (*read_random)(void *, u_int); + bool (*is_random_seeded)(void); } random_reader_context = { (int (*)(struct uio *, bool))nullop, null_read_random, + null_is_random_seeded, }; struct sx randomdev_config_lock; @@ -82,12 +90,15 @@ random_infra_sysinit(void *dummy __unused) SYSINIT(random_device_h_init, SI_SUB_RANDOM, SI_ORDER_FIRST, random_infra_sysinit, NULL); void -random_infra_init(int (*p_random_read_uio)(struct uio *, bool), void (*p_random_read)(void *, u_int)) +random_infra_init(int (*p_random_read_uio)(struct uio *, bool), + void (*p_random_read)(void *, u_int), + bool (*p_is_random_seeded)(void)) { RANDOM_CONFIG_X_LOCK(); random_reader_context.read_random_uio = p_random_read_uio; random_reader_context.read_random = p_random_read; + random_reader_context.is_random_seeded = p_is_random_seeded; RANDOM_CONFIG_X_UNLOCK(); } @@ -98,6 +109,7 @@ random_infra_uninit(void) RANDOM_CONFIG_X_LOCK(); random_reader_context.read_random_uio = (int (*)(struct uio *, bool))nullop; random_reader_context.read_random = null_read_random; + random_reader_context.is_random_seeded = null_is_random_seeded; RANDOM_CONFIG_X_UNLOCK(); } @@ -128,5 +140,14 @@ read_random(void *buf, u_int len) random_reader_context.read_random(buf, len); RANDOM_CONFIG_S_UNLOCK(); } + +bool +is_random_seeded(void) +{ + RANDOM_CONFIG_S_LOCK(); + random_reader_context.is_random_seeded(); + RANDOM_CONFIG_S_UNLOCK(); +} + #endif /* defined(RANDOM_LOADABLE) */ Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Tue Apr 16 16:49:34 2019 (r346281) +++ head/sys/dev/random/randomdev.c Tue Apr 16 17:12:17 2019 (r346282) @@ -62,11 +62,14 @@ __FBSDID("$FreeBSD$"); #if defined(RANDOM_LOADABLE) #define READ_RANDOM_UIO _read_random_uio #define READ_RANDOM _read_random +#define IS_RANDOM_SEEDED _is_random_seeded static int READ_RANDOM_UIO(struct uio *, bool); static void READ_RANDOM(void *, u_int); +static bool IS_RANDOM_SEEDED(void); #else #define READ_RANDOM_UIO read_random_uio #define READ_RANDOM read_random +#define IS_RANDOM_SEEDED is_random_seeded #endif static d_read_t randomdev_read; @@ -93,7 +96,7 @@ random_alg_context_ra_init_alg(void *data) p_random_alg_context = &random_alg_context; p_random_alg_context->ra_init_alg(data); #if defined(RANDOM_LOADABLE) - random_infra_init(READ_RANDOM_UIO, READ_RANDOM); + random_infra_init(READ_RANDOM_UIO, READ_RANDOM, IS_RANDOM_SEEDED); #endif } @@ -269,6 +272,12 @@ READ_RANDOM(void *random_buf, u_int len) explicit_bzero(remainder_buf, sizeof(remainder_buf)); } +} + +bool +IS_RANDOM_SEEDED(void) +{ + return (p_random_alg_context->ra_seeded()); } static __inline void Modified: head/sys/dev/random/randomdev.h ============================================================================== --- head/sys/dev/random/randomdev.h Tue Apr 16 16:49:34 2019 (r346281) +++ head/sys/dev/random/randomdev.h Tue Apr 16 17:12:17 2019 (r346282) @@ -118,7 +118,8 @@ extern struct sx randomdev_config_lock; #define RANDOM_CONFIG_S_LOCK(x) sx_slock(&randomdev_config_lock) #define RANDOM_CONFIG_S_UNLOCK(x) sx_sunlock(&randomdev_config_lock) #define RANDOM_CONFIG_DEINIT_LOCK(x) sx_destroy(&randomdev_config_lock) -void random_infra_init(int (*)(struct uio *, bool), void (*)(void *, u_int)); +void random_infra_init(int (*)(struct uio *, bool), void (*)(void *, u_int), + bool (*)(void)); void random_infra_uninit(void); #endif Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Apr 16 16:49:34 2019 (r346281) +++ head/sys/sys/param.h Tue Apr 16 17:12:17 2019 (r346282) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300018 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300019 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/random.h ============================================================================== --- head/sys/sys/random.h Tue Apr 16 16:49:34 2019 (r346281) +++ head/sys/sys/random.h Tue Apr 16 17:12:17 2019 (r346282) @@ -40,6 +40,7 @@ struct uio; #if defined(DEV_RANDOM) void read_random(void *, u_int); int read_random_uio(struct uio *, bool); +bool is_random_seeded(void); #else static __inline int read_random_uio(void *a __unused, u_int b __unused) @@ -49,6 +50,11 @@ read_random_uio(void *a __unused, u_int b __unused) static __inline void read_random(void *a __unused, u_int b __unused) { +} +static __inline bool +is_random_seeded(void) +{ + return (false); } #endif From owner-svn-src-all@freebsd.org Tue Apr 16 17:12:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 713EF1578302; Tue, 16 Apr 2019 17:12:30 +0000 (UTC) (envelope-from gjb@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 11B0F6EBD5; Tue, 16 Apr 2019 17:12:30 +0000 (UTC) (envelope-from gjb@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 0AE8022A73; Tue, 16 Apr 2019 17:12:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GHCRW7021445; Tue, 16 Apr 2019 17:12:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GHCR81021444; Tue, 16 Apr 2019 17:12:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201904161712.x3GHCR81021444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 16 Apr 2019 17:12:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346283 - in stable/11/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Commit-Revision: 346283 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 11B0F6EBD5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:12:30 -0000 Author: gjb Date: Tue Apr 16 17:12:27 2019 New Revision: 346283 URL: https://svnweb.freebsd.org/changeset/base/346283 Log: Release notes documentation: - r336449, setproctitle_fast(3) addition. - r337418, kqueue(2) allow EVFILT_TIMER updates. - r338405, pthread_get_name_np(3) addition. - r339857, ddb(4) option to print process arguments added. - r340182, ichwd(4) support for Lewisburg PCH TCO watchdog timer. - r341828, ZFS vnode reclaimation deadlock fixed. - r342206, lagg(4) allow changing MTU without destroying interface. - r342656, x86 MSI IRQs are now tunable. - r343084, jail(8) IDs printed when logging a process exit. - r344399, zfsloader functionality now part of loader(8). - r344399, loader(8) GELI support extended to all architectures. - r344403, efi guess console device/type if not defined. - r345040, ccr(4) driver addition. - r345981, random(4) reseeding performance improvements. Add Klara Systems, Modirum MDPay, and Panzura to the sponsors file, sort, and remove random blank lines. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/11/release/doc/share/xml/sponsor.ent Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 16 17:12:17 2019 (r346282) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 16 17:12:27 2019 (r346283) @@ -350,6 +350,19 @@ The &man.pcap.3; library has been updated to version 1.9.0 (pre-release). + The &man.setproctitle.fast.3; function + has been added, which is optimized for high-frequency process + title updates. + + The &man.kqueue.2; system call has been + updated to allow updating + EVFILT_TIMER. + + The &man.pthread.get.name.np.3; function + has been added, which is used to retrieve the function name + associated with a thread. + The &man.pthread.3; library has been updated to improve POSIX compliance. @@ -377,7 +390,21 @@ General Kernel Changes -   + The &man.ddb.4; debugging utility has been + updated to print command-line arguments to a process. + + The number of MSI + IRQs have been converted from a constant to + a tunable. The default remains at 512, + which can now be changed during boot with the + machdep.num_msi_irqs &man.sysctl.8;. + + The kernel will now log the &man.jail.8; + ID when logging a process exit. The + &man.jail.8; ID 0 + represents processes that are not jailed. @@ -414,7 +441,14 @@ Device Drivers -   + The &man.ichwd.4; driver has been updated + to include support for TCO watchdog timers + in the Lewisburg PCH (C620) chipset. + + The &man.random.4; driver has been + updated to improve performance during expensive + reseeding. @@ -429,6 +463,16 @@ The TP-Link® TL-WN321G™ network adapter now uses the &man.run.4; driver instead of the &man.rum.4; driver. + + The + &man.lagg.4; driver has been updated to allow changing the + MTU without requiring destroying and + recreating the interface. + + The &man.ccr.4; driver has been added, + providing support for Chelsio® T6™ cryptography + accelerators. @@ -485,7 +529,10 @@ ZFS -   + An + issue that could result in a system hang during + ZFS vnode reclaimation has been + fixed. @@ -504,7 +551,21 @@ Boot Loader Changes -   + The functionality provided by + zfsloader has been added to + &man.loader.8;. Once the system boot blocks have been updated + following UPDATING, + zfsloader is no longer needed. A hard + link to &man.loader.8; has been added to ease in the + transition. + + The &man.loader.8; has been updated to + extend &man.geli.8; support to all architectures. + + The UEFI boot + &man.loader.8; has been updated to better determine the system + console type and device if not defined in + &man.loader.conf.5;. Modified: stable/11/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/11/release/doc/share/xml/sponsor.ent Tue Apr 16 17:12:17 2019 (r346282) +++ stable/11/release/doc/share/xml/sponsor.ent Tue Apr 16 17:12:27 2019 (r346283) @@ -15,10 +15,8 @@ - - @@ -40,16 +38,21 @@ + + + + - + + From owner-svn-src-all@freebsd.org Tue Apr 16 17:16:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD6C615783FA; Tue, 16 Apr 2019 17:16:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 649D36EDE9; Tue, 16 Apr 2019 17:16: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 4316622A9B; Tue, 16 Apr 2019 17:16: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 x3GHGJom023888; Tue, 16 Apr 2019 17:16:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GHGIYQ023885; Tue, 16 Apr 2019 17:16:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904161716.x3GHGIYQ023885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 16 Apr 2019 17:16: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: r346284 - in stable/12/sys: amd64/pci i386/pci x86/include x86/x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: amd64/pci i386/pci x86/include x86/x86 X-SVN-Commit-Revision: 346284 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 649D36EDE9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:16:20 -0000 Author: kib Date: Tue Apr 16 17:16:18 2019 New Revision: 346284 URL: https://svnweb.freebsd.org/changeset/base/346284 Log: MFC r346062: pci_cfgreg.c: Use io port config access for early boot time. PR: 236838 Modified: stable/12/sys/amd64/pci/pci_cfgreg.c stable/12/sys/i386/pci/pci_cfgreg.c stable/12/sys/x86/include/pci_cfgreg.h stable/12/sys/x86/x86/legacy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/12/sys/amd64/pci/pci_cfgreg.c Tue Apr 16 17:12:27 2019 (r346283) +++ stable/12/sys/amd64/pci/pci_cfgreg.c Tue Apr 16 17:16:18 2019 (r346284) @@ -44,12 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -enum { - CFGMECH_NONE = 0, - CFGMECH_1, - CFGMECH_PCIE, -}; - static uint32_t pci_docfgregread(int bus, int slot, int func, int reg, int bytes); static int pciereg_cfgread(int bus, unsigned slot, unsigned func, @@ -61,7 +55,13 @@ static void pcireg_cfgwrite(int bus, int slot, int fun SYSCTL_DECL(_hw_pci); -static int cfgmech; +/* + * For amd64 we assume that type 1 I/O port-based access always works. + * If an ACPI MCFG table exists, pcie_cfgregopen() will be called to + * switch to memory-mapped access. + */ +int cfgmech = CFGMECH_1; + static vm_offset_t pcie_base; static int pcie_minbus, pcie_maxbus; static uint32_t pcie_badslots; @@ -71,47 +71,10 @@ static int mcfg_enable = 1; SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLFLAG_RDTUN, &mcfg_enable, 0, "Enable support for PCI-e memory mapped config access"); -/* - * Initialise access to PCI configuration space - */ int pci_cfgregopen(void) { - uint64_t pciebar; - uint16_t did, vid; - if (cfgmech != CFGMECH_NONE) - return (1); - cfgmech = CFGMECH_1; - - /* - * Grope around in the PCI config space to see if this is a - * chipset that is capable of doing memory-mapped config cycles. - * This also implies that it can do PCIe extended config cycles. - */ - - /* Check for supported chipsets */ - vid = pci_cfgregread(0, 0, 0, PCIR_VENDOR, 2); - did = pci_cfgregread(0, 0, 0, PCIR_DEVICE, 2); - switch (vid) { - case 0x8086: - switch (did) { - case 0x3590: - case 0x3592: - /* Intel 7520 or 7320 */ - pciebar = pci_cfgregread(0, 0, 0, 0xce, 2) << 16; - pcie_cfgregopen(pciebar, 0, 255); - break; - case 0x2580: - case 0x2584: - case 0x2590: - /* Intel 915, 925, or 915GM */ - pciebar = pci_cfgregread(0, 0, 0, 0x48, 4); - pcie_cfgregopen(pciebar, 0, 255); - break; - } - } - return (1); } @@ -135,9 +98,6 @@ pci_cfgregread(int bus, int slot, int func, int reg, i { uint32_t line; - if (cfgmech == CFGMECH_NONE) - return (0xffffffff); - /* * Some BIOS writers seem to want to ignore the spec and put * 0 in the intline rather than 255 to indicate none. Some use @@ -161,9 +121,6 @@ pci_cfgregread(int bus, int slot, int func, int reg, i void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes) { - - if (cfgmech == CFGMECH_NONE) - return; if (cfgmech == CFGMECH_PCIE && (bus >= pcie_minbus && bus <= pcie_maxbus) && Modified: stable/12/sys/i386/pci/pci_cfgreg.c ============================================================================== --- stable/12/sys/i386/pci/pci_cfgreg.c Tue Apr 16 17:12:27 2019 (r346283) +++ stable/12/sys/i386/pci/pci_cfgreg.c Tue Apr 16 17:16:18 2019 (r346284) @@ -64,20 +64,13 @@ struct pcie_cfg_elem { vm_paddr_t papage; }; -enum { - CFGMECH_NONE = 0, - CFGMECH_1, - CFGMECH_2, - CFGMECH_PCIE, -}; - SYSCTL_DECL(_hw_pci); static TAILQ_HEAD(pcie_cfg_list, pcie_cfg_elem) pcie_list[MAXCPU]; static uint64_t pcie_base; static int pcie_minbus, pcie_maxbus; static uint32_t pcie_badslots; -static int cfgmech; +int cfgmech; static int devmax; static struct mtx pcicfg_mtx; static int mcfg_enable = 1; @@ -136,10 +129,8 @@ pcibios_get_version(void) int pci_cfgregopen(void) { - static int opened = 0; - uint64_t pciebar; - u_int16_t vid, did; - u_int16_t v; + uint16_t v; + static int opened = 0; if (opened) return (1); @@ -158,38 +149,7 @@ pci_cfgregopen(void) if (v >= 0x0210) pci_pir_open(); - if (cfgmech == CFGMECH_PCIE) - return (1); - - /* - * Grope around in the PCI config space to see if this is a - * chipset that is capable of doing memory-mapped config cycles. - * This also implies that it can do PCIe extended config cycles. - */ - - /* Check for supported chipsets */ - vid = pci_cfgregread(0, 0, 0, PCIR_VENDOR, 2); - did = pci_cfgregread(0, 0, 0, PCIR_DEVICE, 2); - switch (vid) { - case 0x8086: - switch (did) { - case 0x3590: - case 0x3592: - /* Intel 7520 or 7320 */ - pciebar = pci_cfgregread(0, 0, 0, 0xce, 2) << 16; - pcie_cfgregopen(pciebar, 0, 255); - break; - case 0x2580: - case 0x2584: - case 0x2590: - /* Intel 915, 925, or 915GM */ - pciebar = pci_cfgregread(0, 0, 0, 0x48, 4); - pcie_cfgregopen(pciebar, 0, 255); - break; - } - } - - return(1); + return (1); } static uint32_t Modified: stable/12/sys/x86/include/pci_cfgreg.h ============================================================================== --- stable/12/sys/x86/include/pci_cfgreg.h Tue Apr 16 17:12:27 2019 (r346283) +++ stable/12/sys/x86/include/pci_cfgreg.h Tue Apr 16 17:16:18 2019 (r346284) @@ -48,6 +48,15 @@ #define CONF2_ENABLE_CHK 0x0e #define CONF2_ENABLE_RES 0x0e +enum { + CFGMECH_NONE = 0, + CFGMECH_1, + CFGMECH_2, + CFGMECH_PCIE, +}; + +extern int cfgmech; + rman_res_t hostb_alloc_start(int type, rman_res_t start, rman_res_t end, rman_res_t count); int pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus); int pci_cfgregopen(void); Modified: stable/12/sys/x86/x86/legacy.c ============================================================================== --- stable/12/sys/x86/x86/legacy.c Tue Apr 16 17:12:27 2019 (r346283) +++ stable/12/sys/x86/x86/legacy.c Tue Apr 16 17:16:18 2019 (r346284) @@ -46,8 +46,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -111,10 +113,52 @@ legacy_probe(device_t dev) return (0); } +/* + * Grope around in the PCI config space to see if this is a chipset + * that is capable of doing memory-mapped config cycles. This also + * implies that it can do PCIe extended config cycles. + */ +static void +legacy_pci_cfgregopen(device_t dev) +{ + uint64_t pciebar; + u_int16_t did, vid; + + if (cfgmech == CFGMECH_NONE || cfgmech == CFGMECH_PCIE) + return; + + /* Check for supported chipsets */ + vid = pci_cfgregread(0, 0, 0, PCIR_VENDOR, 2); + did = pci_cfgregread(0, 0, 0, PCIR_DEVICE, 2); + switch (vid) { + case 0x8086: + switch (did) { + case 0x3590: + case 0x3592: + /* Intel 7520 or 7320 */ + pciebar = pci_cfgregread(0, 0, 0, 0xce, 2) << 16; + pcie_cfgregopen(pciebar, 0, 255); + break; + case 0x2580: + case 0x2584: + case 0x2590: + /* Intel 915, 925, or 915GM */ + pciebar = pci_cfgregread(0, 0, 0, 0x48, 4); + pcie_cfgregopen(pciebar, 0, 255); + break; + } + } + + if (bootverbose && cfgmech == CFGMECH_PCIE) + device_printf(dev, "Enabled ECAM PCIe accesses\n"); +} + static int legacy_attach(device_t dev) { device_t child; + + legacy_pci_cfgregopen(dev); /* * Let our child drivers identify any child devices that they From owner-svn-src-all@freebsd.org Tue Apr 16 17:33:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DA961578A03; Tue, 16 Apr 2019 17:33:10 +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 499826F81E; Tue, 16 Apr 2019 17:33:10 +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 184BB22E02; Tue, 16 Apr 2019 17:33:10 +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 x3GHXAGg034244; Tue, 16 Apr 2019 17:33:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GHX9RA034239; Tue, 16 Apr 2019 17:33:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904161733.x3GHX9RA034239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 16 Apr 2019 17:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346285 - stable/12/sys/fs/tmpfs X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/fs/tmpfs X-SVN-Commit-Revision: 346285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 499826F81E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:33:11 -0000 Author: kib Date: Tue Apr 16 17:33:08 2019 New Revision: 346285 URL: https://svnweb.freebsd.org/changeset/base/346285 Log: MFC r345425, r345514, r345799, r345800, r345803, r346157: Enable tmpfs rw->ro remounts. Modified: stable/12/sys/fs/tmpfs/tmpfs.h stable/12/sys/fs/tmpfs/tmpfs_fifoops.c stable/12/sys/fs/tmpfs/tmpfs_subr.c stable/12/sys/fs/tmpfs/tmpfs_vfsops.c stable/12/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs.h Tue Apr 16 17:16:18 2019 (r346284) +++ stable/12/sys/fs/tmpfs/tmpfs.h Tue Apr 16 17:33:08 2019 (r346285) @@ -325,6 +325,11 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node); */ struct tmpfs_mount { /* + * Original value of the "size" parameter, for reference purposes, + * mostly. + */ + off_t tm_size_max; + /* * Maximum number of memory pages available for use by the file * system, set during mount time. This variable must never be * used directly as it may be bigger than the current amount of @@ -432,8 +437,8 @@ void tmpfs_dir_destroy(struct tmpfs_mount *, struct tm struct tmpfs_dirent * tmpfs_dir_lookup(struct tmpfs_node *node, struct tmpfs_node *f, struct componentname *cnp); -int tmpfs_dir_getdents(struct tmpfs_node *, struct uio *, int, - u_long *, int *); +int tmpfs_dir_getdents(struct tmpfs_mount *, struct tmpfs_node *, + struct uio *, int, u_long *, int *); int tmpfs_dir_whiteout_add(struct vnode *, struct componentname *); void tmpfs_dir_whiteout_remove(struct vnode *, struct componentname *); int tmpfs_reg_resize(struct vnode *, off_t, boolean_t); @@ -447,7 +452,8 @@ int tmpfs_chtimes(struct vnode *, struct vattr *, stru void tmpfs_itimes(struct vnode *, const struct timespec *, const struct timespec *); -void tmpfs_set_status(struct tmpfs_node *node, int status); +void tmpfs_set_status(struct tmpfs_mount *tm, struct tmpfs_node *node, + int status); void tmpfs_update(struct vnode *); int tmpfs_truncate(struct vnode *, off_t); struct tmpfs_dirent *tmpfs_dir_first(struct tmpfs_node *dnode, Modified: stable/12/sys/fs/tmpfs/tmpfs_fifoops.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_fifoops.c Tue Apr 16 17:16:18 2019 (r346284) +++ stable/12/sys/fs/tmpfs/tmpfs_fifoops.c Tue Apr 16 17:33:08 2019 (r346285) @@ -56,7 +56,8 @@ tmpfs_fifo_close(struct vop_close_args *v) struct tmpfs_node *node; node = VP_TO_TMPFS_NODE(v->a_vp); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(VFS_TO_TMPFS(v->a_vp->v_mount), node, + TMPFS_NODE_ACCESSED); tmpfs_update(v->a_vp); return (fifo_specops.vop_close(v)); } Modified: stable/12/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_subr.c Tue Apr 16 17:16:18 2019 (r346284) +++ stable/12/sys/fs/tmpfs/tmpfs_subr.c Tue Apr 16 17:33:08 2019 (r346285) @@ -218,6 +218,8 @@ tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount */ return (EBUSY); } + if ((mp->mnt_kern_flag & MNT_RDONLY) != 0) + return (EROFS); nnode = (struct tmpfs_node *)uma_zalloc_arg(tmp->tm_node_pool, tmp, M_WAITOK); @@ -1108,7 +1110,8 @@ tmpfs_dir_destroy(struct tmpfs_mount *tmp, struct tmpf * error happens. */ static int -tmpfs_dir_getdotdent(struct tmpfs_node *node, struct uio *uio) +tmpfs_dir_getdotdent(struct tmpfs_mount *tm, struct tmpfs_node *node, + struct uio *uio) { int error; struct dirent dent; @@ -1128,7 +1131,7 @@ tmpfs_dir_getdotdent(struct tmpfs_node *node, struct u else error = uiomove(&dent, dent.d_reclen, uio); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(tm, node, TMPFS_NODE_ACCESSED); return (error); } @@ -1141,7 +1144,8 @@ tmpfs_dir_getdotdent(struct tmpfs_node *node, struct u * error happens. */ static int -tmpfs_dir_getdotdotdent(struct tmpfs_node *node, struct uio *uio) +tmpfs_dir_getdotdotdent(struct tmpfs_mount *tm, struct tmpfs_node *node, + struct uio *uio) { int error; struct dirent dent; @@ -1172,7 +1176,7 @@ tmpfs_dir_getdotdotdent(struct tmpfs_node *node, struc else error = uiomove(&dent, dent.d_reclen, uio); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(tm, node, TMPFS_NODE_ACCESSED); return (error); } @@ -1185,8 +1189,8 @@ tmpfs_dir_getdotdotdent(struct tmpfs_node *node, struc * error code if another error happens. */ int -tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, int maxcookies, - u_long *cookies, int *ncookies) +tmpfs_dir_getdents(struct tmpfs_mount *tm, struct tmpfs_node *node, + struct uio *uio, int maxcookies, u_long *cookies, int *ncookies) { struct tmpfs_dir_cursor dc; struct tmpfs_dirent *de; @@ -1207,7 +1211,7 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio */ switch (uio->uio_offset) { case TMPFS_DIRCOOKIE_DOT: - error = tmpfs_dir_getdotdent(node, uio); + error = tmpfs_dir_getdotdent(tm, node, uio); if (error != 0) return (error); uio->uio_offset = TMPFS_DIRCOOKIE_DOTDOT; @@ -1215,7 +1219,7 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio cookies[(*ncookies)++] = off = uio->uio_offset; /* FALLTHROUGH */ case TMPFS_DIRCOOKIE_DOTDOT: - error = tmpfs_dir_getdotdotdent(node, uio); + error = tmpfs_dir_getdotdotdent(tm, node, uio); if (error != 0) return (error); de = tmpfs_dir_first(node, &dc); @@ -1317,7 +1321,7 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio node->tn_dir.tn_readdir_lastn = off; node->tn_dir.tn_readdir_lastp = de; - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(tm, node, TMPFS_NODE_ACCESSED); return error; } @@ -1772,10 +1776,10 @@ tmpfs_chtimes(struct vnode *vp, struct vattr *vap, } void -tmpfs_set_status(struct tmpfs_node *node, int status) +tmpfs_set_status(struct tmpfs_mount *tm, struct tmpfs_node *node, int status) { - if ((node->tn_status & status) == status) + if ((node->tn_status & status) == status || tm->tm_ronly) return; TMPFS_NODE_LOCK(node); node->tn_status |= status; Modified: stable/12/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_vfsops.c Tue Apr 16 17:16:18 2019 (r346284) +++ stable/12/sys/fs/tmpfs/tmpfs_vfsops.c Tue Apr 16 17:33:08 2019 (r346285) @@ -57,10 +57,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include +#include +#include +#include #include #include @@ -88,7 +93,7 @@ static const char *tmpfs_opts[] = { }; static const char *tmpfs_updateopts[] = { - "from", "export", NULL + "from", "export", "size", NULL }; static int @@ -134,7 +139,228 @@ tmpfs_node_fini(void *mem, int size) mtx_destroy(&node->tn_interlock); } +/* + * Handle updates of time from writes to mmaped regions. Use + * MNT_VNODE_FOREACH_ALL instead of MNT_VNODE_FOREACH_ACTIVE, since + * unmap of the tmpfs-backed vnode does not call vinactive(), due to + * vm object type is OBJT_SWAP. + * If lazy, only handle delayed update of mtime due to the writes to + * mapped files. + */ +static void +tmpfs_update_mtime(struct mount *mp, bool lazy) +{ + struct vnode *vp, *mvp; + struct vm_object *obj; + + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if (vp->v_type != VREG) { + VI_UNLOCK(vp); + continue; + } + obj = vp->v_object; + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); + + /* + * In lazy case, do unlocked read, avoid taking vnode + * lock if not needed. Lost update will be handled on + * the next call. + * For non-lazy case, we must flush all pending + * metadata changes now. + */ + if (!lazy || (obj->flags & OBJ_TMPFS_DIRTY) != 0) { + if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, + curthread) != 0) + continue; + tmpfs_check_mtime(vp); + if (!lazy) + tmpfs_update(vp); + vput(vp); + } else { + VI_UNLOCK(vp); + continue; + } + } +} + +struct tmpfs_check_rw_maps_arg { + bool found; +}; + +static bool +tmpfs_check_rw_maps_cb(struct mount *mp __unused, vm_map_t map __unused, + vm_map_entry_t entry __unused, void *arg) +{ + struct tmpfs_check_rw_maps_arg *a; + + a = arg; + a->found = true; + return (true); +} + +/* + * Revoke write permissions from all mappings of regular files + * belonging to the specified tmpfs mount. + */ +static bool +tmpfs_revoke_rw_maps_cb(struct mount *mp __unused, vm_map_t map, + vm_map_entry_t entry, void *arg __unused) +{ + + /* + * XXXKIB: might be invalidate the mapping + * instead ? The process is not going to be + * happy in any case. + */ + entry->max_protection &= ~VM_PROT_WRITE; + if ((entry->protection & VM_PROT_WRITE) != 0) { + entry->protection &= ~VM_PROT_WRITE; + pmap_protect(map->pmap, entry->start, entry->end, + entry->protection); + } + return (false); +} + +static void +tmpfs_all_rw_maps(struct mount *mp, bool (*cb)(struct mount *mp, vm_map_t, + vm_map_entry_t, void *), void *cb_arg) +{ + struct proc *p; + struct vmspace *vm; + vm_map_t map; + vm_map_entry_t entry; + vm_object_t object; + struct vnode *vp; + int gen; + bool terminate; + + terminate = false; + sx_slock(&allproc_lock); +again: + gen = allproc_gen; + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state != PRS_NORMAL || (p->p_flag & (P_INEXEC | + P_SYSTEM | P_WEXIT)) != 0) { + PROC_UNLOCK(p); + continue; + } + vm = vmspace_acquire_ref(p); + _PHOLD_LITE(p); + PROC_UNLOCK(p); + if (vm == NULL) { + PRELE(p); + continue; + } + sx_sunlock(&allproc_lock); + map = &vm->vm_map; + + vm_map_lock(map); + if (map->busy) + vm_map_wait_busy(map); + for (entry = map->header.next; entry != &map->header; + entry = entry->next) { + if ((entry->eflags & (MAP_ENTRY_GUARD | + MAP_ENTRY_IS_SUB_MAP | MAP_ENTRY_COW)) != 0 || + (entry->max_protection & VM_PROT_WRITE) == 0) + continue; + object = entry->object.vm_object; + if (object == NULL || object->type != OBJT_SWAP || + (object->flags & OBJ_TMPFS_NODE) == 0) + continue; + /* + * No need to dig into shadow chain, mapping + * of the object not at top is readonly. + */ + + VM_OBJECT_RLOCK(object); + if (object->type == OBJT_DEAD) { + VM_OBJECT_RUNLOCK(object); + continue; + } + MPASS(object->ref_count > 1); + if ((object->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) != + (OBJ_TMPFS_NODE | OBJ_TMPFS)) { + VM_OBJECT_RUNLOCK(object); + continue; + } + vp = object->un_pager.swp.swp_tmpfs; + if (vp->v_mount != mp) { + VM_OBJECT_RUNLOCK(object); + continue; + } + + terminate = cb(mp, map, entry, cb_arg); + VM_OBJECT_RUNLOCK(object); + if (terminate) + break; + } + vm_map_unlock(map); + + vmspace_free(vm); + sx_slock(&allproc_lock); + PRELE(p); + if (terminate) + break; + } + if (!terminate && gen != allproc_gen) + goto again; + sx_sunlock(&allproc_lock); +} + +static bool +tmpfs_check_rw_maps(struct mount *mp) +{ + struct tmpfs_check_rw_maps_arg ca; + + ca.found = false; + tmpfs_all_rw_maps(mp, tmpfs_check_rw_maps_cb, &ca); + return (ca.found); +} + static int +tmpfs_rw_to_ro(struct mount *mp) +{ + int error, flags; + bool forced; + + forced = (mp->mnt_flag & MNT_FORCE) != 0; + flags = WRITECLOSE | (forced ? FORCECLOSE : 0); + + if ((error = vn_start_write(NULL, &mp, V_WAIT)) != 0) + return (error); + error = vfs_write_suspend_umnt(mp); + if (error != 0) + return (error); + if (!forced && tmpfs_check_rw_maps(mp)) { + error = EBUSY; + goto out; + } + VFS_TO_TMPFS(mp)->tm_ronly = 1; + MNT_ILOCK(mp); + mp->mnt_flag |= MNT_RDONLY; + MNT_IUNLOCK(mp); + for (;;) { + tmpfs_all_rw_maps(mp, tmpfs_revoke_rw_maps_cb, NULL); + tmpfs_update_mtime(mp, false); + error = vflush(mp, 0, flags, curthread); + if (error != 0) { + VFS_TO_TMPFS(mp)->tm_ronly = 0; + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_RDONLY; + MNT_IUNLOCK(mp); + goto out; + } + if (!tmpfs_check_rw_maps(mp)) + break; + } +out: + vfs_write_resume(mp, 0); + return (error); +} + +static int tmpfs_mount(struct mount *mp) { const size_t nodes_per_page = howmany(PAGE_SIZE, @@ -161,9 +387,29 @@ tmpfs_mount(struct mount *mp) /* Only support update mounts for certain options. */ if (vfs_filteropt(mp->mnt_optnew, tmpfs_updateopts) != 0) return (EOPNOTSUPP); - if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) != - ((struct tmpfs_mount *)mp->mnt_data)->tm_ronly) - return (EOPNOTSUPP); + if (vfs_getopt_size(mp->mnt_optnew, "size", &size_max) == 0) { + /* + * On-the-fly resizing is not supported (yet). We still + * need to have "size" listed as "supported", otherwise + * trying to update fs that is listed in fstab with size + * parameter, say trying to change rw to ro or vice + * versa, would cause vfs_filteropt() to bail. + */ + if (size_max != VFS_TO_TMPFS(mp)->tm_size_max) + return (EOPNOTSUPP); + } + if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && + !(VFS_TO_TMPFS(mp)->tm_ronly)) { + /* RW -> RO */ + return (tmpfs_rw_to_ro(mp)); + } else if (!vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && + VFS_TO_TMPFS(mp)->tm_ronly) { + /* RO -> RW */ + VFS_TO_TMPFS(mp)->tm_ronly = 0; + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_RDONLY; + MNT_IUNLOCK(mp); + } return (0); } @@ -229,6 +475,7 @@ tmpfs_mount(struct mount *mp) tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX; LIST_INIT(&tmp->tm_nodes_used); + tmp->tm_size_max = size_max; tmp->tm_pages_max = pages; tmp->tm_pages_used = 0; new_unrhdr64(&tmp->tm_ino_unr, 2); @@ -433,45 +680,13 @@ tmpfs_statfs(struct mount *mp, struct statfs *sbp) static int tmpfs_sync(struct mount *mp, int waitfor) { - struct vnode *vp, *mvp; - struct vm_object *obj; if (waitfor == MNT_SUSPEND) { MNT_ILOCK(mp); mp->mnt_kern_flag |= MNTK_SUSPEND2 | MNTK_SUSPENDED; MNT_IUNLOCK(mp); } else if (waitfor == MNT_LAZY) { - /* - * Handle lazy updates of mtime from writes to mmaped - * regions. Use MNT_VNODE_FOREACH_ALL instead of - * MNT_VNODE_FOREACH_ACTIVE, since unmap of the - * tmpfs-backed vnode does not call vinactive(), due - * to vm object type is OBJT_SWAP. - */ - MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { - if (vp->v_type != VREG) { - VI_UNLOCK(vp); - continue; - } - obj = vp->v_object; - KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == - (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); - - /* - * Unlocked read, avoid taking vnode lock if - * not needed. Lost update will be handled on - * the next call. - */ - if ((obj->flags & OBJ_TMPFS_DIRTY) == 0) { - VI_UNLOCK(vp); - continue; - } - if (vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, - curthread) != 0) - continue; - tmpfs_check_mtime(vp); - vput(vp); - } + tmpfs_update_mtime(mp, true); } return (0); } Modified: stable/12/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_vnops.c Tue Apr 16 17:16:18 2019 (r346284) +++ stable/12/sys/fs/tmpfs/tmpfs_vnops.c Tue Apr 16 17:33:08 2019 (r346285) @@ -481,7 +481,7 @@ tmpfs_read(struct vop_read_args *v) if (uio->uio_offset < 0) return (EINVAL); node = VP_TO_TMPFS_NODE(vp); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(VFS_TO_TMPFS(vp->v_mount), node, TMPFS_NODE_ACCESSED); return (uiomove_object(node->tn_reg.tn_aobj, node->tn_size, uio)); } @@ -1188,25 +1188,30 @@ tmpfs_symlink(struct vop_symlink_args *v) } static int -tmpfs_readdir(struct vop_readdir_args *v) +tmpfs_readdir(struct vop_readdir_args *va) { - struct vnode *vp = v->a_vp; - struct uio *uio = v->a_uio; - int *eofflag = v->a_eofflag; - u_long **cookies = v->a_cookies; - int *ncookies = v->a_ncookies; - - int error; - ssize_t startresid; - int maxcookies; + struct vnode *vp; + struct uio *uio; + struct tmpfs_mount *tm; struct tmpfs_node *node; + u_long **cookies; + int *eofflag, *ncookies; + ssize_t startresid; + int error, maxcookies; + vp = va->a_vp; + uio = va->a_uio; + eofflag = va->a_eofflag; + cookies = va->a_cookies; + ncookies = va->a_ncookies; + /* This operation only makes sense on directory nodes. */ if (vp->v_type != VDIR) return ENOTDIR; maxcookies = 0; node = VP_TO_TMPFS_DIR(vp); + tm = VFS_TO_TMPFS(vp->v_mount); startresid = uio->uio_resid; @@ -1220,9 +1225,9 @@ tmpfs_readdir(struct vop_readdir_args *v) } if (cookies == NULL) - error = tmpfs_dir_getdents(node, uio, 0, NULL, NULL); + error = tmpfs_dir_getdents(tm, node, uio, 0, NULL, NULL); else - error = tmpfs_dir_getdents(node, uio, maxcookies, *cookies, + error = tmpfs_dir_getdents(tm, node, uio, maxcookies, *cookies, ncookies); /* Buffer was filled without hitting EOF. */ @@ -1258,7 +1263,7 @@ tmpfs_readlink(struct vop_readlink_args *v) error = uiomove(node->tn_link, MIN(node->tn_size, uio->uio_resid), uio); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(VFS_TO_TMPFS(vp->v_mount), node, TMPFS_NODE_ACCESSED); return (error); } From owner-svn-src-all@freebsd.org Tue Apr 16 17:43:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBC711578D82; Tue, 16 Apr 2019 17:43:16 +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 625AD6FDE6; Tue, 16 Apr 2019 17:43:16 +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 39EBD22FB3; Tue, 16 Apr 2019 17:43:16 +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 x3GHhGD0039589; Tue, 16 Apr 2019 17:43:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GHhFsk039584; Tue, 16 Apr 2019 17:43:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904161743.x3GHhFsk039584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 16 Apr 2019 17:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346286 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/fs/tmpfs X-SVN-Commit-Revision: 346286 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 625AD6FDE6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:43:17 -0000 Author: kib Date: Tue Apr 16 17:43:14 2019 New Revision: 346286 URL: https://svnweb.freebsd.org/changeset/base/346286 Log: MFC r345425, r345514, r345799, r345800, r345803, r346157: Enable tmpfs rw->ro remounts. Modified: stable/11/sys/fs/tmpfs/tmpfs.h stable/11/sys/fs/tmpfs/tmpfs_fifoops.c stable/11/sys/fs/tmpfs/tmpfs_subr.c stable/11/sys/fs/tmpfs/tmpfs_vfsops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs.h Tue Apr 16 17:33:08 2019 (r346285) +++ stable/11/sys/fs/tmpfs/tmpfs.h Tue Apr 16 17:43:14 2019 (r346286) @@ -330,6 +330,11 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node); */ struct tmpfs_mount { /* + * Original value of the "size" parameter, for reference purposes, + * mostly. + */ + off_t tm_size_max; + /* * Maximum number of memory pages available for use by the file * system, set during mount time. This variable must never be * used directly as it may be bigger than the current amount of @@ -437,8 +442,8 @@ void tmpfs_dir_destroy(struct tmpfs_mount *, struct tm struct tmpfs_dirent * tmpfs_dir_lookup(struct tmpfs_node *node, struct tmpfs_node *f, struct componentname *cnp); -int tmpfs_dir_getdents(struct tmpfs_node *, struct uio *, int, - u_long *, int *); +int tmpfs_dir_getdents(struct tmpfs_mount *, struct tmpfs_node *, + struct uio *, int, u_long *, int *); int tmpfs_dir_whiteout_add(struct vnode *, struct componentname *); void tmpfs_dir_whiteout_remove(struct vnode *, struct componentname *); int tmpfs_reg_resize(struct vnode *, off_t, boolean_t); @@ -452,7 +457,8 @@ int tmpfs_chtimes(struct vnode *, struct vattr *, stru void tmpfs_itimes(struct vnode *, const struct timespec *, const struct timespec *); -void tmpfs_set_status(struct tmpfs_node *node, int status); +void tmpfs_set_status(struct tmpfs_mount *tm, struct tmpfs_node *node, + int status); void tmpfs_update(struct vnode *); int tmpfs_truncate(struct vnode *, off_t); struct tmpfs_dirent *tmpfs_dir_first(struct tmpfs_node *dnode, Modified: stable/11/sys/fs/tmpfs/tmpfs_fifoops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_fifoops.c Tue Apr 16 17:33:08 2019 (r346285) +++ stable/11/sys/fs/tmpfs/tmpfs_fifoops.c Tue Apr 16 17:43:14 2019 (r346286) @@ -54,7 +54,8 @@ tmpfs_fifo_close(struct vop_close_args *v) struct tmpfs_node *node; node = VP_TO_TMPFS_NODE(v->a_vp); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(VFS_TO_TMPFS(v->a_vp->v_mount), node, + TMPFS_NODE_ACCESSED); tmpfs_update(v->a_vp); return (fifo_specops.vop_close(v)); } Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Tue Apr 16 17:33:08 2019 (r346285) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Tue Apr 16 17:43:14 2019 (r346286) @@ -213,6 +213,8 @@ tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount */ return (EBUSY); } + if ((mp->mnt_kern_flag & MNT_RDONLY) != 0) + return (EROFS); nnode = (struct tmpfs_node *)uma_zalloc_arg(tmp->tm_node_pool, tmp, M_WAITOK); @@ -1104,7 +1106,8 @@ tmpfs_dir_destroy(struct tmpfs_mount *tmp, struct tmpf * error happens. */ static int -tmpfs_dir_getdotdent(struct tmpfs_node *node, struct uio *uio) +tmpfs_dir_getdotdent(struct tmpfs_mount *tm, struct tmpfs_node *node, + struct uio *uio) { int error; struct dirent dent; @@ -1124,7 +1127,7 @@ tmpfs_dir_getdotdent(struct tmpfs_node *node, struct u else error = uiomove(&dent, dent.d_reclen, uio); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(tm, node, TMPFS_NODE_ACCESSED); return (error); } @@ -1137,7 +1140,8 @@ tmpfs_dir_getdotdent(struct tmpfs_node *node, struct u * error happens. */ static int -tmpfs_dir_getdotdotdent(struct tmpfs_node *node, struct uio *uio) +tmpfs_dir_getdotdotdent(struct tmpfs_mount *tm, struct tmpfs_node *node, + struct uio *uio) { int error; struct dirent dent; @@ -1168,7 +1172,7 @@ tmpfs_dir_getdotdotdent(struct tmpfs_node *node, struc else error = uiomove(&dent, dent.d_reclen, uio); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(tm, node, TMPFS_NODE_ACCESSED); return (error); } @@ -1181,8 +1185,8 @@ tmpfs_dir_getdotdotdent(struct tmpfs_node *node, struc * error code if another error happens. */ int -tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, int maxcookies, - u_long *cookies, int *ncookies) +tmpfs_dir_getdents(struct tmpfs_mount *tm, struct tmpfs_node *node, + struct uio *uio, int maxcookies, u_long *cookies, int *ncookies) { struct tmpfs_dir_cursor dc; struct tmpfs_dirent *de; @@ -1203,7 +1207,7 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio */ switch (uio->uio_offset) { case TMPFS_DIRCOOKIE_DOT: - error = tmpfs_dir_getdotdent(node, uio); + error = tmpfs_dir_getdotdent(tm, node, uio); if (error != 0) return (error); uio->uio_offset = TMPFS_DIRCOOKIE_DOTDOT; @@ -1211,7 +1215,7 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio cookies[(*ncookies)++] = off = uio->uio_offset; /* FALLTHROUGH */ case TMPFS_DIRCOOKIE_DOTDOT: - error = tmpfs_dir_getdotdotdent(node, uio); + error = tmpfs_dir_getdotdotdent(tm, node, uio); if (error != 0) return (error); de = tmpfs_dir_first(node, &dc); @@ -1313,7 +1317,7 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio node->tn_dir.tn_readdir_lastn = off; node->tn_dir.tn_readdir_lastp = de; - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(tm, node, TMPFS_NODE_ACCESSED); return error; } @@ -1760,10 +1764,10 @@ tmpfs_chtimes(struct vnode *vp, struct vattr *vap, } void -tmpfs_set_status(struct tmpfs_node *node, int status) +tmpfs_set_status(struct tmpfs_mount *tm, struct tmpfs_node *node, int status) { - if ((node->tn_status & status) == status) + if ((node->tn_status & status) == status || tm->tm_ronly) return; TMPFS_NODE_LOCK(node); node->tn_status |= status; Modified: stable/11/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Tue Apr 16 17:33:08 2019 (r346285) +++ stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Tue Apr 16 17:43:14 2019 (r346286) @@ -52,9 +52,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include +#include +#include +#include #include #include @@ -82,7 +87,7 @@ static const char *tmpfs_opts[] = { }; static const char *tmpfs_updateopts[] = { - "from", "export", NULL + "from", "export", "size", NULL }; static int @@ -128,7 +133,228 @@ tmpfs_node_fini(void *mem, int size) mtx_destroy(&node->tn_interlock); } +/* + * Handle updates of time from writes to mmaped regions. Use + * MNT_VNODE_FOREACH_ALL instead of MNT_VNODE_FOREACH_ACTIVE, since + * unmap of the tmpfs-backed vnode does not call vinactive(), due to + * vm object type is OBJT_SWAP. + * If lazy, only handle delayed update of mtime due to the writes to + * mapped files. + */ +static void +tmpfs_update_mtime(struct mount *mp, bool lazy) +{ + struct vnode *vp, *mvp; + struct vm_object *obj; + + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if (vp->v_type != VREG) { + VI_UNLOCK(vp); + continue; + } + obj = vp->v_object; + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); + + /* + * In lazy case, do unlocked read, avoid taking vnode + * lock if not needed. Lost update will be handled on + * the next call. + * For non-lazy case, we must flush all pending + * metadata changes now. + */ + if (!lazy || (obj->flags & OBJ_TMPFS_DIRTY) != 0) { + if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, + curthread) != 0) + continue; + tmpfs_check_mtime(vp); + if (!lazy) + tmpfs_update(vp); + vput(vp); + } else { + VI_UNLOCK(vp); + continue; + } + } +} + +struct tmpfs_check_rw_maps_arg { + bool found; +}; + +static bool +tmpfs_check_rw_maps_cb(struct mount *mp __unused, vm_map_t map __unused, + vm_map_entry_t entry __unused, void *arg) +{ + struct tmpfs_check_rw_maps_arg *a; + + a = arg; + a->found = true; + return (true); +} + +/* + * Revoke write permissions from all mappings of regular files + * belonging to the specified tmpfs mount. + */ +static bool +tmpfs_revoke_rw_maps_cb(struct mount *mp __unused, vm_map_t map, + vm_map_entry_t entry, void *arg __unused) +{ + + /* + * XXXKIB: might be invalidate the mapping + * instead ? The process is not going to be + * happy in any case. + */ + entry->max_protection &= ~VM_PROT_WRITE; + if ((entry->protection & VM_PROT_WRITE) != 0) { + entry->protection &= ~VM_PROT_WRITE; + pmap_protect(map->pmap, entry->start, entry->end, + entry->protection); + } + return (false); +} + +static void +tmpfs_all_rw_maps(struct mount *mp, bool (*cb)(struct mount *mp, vm_map_t, + vm_map_entry_t, void *), void *cb_arg) +{ + struct proc *p; + struct vmspace *vm; + vm_map_t map; + vm_map_entry_t entry; + vm_object_t object; + struct vnode *vp; + int gen; + bool terminate; + + terminate = false; + sx_slock(&allproc_lock); +again: + gen = allproc_gen; + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state != PRS_NORMAL || (p->p_flag & (P_INEXEC | + P_SYSTEM | P_WEXIT)) != 0) { + PROC_UNLOCK(p); + continue; + } + vm = vmspace_acquire_ref(p); + _PHOLD_LITE(p); + PROC_UNLOCK(p); + if (vm == NULL) { + PRELE(p); + continue; + } + sx_sunlock(&allproc_lock); + map = &vm->vm_map; + + vm_map_lock(map); + if (map->busy) + vm_map_wait_busy(map); + for (entry = map->header.next; entry != &map->header; + entry = entry->next) { + if ((entry->eflags & (MAP_ENTRY_GUARD | + MAP_ENTRY_IS_SUB_MAP | MAP_ENTRY_COW)) != 0 || + (entry->max_protection & VM_PROT_WRITE) == 0) + continue; + object = entry->object.vm_object; + if (object == NULL || object->type != OBJT_SWAP || + (object->flags & OBJ_TMPFS_NODE) == 0) + continue; + /* + * No need to dig into shadow chain, mapping + * of the object not at top is readonly. + */ + + VM_OBJECT_RLOCK(object); + if (object->type == OBJT_DEAD) { + VM_OBJECT_RUNLOCK(object); + continue; + } + MPASS(object->ref_count > 1); + if ((object->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) != + (OBJ_TMPFS_NODE | OBJ_TMPFS)) { + VM_OBJECT_RUNLOCK(object); + continue; + } + vp = object->un_pager.swp.swp_tmpfs; + if (vp->v_mount != mp) { + VM_OBJECT_RUNLOCK(object); + continue; + } + + terminate = cb(mp, map, entry, cb_arg); + VM_OBJECT_RUNLOCK(object); + if (terminate) + break; + } + vm_map_unlock(map); + + vmspace_free(vm); + sx_slock(&allproc_lock); + PRELE(p); + if (terminate) + break; + } + if (!terminate && gen != allproc_gen) + goto again; + sx_sunlock(&allproc_lock); +} + +static bool +tmpfs_check_rw_maps(struct mount *mp) +{ + struct tmpfs_check_rw_maps_arg ca; + + ca.found = false; + tmpfs_all_rw_maps(mp, tmpfs_check_rw_maps_cb, &ca); + return (ca.found); +} + static int +tmpfs_rw_to_ro(struct mount *mp) +{ + int error, flags; + bool forced; + + forced = (mp->mnt_flag & MNT_FORCE) != 0; + flags = WRITECLOSE | (forced ? FORCECLOSE : 0); + + if ((error = vn_start_write(NULL, &mp, V_WAIT)) != 0) + return (error); + error = vfs_write_suspend_umnt(mp); + if (error != 0) + return (error); + if (!forced && tmpfs_check_rw_maps(mp)) { + error = EBUSY; + goto out; + } + VFS_TO_TMPFS(mp)->tm_ronly = 1; + MNT_ILOCK(mp); + mp->mnt_flag |= MNT_RDONLY; + MNT_IUNLOCK(mp); + for (;;) { + tmpfs_all_rw_maps(mp, tmpfs_revoke_rw_maps_cb, NULL); + tmpfs_update_mtime(mp, false); + error = vflush(mp, 0, flags, curthread); + if (error != 0) { + VFS_TO_TMPFS(mp)->tm_ronly = 0; + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_RDONLY; + MNT_IUNLOCK(mp); + goto out; + } + if (!tmpfs_check_rw_maps(mp)) + break; + } +out: + vfs_write_resume(mp, 0); + return (error); +} + +static int tmpfs_mount(struct mount *mp) { const size_t nodes_per_page = howmany(PAGE_SIZE, @@ -159,9 +385,29 @@ tmpfs_mount(struct mount *mp) /* Only support update mounts for certain options. */ if (vfs_filteropt(mp->mnt_optnew, tmpfs_updateopts) != 0) return (EOPNOTSUPP); - if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) != - ((struct tmpfs_mount *)mp->mnt_data)->tm_ronly) - return (EOPNOTSUPP); + if (vfs_getopt_size(mp->mnt_optnew, "size", &size_max) == 0) { + /* + * On-the-fly resizing is not supported (yet). We still + * need to have "size" listed as "supported", otherwise + * trying to update fs that is listed in fstab with size + * parameter, say trying to change rw to ro or vice + * versa, would cause vfs_filteropt() to bail. + */ + if (size_max != VFS_TO_TMPFS(mp)->tm_size_max) + return (EOPNOTSUPP); + } + if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && + !(VFS_TO_TMPFS(mp)->tm_ronly)) { + /* RW -> RO */ + return (tmpfs_rw_to_ro(mp)); + } else if (!vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && + VFS_TO_TMPFS(mp)->tm_ronly) { + /* RO -> RW */ + VFS_TO_TMPFS(mp)->tm_ronly = 0; + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_RDONLY; + MNT_IUNLOCK(mp); + } return (0); } @@ -227,6 +473,7 @@ tmpfs_mount(struct mount *mp) tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX; LIST_INIT(&tmp->tm_nodes_used); + tmp->tm_size_max = size_max; tmp->tm_pages_max = pages; tmp->tm_pages_used = 0; tmp->tm_ino_unr = new_unrhdr(2, INT_MAX, &tmp->tm_allnode_lock); @@ -433,45 +680,13 @@ tmpfs_statfs(struct mount *mp, struct statfs *sbp) static int tmpfs_sync(struct mount *mp, int waitfor) { - struct vnode *vp, *mvp; - struct vm_object *obj; if (waitfor == MNT_SUSPEND) { MNT_ILOCK(mp); mp->mnt_kern_flag |= MNTK_SUSPEND2 | MNTK_SUSPENDED; MNT_IUNLOCK(mp); } else if (waitfor == MNT_LAZY) { - /* - * Handle lazy updates of mtime from writes to mmaped - * regions. Use MNT_VNODE_FOREACH_ALL instead of - * MNT_VNODE_FOREACH_ACTIVE, since unmap of the - * tmpfs-backed vnode does not call vinactive(), due - * to vm object type is OBJT_SWAP. - */ - MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { - if (vp->v_type != VREG) { - VI_UNLOCK(vp); - continue; - } - obj = vp->v_object; - KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == - (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); - - /* - * Unlocked read, avoid taking vnode lock if - * not needed. Lost update will be handled on - * the next call. - */ - if ((obj->flags & OBJ_TMPFS_DIRTY) == 0) { - VI_UNLOCK(vp); - continue; - } - if (vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, - curthread) != 0) - continue; - tmpfs_check_mtime(vp); - vput(vp); - } + tmpfs_update_mtime(mp, true); } return (0); } Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.c Tue Apr 16 17:33:08 2019 (r346285) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.c Tue Apr 16 17:43:14 2019 (r346286) @@ -475,7 +475,7 @@ tmpfs_read(struct vop_read_args *v) if (uio->uio_offset < 0) return (EINVAL); node = VP_TO_TMPFS_NODE(vp); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(VFS_TO_TMPFS(vp->v_mount), node, TMPFS_NODE_ACCESSED); return (uiomove_object(node->tn_reg.tn_aobj, node->tn_size, uio)); } @@ -1182,25 +1182,30 @@ tmpfs_symlink(struct vop_symlink_args *v) } static int -tmpfs_readdir(struct vop_readdir_args *v) +tmpfs_readdir(struct vop_readdir_args *va) { - struct vnode *vp = v->a_vp; - struct uio *uio = v->a_uio; - int *eofflag = v->a_eofflag; - u_long **cookies = v->a_cookies; - int *ncookies = v->a_ncookies; - - int error; - ssize_t startresid; - int maxcookies; + struct vnode *vp; + struct uio *uio; + struct tmpfs_mount *tm; struct tmpfs_node *node; + u_long **cookies; + int *eofflag, *ncookies; + ssize_t startresid; + int error, maxcookies; + vp = va->a_vp; + uio = va->a_uio; + eofflag = va->a_eofflag; + cookies = va->a_cookies; + ncookies = va->a_ncookies; + /* This operation only makes sense on directory nodes. */ if (vp->v_type != VDIR) return ENOTDIR; maxcookies = 0; node = VP_TO_TMPFS_DIR(vp); + tm = VFS_TO_TMPFS(vp->v_mount); startresid = uio->uio_resid; @@ -1214,9 +1219,9 @@ tmpfs_readdir(struct vop_readdir_args *v) } if (cookies == NULL) - error = tmpfs_dir_getdents(node, uio, 0, NULL, NULL); + error = tmpfs_dir_getdents(tm, node, uio, 0, NULL, NULL); else - error = tmpfs_dir_getdents(node, uio, maxcookies, *cookies, + error = tmpfs_dir_getdents(tm, node, uio, maxcookies, *cookies, ncookies); /* Buffer was filled without hitting EOF. */ @@ -1252,7 +1257,7 @@ tmpfs_readlink(struct vop_readlink_args *v) error = uiomove(node->tn_link, MIN(node->tn_size, uio->uio_resid), uio); - tmpfs_set_status(node, TMPFS_NODE_ACCESSED); + tmpfs_set_status(VFS_TO_TMPFS(vp->v_mount), node, TMPFS_NODE_ACCESSED); return (error); } From owner-svn-src-all@freebsd.org Tue Apr 16 17:47:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 319C61578E5F for ; Tue, 16 Apr 2019 17:47:54 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96B0A6FF95 for ; Tue, 16 Apr 2019 17:47:53 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1555436870; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=OxqwVH4usXF2XJRn19drMusB2G97FBOczk3qkF1b5F+9WimQg5fOtk1qKfWcmlVQzO7OOLFQtQ4UP DP9DVdIEDuBB34RjRgQNRYrfsjUmuE6S/Yyde3/dkkonZa5k8XqLleILCE2+epZUsuKsd4Hqno5GwO xRJLEM8mMXX/Iuw3/wgwTNrIwpTxAhxxFOSVah8nAiEYf2jpevBAFh9PSCp+uQ8ZQMxIJK6Jo1ICdZ iUgl91/O6wPT95atYbxCmkIERuFVS4d/xDpXGvzRO4MVYoE5otUYaxyedGZEyt79otZ4EzqXwSyWFZ gSU8V+DBxkr7rt+dsChzM/qToLwE5oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=UDDuVMnJpcid1uDWmWisJHMRzVrfVzcw3+OtKIXYSkQ=; b=nTKC5gll5+teIOxnfJ5Tl361zgJwzkv6l3NPNbSOAbZgIHcw3CrB7BU1x0QOvnkXwwb/W0yYnYcib NolwdZSSG4/DFab3iOQVw25hIDTqKL5ehiNvZGvUxgFIcIWwHdSWrizYW0XU2MbwVamBYlqRULGbr1 4J9W1njdAJEnF4VKu4ZoNg40KGX9AAgNP1Z+YZLIVokDvFcqJqk7xXtE0m0zV+3gRAFbB73P6sV8Mr xwmB0ax85l/2r35RzqqZFUVD3STl5nYS3txjGUDV1isoL5d+A9H2wMiChh6glzFixKgXwWyB37NVLH SNXsqqxk4gGqrnTnpWQGLJmtSfXQG+w== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=UDDuVMnJpcid1uDWmWisJHMRzVrfVzcw3+OtKIXYSkQ=; b=CWi4PMhsg29fXsT5HHW/sQ5QqsGz0JZcFivevBxgsm0mzWcR2loIZYelBo8zylYZjpHxEaCvs7fa/ WAe4riAysceBMZ6qLndNmfWWtVb3QVnAi0haZAVS79siuTT6mFWWXQDbEdTHbMp5RhFDWXS1dkFcTW w128+twsIlR1eW+rEiY6Cot59+sPJKiaGuqyPRTgOiDDqL+xKm51UBRruQrTpHeVSTMKZ7RdGcWvDW OzaBr0w2p8H6YZsXZG1lFkqeYRoFNHgc5z3IyJbpd0dAF2Q4CLY+sWQqDtzf97dhyY2vxlpRs4lTko VepffHKkOAK+w7pJ8ek8Fgd2urUk4cw== X-MHO-RoutePath: aGlwcGll X-MHO-User: bd7c0d4a-606f-11e9-908b-352056dbf2de X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id bd7c0d4a-606f-11e9-908b-352056dbf2de; Tue, 16 Apr 2019 17:47:46 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3GHlisQ043599; Tue, 16 Apr 2019 11:47:44 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <0aedf8b8c91c2f9f76249c0a13e971fbb9aac16a.camel@freebsd.org> Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys From: Ian Lepore To: cem@freebsd.org, Warner Losh Cc: src-committers , svn-src-all , svn-src-head Date: Tue, 16 Apr 2019 11:47:44 -0600 In-Reply-To: References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <20190416150352.c604a280368ccb2992a861e8@bidouilliste.com> <310a420ee0b9e12249979d89dc4fa0d4cac5a8dc.camel@freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 96B0A6FF95 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.997,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:47:54 -0000 On Tue, 2019-04-16 at 09:58 -0700, Conrad Meyer wrote: > Systems lacking both an NV store and an entropy source available > during mi_startup (i.e., not interrupts...) cannot safely provide > entropy in early boot. On those systems, we must disable random > consumption during early boot. Or you could remember that one of the core unix philosphies is "tools, not policy" and leave it to embedded systems developers to decide for themselves what's "safe" or not. Not every application needs cryptographic strength entropy, especially for things like retrying after a short random delay or generating a random MAC address or whatever. -- Ian From owner-svn-src-all@freebsd.org Tue Apr 16 17:54:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A7CE1579037; Tue, 16 Apr 2019 17:54:52 +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 2709F703FD; Tue, 16 Apr 2019 17:54:52 +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 0044C23174; Tue, 16 Apr 2019 17:54:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GHspDN044855; Tue, 16 Apr 2019 17:54:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GHspIg044854; Tue, 16 Apr 2019 17:54:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904161754.x3GHspIg044854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 16 Apr 2019 17:54: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: r346287 - stable/12/sys/fs/msdosfs X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/fs/msdosfs X-SVN-Commit-Revision: 346287 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2709F703FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:54:52 -0000 Author: kib Date: Tue Apr 16 17:54:51 2019 New Revision: 346287 URL: https://svnweb.freebsd.org/changeset/base/346287 Log: MFC r346064: Fix dirty buf exhaustion easily triggered with msdosfs. Modified: stable/12/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- stable/12/sys/fs/msdosfs/msdosfs_fat.c Tue Apr 16 17:43:14 2019 (r346286) +++ stable/12/sys/fs/msdosfs/msdosfs_fat.c Tue Apr 16 17:54:51 2019 (r346287) @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -979,6 +980,7 @@ extendfile(struct denode *dep, u_long count, struct bu u_long cn, got; struct msdosfsmount *pmp = dep->de_pmp; struct buf *bp; + struct vop_fsync_args fsync_ap; daddr_t blkno; /* @@ -1086,8 +1088,16 @@ extendfile(struct denode *dep, u_long count, struct bu if (bpp) { *bpp = bp; bpp = NULL; - } else + } else { bdwrite(bp); + } + if (vm_page_count_severe() || + buf_dirty_count_severe()) { + fsync_ap.a_vp = DETOV(dep); + fsync_ap.a_waitfor = MNT_WAIT; + fsync_ap.a_td = curthread; + vop_stdfsync(&fsync_ap); + } } } } From owner-svn-src-all@freebsd.org Tue Apr 16 17:55:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0105915790A7; Tue, 16 Apr 2019 17:55:56 +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 94C8970552; Tue, 16 Apr 2019 17:55:55 +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 6F32C23175; Tue, 16 Apr 2019 17:55:55 +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 x3GHtt9p044982; Tue, 16 Apr 2019 17:55:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GHts83044976; Tue, 16 Apr 2019 17:55:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904161755.x3GHts83044976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 16 Apr 2019 17:55:54 +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: r346288 - in stable/12/sys: fs/fuse fs/msdosfs kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: fs/fuse fs/msdosfs kern sys X-SVN-Commit-Revision: 346288 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 94C8970552 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:55:56 -0000 Author: kib Date: Tue Apr 16 17:55:54 2019 New Revision: 346288 URL: https://svnweb.freebsd.org/changeset/base/346288 Log: MFC r346065: Add vn_fsync_buf(). Modified: stable/12/sys/fs/fuse/fuse_io.c stable/12/sys/fs/msdosfs/msdosfs_fat.c stable/12/sys/kern/vfs_default.c stable/12/sys/kern/vfs_vnops.c stable/12/sys/sys/vnode.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/fuse/fuse_io.c ============================================================================== --- stable/12/sys/fs/fuse/fuse_io.c Tue Apr 16 17:54:51 2019 (r346287) +++ stable/12/sys/fs/fuse/fuse_io.c Tue Apr 16 17:55:54 2019 (r346288) @@ -744,13 +744,8 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp) int fuse_io_flushbuf(struct vnode *vp, int waitfor, struct thread *td) { - struct vop_fsync_args a = { - .a_vp = vp, - .a_waitfor = waitfor, - .a_td = td, - }; - return (vop_stdfsync(&a)); + return (vn_fsync_buf(vp, waitfor)); } /* Modified: stable/12/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- stable/12/sys/fs/msdosfs/msdosfs_fat.c Tue Apr 16 17:54:51 2019 (r346287) +++ stable/12/sys/fs/msdosfs/msdosfs_fat.c Tue Apr 16 17:55:54 2019 (r346288) @@ -980,7 +980,6 @@ extendfile(struct denode *dep, u_long count, struct bu u_long cn, got; struct msdosfsmount *pmp = dep->de_pmp; struct buf *bp; - struct vop_fsync_args fsync_ap; daddr_t blkno; /* @@ -1092,12 +1091,8 @@ extendfile(struct denode *dep, u_long count, struct bu bdwrite(bp); } if (vm_page_count_severe() || - buf_dirty_count_severe()) { - fsync_ap.a_vp = DETOV(dep); - fsync_ap.a_waitfor = MNT_WAIT; - fsync_ap.a_td = curthread; - vop_stdfsync(&fsync_ap); - } + buf_dirty_count_severe()) + vn_fsync_buf(DETOV(dep), MNT_WAIT); } } } Modified: stable/12/sys/kern/vfs_default.c ============================================================================== --- stable/12/sys/kern/vfs_default.c Tue Apr 16 17:54:51 2019 (r346287) +++ stable/12/sys/kern/vfs_default.c Tue Apr 16 17:55:54 2019 (r346288) @@ -638,98 +638,8 @@ vop_stdfsync(ap) struct thread *a_td; } */ *ap; { - struct vnode *vp; - struct buf *bp, *nbp; - struct bufobj *bo; - struct mount *mp; - int error, maxretry; - error = 0; - maxretry = 10000; /* large, arbitrarily chosen */ - vp = ap->a_vp; - mp = NULL; - if (vp->v_type == VCHR) { - VI_LOCK(vp); - mp = vp->v_rdev->si_mountpt; - VI_UNLOCK(vp); - } - bo = &vp->v_bufobj; - BO_LOCK(bo); -loop1: - /* - * MARK/SCAN initialization to avoid infinite loops. - */ - TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) { - bp->b_vflags &= ~BV_SCANNED; - bp->b_error = 0; - } - - /* - * Flush all dirty buffers associated with a vnode. - */ -loop2: - TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) { - if ((bp->b_vflags & BV_SCANNED) != 0) - continue; - bp->b_vflags |= BV_SCANNED; - if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL)) { - if (ap->a_waitfor != MNT_WAIT) - continue; - if (BUF_LOCK(bp, - LK_EXCLUSIVE | LK_INTERLOCK | LK_SLEEPFAIL, - BO_LOCKPTR(bo)) != 0) { - BO_LOCK(bo); - goto loop1; - } - BO_LOCK(bo); - } - BO_UNLOCK(bo); - KASSERT(bp->b_bufobj == bo, - ("bp %p wrong b_bufobj %p should be %p", - bp, bp->b_bufobj, bo)); - if ((bp->b_flags & B_DELWRI) == 0) - panic("fsync: not dirty"); - if ((vp->v_object != NULL) && (bp->b_flags & B_CLUSTEROK)) { - vfs_bio_awrite(bp); - } else { - bremfree(bp); - bawrite(bp); - } - if (maxretry < 1000) - pause("dirty", hz < 1000 ? 1 : hz / 1000); - BO_LOCK(bo); - goto loop2; - } - - /* - * If synchronous the caller expects us to completely resolve all - * dirty buffers in the system. Wait for in-progress I/O to - * complete (which could include background bitmap writes), then - * retry if dirty blocks still exist. - */ - if (ap->a_waitfor == MNT_WAIT) { - bufobj_wwait(bo, 0, 0); - if (bo->bo_dirty.bv_cnt > 0) { - /* - * If we are unable to write any of these buffers - * then we fail now rather than trying endlessly - * to write them out. - */ - TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) - if ((error = bp->b_error) != 0) - break; - if ((mp != NULL && mp->mnt_secondary_writes > 0) || - (error == 0 && --maxretry >= 0)) - goto loop1; - if (error == 0) - error = EAGAIN; - } - } - BO_UNLOCK(bo); - if (error != 0) - vn_printf(vp, "fsync: giving up on dirty (error = %d) ", error); - - return (error); + return (vn_fsync_buf(ap->a_vp, ap->a_waitfor)); } static int @@ -742,12 +652,8 @@ vop_stdfdatasync(struct vop_fdatasync_args *ap) int vop_stdfdatasync_buf(struct vop_fdatasync_args *ap) { - struct vop_fsync_args apf; - apf.a_vp = ap->a_vp; - apf.a_waitfor = MNT_WAIT; - apf.a_td = ap->a_td; - return (vop_stdfsync(&apf)); + return (vn_fsync_buf(ap->a_vp, MNT_WAIT)); } /* XXX Needs good comment and more info in the manpage (VOP_GETPAGES(9)). */ Modified: stable/12/sys/kern/vfs_vnops.c ============================================================================== --- stable/12/sys/kern/vfs_vnops.c Tue Apr 16 17:54:51 2019 (r346287) +++ stable/12/sys/kern/vfs_vnops.c Tue Apr 16 17:55:54 2019 (r346288) @@ -2490,3 +2490,98 @@ vn_fsid(struct vnode *vp, struct vattr *va) va->va_fsid <<= sizeof(f->val[1]) * NBBY; va->va_fsid += (uint32_t)f->val[0]; } + +int +vn_fsync_buf(struct vnode *vp, int waitfor) +{ + struct buf *bp, *nbp; + struct bufobj *bo; + struct mount *mp; + int error, maxretry; + + error = 0; + maxretry = 10000; /* large, arbitrarily chosen */ + mp = NULL; + if (vp->v_type == VCHR) { + VI_LOCK(vp); + mp = vp->v_rdev->si_mountpt; + VI_UNLOCK(vp); + } + bo = &vp->v_bufobj; + BO_LOCK(bo); +loop1: + /* + * MARK/SCAN initialization to avoid infinite loops. + */ + TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) { + bp->b_vflags &= ~BV_SCANNED; + bp->b_error = 0; + } + + /* + * Flush all dirty buffers associated with a vnode. + */ +loop2: + TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) { + if ((bp->b_vflags & BV_SCANNED) != 0) + continue; + bp->b_vflags |= BV_SCANNED; + if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL)) { + if (waitfor != MNT_WAIT) + continue; + if (BUF_LOCK(bp, + LK_EXCLUSIVE | LK_INTERLOCK | LK_SLEEPFAIL, + BO_LOCKPTR(bo)) != 0) { + BO_LOCK(bo); + goto loop1; + } + BO_LOCK(bo); + } + BO_UNLOCK(bo); + KASSERT(bp->b_bufobj == bo, + ("bp %p wrong b_bufobj %p should be %p", + bp, bp->b_bufobj, bo)); + if ((bp->b_flags & B_DELWRI) == 0) + panic("fsync: not dirty"); + if ((vp->v_object != NULL) && (bp->b_flags & B_CLUSTEROK)) { + vfs_bio_awrite(bp); + } else { + bremfree(bp); + bawrite(bp); + } + if (maxretry < 1000) + pause("dirty", hz < 1000 ? 1 : hz / 1000); + BO_LOCK(bo); + goto loop2; + } + + /* + * If synchronous the caller expects us to completely resolve all + * dirty buffers in the system. Wait for in-progress I/O to + * complete (which could include background bitmap writes), then + * retry if dirty blocks still exist. + */ + if (waitfor == MNT_WAIT) { + bufobj_wwait(bo, 0, 0); + if (bo->bo_dirty.bv_cnt > 0) { + /* + * If we are unable to write any of these buffers + * then we fail now rather than trying endlessly + * to write them out. + */ + TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) + if ((error = bp->b_error) != 0) + break; + if ((mp != NULL && mp->mnt_secondary_writes > 0) || + (error == 0 && --maxretry >= 0)) + goto loop1; + if (error == 0) + error = EAGAIN; + } + } + BO_UNLOCK(bo); + if (error != 0) + vn_printf(vp, "fsync: giving up on dirty (error = %d) ", error); + + return (error); +} Modified: stable/12/sys/sys/vnode.h ============================================================================== --- stable/12/sys/sys/vnode.h Tue Apr 16 17:54:51 2019 (r346287) +++ stable/12/sys/sys/vnode.h Tue Apr 16 17:55:54 2019 (r346288) @@ -669,6 +669,7 @@ int vn_close(struct vnode *vp, int flags, struct ucred *file_cred, struct thread *td); void vn_finished_write(struct mount *mp); void vn_finished_secondary_write(struct mount *mp); +int vn_fsync_buf(struct vnode *vp, int waitfor); int vn_isdisk(struct vnode *vp, int *errp); int _vn_lock(struct vnode *vp, int flags, char *file, int line); #define vn_lock(vp, flags) _vn_lock(vp, flags, __FILE__, __LINE__) From owner-svn-src-all@freebsd.org Tue Apr 16 17:56:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 155CC157914C; Tue, 16 Apr 2019 17:56:54 +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 AF9C6706D4; Tue, 16 Apr 2019 17:56:53 +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 8965123177; Tue, 16 Apr 2019 17:56:53 +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 x3GHurpV045078; Tue, 16 Apr 2019 17:56:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GHurUA045077; Tue, 16 Apr 2019 17:56:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904161756.x3GHurUA045077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 16 Apr 2019 17:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346289 - stable/11/sys/fs/msdosfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/fs/msdosfs X-SVN-Commit-Revision: 346289 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF9C6706D4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 17:56:54 -0000 Author: kib Date: Tue Apr 16 17:56:53 2019 New Revision: 346289 URL: https://svnweb.freebsd.org/changeset/base/346289 Log: MFC r346064: Fix dirty buf exhaustion easily triggered with msdosfs. Modified: stable/11/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- stable/11/sys/fs/msdosfs/msdosfs_fat.c Tue Apr 16 17:55:54 2019 (r346288) +++ stable/11/sys/fs/msdosfs/msdosfs_fat.c Tue Apr 16 17:56:53 2019 (r346289) @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -977,6 +978,7 @@ extendfile(struct denode *dep, u_long count, struct bu u_long cn, got; struct msdosfsmount *pmp = dep->de_pmp; struct buf *bp; + struct vop_fsync_args fsync_ap; daddr_t blkno; /* @@ -1086,8 +1088,16 @@ extendfile(struct denode *dep, u_long count, struct bu if (bpp) { *bpp = bp; bpp = NULL; - } else + } else { bdwrite(bp); + } + if (vm_page_count_severe() || + buf_dirty_count_severe()) { + fsync_ap.a_vp = DETOV(dep); + fsync_ap.a_waitfor = MNT_WAIT; + fsync_ap.a_td = curthread; + vop_stdfsync(&fsync_ap); + } } } } From owner-svn-src-all@freebsd.org Tue Apr 16 18:31:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ACDC1579DE5; Tue, 16 Apr 2019 18:31:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 E40D571BB4; Tue, 16 Apr 2019 18:31:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0D5C236CE; Tue, 16 Apr 2019 18:31:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GIVehb066447; Tue, 16 Apr 2019 18:31:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GIVe6q066446; Tue, 16 Apr 2019 18:31:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904161831.x3GIVe6q066446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 Apr 2019 18:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346290 - stable/12/sys/cam X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam X-SVN-Commit-Revision: 346290 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E40D571BB4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 18:31:41 -0000 Author: mav Date: Tue Apr 16 18:31:40 2019 New Revision: 346290 URL: https://svnweb.freebsd.org/changeset/base/346290 Log: MFC r345805: Unify SCSI_STATUS_BUSY retry handling with other cases. - Do not retry if periph was invalidated. - Do not decrement retry_count if already zero. - Report action_string when applicable. Modified: stable/12/sys/cam/cam_periph.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/cam_periph.c ============================================================================== --- stable/12/sys/cam/cam_periph.c Tue Apr 16 17:56:53 2019 (r346289) +++ stable/12/sys/cam/cam_periph.c Tue Apr 16 18:31:40 2019 (r346290) @@ -1448,6 +1448,7 @@ camperiphscsistatuserror(union ccb *ccb, union ccb **o int *openings, u_int32_t *relsim_flags, u_int32_t *timeout, u_int32_t *action, const char **action_string) { + struct cam_periph *periph; int error; switch (ccb->csio.scsi_status) { @@ -1530,14 +1531,21 @@ camperiphscsistatuserror(union ccb *ccb, union ccb **o * Restart the queue after either another * command completes or a 1 second timeout. */ - if ((sense_flags & SF_RETRY_BUSY) != 0 || - (ccb->ccb_h.retry_count--) > 0) { + periph = xpt_path_periph(ccb->ccb_h.path); + if (periph->flags & CAM_PERIPH_INVALID) { + error = EIO; + *action_string = "Periph was invalidated"; + } else if ((sense_flags & SF_RETRY_BUSY) != 0 || + ccb->ccb_h.retry_count > 0) { + if ((sense_flags & SF_RETRY_BUSY) == 0) + ccb->ccb_h.retry_count--; error = ERESTART; *relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT | RELSIM_RELEASE_AFTER_CMDCMPLT; *timeout = 1000; } else { error = EIO; + *action_string = "Retries exhausted"; } break; case SCSI_STATUS_RESERV_CONFLICT: From owner-svn-src-all@freebsd.org Tue Apr 16 18:32:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46AED1579E41; Tue, 16 Apr 2019 18:32: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 DA31071D32; Tue, 16 Apr 2019 18:32: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 B41CE236F9; Tue, 16 Apr 2019 18:32: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 x3GIW7xU067442; Tue, 16 Apr 2019 18:32:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GIW7KI067441; Tue, 16 Apr 2019 18:32:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201904161832.x3GIW7KI067441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 Apr 2019 18:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346291 - stable/11/sys/cam X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam X-SVN-Commit-Revision: 346291 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DA31071D32 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 18:32:08 -0000 Author: mav Date: Tue Apr 16 18:32:07 2019 New Revision: 346291 URL: https://svnweb.freebsd.org/changeset/base/346291 Log: MFC r345805: Unify SCSI_STATUS_BUSY retry handling with other cases. - Do not retry if periph was invalidated. - Do not decrement retry_count if already zero. - Report action_string when applicable. Modified: stable/11/sys/cam/cam_periph.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_periph.c ============================================================================== --- stable/11/sys/cam/cam_periph.c Tue Apr 16 18:31:40 2019 (r346290) +++ stable/11/sys/cam/cam_periph.c Tue Apr 16 18:32:07 2019 (r346291) @@ -1383,6 +1383,7 @@ camperiphscsistatuserror(union ccb *ccb, union ccb **o int *openings, u_int32_t *relsim_flags, u_int32_t *timeout, u_int32_t *action, const char **action_string) { + struct cam_periph *periph; int error; switch (ccb->csio.scsi_status) { @@ -1465,14 +1466,21 @@ camperiphscsistatuserror(union ccb *ccb, union ccb **o * Restart the queue after either another * command completes or a 1 second timeout. */ - if ((sense_flags & SF_RETRY_BUSY) != 0 || - (ccb->ccb_h.retry_count--) > 0) { + periph = xpt_path_periph(ccb->ccb_h.path); + if (periph->flags & CAM_PERIPH_INVALID) { + error = EIO; + *action_string = "Periph was invalidated"; + } else if ((sense_flags & SF_RETRY_BUSY) != 0 || + ccb->ccb_h.retry_count > 0) { + if ((sense_flags & SF_RETRY_BUSY) == 0) + ccb->ccb_h.retry_count--; error = ERESTART; *relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT | RELSIM_RELEASE_AFTER_CMDCMPLT; *timeout = 1000; } else { error = EIO; + *action_string = "Retries exhausted"; } break; case SCSI_STATUS_RESERV_CONFLICT: From owner-svn-src-all@freebsd.org Tue Apr 16 18:47:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9BD2157A4D4; Tue, 16 Apr 2019 18:47:21 +0000 (UTC) (envelope-from cem@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 5058D72BBF; Tue, 16 Apr 2019 18:47:21 +0000 (UTC) (envelope-from cem@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 2204823A02; Tue, 16 Apr 2019 18:47:21 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GIlKBb077015; Tue, 16 Apr 2019 18:47:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GIlKir077013; Tue, 16 Apr 2019 18:47:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201904161847.x3GIlKir077013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 16 Apr 2019 18:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346292 - in head: . sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: . sys/kern X-SVN-Commit-Revision: 346292 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5058D72BBF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 18:47:22 -0000 Author: cem Date: Tue Apr 16 18:47:20 2019 New Revision: 346292 URL: https://svnweb.freebsd.org/changeset/base/346292 Log: stack_protector: Add tunable to bypass random cookies This is a stopgap measure to unbreak installer/VM/embedded boot issues introduced (or at least exposed by) in r346250. Add the new tunable, "security.stack_protect.permit_nonrandom_cookies," in order to continue boot with insecure non-random stack cookies if the random device is unavailable. For now, enable it by default. This is NOT safe. It will be disabled by default in a future revision. There is follow-on work planned to use fast random sources (e.g., RDRAND on x86 and DARN on Power) to seed when the early entropy file cannot be provided, for whatever reason. Please see D19928. Some better hacks may be used to make the non-random __stack_chk_guard slightly less predictable (from delphij@ and mjg@); those suggestions are left for a future revision. I think it may also be plausible to move stack guard initialization far later in the boot process; potentially it could be moved all the way to just before userspace is started. Reported by: many Reviewed by: delphij, emaste, imp (all w/ caveat: this is a stopgap fix) Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19927 Modified: head/UPDATING head/sys/kern/stack_protector.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Apr 16 18:32:07 2019 (r346291) +++ head/UPDATING Tue Apr 16 18:47:20 2019 (r346292) @@ -32,6 +32,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20190416: + The tunable "security.stack_protect.permit_nonrandom_cookies" may be + set to a non-zero value to boot systems that do not provide early + entropy. Otherwise, such systems may see the panic message: + "cannot initialize stack cookies because random device is not yet + seeded." + +20190416: The loadable random module KPI has changed; the random_infra_init() routine now requires a 3rd function pointer for a bool (*)(void) method that returns true if the random device is seeded (and Modified: head/sys/kern/stack_protector.c ============================================================================== --- head/sys/kern/stack_protector.c Tue Apr 16 18:32:07 2019 (r346291) +++ head/sys/kern/stack_protector.c Tue Apr 16 18:47:20 2019 (r346292) @@ -4,12 +4,28 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include long __stack_chk_guard[8] = {}; void __stack_chk_fail(void); +/* + * XXX This default is unsafe!!! We intend to change it after resolving issues + * with early entropy in the installer; some kinds of systems that do not use + * loader(8), such as riscv, aarch64, and power; and perhaps others that I am + * forgetting off the top of my head. + */ +static bool permit_nonrandom_cookies = true; + +SYSCTL_NODE(_security, OID_AUTO, stack_protect, CTLFLAG_RW, 0, + "-fstack-protect support"); +SYSCTL_BOOL(_security_stack_protect, OID_AUTO, permit_nonrandom_cookies, + CTLFLAG_RDTUN, &permit_nonrandom_cookies, 0, + "Allow stack guard to be used without real random cookies"); + void __stack_chk_fail(void) { @@ -23,8 +39,37 @@ __stack_chk_init(void *dummy __unused) size_t i; long guard[nitems(__stack_chk_guard)]; - arc4rand(guard, sizeof(guard), 0); - for (i = 0; i < nitems(guard); i++) - __stack_chk_guard[i] = guard[i]; + if (is_random_seeded()) { + arc4rand(guard, sizeof(guard), 0); + for (i = 0; i < nitems(guard); i++) + __stack_chk_guard[i] = guard[i]; + return; + } + + if (permit_nonrandom_cookies) { + printf("%s: WARNING: Initializing stack protection with " + "non-random cookies!\n", __func__); + printf("%s: WARNING: This severely limits the benefit of " + "-fstack-protector!\n", __func__); + + /* + * The emperor is naked, but I rolled some dice and at least + * these values aren't zero. + */ + __stack_chk_guard[0] = (long)0xe7318d5959af899full; + __stack_chk_guard[1] = (long)0x35a9481c089348bfull; + __stack_chk_guard[2] = (long)0xde657fdc04117255ull; + __stack_chk_guard[3] = (long)0x0dd44c61c22e4a6bull; + __stack_chk_guard[4] = (long)0x0a5869a354edb0a5ull; + __stack_chk_guard[5] = (long)0x05cebfed255b5232ull; + __stack_chk_guard[6] = (long)0x270ffac137c4c72full; + __stack_chk_guard[7] = (long)0xd8141a789bad478dull; + _Static_assert(nitems(__stack_chk_guard) == 8, + "__stack_chk_guard doesn't have 8 items"); + return; + } + + panic("%s: cannot initialize stack cookies because random device is " + "not yet seeded", __func__); } SYSINIT(stack_chk, SI_SUB_RANDOM, SI_ORDER_ANY, __stack_chk_init, NULL); From owner-svn-src-all@freebsd.org Tue Apr 16 19:38:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA6D5157B2A7; Tue, 16 Apr 2019 19:38:17 +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 4E36374976; Tue, 16 Apr 2019 19:38:17 +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 2AF182426B; Tue, 16 Apr 2019 19:38:17 +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 x3GJcHlC003879; Tue, 16 Apr 2019 19:38:17 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GJcG3U003876; Tue, 16 Apr 2019 19:38:16 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904161938.x3GJcG3U003876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Apr 2019 19:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346293 - in head/sys/arm/allwinner: . clk X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/arm/allwinner: . clk X-SVN-Commit-Revision: 346293 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E36374976 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 19:38:18 -0000 Author: manu Date: Tue Apr 16 19:38:16 2019 New Revision: 346293 URL: https://svnweb.freebsd.org/changeset/base/346293 Log: allwinner: clk: Garbage collect old clock implementation The old clocks are disconneted from the build since r337344. Remove all those pseudo drivers. The only one remaining is for gmac (the ethernet controller) so move it to sys/arm/allwinner. While here remove a83t support from gmacclk as it is unneeded since r326114. MFC after: 1 month Added: head/sys/arm/allwinner/aw_gmacclk.c - copied, changed from r346292, head/sys/arm/allwinner/clk/aw_gmacclk.c Deleted: head/sys/arm/allwinner/clk/ Modified: head/sys/arm/allwinner/aw_ccu.c head/sys/arm/allwinner/files.allwinner Modified: head/sys/arm/allwinner/aw_ccu.c ============================================================================== --- head/sys/arm/allwinner/aw_ccu.c Tue Apr 16 18:47:20 2019 (r346292) +++ head/sys/arm/allwinner/aw_ccu.c Tue Apr 16 19:38:16 2019 (r346293) @@ -53,38 +53,18 @@ __FBSDID("$FreeBSD$"); #define CCU_BASE 0x01c20000 #define CCU_SIZE 0x400 -#define PRCM_BASE 0x01f01400 -#define PRCM_SIZE 0x200 - -#define SYSCTRL_BASE 0x01c00000 -#define SYSCTRL_SIZE 0x34 - struct aw_ccu_softc { struct simplebus_softc sc; bus_space_tag_t bst; - bus_space_handle_t ccu_bsh; - bus_space_handle_t prcm_bsh; - bus_space_handle_t sysctrl_bsh; + bus_space_handle_t bsh; struct mtx mtx; int flags; }; -#define CLOCK_CCU (1 << 0) -#define CLOCK_PRCM (1 << 1) -#define CLOCK_SYSCTRL (1 << 2) - static struct ofw_compat_data compat_data[] = { - { "allwinner,sun4i-a10", CLOCK_CCU }, - { "allwinner,sun5i-a13", CLOCK_CCU }, - { "allwinner,sun7i-a20", CLOCK_CCU }, - { "allwinner,sun6i-a31", CLOCK_CCU }, - { "allwinner,sun6i-a31s", CLOCK_CCU }, - { "allwinner,sun50i-a64", CLOCK_CCU }, - { "allwinner,sun50i-h5", CLOCK_CCU }, - { "allwinner,sun8i-a33", CLOCK_CCU }, - { "allwinner,sun8i-a83t", CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL }, - { "allwinner,sun8i-h2-plus", CLOCK_CCU|CLOCK_PRCM }, - { "allwinner,sun8i-h3", CLOCK_CCU|CLOCK_PRCM }, + { "allwinner,sun7i-a20", 1 }, + { "allwinner,sun6i-a31", 1 }, + { "allwinner,sun6i-a31s", 1 }, { NULL, 0 } }; @@ -92,24 +72,11 @@ static int aw_ccu_check_addr(struct aw_ccu_softc *sc, bus_addr_t addr, bus_space_handle_t *pbsh, bus_size_t *poff) { - if (addr >= CCU_BASE && addr < (CCU_BASE + CCU_SIZE) && - (sc->flags & CLOCK_CCU) != 0) { + if (addr >= CCU_BASE && addr < (CCU_BASE + CCU_SIZE)) { *poff = addr - CCU_BASE; - *pbsh = sc->ccu_bsh; + *pbsh = sc->bsh; return (0); } - if (addr >= PRCM_BASE && addr < (PRCM_BASE + PRCM_SIZE) && - (sc->flags & CLOCK_PRCM) != 0) { - *poff = addr - PRCM_BASE; - *pbsh = sc->prcm_bsh; - return (0); - } - if (addr >= SYSCTRL_BASE && addr < (SYSCTRL_BASE + SYSCTRL_SIZE) && - (sc->flags & CLOCK_SYSCTRL) != 0) { - *poff = addr - SYSCTRL_BASE; - *pbsh = sc->sysctrl_bsh; - return (0); - } return (EINVAL); } @@ -241,29 +208,11 @@ aw_ccu_attach(device_t dev) * properties. */ sc->bst = bus_get_bus_tag(dev); - if (sc->flags & CLOCK_CCU) { - error = bus_space_map(sc->bst, CCU_BASE, CCU_SIZE, 0, - &sc->ccu_bsh); - if (error != 0) { - device_printf(dev, "couldn't map CCU: %d\n", error); - return (error); - } - } - if (sc->flags & CLOCK_PRCM) { - error = bus_space_map(sc->bst, PRCM_BASE, PRCM_SIZE, 0, - &sc->prcm_bsh); - if (error != 0) { - device_printf(dev, "couldn't map PRCM: %d\n", error); - return (error); - } - } - if (sc->flags & CLOCK_SYSCTRL) { - error = bus_space_map(sc->bst, SYSCTRL_BASE, SYSCTRL_SIZE, 0, - &sc->sysctrl_bsh); - if (error != 0) { - device_printf(dev, "couldn't map SYSCTRL: %d\n", error); - return (error); - } + error = bus_space_map(sc->bst, CCU_BASE, CCU_SIZE, 0, + &sc->bsh); + if (error != 0) { + device_printf(dev, "couldn't map CCU: %d\n", error); + return (error); } mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); Copied and modified: head/sys/arm/allwinner/aw_gmacclk.c (from r346292, head/sys/arm/allwinner/clk/aw_gmacclk.c) ============================================================================== --- head/sys/arm/allwinner/clk/aw_gmacclk.c Tue Apr 16 18:47:20 2019 (r346292, copy source) +++ head/sys/arm/allwinner/aw_gmacclk.c Tue Apr 16 19:38:16 2019 (r346293) @@ -77,21 +77,14 @@ __FBSDID("$FreeBSD$"); #define CLK_IDX_RGMII 1 #define CLK_IDX_COUNT 2 -enum aw_gmacclk_type { - GMACCLK_A20 = 1, - GMACCLK_A83T, -}; - static struct ofw_compat_data compat_data[] = { - { "allwinner,sun7i-a20-gmac-clk", GMACCLK_A20 }, - { "allwinner,sun8i-a83t-emac-clk", GMACCLK_A83T }, + { "allwinner,sun7i-a20-gmac-clk", 1 }, { NULL, 0 } }; struct aw_gmacclk_sc { device_t clkdev; bus_addr_t reg; - enum aw_gmacclk_type type; int rx_delay; int tx_delay; @@ -159,20 +152,6 @@ aw_gmacclk_set_mux(struct clknode *clk, int index) val &= ~(GMAC_CLK_SRC | GMAC_CLK_PIT); val |= (clk_src << GMAC_CLK_SRC_SHIFT); val |= (pit << GMAC_CLK_PIT_SHIFT); - if (sc->type == GMACCLK_A83T) { - val &= ~EMAC_TXC_DIV_CFG; - val |= (txc_div << EMAC_TXC_DIV_CFG_SHIFT); - val &= ~EMAC_PHY_SELECT; - val |= (EMAC_PHY_SELECT_EXT << EMAC_PHY_SELECT_SHIFT); - if (sc->tx_delay >= 0) { - val &= ~EMAC_ETXDC; - val |= (sc->tx_delay << EMAC_ETXDC_SHIFT); - } - if (sc->rx_delay >= 0) { - val &= ~EMAC_ERXDC; - val |= (sc->rx_delay << EMAC_ERXDC_SHIFT); - } - } GMACCLK_WRITE(sc, val); DEVICE_UNLOCK(sc); @@ -260,7 +239,6 @@ aw_gmacclk_attach(device_t dev) sc = clknode_get_softc(clk); sc->reg = paddr; sc->clkdev = device_get_parent(dev); - sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; sc->tx_delay = sc->rx_delay = -1; OF_getencprop(node, "tx-delay", &sc->tx_delay, sizeof(sc->tx_delay)); OF_getencprop(node, "rx-delay", &sc->rx_delay, sizeof(sc->rx_delay)); Modified: head/sys/arm/allwinner/files.allwinner ============================================================================== --- head/sys/arm/allwinner/files.allwinner Tue Apr 16 18:47:20 2019 (r346292) +++ head/sys/arm/allwinner/files.allwinner Tue Apr 16 19:38:16 2019 (r346293) @@ -34,7 +34,7 @@ arm/allwinner/aw_cir.c optional aw_cir evdev arm/allwinner/aw_reset.c standard arm/allwinner/aw_ccu.c standard -arm/allwinner/clk/aw_gmacclk.c standard +arm/allwinner/aw_gmacclk.c standard arm/allwinner/clkng/aw_ccung.c standard arm/allwinner/clkng/aw_clk_nkmp.c standard From owner-svn-src-all@freebsd.org Tue Apr 16 19:46:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9774E157B633; Tue, 16 Apr 2019 19:46:03 +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 3558A74E91; Tue, 16 Apr 2019 19:46:03 +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 0E38A24427; Tue, 16 Apr 2019 19:46:03 +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 x3GJk2Ql009119; Tue, 16 Apr 2019 19:46:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GJk2uH009117; Tue, 16 Apr 2019 19:46:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904161946.x3GJk2uH009117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 16 Apr 2019 19:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346294 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 346294 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3558A74E91 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 19:46:03 -0000 Author: kib Date: Tue Apr 16 19:46:02 2019 New Revision: 346294 URL: https://svnweb.freebsd.org/changeset/base/346294 Log: Fix initial x87 state after r345562. After the referenced commit, we did not set x87 and sse valid bits in the xstate_bv bitmask for initial fpu state (stored in memory), when using XSAVE. The state is loaded into FPU register file to initialize the process FPU state, and since both bits were clear, the default x87 and SSE states were loaded. By chance, FreeBSD ABI SSE2 state is same as FPU initial state, so the bug is not visible for 64bit processes. But on i386, the precision control should be set to double (53bit mantissa), instead of the default double extended (64bit mantissa). For 32bit processes on amd64, kernel reloads control word with the right mask, which only left native i386 and amd64 native but using x87 as affected. Fix it by setting minimal required xstate_bv mask. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/fpu.c head/sys/i386/i386/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Tue Apr 16 19:38:16 2019 (r346293) +++ head/sys/amd64/amd64/fpu.c Tue Apr 16 19:46:02 2019 (r346294) @@ -370,6 +370,7 @@ fpuinit(void) static void fpuinitstate(void *arg __unused) { + uint64_t *xstate_bv; register_t saveintr; int cp[4], i, max_ext_n; @@ -400,6 +401,10 @@ fpuinitstate(void *arg __unused) * Save Area. */ if (use_xsave) { + xstate_bv = (uint64_t *)((char *)(fpu_initialstate + 1) + + offsetof(struct xstate_hdr, xstate_bv)); + *xstate_bv = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; + max_ext_n = flsl(xsave_mask); xsave_area_desc = malloc(max_ext_n * sizeof(struct xsave_area_elm_descr), M_DEVBUF, M_WAITOK | M_ZERO); Modified: head/sys/i386/i386/npx.c ============================================================================== --- head/sys/i386/i386/npx.c Tue Apr 16 19:38:16 2019 (r346293) +++ head/sys/i386/i386/npx.c Tue Apr 16 19:46:02 2019 (r346294) @@ -472,6 +472,7 @@ npxinit(bool bsp) static void npxinitstate(void *arg __unused) { + uint64_t *xstate_bv; register_t saveintr; int cp[4], i, max_ext_n; @@ -507,6 +508,7 @@ npxinitstate(void *arg __unused) sizeof(npx_initialstate->sv_xmm.sv_fp)); bzero(npx_initialstate->sv_xmm.sv_xmm, sizeof(npx_initialstate->sv_xmm.sv_xmm)); + } else bzero(npx_initialstate->sv_87.sv_ac, sizeof(npx_initialstate->sv_87.sv_ac)); @@ -516,6 +518,10 @@ npxinitstate(void *arg __unused) * Save Area. */ if (use_xsave) { + xstate_bv = (uint64_t *)((char *)(npx_initialstate + 1) + + offsetof(struct xstate_hdr, xstate_bv)); + *xstate_bv = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; + if (xsave_mask >> 32 != 0) max_ext_n = fls(xsave_mask >> 32) + 32; else From owner-svn-src-all@freebsd.org Tue Apr 16 20:04:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB251157BB9F; Tue, 16 Apr 2019 20:04:27 +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 6508D757D2; Tue, 16 Apr 2019 20:04:27 +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 2D690247A4; Tue, 16 Apr 2019 20:04:27 +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 x3GK4RpI019672; Tue, 16 Apr 2019 20:04:27 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GK4N7u019636; Tue, 16 Apr 2019 20:04:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904162004.x3GK4N7u019636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Apr 2019 20:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346295 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/mv arm/nvidia/tegra124 a... X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/mv arm/nvidia/tegra124 arm/qemu arm/ralink arm/ro... X-SVN-Commit-Revision: 346295 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6508D757D2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 20:04:28 -0000 Author: manu Date: Tue Apr 16 20:04:22 2019 New Revision: 346295 URL: https://svnweb.freebsd.org/changeset/base/346295 Log: arm: Add kern_clocksource.c directly in files.arm This files is needed and included in all our config so move it to a common location. MFC after: 2 weeks Modified: head/sys/arm/allwinner/files.allwinner head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/amlogic/aml8726/files.aml8726 head/sys/arm/annapurna/alpine/files.alpine head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/arm/freescale/imx/files.imx5 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/vybrid/files.vybrid head/sys/arm/mv/files.arm7 head/sys/arm/mv/files.mv head/sys/arm/nvidia/tegra124/files.tegra124 head/sys/arm/qemu/files.qemu head/sys/arm/ralink/files.ralink head/sys/arm/rockchip/files.rk30xx head/sys/arm/samsung/exynos/files.exynos5 head/sys/arm/ti/files.ti head/sys/arm/versatile/files.versatile head/sys/arm/xilinx/files.zynq7 head/sys/conf/files.arm Modified: head/sys/arm/allwinner/files.allwinner ============================================================================== --- head/sys/arm/allwinner/files.allwinner Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/allwinner/files.allwinner Tue Apr 16 20:04:22 2019 (r346295) @@ -1,5 +1,4 @@ # $FreeBSD$ -kern/kern_clocksource.c standard arm/allwinner/a10_ahci.c optional ahci arm/allwinner/a10_codec.c optional sound Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/altera/socfpga/files.socfpga Tue Apr 16 20:04:22 2019 (r346295) @@ -1,7 +1,5 @@ # $FreeBSD$ -kern/kern_clocksource.c standard - arm/altera/socfpga/socfpga_common.c standard arm/altera/socfpga/socfpga_machdep.c standard arm/altera/socfpga/socfpga_manager.c standard Modified: head/sys/arm/amlogic/aml8726/files.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/files.aml8726 Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/amlogic/aml8726/files.aml8726 Tue Apr 16 20:04:22 2019 (r346295) @@ -1,7 +1,5 @@ #$FreeBSD$ -kern/kern_clocksource.c standard - arm/amlogic/aml8726/aml8726_l2cache.c standard arm/amlogic/aml8726/aml8726_machdep.c standard Modified: head/sys/arm/annapurna/alpine/files.alpine ============================================================================== --- head/sys/arm/annapurna/alpine/files.alpine Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/annapurna/alpine/files.alpine Tue Apr 16 20:04:22 2019 (r346295) @@ -1,7 +1,5 @@ # $FreeBSD$ -kern/kern_clocksource.c standard - arm/versatile/sp804.c standard dev/uart/uart_dev_ns8250.c optional uart Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Tue Apr 16 20:04:22 2019 (r346295) @@ -18,8 +18,6 @@ arm/broadcom/bcm2835/bcm2835_vcio.c standard arm/broadcom/bcm2835/bcm2835_wdog.c standard arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt -kern/kern_clocksource.c standard - dev/mbox/mbox_if.m standard arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq \ Modified: head/sys/arm/freescale/imx/files.imx5 ============================================================================== --- head/sys/arm/freescale/imx/files.imx5 Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/freescale/imx/files.imx5 Tue Apr 16 20:04:22 2019 (r346295) @@ -1,5 +1,4 @@ # $FreeBSD$ -kern/kern_clocksource.c standard # Init arm/freescale/imx/imx_common.c standard Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/freescale/imx/files.imx6 Tue Apr 16 20:04:22 2019 (r346295) @@ -1,11 +1,6 @@ # $FreeBSD$ # -# Standard ARM support. -# -kern/kern_clocksource.c standard - -# # Standard imx6 devices and support. # arm/freescale/fsl_ocotp.c standard Modified: head/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/files.vybrid Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/freescale/vybrid/files.vybrid Tue Apr 16 20:04:22 2019 (r346295) @@ -1,7 +1,5 @@ # $FreeBSD$ -kern/kern_clocksource.c standard - arm/freescale/vybrid/vf_machdep.c standard arm/freescale/vybrid/vf_ccm.c standard arm/freescale/vybrid/vf_anadig.c standard Modified: head/sys/arm/mv/files.arm7 ============================================================================== --- head/sys/arm/mv/files.arm7 Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/mv/files.arm7 Tue Apr 16 20:04:22 2019 (r346295) @@ -36,5 +36,3 @@ dev/uart/uart_dev_snps.c optional uart dev/usb/controller/ehci_mv.c optional ehci dev/usb/controller/generic_xhci.c optional xhci dev/ahci/ahci_mv_fdt.c optional ahci - -kern/kern_clocksource.c standard Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/mv/files.mv Tue Apr 16 20:04:22 2019 (r346295) @@ -33,5 +33,3 @@ dev/uart/uart_dev_snps.c optional uart dev/usb/controller/ehci_mv.c optional ehci dev/usb/controller/generic_xhci.c optional xhci dev/ahci/ahci_mv_fdt.c optional ahci - -kern/kern_clocksource.c standard Modified: head/sys/arm/nvidia/tegra124/files.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/files.tegra124 Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/nvidia/tegra124/files.tegra124 Tue Apr 16 20:04:22 2019 (r346295) @@ -1,11 +1,6 @@ # $FreeBSD$ # -# Standard ARM support. -# -kern/kern_clocksource.c standard - -# # Standard tegra124 devices and support. # arm/nvidia/tegra124/tegra124_machdep.c standard Modified: head/sys/arm/qemu/files.qemu ============================================================================== --- head/sys/arm/qemu/files.qemu Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/qemu/files.qemu Tue Apr 16 20:04:22 2019 (r346295) @@ -1,11 +1,6 @@ # $FreeBSD$ # -# Standard ARM support. -# -kern/kern_clocksource.c standard - -# # Standard qemu virt devices and support. # arm/qemu/virt_machdep.c standard Modified: head/sys/arm/ralink/files.ralink ============================================================================== --- head/sys/arm/ralink/files.ralink Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/ralink/files.ralink Tue Apr 16 20:04:22 2019 (r346295) @@ -5,5 +5,3 @@ arm/ralink/rt1310_gpio.c optional rt1310gpio arm/ralink/rt1310_timer.c standard arm/ralink/if_fv.c optional fv -kern/kern_clocksource.c standard - Modified: head/sys/arm/rockchip/files.rk30xx ============================================================================== --- head/sys/arm/rockchip/files.rk30xx Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/rockchip/files.rk30xx Tue Apr 16 20:04:22 2019 (r346295) @@ -1,5 +1,4 @@ # $FreeBSD$ -kern/kern_clocksource.c standard arm/rockchip/rk30xx_machdep.c standard arm/rockchip/rk30xx_pmu.c standard Modified: head/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- head/sys/arm/samsung/exynos/files.exynos5 Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/samsung/exynos/files.exynos5 Tue Apr 16 20:04:22 2019 (r346295) @@ -1,7 +1,5 @@ # $FreeBSD$ -kern/kern_clocksource.c standard - arm/samsung/exynos/exynos5_mct.c standard arm/samsung/exynos/exynos5_mp.c optional smp arm/samsung/exynos/exynos5_machdep.c standard Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/ti/files.ti Tue Apr 16 20:04:22 2019 (r346295) @@ -1,7 +1,5 @@ #$FreeBSD$ -kern/kern_clocksource.c standard - arm/ti/ti_cpuid.c standard arm/ti/ti_hwmods.c standard arm/ti/ti_machdep.c standard Modified: head/sys/arm/versatile/files.versatile ============================================================================== --- head/sys/arm/versatile/files.versatile Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/versatile/files.versatile Tue Apr 16 20:04:22 2019 (r346295) @@ -8,5 +8,3 @@ arm/versatile/versatile_common.c standard arm/versatile/versatile_pci.c optional pci arm/versatile/versatile_scm.c standard arm/versatile/versatile_sic.c standard - -kern/kern_clocksource.c standard Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/arm/xilinx/files.zynq7 Tue Apr 16 20:04:22 2019 (r346295) @@ -3,8 +3,6 @@ # # $FreeBSD$ -kern/kern_clocksource.c standard - arm/xilinx/zy7_machdep.c standard arm/xilinx/zy7_l2cache.c standard arm/xilinx/zy7_slcr.c standard Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Tue Apr 16 19:46:02 2019 (r346294) +++ head/sys/conf/files.arm Tue Apr 16 20:04:22 2019 (r346295) @@ -11,6 +11,9 @@ cloudabi32_vdso_blob.o optional compat_cloudabi32 \ no-implicit-rule \ clean "cloudabi32_vdso_blob.o" # + +kern/kern_clocksource.c standard + arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt arm/annapurna/alpine/alpine_pci.c optional al_pci fdt @@ -167,3 +170,4 @@ libkern/qdivrem.c standard libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard + From owner-svn-src-all@freebsd.org Tue Apr 16 20:05:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38FCB157BC70; Tue, 16 Apr 2019 20:05:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 DB24375B83; Tue, 16 Apr 2019 20:05:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD4E2247A7; Tue, 16 Apr 2019 20:05:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GK5YAQ020019; Tue, 16 Apr 2019 20:05:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GK5SUZ019987; Tue, 16 Apr 2019 20:05:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201904162005.x3GK5SUZ019987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 16 Apr 2019 20:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346296 - in stable/11: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/include/xray contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contri... X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/11: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/include/xray contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtin... X-SVN-Commit-Revision: 346296 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DB24375B83 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 20:05:36 -0000 Author: dim Date: Tue Apr 16 20:05:24 2019 New Revision: 346296 URL: https://svnweb.freebsd.org/changeset/base/346296 Log: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 8.0.0 final release r356365. MFC r306265 (by emaste): Force LLVM_LIBUNWIND off if we don't have a C++11 compiler Tested by: bde Differential Revision: https://reviews.freebsd.org/D7746 MFC r308100 (by emaste): compile libunwind c source with -fexceptions When an exception is thrown the unwinder must unwind its own C source (starting with _Unwind_RaiseException in UnwindLevel1.c), so it needs to be built with unwinding data. MFC r324998 (by bdrewery): Prefix {TARGET,BUILD}_TRIPLE with LLVM_ to avoid Makefile.inc1 collision. The Makefile.inc1 TARGET_TRIPLE is for specifying which -target is used during the build of world. Reviewed by: dim, imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12792 MFC r329093 (by emaste): Promote llvm-cov to a standalone option Introduce WITH_/WITHOUT_LLVM_COV to match GCC's WITH_/WITHOUT_GCOV. It is intended to provide a superset of the interface and functionality of gcov. It is enabled by default when building Clang, similarly to gcov and GCC. This change moves one file in libllvm to be compiled unconditionally. Previously it was included only when WITH_CLANG_EXTRAS was set, but the complexity of a new special case for (CLANG_EXTRAS | LLVM_COV) is not worth avoiding a tiny increase in build time. Reviewed by: dim, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D142645 MFC r331244 (by jhb): Add support for MIPS to LLVM's libunwind. This is originally based on a patch from David Chisnall for soft-float N64 but has since been updated to support O32, N32, and hard-float ABIs. The soft-float O32, N32, and N64 support has been committed upstream. The hard-float changes are still in review upstream. Enable LLVM_LIBUNWIND on mips when building with a suitable (C+11-capable) toolchain. This has been tested with external GCC for all ABIs and O32 and N64 with clang. Reviewed by: emaste Obtained from: CheriBSD (original N64 patch) Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D14701 MFC r336691 (by emaste): llvm: remove __FreeBSD_version conditionals All supported FreeBSD build host versions have backtrace.h, so we can just eliminate that test. For futimes() we can test the compiler's built-in __FreeBSD__ major version rather than relying on including osreldate.h. This should reduce the frequency with which Clang gets rebuilt when building world. Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC r337379 (by andrew): Default to armv5te in LINT on arm. This should fix building LINT there. MFC r337552: Add optional LLVM BPF target support BPF (eBPF) is an independent instruction set architecture which is introduced in Linux a few years ago. Originally, eBPF execute environment was only inside Linux kernel. However, recent years there are some user space implementation (https://github.com/iovisor/ubpf, https://doc.dpdk.org/guides/prog_guide/bpf_lib.html) and kernel space implementation for FreeBSD is going on (https://github.com/YutaroHayakawa/generic-ebpf). The BPF target support can be enabled using WITH_LLVM_TARGET_BPF, as it is not built by default. Submitted by: Yutaro Hayakawa Reviewed by: dim, bdrewery Differential Revision: https://reviews.freebsd.org/D16033 MFC r337585: In r308100, an explicit -fexceptions flag was added for the C sources from LLVM's libunwind, which end up in libgcc_eh.a and libgcc_s.so. This is because the unwinder needs the unwinder data for its own functions. However, for the C++ sources in libunwind, -fexceptions is already the default, and this can have the side effect of generating a reference to __gxx_personality_v0, the so-called personality function, which is normally provided by the C++ ABI library (libcxxrt or libsupc++). If the reference ends up in the eventual libgcc_s.so, linking any non-C++ programs against it will fail with "undefined reference to `__gxx_personality_v0'". Note that at high optimization levels, the reference is usually optimized away, which is why we have never noticed this problem before. With clang 7.0.0 though, higher optimization levels don't help anymore, since the addition of address-significance tables [1] in . Effectively, this always causes a reference to __gxx_personality_v0. After discussion with the upstream author of that change, it turns out that we should compile libunwind sources with the -fno-exceptions -funwind-tables flags instead. This ensures unwind tables are generated, but no references to any personality functions are emitted. [1] https://lists.llvm.org/pipermail/llvm-dev/2018-May/123514.html Reported by: jbeich PR: 230399 MFC r340287 (by emaste): Consolidate gcov entries in OptionalObsoleteFiles Sponsored by: The FreeBSD Foundation MFC r340289 (by emaste): llvm-cov: also install as gcov (if GNU gcov is disabled) llvm-cov provides a gcov-compatible interface when invoked as gcov. Reviewed by: dim, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17923 MFC r340296 (by emaste): Move llvm-profdata build into MK_LLVM_COV block llvm-profdata is used with llvm-cov for code coverage (although llvm-cov can also operate independently in a gcov-compatible mode). Although llvm-profdata can be used independently of llvm-cov it makes sense to group these under one option. Also handle these in OptionalObsoleteFiles.inc while here. Sponsored by: The FreeBSD Foundation MFC r340300 (by emaste): libllvm: Move SampleProfWriter to SRCS_MIN It is required by llvm-profdata, now built by default under the LLVM_COV knob. The additional complexity that would come from avoiding building it if CLANG_EXTRAS and LLVM_COV are both disabled is not worth the small savings in build time. Sponsored by: The FreeBSD Foundation MFC r340972 (by emaste): llvm-objdump: initial man page Based on llvm-objdump's online documentation and usage information. This serves as a starting point; additional detail and cleanup still required. Also being submitted upstream in LLVM review D54864. I expect to use this bespoke copy while we have LLVM 6.0 or 7.0 in FreeBSD; when we update to LLVM 8.0 it should be upstream and we will switch to it. PR: 233437 Reviewed by: bcr (man formatting) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18309 MFC r340973 (by emaste): llvm-objdump.1: remove invalid options Some options appear in llvm-objdump's usage information as a side effect of its option parsing implementation and are not actually llvm-objdump options. Reported in LLVM review https://reviews.llvm.org/D54864. Reported by: Fangrui Song Sponsored by: The FreeBSD Foundation MFC r340975 (by emaste): llvm-objdump.1: fix igor / mandoc -Tlint warnings Accidentally omitted from r340972. MFC r341055 (by emaste): llvm-objdump.1: remove more unintentional options Some options come from static constructors in LLVM libraries and are automatically added to llvm's usage output. They're not really supposed to be llvm-objdump options. Reported by: Fangrui Song in LLVM review D54864 Sponsored by: The FreeBSD Foundation MFC r344779: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to the upstream release_80 branch r355313 (effectively, 8.0.0 rc3). The release will follow very soon, but no more functional changes are expected. Release notes for llvm, clang and lld 8.0.0 will soon be available here: PR: 236062 Relnotes: yes MFC r344798 (by emaste): libllvm: promote WithColor and xxhash to SRCS_MIN The armv6 build failed in CI due to missing symbols (from these two source files) in the bootstrap Clang. This affected only armv6 because other Clang-using archs are using LLD as the bootstrap linker, and thus include SRCS_MIW via LLD_BOOTSTRAP. Reported by: CI, via lwhsu Sponsored by: The FreeBSD Foundation MFC r344825: Add a few missed files to the MK_LLVM_TARGET_BPF=yes case, otherwise clang and various other executables will fail to link with undefined symbols. Reported by: O. Hartmann MFC r344852: Put in a temporary workaround for what is likely a gcc 6 bug (it does not occur with gcc 7 or later). This should prevent the following error from breaking the head-amd64-gcc CI builds: In file included from /workspace/src/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfo.cpp:14:0: /workspace/src/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h:128:54: error: 'template lldb_private::MemoryRegionInfos::MemoryRegionInfos(_InputIterator, _InputIterator, const allocator_type&)' inherited from 'std::__1::vector' using std::vector::vector; ^~~~~~ /workspace/src/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h:128:54: error: conflicts with version inherited from 'std::__1::vector' Reported by: CI MFC r344896: Pull in r354937 from upstream clang trunk (by Jörg Sonnenberger): Fix inline assembler constraint validation The current constraint logic is both too lax and too strict. It fails for input outside the [INT_MIN..INT_MAX] range, but it also implicitly accepts 0 as value when it should not. Adjust logic to handle both correctly. Differential Revision: https://reviews.llvm.org/D58649 Pull in r355491 from upstream clang trunk (by Hans Wennborg): Inline asm constraints: allow ICE-like pointers for the "n" constraint (PR40890) Apparently GCC allows this, and there's code relying on it (see bug). The idea is to allow expression that would have been allowed if they were cast to int. So I based the code on how such a cast would be done (the CK_PointerToIntegral case in IntExprEvaluator::VisitCastExpr()). Differential Revision: https://reviews.llvm.org/D58821 These should fix assertions and errors when using the inline assembly "n" constraint in certain ways. In case of devel/valgrind, a pointer was used as the input for the constraint, which lead to "Assertion failed: (isInt() && "Invalid accessor"), function getInt". In case of math/secp256k1, a very large integer value was used as input for the constraint, which lead to "error: value '4624529908474429119' out of range for constraint 'n'". PR: 236216, 236194 MFC r344951: Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branch r355677 (effectively, 8.0.0 rc4), resolve conflicts, and bump version numbers. PR: 236062 MFC r345018: Merge LLVM libunwind trunk r351319, from just before upstream's release_80 branch point. Afterwards, we will merge the rest of the changes in the actual release_80 branch. PR: 236062 MFC r345019: Merge LLVM libunwind release_80 branch r355677 (effectively, 8.0.0 rc4). PR: 236062 MFC r345021: Pull in r355854 from upstream llvm trunk (by Jonas Paulsson): [RegAlloc] Avoid compile time regression with multiple copy hints. As a fix for https://bugs.llvm.org/show_bug.cgi?id=40986 ("excessive compile time building opencollada"), this patch makes sure that no phys reg is hinted more than once from getRegAllocationHints(). This handles the case were many virtual registers are assigned to the same physreg. The previous compile time fix (r343686) in weightCalcHelper() only made sure that physical/virtual registers are passed no more than once to addRegAllocationHint(). Review: Dimitry Andric, Quentin Colombet https://reviews.llvm.org/D59201 This should fix a hang when compiling certain generated .cpp files in the graphics/opencollada port. PR: 236313 MFC r345068 (by jhb): Move libunwind out of contrib/llvm/projects. Move LLVM's libunwind to its own contrib/ directory similar to other runtime libraries like libc++ and libcxxrt. Reviewed by: dim, emaste Differential Revision: https://reviews.freebsd.org/D19534 MFC r345073: Revert r308867 (which was originally committed in the clang390-import project branch): Work around LLVM PR30879, which is about a bad interaction between X86 Call Frame Optimization on i386 and libunwind, by disallowing the optimization for i386-freebsd12. This should fix some instances of broken exception handling when frame pointers are omitted, in particular some unittests run during the build of editors/libreoffice. This hack will be removed as soon as upstream has implemented a more permanent fix for this problem. And indeed, after r345018 and r345019, which updated LLVM libunwind to the most recent version, the above workaround is no longer needed. The upstream commit which fixed this is: https://llvm.org/viewvc/llvm-project?view=revision&revision=292723 Specifically, 32 bit (i386-freebsd) executables optimized with omitted frame pointers and Call Frame Optimization should now behave correctly when a C++ exception is thrown, and the stack is unwound. Upstream PR: https://llvm.org/bugs/show_bug.cgi?id=30879 PR: 236062 MFC r345152: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, and lldb release_80 branch r356034 (effectively, 8.0.0 rc5), resolve conflicts, and bump version numbers. PR: 236062 MFC r345231: Add LLVM openmp trunk r351319 (just before the release_80 branch point) to contrib/llvm. This is not yet connected to the build, the glue for that will come in a follow-up commit. PR: 236062 MFC r345232: Bootstrap svn:mergeinfo on contrib/openmp. PR: 236062 MFC r345233: Merge openmp release_80 branch r356034 (effectively, 8.0.0 rc5). PR: 236062 MFC r345234: Add openmp __kmp_gettid() wrapper, using pthread_getthreadid_np(3). This has also been submitted upstream. PR: 236062 MFC r345283: Enable building libomp.so for 32-bit x86. This is done by selectively enabling the functions that save and restore MXCSR, since access to this register requires SSE support. Note that you may run into other issues with OpenMP on i386, since this *not* yet supported upstream, and certainly not extensively tested. PR: 236062, 236582 MFC r345345: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 8.0.0 final release r356365. There were no functional changes since the most recent merge, of 8.0.0 rc5. Release notes for llvm, clang, lld and libc++ 8.0.0 are now available: https://llvm.org/releases/8.0.0/docs/ReleaseNotes.html https://llvm.org/releases/8.0.0/tools/clang/docs/ReleaseNotes.html https://llvm.org/releases/8.0.0/tools/lld/docs/ReleaseNotes.html https://llvm.org/releases/8.0.0/projects/libcxx/docs/ReleaseNotes.html PR: 236062 MFC r345349: Pull in r352826 from upstream lld trunk (by Fangrui Song): [ELF] Support --{,no-}allow-shlib-undefined Summary: In ld.bfd/gold, --no-allow-shlib-undefined is the default when linking an executable. This patch implements a check to error on undefined symbols in a shared object, if all of its DT_NEEDED entries are seen. Our approach resembles the one used in gold, achieves a good balance to be useful but not too smart (ld.bfd traces all DSOs and emulates the behavior of a dynamic linker to catch more cases). The error is issued based on the symbol table, different from undefined reference errors issued for relocations. It is most effective when there are DSOs that were not linked with -z defs (e.g. when static sanitizers runtime is used). gold has a comment that some system libraries on GNU/Linux may have spurious undefined references and thus system libraries should be excluded (https://sourceware.org/bugzilla/show_bug.cgi?id=6811). The story may have changed now but we make --allow-shlib-undefined the default for now. Its interaction with -shared can be discussed in the future. Reviewers: ruiu, grimar, pcc, espindola Reviewed By: ruiu Subscribers: joerg, emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D57385 Pull in r352943 from upstream lld trunk (by Fangrui Song): [ELF] Default to --no-allow-shlib-undefined for executables Summary: This follows the ld.bfd/gold behavior. The error check is useful as it captures a common type of ld.so undefined symbol errors as link-time errors: // a.cc => a.so (not linked with -z defs) void f(); // f is undefined void g() { f(); } // b.cc => executable with a DT_NEEDED entry on a.so void g(); int main() { g(); } // ld.so errors when g() is executed (lazy binding) or when the program is started (-z now) // symbol lookup error: ... undefined symbol: f Reviewers: ruiu, grimar, pcc, espindola Reviewed By: ruiu Subscribers: llvm-commits, emaste, arichardson Tags: #llvm Differential Revision: https://reviews.llvm.org/D57569 Together, these add support for --no-allow-shlib-undefined, and make it the default for executables, so they will fail to link if any symbols from needed shared libraries are undefined. Reported by: jbeich PR: 236062, 236141 MFC r345449: Pull in r356809 from upstream llvm trunk (by Eli Friedman): [ARM] Don't form "ands" when it isn't scheduled correctly. In r322972/r323136, the iteration here was changed to catch cases at the beginning of a basic block... but we accidentally deleted an important safety check. Restore that check to the way it was. Fixes https://bugs.llvm.org/show_bug.cgi?id=41116 Differential Revision: https://reviews.llvm.org/D59680 This should fix "Assertion failed: (LiveCPSR && "CPSR liveness tracking is wrong!"), function UpdateCPSRUse" errors when building the devel/xwpe port for armv7. PR: 236062, 236568 Added: stable/11/contrib/compiler-rt/lib/builtins/ppc/fixunstfti.c - copied unchanged from r344779, head/contrib/compiler-rt/lib/builtins/ppc/fixunstfti.c stable/11/contrib/compiler-rt/lib/builtins/ppc/floattitf.c - copied unchanged from r344779, head/contrib/compiler-rt/lib/builtins/ppc/floattitf.c stable/11/contrib/compiler-rt/lib/esan/esan_sideline_bsd.cpp - copied unchanged from r344779, head/contrib/compiler-rt/lib/esan/esan_sideline_bsd.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerBuiltins.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/fuzzer/FuzzerBuiltins.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerBuiltinsMsvc.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/fuzzer/FuzzerBuiltinsMsvc.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp - copied unchanged from r344779, head/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp stable/11/contrib/compiler-rt/lib/hwasan/hwasan_checks.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/hwasan/hwasan_checks.h stable/11/contrib/compiler-rt/lib/hwasan/hwasan_memintrinsics.cc - copied unchanged from r344779, head/contrib/compiler-rt/lib/hwasan/hwasan_memintrinsics.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_thread_list.cc - copied unchanged from r344779, head/contrib/compiler-rt/lib/hwasan/hwasan_thread_list.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_thread_list.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/hwasan/hwasan_thread_list.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_local_address_space_view.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_local_address_space_view.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_netbsd.cc - copied unchanged from r344779, head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_netbsd.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc - copied unchanged from r344779, head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.cc - copied unchanged from r344779, head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.h stable/11/contrib/compiler-rt/lib/xray/xray_fdr_controller.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/xray/xray_fdr_controller.h stable/11/contrib/compiler-rt/lib/xray/xray_fdr_log_writer.h - copied unchanged from r344779, head/contrib/compiler-rt/lib/xray/xray_fdr_log_writer.h stable/11/contrib/libc++/include/bit - copied unchanged from r344779, head/contrib/libc++/include/bit - copied from r345068, head/contrib/libunwind/ stable/11/contrib/llvm/include/llvm-c/Error.h - copied unchanged from r344779, head/contrib/llvm/include/llvm-c/Error.h stable/11/contrib/llvm/include/llvm-c/OptRemarks.h - copied unchanged from r344779, head/contrib/llvm/include/llvm-c/OptRemarks.h stable/11/contrib/llvm/include/llvm-c/Transforms/AggressiveInstCombine.h - copied unchanged from r344779, head/contrib/llvm/include/llvm-c/Transforms/AggressiveInstCombine.h stable/11/contrib/llvm/include/llvm-c/Transforms/Coroutines.h - copied unchanged from r344779, head/contrib/llvm/include/llvm-c/Transforms/Coroutines.h stable/11/contrib/llvm/include/llvm/ADT/bit.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/ADT/bit.h stable/11/contrib/llvm/include/llvm/Analysis/GuardUtils.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Analysis/GuardUtils.h stable/11/contrib/llvm/include/llvm/Analysis/IVDescriptors.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Analysis/IVDescriptors.h stable/11/contrib/llvm/include/llvm/Analysis/IndirectCallVisitor.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Analysis/IndirectCallVisitor.h stable/11/contrib/llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h stable/11/contrib/llvm/include/llvm/Analysis/LegacyDivergenceAnalysis.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Analysis/LegacyDivergenceAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/OrderedInstructions.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Analysis/OrderedInstructions.h stable/11/contrib/llvm/include/llvm/Analysis/StackSafetyAnalysis.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Analysis/StackSafetyAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/SyncDependenceAnalysis.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Analysis/SyncDependenceAnalysis.h stable/11/contrib/llvm/include/llvm/BinaryFormat/AMDGPUMetadataVerifier.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/BinaryFormat/AMDGPUMetadataVerifier.h stable/11/contrib/llvm/include/llvm/BinaryFormat/ELFRelocs/MSP430.def - copied unchanged from r344779, head/contrib/llvm/include/llvm/BinaryFormat/ELFRelocs/MSP430.def stable/11/contrib/llvm/include/llvm/BinaryFormat/MsgPack.def - copied unchanged from r344779, head/contrib/llvm/include/llvm/BinaryFormat/MsgPack.def stable/11/contrib/llvm/include/llvm/BinaryFormat/MsgPack.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/BinaryFormat/MsgPack.h stable/11/contrib/llvm/include/llvm/BinaryFormat/MsgPackReader.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/BinaryFormat/MsgPackReader.h stable/11/contrib/llvm/include/llvm/BinaryFormat/MsgPackTypes.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/BinaryFormat/MsgPackTypes.h stable/11/contrib/llvm/include/llvm/BinaryFormat/MsgPackWriter.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/BinaryFormat/MsgPackWriter.h stable/11/contrib/llvm/include/llvm/CodeGen/AsmPrinterHandler.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/CodeGen/AsmPrinterHandler.h stable/11/contrib/llvm/include/llvm/CodeGen/BuiltinGCs.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/CodeGen/BuiltinGCs.h stable/11/contrib/llvm/include/llvm/CodeGen/DbgEntityHistoryCalculator.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/CodeGen/DbgEntityHistoryCalculator.h stable/11/contrib/llvm/include/llvm/CodeGen/DebugHandlerBase.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/CodeGen/DebugHandlerBase.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/CSEMIRBuilder.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/CodeGen/GlobalISel/CSEMIRBuilder.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h stable/11/contrib/llvm/include/llvm/CodeGen/MachinePipeliner.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/CodeGen/MachinePipeliner.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecordHelpers.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecordHelpers.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecordHelpers.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecordHelpers.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumFrameData.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumFrameData.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAFrameData.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAFrameData.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBFrameData.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBFrameData.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumGlobals.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumGlobals.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeSymbolEnumerator.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeSymbolEnumerator.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeArray.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeArray.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeFunctionSig.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeFunctionSig.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeTypedef.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeTypedef.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeUDT.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeUDT.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeVTShape.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeVTShape.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h stable/11/contrib/llvm/include/llvm/Demangle/Compiler.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Demangle/Compiler.h stable/11/contrib/llvm/include/llvm/Demangle/ItaniumDemangle.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Demangle/ItaniumDemangle.h stable/11/contrib/llvm/include/llvm/Demangle/MicrosoftDemangle.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Demangle/MicrosoftDemangle.h stable/11/contrib/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h stable/11/contrib/llvm/include/llvm/Demangle/StringView.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Demangle/StringView.h stable/11/contrib/llvm/include/llvm/Demangle/Utility.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Demangle/Utility.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/LazyReexports.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/ExecutionEngine/Orc/LazyReexports.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h stable/11/contrib/llvm/include/llvm/IR/CFGDiff.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/IR/CFGDiff.h stable/11/contrib/llvm/include/llvm/IR/IntrinsicsRISCV.td - copied unchanged from r344779, head/contrib/llvm/include/llvm/IR/IntrinsicsRISCV.td stable/11/contrib/llvm/include/llvm/IR/PassInstrumentation.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/IR/PassInstrumentation.h stable/11/contrib/llvm/include/llvm/IR/PassTimingInfo.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/IR/PassTimingInfo.h stable/11/contrib/llvm/include/llvm/LTO/SummaryBasedOptimizations.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/LTO/SummaryBasedOptimizations.h stable/11/contrib/llvm/include/llvm/MCA/ - copied from r344779, head/contrib/llvm/include/llvm/MCA/ stable/11/contrib/llvm/include/llvm/Passes/StandardInstrumentations.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Passes/StandardInstrumentations.h stable/11/contrib/llvm/include/llvm/Support/AArch64TargetParser.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/AArch64TargetParser.h stable/11/contrib/llvm/include/llvm/Support/ARMTargetParser.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/ARMTargetParser.h stable/11/contrib/llvm/include/llvm/Support/BuryPointer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/BuryPointer.h stable/11/contrib/llvm/include/llvm/Support/CFGUpdate.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/CFGUpdate.h stable/11/contrib/llvm/include/llvm/Support/FileCheck.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/FileCheck.h stable/11/contrib/llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h stable/11/contrib/llvm/include/llvm/Support/MSVCErrorWorkarounds.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/MSVCErrorWorkarounds.h stable/11/contrib/llvm/include/llvm/Support/SymbolRemappingReader.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/SymbolRemappingReader.h stable/11/contrib/llvm/include/llvm/Support/VirtualFileSystem.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Support/VirtualFileSystem.h stable/11/contrib/llvm/include/llvm/Target/TargetPfmCounters.td - copied unchanged from r344779, head/contrib/llvm/include/llvm/Target/TargetPfmCounters.td stable/11/contrib/llvm/include/llvm/TextAPI/ - copied from r344779, head/contrib/llvm/include/llvm/TextAPI/ stable/11/contrib/llvm/include/llvm/Transforms/IPO/HotColdSplitting.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/IPO/HotColdSplitting.h stable/11/contrib/llvm/include/llvm/Transforms/Instrumentation/ControlHeightReduction.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Instrumentation/ControlHeightReduction.h stable/11/contrib/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h stable/11/contrib/llvm/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/MakeGuardsExplicit.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Scalar/MakeGuardsExplicit.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/Scalarizer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Scalar/Scalarizer.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/WarnMissedTransforms.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Scalar/WarnMissedTransforms.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/CanonicalizeAliases.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Utils/CanonicalizeAliases.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/GuardUtils.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Utils/GuardUtils.h stable/11/contrib/llvm/include/llvm/Transforms/Vectorize/LoadStoreVectorizer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/Transforms/Vectorize/LoadStoreVectorizer.h stable/11/contrib/llvm/include/llvm/XRay/BlockIndexer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/BlockIndexer.h stable/11/contrib/llvm/include/llvm/XRay/BlockPrinter.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/BlockPrinter.h stable/11/contrib/llvm/include/llvm/XRay/BlockVerifier.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/BlockVerifier.h stable/11/contrib/llvm/include/llvm/XRay/FDRLogBuilder.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/FDRLogBuilder.h stable/11/contrib/llvm/include/llvm/XRay/FDRRecordConsumer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/FDRRecordConsumer.h stable/11/contrib/llvm/include/llvm/XRay/FDRRecordProducer.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/FDRRecordProducer.h stable/11/contrib/llvm/include/llvm/XRay/FDRRecords.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/FDRRecords.h stable/11/contrib/llvm/include/llvm/XRay/FDRTraceExpander.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/FDRTraceExpander.h stable/11/contrib/llvm/include/llvm/XRay/FDRTraceWriter.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/FDRTraceWriter.h stable/11/contrib/llvm/include/llvm/XRay/FileHeaderReader.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/FileHeaderReader.h stable/11/contrib/llvm/include/llvm/XRay/Profile.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/Profile.h stable/11/contrib/llvm/include/llvm/XRay/RecordPrinter.h - copied unchanged from r344779, head/contrib/llvm/include/llvm/XRay/RecordPrinter.h stable/11/contrib/llvm/include/llvm/module.extern.modulemap - copied unchanged from r344779, head/contrib/llvm/include/llvm/module.extern.modulemap stable/11/contrib/llvm/include/llvm/module.install.modulemap - copied unchanged from r344779, head/contrib/llvm/include/llvm/module.install.modulemap stable/11/contrib/llvm/lib/Analysis/GuardUtils.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Analysis/GuardUtils.cpp stable/11/contrib/llvm/lib/Analysis/IVDescriptors.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Analysis/IVDescriptors.cpp stable/11/contrib/llvm/lib/Analysis/InstructionPrecedenceTracking.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Analysis/InstructionPrecedenceTracking.cpp stable/11/contrib/llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/OrderedInstructions.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Analysis/OrderedInstructions.cpp stable/11/contrib/llvm/lib/Analysis/StackSafetyAnalysis.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Analysis/StackSafetyAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/SyncDependenceAnalysis.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Analysis/SyncDependenceAnalysis.cpp stable/11/contrib/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp - copied unchanged from r344779, head/contrib/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp stable/11/contrib/llvm/lib/BinaryFormat/MsgPackReader.cpp - copied unchanged from r344779, head/contrib/llvm/lib/BinaryFormat/MsgPackReader.cpp stable/11/contrib/llvm/lib/BinaryFormat/MsgPackTypes.cpp - copied unchanged from r344779, head/contrib/llvm/lib/BinaryFormat/MsgPackTypes.cpp stable/11/contrib/llvm/lib/BinaryFormat/MsgPackWriter.cpp - copied unchanged from r344779, head/contrib/llvm/lib/BinaryFormat/MsgPackWriter.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp - copied unchanged from r344779, head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/WasmException.cpp - copied unchanged from r344779, head/contrib/llvm/lib/CodeGen/AsmPrinter/WasmException.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/WasmException.h - copied unchanged from r344779, head/contrib/llvm/lib/CodeGen/AsmPrinter/WasmException.h stable/11/contrib/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp - copied unchanged from r344779, head/contrib/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp - copied unchanged from r344779, head/contrib/llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp - copied unchanged from r344779, head/contrib/llvm/lib/CodeGen/GlobalISel/GISelChangeObserver.cpp stable/11/contrib/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp - copied unchanged from r344779, head/contrib/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/TypeRecordHelpers.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/CodeView/TypeRecordHelpers.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumFrameData.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumFrameData.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAFrameData.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAFrameData.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumGlobals.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumGlobals.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeSymbolEnumerator.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeSymbolEnumerator.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeArray.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeArray.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeFunctionSig.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeFunctionSig.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeTypedef.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeTypedef.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeUDT.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeUDT.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeVTShape.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/NativeTypeVTShape.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/SymbolCache.cpp - copied unchanged from r344779, head/contrib/llvm/lib/DebugInfo/PDB/Native/SymbolCache.cpp stable/11/contrib/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp - copied unchanged from r344779, head/contrib/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp - copied unchanged from r344779, head/contrib/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp - copied unchanged from r344779, head/contrib/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp stable/11/contrib/llvm/lib/IR/PassInstrumentation.cpp - copied unchanged from r344779, head/contrib/llvm/lib/IR/PassInstrumentation.cpp stable/11/contrib/llvm/lib/IR/PassTimingInfo.cpp - copied unchanged from r344779, head/contrib/llvm/lib/IR/PassTimingInfo.cpp stable/11/contrib/llvm/lib/LTO/SummaryBasedOptimizations.cpp - copied unchanged from r344779, head/contrib/llvm/lib/LTO/SummaryBasedOptimizations.cpp stable/11/contrib/llvm/lib/MC/MCParser/WasmAsmParser.cpp - copied unchanged from r344779, head/contrib/llvm/lib/MC/MCParser/WasmAsmParser.cpp stable/11/contrib/llvm/lib/MCA/ - copied from r344779, head/contrib/llvm/lib/MCA/ stable/11/contrib/llvm/lib/OptRemarks/ - copied from r344779, head/contrib/llvm/lib/OptRemarks/ stable/11/contrib/llvm/lib/Passes/StandardInstrumentations.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Passes/StandardInstrumentations.cpp stable/11/contrib/llvm/lib/Support/AArch64TargetParser.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Support/AArch64TargetParser.cpp stable/11/contrib/llvm/lib/Support/ARMTargetParser.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Support/ARMTargetParser.cpp stable/11/contrib/llvm/lib/Support/BuryPointer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Support/BuryPointer.cpp stable/11/contrib/llvm/lib/Support/FileCheck.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Support/FileCheck.cpp stable/11/contrib/llvm/lib/Support/ItaniumManglingCanonicalizer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Support/ItaniumManglingCanonicalizer.cpp stable/11/contrib/llvm/lib/Support/SymbolRemappingReader.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Support/SymbolRemappingReader.cpp stable/11/contrib/llvm/lib/Support/VirtualFileSystem.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Support/VirtualFileSystem.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64PfmCounters.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/AArch64/AArch64PfmCounters.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64SchedPredExynos.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredExynos.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64SchedPredicates.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredicates.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64SpeculationHardening.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AArch64/AArch64SpeculationHardening.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUFixFunctionBitcasts.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AMDGPU/AMDGPUFixFunctionBitcasts.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIAddIMGInit.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AMDGPU/SIAddIMGInit.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIFixupVectorISel.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AMDGPU/SIFixupVectorISel.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIModeRegister.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/AMDGPU/SIModeRegister.cpp stable/11/contrib/llvm/lib/Target/BPF/BPFMIChecking.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/BPF/BPFMIChecking.cpp stable/11/contrib/llvm/lib/Target/BPF/BTF.def - copied unchanged from r344779, head/contrib/llvm/lib/Target/BPF/BTF.def stable/11/contrib/llvm/lib/Target/BPF/BTF.h - copied unchanged from r344779, head/contrib/llvm/lib/Target/BPF/BTF.h stable/11/contrib/llvm/lib/Target/BPF/BTFDebug.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/BPF/BTFDebug.cpp stable/11/contrib/llvm/lib/Target/BPF/BTFDebug.h - copied unchanged from r344779, head/contrib/llvm/lib/Target/BPF/BTFDebug.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepDecoders.h - copied unchanged from r344779, head/contrib/llvm/lib/Target/Hexagon/HexagonDepDecoders.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepMapAsm2Intrin.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/Hexagon/HexagonDepMapAsm2Intrin.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV5.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV5.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV5.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV5.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV66.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV66.td stable/11/contrib/llvm/lib/Target/MSP430/AsmParser/ - copied from r344779, head/contrib/llvm/lib/Target/MSP430/AsmParser/ stable/11/contrib/llvm/lib/Target/MSP430/Disassembler/ - copied from r344779, head/contrib/llvm/lib/Target/MSP430/Disassembler/ stable/11/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp stable/11/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFObjectWriter.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFStreamer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFStreamer.cpp stable/11/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430FixupKinds.h - copied unchanged from r344779, head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430FixupKinds.h stable/11/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCCodeEmitter.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCCodeEmitter.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXProxyRegErasure.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/NVPTX/NVPTXProxyRegErasure.cpp stable/11/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.h - copied unchanged from r344779, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.h stable/11/contrib/llvm/lib/Target/PowerPC/PPCPfmCounters.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/PowerPC/PPCPfmCounters.td stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h - copied unchanged from r344779, head/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h stable/11/contrib/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp stable/11/contrib/llvm/lib/Target/RISCV/RISCVSystemOperands.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/RISCV/RISCVSystemOperands.td stable/11/contrib/llvm/lib/Target/RISCV/Utils/ - copied from r344779, head/contrib/llvm/lib/Target/RISCV/Utils/ stable/11/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.h - copied unchanged from r344779, head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.h - copied unchanged from r344779, head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyEHRestoreStackPointer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyEHRestoreStackPointer.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMemIntrinsicResults.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMemIntrinsicResults.cpp stable/11/contrib/llvm/lib/Target/X86/X86CondBrFolding.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/X86/X86CondBrFolding.cpp stable/11/contrib/llvm/lib/Target/X86/X86DiscriminateMemOps.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/X86/X86DiscriminateMemOps.cpp stable/11/contrib/llvm/lib/Target/X86/X86InsertPrefetch.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Target/X86/X86InsertPrefetch.cpp stable/11/contrib/llvm/lib/Target/X86/X86ScheduleBdVer2.td - copied unchanged from r344779, head/contrib/llvm/lib/Target/X86/X86ScheduleBdVer2.td stable/11/contrib/llvm/lib/Testing/Support/SupportHelpers.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Testing/Support/SupportHelpers.cpp stable/11/contrib/llvm/lib/TextAPI/ - copied from r344779, head/contrib/llvm/lib/TextAPI/ stable/11/contrib/llvm/lib/Transforms/IPO/HotColdSplitting.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Transforms/IPO/HotColdSplitting.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp stable/11/contrib/llvm/lib/Transforms/Utils/CanonicalizeAliases.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Transforms/Utils/CanonicalizeAliases.cpp stable/11/contrib/llvm/lib/Transforms/Utils/GuardUtils.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Transforms/Utils/GuardUtils.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/VPlanSLP.cpp - copied unchanged from r344779, head/contrib/llvm/lib/Transforms/Vectorize/VPlanSLP.cpp stable/11/contrib/llvm/lib/XRay/BlockIndexer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/BlockIndexer.cpp stable/11/contrib/llvm/lib/XRay/BlockPrinter.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/BlockPrinter.cpp stable/11/contrib/llvm/lib/XRay/BlockVerifier.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/BlockVerifier.cpp stable/11/contrib/llvm/lib/XRay/FDRRecordProducer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/FDRRecordProducer.cpp stable/11/contrib/llvm/lib/XRay/FDRRecords.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/FDRRecords.cpp stable/11/contrib/llvm/lib/XRay/FDRTraceExpander.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/FDRTraceExpander.cpp stable/11/contrib/llvm/lib/XRay/FDRTraceWriter.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/FDRTraceWriter.cpp stable/11/contrib/llvm/lib/XRay/FileHeaderReader.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/FileHeaderReader.cpp stable/11/contrib/llvm/lib/XRay/LogBuilderConsumer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/LogBuilderConsumer.cpp stable/11/contrib/llvm/lib/XRay/Profile.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/Profile.cpp stable/11/contrib/llvm/lib/XRay/RecordInitializer.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/RecordInitializer.cpp stable/11/contrib/llvm/lib/XRay/RecordPrinter.cpp - copied unchanged from r344779, head/contrib/llvm/lib/XRay/RecordPrinter.cpp stable/11/contrib/llvm/tools/clang/include/clang/AST/ASTContextAllocate.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/AST/ASTContextAllocate.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ASTDumperUtils.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/AST/ASTDumperUtils.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ASTImporterLookupTable.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/AST/ASTImporterLookupTable.h stable/11/contrib/llvm/tools/clang/include/clang/AST/AttrVisitor.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/AST/AttrVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/AST/FormatString.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/AST/FormatString.h stable/11/contrib/llvm/tools/clang/include/clang/AST/OSLog.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/AST/OSLog.h stable/11/contrib/llvm/tools/clang/include/clang/AST/TemplateArgumentVisitor.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/AST/TemplateArgumentVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/AST/TextNodeDumper.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/AST/TextNodeDumper.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ExprMutationAnalyzer.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ExprMutationAnalyzer.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/SelectorExtras.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Analysis/SelectorExtras.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/CodeGenOptions.def - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/CodeGenOptions.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/CodeGenOptions.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/CodeGenOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticAST.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticAST.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticAnalysis.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticAnalysis.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticComment.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticComment.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCrossTU.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCrossTU.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriver.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriver.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontend.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontend.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLex.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLex.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParse.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParse.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticRefactoring.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticRefactoring.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSema.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSema.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerialization.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerialization.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/FixedPoint.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/FixedPoint.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/MSP430Target.def - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/MSP430Target.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/OpenCLExtensionTypes.def - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Basic/OpenCLExtensionTypes.def stable/11/contrib/llvm/tools/clang/include/clang/Driver/DarwinSDKInfo.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Driver/DarwinSDKInfo.h stable/11/contrib/llvm/tools/clang/include/clang/Parse/LoopHint.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Parse/LoopHint.h stable/11/contrib/llvm/tools/clang/include/clang/Serialization/PCHContainerOperations.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/Serialization/PCHContainerOperations.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/RetainSummaryManager.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/RetainSummaryManager.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h stable/11/contrib/llvm/tools/clang/lib/AST/ASTImporterLookupTable.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/AST/ASTImporterLookupTable.cpp stable/11/contrib/llvm/tools/clang/lib/AST/FormatString.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/AST/FormatString.cpp stable/11/contrib/llvm/tools/clang/lib/AST/FormatStringParsing.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/AST/FormatStringParsing.h stable/11/contrib/llvm/tools/clang/lib/AST/OSLog.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/AST/OSLog.cpp stable/11/contrib/llvm/tools/clang/lib/AST/PrintfFormatString.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/AST/PrintfFormatString.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ScanfFormatString.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/AST/ScanfFormatString.cpp stable/11/contrib/llvm/tools/clang/lib/AST/TextNodeDumper.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/AST/TextNodeDumper.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/ExprMutationAnalyzer.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Analysis/ExprMutationAnalyzer.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/CodeGenOptions.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Basic/CodeGenOptions.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/FixedPoint.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Basic/FixedPoint.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/ARC.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Basic/Targets/ARC.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/ARC.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Basic/Targets/ARC.h stable/11/contrib/llvm/tools/clang/lib/Driver/DarwinSDKInfo.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Driver/DarwinSDKInfo.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Hurd.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Hurd.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Hurd.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Hurd.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSP430.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSP430.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSP430.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSP430.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCVToolchain.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCVToolchain.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCVToolchain.h - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCVToolchain.h stable/11/contrib/llvm/tools/clang/lib/Serialization/PCHContainerOperations.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/Serialization/PCHContainerOperations.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/ - copied from r344779, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/ stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/ - copied from r344779, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/ stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TaintManager.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TaintManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp - copied unchanged from r344779, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/MSP430.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lld/ELF/Arch/MSP430.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/RISCV.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lld/ELF/Arch/RISCV.cpp stable/11/contrib/llvm/tools/lld/ELF/DWARF.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lld/ELF/DWARF.cpp stable/11/contrib/llvm/tools/lld/ELF/DWARF.h - copied unchanged from r344779, head/contrib/llvm/tools/lld/ELF/DWARF.h stable/11/contrib/llvm/tools/lld/docs/missingkeyfunction.rst - copied unchanged from r344779, head/contrib/llvm/tools/lld/docs/missingkeyfunction.rst stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBInitializerOptions.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/API/SBInitializerOptions.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Highlighter.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Core/Highlighter.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/RichManglingContext.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Core/RichManglingContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/SafeMachO.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Host/SafeMachO.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/StackFrameRecognizer.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Target/StackFrameRecognizer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Broadcaster.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Utility/Broadcaster.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Event.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Utility/Event.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Listener.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Utility/Listener.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Predicate.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Utility/Predicate.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/RegisterValue.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Utility/RegisterValue.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Reproducer.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Utility/Reproducer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Scalar.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Utility/Scalar.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/State.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/include/lldb/Utility/State.h stable/11/contrib/llvm/tools/lldb/source/API/SBInitializerOptions.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/API/SBInitializerOptions.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverScripted.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverScripted.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectReproducer.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Commands/CommandObjectReproducer.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectReproducer.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Commands/CommandObjectReproducer.h stable/11/contrib/llvm/tools/lldb/source/Core/Highlighter.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Core/Highlighter.cpp stable/11/contrib/llvm/tools/lldb/source/Core/RichManglingContext.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Core/RichManglingContext.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Architecture/Mips/ - copied from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Architecture/Mips/ stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ClangCommon/ - copied from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Language/ClangCommon/ stable/11/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/Breakpad/ - copied from r344779, head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/Breakpad/ stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxProcMaps.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxProcMaps.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxProcMaps.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxProcMaps.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.h - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/Breakpad/ - copied from r344779, head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/Breakpad/ stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/NativePDB/ - copied from r344779, head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/NativePDB/ stable/11/contrib/llvm/tools/lldb/source/Target/StackFrameRecognizer.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Target/StackFrameRecognizer.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Broadcaster.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Utility/Broadcaster.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Event.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Utility/Event.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Listener.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Utility/Listener.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/RegisterValue.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Utility/RegisterValue.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Reproducer.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Utility/Reproducer.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Scalar.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Utility/Scalar.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/State.cpp - copied unchanged from r344779, head/contrib/llvm/tools/lldb/source/Utility/State.cpp stable/11/contrib/llvm/tools/lldb/tools/driver/Options.td - copied unchanged from r344779, head/contrib/llvm/tools/lldb/tools/driver/Options.td stable/11/contrib/llvm/tools/llvm-cov/CoverageExporterLcov.cpp - copied unchanged from r344779, head/contrib/llvm/tools/llvm-cov/CoverageExporterLcov.cpp stable/11/contrib/llvm/tools/llvm-cov/CoverageExporterLcov.h - copied unchanged from r344779, head/contrib/llvm/tools/llvm-cov/CoverageExporterLcov.h stable/11/contrib/llvm/tools/llvm-cxxmap/ - copied from r344779, head/contrib/llvm/tools/llvm-cxxmap/ stable/11/contrib/llvm/tools/llvm-mca/CodeRegionGenerator.cpp - copied unchanged from r344779, head/contrib/llvm/tools/llvm-mca/CodeRegionGenerator.cpp stable/11/contrib/llvm/tools/llvm-mca/CodeRegionGenerator.h - copied unchanged from r344779, head/contrib/llvm/tools/llvm-mca/CodeRegionGenerator.h stable/11/contrib/llvm/tools/llvm-mca/Views/ - copied from r344779, head/contrib/llvm/tools/llvm-mca/Views/ stable/11/contrib/llvm/tools/llvm-mca/include/ - copied from r344779, head/contrib/llvm/tools/llvm-mca/include/ stable/11/contrib/llvm/tools/llvm-mca/lib/ - copied from r344779, head/contrib/llvm/tools/llvm-mca/lib/ stable/11/contrib/llvm/tools/llvm-objcopy/Buffer.cpp - copied unchanged from r344779, head/contrib/llvm/tools/llvm-objcopy/Buffer.cpp stable/11/contrib/llvm/tools/llvm-objcopy/Buffer.h - copied unchanged from r344779, head/contrib/llvm/tools/llvm-objcopy/Buffer.h stable/11/contrib/llvm/tools/llvm-objcopy/COFF/ - copied from r344779, head/contrib/llvm/tools/llvm-objcopy/COFF/ stable/11/contrib/llvm/tools/llvm-objcopy/CopyConfig.cpp - copied unchanged from r344779, head/contrib/llvm/tools/llvm-objcopy/CopyConfig.cpp stable/11/contrib/llvm/tools/llvm-objcopy/CopyConfig.h - copied unchanged from r344779, head/contrib/llvm/tools/llvm-objcopy/CopyConfig.h stable/11/contrib/llvm/tools/llvm-objcopy/ELF/ - copied from r344779, head/contrib/llvm/tools/llvm-objcopy/ELF/ stable/11/contrib/llvm/tools/llvm-xray/xray-fdr-dump.cpp - copied unchanged from r344779, head/contrib/llvm/tools/llvm-xray/xray-fdr-dump.cpp stable/11/contrib/llvm/utils/TableGen/ExegesisEmitter.cpp - copied unchanged from r344779, head/contrib/llvm/utils/TableGen/ExegesisEmitter.cpp stable/11/contrib/openmp/ - copied from r345231, head/contrib/openmp/ stable/11/tools/build/options/WITHOUT_LLVM_COV - copied unchanged from r329093, head/tools/build/options/WITHOUT_LLVM_COV stable/11/tools/build/options/WITH_LLVM_COV - copied unchanged from r329093, head/tools/build/options/WITH_LLVM_COV stable/11/tools/build/options/WITH_LLVM_TARGET_BPF - copied unchanged from r337552, head/tools/build/options/WITH_LLVM_TARGET_BPF stable/11/usr.bin/clang/llvm-objdump/llvm-objdump.1 - copied, changed from r340972, head/usr.bin/clang/llvm-objdump/llvm-objdump.1 Directory Properties: stable/11/contrib/libunwind/ (props changed) Deleted: stable/11/contrib/compiler-rt/lib/builtins/arm64/ stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsDlsymWin.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeakAlias.cpp stable/11/contrib/libc++/include/experimental/dynarray stable/11/contrib/libc++/src/experimental/filesystem/ stable/11/contrib/llvm/include/llvm/Analysis/IndirectCallSiteVisitor.h stable/11/contrib/llvm/include/llvm/CodeGen/GCs.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeBuiltinSymbol.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumSymbol.h stable/11/contrib/llvm/include/llvm/IR/TypeBuilder.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/OrderedInstructions.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h stable/11/contrib/llvm/lib/CodeGen/MachinePassRegistry.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeBuiltinSymbol.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumSymbol.cpp stable/11/contrib/llvm/lib/Demangle/Compiler.h stable/11/contrib/llvm/lib/Demangle/StringView.h stable/11/contrib/llvm/lib/Demangle/Utility.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsics.td stable/11/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPULaneDominator.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPULaneDominator.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonGatherPacketize.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV3.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV4.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV4.td stable/11/contrib/llvm/lib/Target/Nios2/InstPrinter/Nios2InstPrinter.cpp stable/11/contrib/llvm/lib/Target/Nios2/InstPrinter/Nios2InstPrinter.h stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.cpp stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.h stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2BaseInfo.h stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2ELFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2FixupKinds.h stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCAsmInfo.cpp stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCAsmInfo.h stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCExpr.cpp stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCExpr.h stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.cpp stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.h stable/11/contrib/llvm/lib/Target/Nios2/MCTargetDesc/Nios2TargetStreamer.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2.td stable/11/contrib/llvm/lib/Target/Nios2/Nios2AsmPrinter.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2CallingConv.td stable/11/contrib/llvm/lib/Target/Nios2/Nios2FrameLowering.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2FrameLowering.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2ISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2ISelLowering.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2ISelLowering.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2InstrFormats.td stable/11/contrib/llvm/lib/Target/Nios2/Nios2InstrInfo.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2InstrInfo.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2InstrInfo.td stable/11/contrib/llvm/lib/Target/Nios2/Nios2MCInstLower.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2MachineFunction.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2MachineFunction.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2RegisterInfo.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2RegisterInfo.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2RegisterInfo.td stable/11/contrib/llvm/lib/Target/Nios2/Nios2Schedule.td stable/11/contrib/llvm/lib/Target/Nios2/Nios2Subtarget.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2Subtarget.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2TargetMachine.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2TargetMachine.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2TargetObjectFile.cpp stable/11/contrib/llvm/lib/Target/Nios2/Nios2TargetObjectFile.h stable/11/contrib/llvm/lib/Target/Nios2/Nios2TargetStreamer.h stable/11/contrib/llvm/lib/Target/Nios2/TargetInfo/Nios2TargetInfo.cpp stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h stable/11/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp stable/11/contrib/llvm/lib/Transforms/Utils/OrderedInstructions.cpp stable/11/contrib/llvm/projects/ stable/11/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/OSLog.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNios2.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/VirtualFileSystem.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def stable/11/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/PTHLexer.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/LoopHint.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ClangCheckers.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerOptInfo.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTContext.h stable/11/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/FormatStringParsing.h stable/11/contrib/llvm/tools/clang/lib/Analysis/OSLog.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/Nios2.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/Nios2.h stable/11/contrib/llvm/tools/clang/lib/Basic/VirtualFileSystem.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/Arch/ stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCV.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/RISCV.h stable/11/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/CodeGenOptions.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/PCHContainerOperations.cpp stable/11/contrib/llvm/tools/clang/lib/Headers/cuda/ stable/11/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AllocationDiagnostics.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AllocationDiagnostics.h stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MisusedMovedObjectChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SelectorExtras.h stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Inclusions/CMakeLists.txt stable/11/contrib/llvm/tools/lld/ELF/GdbIndex.cpp stable/11/contrib/llvm/tools/lld/ELF/GdbIndex.h stable/11/contrib/llvm/tools/lld/include/lld/Core/TODO.txt stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Broadcaster.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Event.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Listener.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/RegisterValue.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Scalar.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/State.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/Predicate.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeBreakpoint.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/common/SoftwareBreakpoint.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/GoASTContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/JavaASTContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/OCamlASTContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Either.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/FastDemangle.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Range.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/SafeMachO.h stable/11/contrib/llvm/tools/lldb/source/Core/Broadcaster.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Event.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Listener.cpp stable/11/contrib/llvm/tools/lldb/source/Core/RegisterValue.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Scalar.cpp stable/11/contrib/llvm/tools/lldb/source/Core/State.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpoint.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpointList.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/SoftwareBreakpoint.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Architecture/PPC64/CMakeLists.txt stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoAST.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoLexer.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoLexer.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoParser.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoParser.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoUserExpression.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/gen_go_ast.py stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/PPC64/CMakeLists.txt stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/Go/GoFormatterFunctions.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/Go/GoFormatterFunctions.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/Go/GoLanguage.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/Go/GoLanguage.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/Java/JavaFormatterFunctions.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/Java/JavaFormatterFunctions.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/Java/JavaLanguage.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/Java/JavaLanguage.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/OCaml/OCamlLanguage.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/OCaml/OCamlLanguage.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Java/JavaLanguageRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Java/JavaLanguageRuntime.h stable/11/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.h stable/11/contrib/llvm/tools/lldb/source/Symbol/GoASTContext.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/JavaASTContext.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/OCamlASTContext.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/FastDemangle.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Range.cpp stable/11/contrib/llvm/tools/llvm-mca/Context.cpp stable/11/contrib/llvm/tools/llvm-mca/Context.h stable/11/contrib/llvm/tools/llvm-mca/DispatchStage.cpp stable/11/contrib/llvm/tools/llvm-mca/DispatchStage.h stable/11/contrib/llvm/tools/llvm-mca/DispatchStatistics.cpp stable/11/contrib/llvm/tools/llvm-mca/DispatchStatistics.h stable/11/contrib/llvm/tools/llvm-mca/ExecuteStage.cpp stable/11/contrib/llvm/tools/llvm-mca/ExecuteStage.h stable/11/contrib/llvm/tools/llvm-mca/FetchStage.cpp stable/11/contrib/llvm/tools/llvm-mca/FetchStage.h stable/11/contrib/llvm/tools/llvm-mca/HWEventListener.cpp stable/11/contrib/llvm/tools/llvm-mca/HWEventListener.h stable/11/contrib/llvm/tools/llvm-mca/HardwareUnit.cpp stable/11/contrib/llvm/tools/llvm-mca/HardwareUnit.h stable/11/contrib/llvm/tools/llvm-mca/InstrBuilder.cpp stable/11/contrib/llvm/tools/llvm-mca/InstrBuilder.h stable/11/contrib/llvm/tools/llvm-mca/Instruction.cpp stable/11/contrib/llvm/tools/llvm-mca/Instruction.h stable/11/contrib/llvm/tools/llvm-mca/InstructionInfoView.cpp stable/11/contrib/llvm/tools/llvm-mca/InstructionInfoView.h stable/11/contrib/llvm/tools/llvm-mca/InstructionTables.cpp stable/11/contrib/llvm/tools/llvm-mca/InstructionTables.h stable/11/contrib/llvm/tools/llvm-mca/LSUnit.cpp stable/11/contrib/llvm/tools/llvm-mca/LSUnit.h stable/11/contrib/llvm/tools/llvm-mca/Pipeline.cpp stable/11/contrib/llvm/tools/llvm-mca/Pipeline.h stable/11/contrib/llvm/tools/llvm-mca/RegisterFile.cpp stable/11/contrib/llvm/tools/llvm-mca/RegisterFile.h stable/11/contrib/llvm/tools/llvm-mca/RegisterFileStatistics.cpp stable/11/contrib/llvm/tools/llvm-mca/RegisterFileStatistics.h stable/11/contrib/llvm/tools/llvm-mca/ResourcePressureView.cpp stable/11/contrib/llvm/tools/llvm-mca/ResourcePressureView.h stable/11/contrib/llvm/tools/llvm-mca/RetireControlUnit.cpp stable/11/contrib/llvm/tools/llvm-mca/RetireControlUnit.h stable/11/contrib/llvm/tools/llvm-mca/RetireControlUnitStatistics.cpp stable/11/contrib/llvm/tools/llvm-mca/RetireControlUnitStatistics.h stable/11/contrib/llvm/tools/llvm-mca/RetireStage.cpp stable/11/contrib/llvm/tools/llvm-mca/RetireStage.h stable/11/contrib/llvm/tools/llvm-mca/Scheduler.cpp stable/11/contrib/llvm/tools/llvm-mca/Scheduler.h stable/11/contrib/llvm/tools/llvm-mca/SchedulerStatistics.cpp stable/11/contrib/llvm/tools/llvm-mca/SchedulerStatistics.h stable/11/contrib/llvm/tools/llvm-mca/SourceMgr.h stable/11/contrib/llvm/tools/llvm-mca/Stage.cpp stable/11/contrib/llvm/tools/llvm-mca/Stage.h stable/11/contrib/llvm/tools/llvm-mca/SummaryView.cpp stable/11/contrib/llvm/tools/llvm-mca/SummaryView.h stable/11/contrib/llvm/tools/llvm-mca/Support.cpp stable/11/contrib/llvm/tools/llvm-mca/Support.h stable/11/contrib/llvm/tools/llvm-mca/TimelineView.cpp stable/11/contrib/llvm/tools/llvm-mca/TimelineView.h stable/11/contrib/llvm/tools/llvm-mca/View.cpp stable/11/contrib/llvm/tools/llvm-mca/View.h stable/11/contrib/llvm/tools/llvm-objcopy/Object.cpp stable/11/contrib/llvm/tools/llvm-objcopy/Object.h stable/11/contrib/llvm/tools/llvm-pdbutil/Analyze.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/Analyze.h Modified: stable/11/ObsoleteFiles.inc stable/11/UPDATING stable/11/contrib/compiler-rt/LICENSE.TXT stable/11/contrib/compiler-rt/include/sanitizer/allocator_interface.h stable/11/contrib/compiler-rt/include/sanitizer/common_interface_defs.h stable/11/contrib/compiler-rt/include/sanitizer/hwasan_interface.h stable/11/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h stable/11/contrib/compiler-rt/include/xray/xray_log_interface.h stable/11/contrib/compiler-rt/lib/asan/asan_allocator.h stable/11/contrib/compiler-rt/lib/asan/asan_errors.cc stable/11/contrib/compiler-rt/lib/asan/asan_errors.h stable/11/contrib/compiler-rt/lib/asan/asan_flags.inc stable/11/contrib/compiler-rt/lib/asan/asan_fuchsia.cc stable/11/contrib/compiler-rt/lib/asan/asan_globals.cc stable/11/contrib/compiler-rt/lib/asan/asan_globals_win.cc stable/11/contrib/compiler-rt/lib/asan/asan_internal.h stable/11/contrib/compiler-rt/lib/asan/asan_linux.cc stable/11/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc stable/11/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc stable/11/contrib/compiler-rt/lib/asan/asan_malloc_win.cc stable/11/contrib/compiler-rt/lib/asan/asan_new_delete.cc stable/11/contrib/compiler-rt/lib/asan/asan_posix.cc stable/11/contrib/compiler-rt/lib/asan/asan_report.h stable/11/contrib/compiler-rt/lib/asan/asan_rtems.cc stable/11/contrib/compiler-rt/lib/asan/asan_rtl.cc stable/11/contrib/compiler-rt/lib/asan/asan_thread.cc stable/11/contrib/compiler-rt/lib/asan/asan_win.cc stable/11/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc stable/11/contrib/compiler-rt/lib/builtins/arm/addsf3.S stable/11/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S stable/11/contrib/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S stable/11/contrib/compiler-rt/lib/builtins/clzdi2.c stable/11/contrib/compiler-rt/lib/builtins/cpu_model.c stable/11/contrib/compiler-rt/lib/builtins/ctzdi2.c stable/11/contrib/compiler-rt/lib/builtins/divdc3.c stable/11/contrib/compiler-rt/lib/builtins/divdf3.c stable/11/contrib/compiler-rt/lib/builtins/divsc3.c stable/11/contrib/compiler-rt/lib/builtins/divsf3.c stable/11/contrib/compiler-rt/lib/builtins/divtc3.c stable/11/contrib/compiler-rt/lib/builtins/emutls.c stable/11/contrib/compiler-rt/lib/builtins/fp_lib.h stable/11/contrib/compiler-rt/lib/builtins/gcc_personality_v0.c stable/11/contrib/compiler-rt/lib/builtins/int_lib.h stable/11/contrib/compiler-rt/lib/builtins/int_math.h stable/11/contrib/compiler-rt/lib/builtins/int_types.h stable/11/contrib/compiler-rt/lib/builtins/int_util.c stable/11/contrib/compiler-rt/lib/builtins/int_util.h stable/11/contrib/compiler-rt/lib/builtins/os_version_check.c stable/11/contrib/compiler-rt/lib/builtins/ppc/divtc3.c stable/11/contrib/compiler-rt/lib/cfi/cfi.cc stable/11/contrib/compiler-rt/lib/cfi/cfi_blacklist.txt stable/11/contrib/compiler-rt/lib/dfsan/dfsan.cc stable/11/contrib/compiler-rt/lib/esan/esan_interceptors.cpp stable/11/contrib/compiler-rt/lib/esan/esan_shadow.h stable/11/contrib/compiler-rt/lib/esan/esan_sideline.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerCommand.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerCorpus.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerDefs.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerDriver.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerFlags.def stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerIO.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerIO.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerInternal.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerLoop.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerMutate.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerMutate.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerOptions.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerTracePC.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerUtil.h stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp stable/11/contrib/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp stable/11/contrib/compiler-rt/lib/hwasan/hwasan.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan.h stable/11/contrib/compiler-rt/lib/hwasan/hwasan_allocator.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_allocator.h stable/11/contrib/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_flags.h stable/11/contrib/compiler-rt/lib/hwasan/hwasan_flags.inc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_interceptors.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_interface_internal.h stable/11/contrib/compiler-rt/lib/hwasan/hwasan_linux.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_mapping.h stable/11/contrib/compiler-rt/lib/hwasan/hwasan_new_delete.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_poisoning.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_poisoning.h stable/11/contrib/compiler-rt/lib/hwasan/hwasan_report.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_report.h stable/11/contrib/compiler-rt/lib/hwasan/hwasan_thread.cc stable/11/contrib/compiler-rt/lib/hwasan/hwasan_thread.h stable/11/contrib/compiler-rt/lib/interception/interception.h stable/11/contrib/compiler-rt/lib/interception/interception_linux.h stable/11/contrib/compiler-rt/lib/interception/interception_win.cc stable/11/contrib/compiler-rt/lib/lsan/lsan_allocator.cc stable/11/contrib/compiler-rt/lib/lsan/lsan_allocator.h stable/11/contrib/compiler-rt/lib/lsan/lsan_common_mac.cc stable/11/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc stable/11/contrib/compiler-rt/lib/msan/msan.cc stable/11/contrib/compiler-rt/lib/msan/msan_allocator.cc stable/11/contrib/compiler-rt/lib/msan/msan_interceptors.cc stable/11/contrib/compiler-rt/lib/msan/msan_linux.cc stable/11/contrib/compiler-rt/lib/profile/GCDAProfiling.c stable/11/contrib/compiler-rt/lib/profile/InstrProfData.inc stable/11/contrib/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c stable/11/contrib/compiler-rt/lib/profile/InstrProfilingPlatformOther.c stable/11/contrib/compiler-rt/lib/profile/InstrProfilingValue.c stable/11/contrib/compiler-rt/lib/profile/WindowsMMap.c stable/11/contrib/compiler-rt/lib/profile/WindowsMMap.h stable/11/contrib/compiler-rt/lib/safestack/safestack.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_bytemap.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_size_class_map.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_sections.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_file.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_malloc_mac.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_openbsd.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_rtems.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_solaris.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_aarch64.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_arm.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_termination.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc stable/11/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h stable/11/contrib/compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt stable/11/contrib/compiler-rt/lib/scudo/scudo_allocator.cpp stable/11/contrib/compiler-rt/lib/scudo/scudo_allocator.h stable/11/contrib/compiler-rt/lib/scudo/scudo_malloc.cpp stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_debugging.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.inc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.h stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_platform.h stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_report.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.h stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc stable/11/contrib/compiler-rt/lib/ubsan/ubsan_checks.inc stable/11/contrib/compiler-rt/lib/ubsan/ubsan_flags.inc stable/11/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc stable/11/contrib/compiler-rt/lib/ubsan/ubsan_handlers.h stable/11/contrib/compiler-rt/lib/ubsan/ubsan_interface.inc stable/11/contrib/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc stable/11/contrib/compiler-rt/lib/xray/xray_allocator.h stable/11/contrib/compiler-rt/lib/xray/xray_basic_logging.cc stable/11/contrib/compiler-rt/lib/xray/xray_buffer_queue.cc stable/11/contrib/compiler-rt/lib/xray/xray_buffer_queue.h stable/11/contrib/compiler-rt/lib/xray/xray_defs.h stable/11/contrib/compiler-rt/lib/xray/xray_fdr_log_records.h stable/11/contrib/compiler-rt/lib/xray/xray_fdr_logging.cc stable/11/contrib/compiler-rt/lib/xray/xray_function_call_trie.h stable/11/contrib/compiler-rt/lib/xray/xray_init.cc stable/11/contrib/compiler-rt/lib/xray/xray_interface.cc stable/11/contrib/compiler-rt/lib/xray/xray_profile_collector.cc stable/11/contrib/compiler-rt/lib/xray/xray_profile_collector.h stable/11/contrib/compiler-rt/lib/xray/xray_profiling.cc stable/11/contrib/compiler-rt/lib/xray/xray_profiling_flags.inc stable/11/contrib/compiler-rt/lib/xray/xray_segmented_array.h stable/11/contrib/compiler-rt/lib/xray/xray_trampoline_x86_64.S stable/11/contrib/compiler-rt/lib/xray/xray_tsc.h stable/11/contrib/compiler-rt/lib/xray/xray_utils.cc stable/11/contrib/compiler-rt/lib/xray/xray_utils.h stable/11/contrib/compiler-rt/lib/xray/xray_x86_64.cc stable/11/contrib/libc++/LICENSE.TXT stable/11/contrib/libc++/include/__bit_reference stable/11/contrib/libc++/include/__config stable/11/contrib/libc++/include/__debug stable/11/contrib/libc++/include/__functional_base stable/11/contrib/libc++/include/__hash_table stable/11/contrib/libc++/include/__libcpp_version stable/11/contrib/libc++/include/__locale stable/11/contrib/libc++/include/__mutex_base stable/11/contrib/libc++/include/__node_handle stable/11/contrib/libc++/include/__sso_allocator stable/11/contrib/libc++/include/__string stable/11/contrib/libc++/include/__threading_support stable/11/contrib/libc++/include/__tree stable/11/contrib/libc++/include/__tuple stable/11/contrib/libc++/include/algorithm stable/11/contrib/libc++/include/any stable/11/contrib/libc++/include/array stable/11/contrib/libc++/include/atomic stable/11/contrib/libc++/include/bitset stable/11/contrib/libc++/include/charconv stable/11/contrib/libc++/include/chrono stable/11/contrib/libc++/include/cmath stable/11/contrib/libc++/include/complex stable/11/contrib/libc++/include/cstddef stable/11/contrib/libc++/include/deque stable/11/contrib/libc++/include/exception stable/11/contrib/libc++/include/experimental/any stable/11/contrib/libc++/include/experimental/chrono stable/11/contrib/libc++/include/experimental/coroutine stable/11/contrib/libc++/include/experimental/memory_resource stable/11/contrib/libc++/include/experimental/numeric stable/11/contrib/libc++/include/experimental/optional stable/11/contrib/libc++/include/experimental/ratio stable/11/contrib/libc++/include/experimental/string_view stable/11/contrib/libc++/include/experimental/system_error stable/11/contrib/libc++/include/experimental/tuple stable/11/contrib/libc++/include/filesystem stable/11/contrib/libc++/include/forward_list stable/11/contrib/libc++/include/fstream stable/11/contrib/libc++/include/functional stable/11/contrib/libc++/include/future stable/11/contrib/libc++/include/iomanip stable/11/contrib/libc++/include/iosfwd stable/11/contrib/libc++/include/istream stable/11/contrib/libc++/include/iterator stable/11/contrib/libc++/include/limits stable/11/contrib/libc++/include/list stable/11/contrib/libc++/include/locale stable/11/contrib/libc++/include/map stable/11/contrib/libc++/include/memory stable/11/contrib/libc++/include/module.modulemap stable/11/contrib/libc++/include/mutex stable/11/contrib/libc++/include/new stable/11/contrib/libc++/include/numeric stable/11/contrib/libc++/include/optional stable/11/contrib/libc++/include/ostream stable/11/contrib/libc++/include/random stable/11/contrib/libc++/include/regex stable/11/contrib/libc++/include/scoped_allocator stable/11/contrib/libc++/include/set stable/11/contrib/libc++/include/shared_mutex stable/11/contrib/libc++/include/span stable/11/contrib/libc++/include/sstream stable/11/contrib/libc++/include/stddef.h stable/11/contrib/libc++/include/stdexcept stable/11/contrib/libc++/include/streambuf stable/11/contrib/libc++/include/string stable/11/contrib/libc++/include/string_view stable/11/contrib/libc++/include/thread stable/11/contrib/libc++/include/tuple stable/11/contrib/libc++/include/type_traits stable/11/contrib/libc++/include/typeinfo stable/11/contrib/libc++/include/unordered_map stable/11/contrib/libc++/include/unordered_set stable/11/contrib/libc++/include/utility stable/11/contrib/libc++/include/valarray stable/11/contrib/libc++/include/variant stable/11/contrib/libc++/include/vector stable/11/contrib/libc++/include/version stable/11/contrib/libc++/src/experimental/memory_resource.cpp stable/11/contrib/libc++/src/filesystem/filesystem_common.h stable/11/contrib/libc++/src/filesystem/operations.cpp stable/11/contrib/libc++/src/future.cpp stable/11/contrib/libc++/src/iostream.cpp stable/11/contrib/libc++/src/new.cpp stable/11/contrib/libc++/src/support/runtime/exception_fallback.ipp stable/11/contrib/libc++/src/support/runtime/exception_glibcxx.ipp stable/11/contrib/libc++/src/support/runtime/exception_libcxxrt.ipp stable/11/contrib/libc++/src/support/runtime/exception_msvc.ipp stable/11/contrib/libc++/src/thread.cpp stable/11/contrib/llvm/FREEBSD-Xlist stable/11/contrib/llvm/LICENSE.TXT stable/11/contrib/llvm/include/llvm-c/Core.h stable/11/contrib/llvm/include/llvm-c/DebugInfo.h stable/11/contrib/llvm/include/llvm-c/ExecutionEngine.h stable/11/contrib/llvm/include/llvm-c/OrcBindings.h stable/11/contrib/llvm/include/llvm-c/TargetMachine.h stable/11/contrib/llvm/include/llvm-c/Transforms/Scalar.h stable/11/contrib/llvm/include/llvm-c/Types.h stable/11/contrib/llvm/include/llvm-c/lto.h stable/11/contrib/llvm/include/llvm/ADT/APFloat.h stable/11/contrib/llvm/include/llvm/ADT/APInt.h stable/11/contrib/llvm/include/llvm/ADT/Any.h stable/11/contrib/llvm/include/llvm/ADT/BitVector.h stable/11/contrib/llvm/include/llvm/ADT/DenseMap.h stable/11/contrib/llvm/include/llvm/ADT/DenseSet.h stable/11/contrib/llvm/include/llvm/ADT/GraphTraits.h stable/11/contrib/llvm/include/llvm/ADT/Hashing.h stable/11/contrib/llvm/include/llvm/ADT/ImmutableList.h stable/11/contrib/llvm/include/llvm/ADT/IntervalMap.h stable/11/contrib/llvm/include/llvm/ADT/Optional.h stable/11/contrib/llvm/include/llvm/ADT/PointerIntPair.h stable/11/contrib/llvm/include/llvm/ADT/PointerSumType.h stable/11/contrib/llvm/include/llvm/ADT/PostOrderIterator.h stable/11/contrib/llvm/include/llvm/ADT/STLExtras.h stable/11/contrib/llvm/include/llvm/ADT/SmallBitVector.h stable/11/contrib/llvm/include/llvm/ADT/SmallVector.h stable/11/contrib/llvm/include/llvm/ADT/SparseBitVector.h stable/11/contrib/llvm/include/llvm/ADT/StringExtras.h stable/11/contrib/llvm/include/llvm/ADT/Triple.h stable/11/contrib/llvm/include/llvm/ADT/iterator.h stable/11/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h stable/11/contrib/llvm/include/llvm/Analysis/BasicAliasAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h stable/11/contrib/llvm/include/llvm/Analysis/CFG.h stable/11/contrib/llvm/include/llvm/Analysis/CFGPrinter.h stable/11/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h stable/11/contrib/llvm/include/llvm/Analysis/CaptureTracking.h stable/11/contrib/llvm/include/llvm/Analysis/CmpInstAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/DemandedBits.h stable/11/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/DivergenceAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/GlobalsModRef.h stable/11/contrib/llvm/include/llvm/Analysis/InlineCost.h stable/11/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h stable/11/contrib/llvm/include/llvm/Analysis/IteratedDominanceFrontier.h stable/11/contrib/llvm/include/llvm/Analysis/LoopAccessAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/LoopInfo.h stable/11/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h stable/11/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/MemoryLocation.h stable/11/contrib/llvm/include/llvm/Analysis/MemorySSA.h stable/11/contrib/llvm/include/llvm/Analysis/MemorySSAUpdater.h stable/11/contrib/llvm/include/llvm/Analysis/MustExecute.h stable/11/contrib/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h stable/11/contrib/llvm/include/llvm/Analysis/ObjCARCInstKind.h stable/11/contrib/llvm/include/llvm/Analysis/Passes.h stable/11/contrib/llvm/include/llvm/Analysis/PhiValues.h stable/11/contrib/llvm/include/llvm/Analysis/ProfileSummaryInfo.h stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h stable/11/contrib/llvm/include/llvm/Analysis/ScopedNoAliasAA.h stable/11/contrib/llvm/include/llvm/Analysis/SparsePropagation.h stable/11/contrib/llvm/include/llvm/Analysis/SyntheticCountsUtils.h stable/11/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.def stable/11/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h stable/11/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h stable/11/contrib/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h stable/11/contrib/llvm/include/llvm/Analysis/TypeMetadataUtils.h stable/11/contrib/llvm/include/llvm/Analysis/ValueTracking.h stable/11/contrib/llvm/include/llvm/Analysis/VectorUtils.h stable/11/contrib/llvm/include/llvm/BinaryFormat/Dwarf.def stable/11/contrib/llvm/include/llvm/BinaryFormat/Dwarf.h stable/11/contrib/llvm/include/llvm/BinaryFormat/ELF.h stable/11/contrib/llvm/include/llvm/BinaryFormat/MachO.h stable/11/contrib/llvm/include/llvm/BinaryFormat/Wasm.h stable/11/contrib/llvm/include/llvm/BinaryFormat/WasmRelocs.def stable/11/contrib/llvm/include/llvm/Bitcode/BitcodeReader.h stable/11/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h stable/11/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h stable/11/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h stable/11/contrib/llvm/include/llvm/CodeGen/CommandFlags.inc stable/11/contrib/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h stable/11/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/GCMetadata.h stable/11/contrib/llvm/include/llvm/CodeGen/GCMetadataPrinter.h stable/11/contrib/llvm/include/llvm/CodeGen/GCStrategy.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/Combiner.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/CombinerInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/ConstantFoldingMIRBuilder.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/GISelWorkList.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/GlobalISel/Utils.h stable/11/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h stable/11/contrib/llvm/include/llvm/CodeGen/LinkAllAsmWriterComponents.h stable/11/contrib/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h stable/11/contrib/llvm/include/llvm/CodeGen/LiveIntervals.h stable/11/contrib/llvm/include/llvm/CodeGen/LivePhysRegs.h stable/11/contrib/llvm/include/llvm/CodeGen/LiveRegUnits.h stable/11/contrib/llvm/include/llvm/CodeGen/MIRYamlMapping.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineFunction.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineInstr.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineOutliner.h stable/11/contrib/llvm/include/llvm/CodeGen/MachinePassRegistry.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h stable/11/contrib/llvm/include/llvm/CodeGen/Passes.h stable/11/contrib/llvm/include/llvm/CodeGen/PreISelIntrinsicLowering.h stable/11/contrib/llvm/include/llvm/CodeGen/PseudoSourceValue.h stable/11/contrib/llvm/include/llvm/CodeGen/RegAllocRegistry.h stable/11/contrib/llvm/include/llvm/CodeGen/RegisterUsageInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h stable/11/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h stable/11/contrib/llvm/include/llvm/CodeGen/SchedulerRegistry.h stable/11/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h stable/11/contrib/llvm/include/llvm/CodeGen/SelectionDAGAddressAnalysis.h stable/11/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h stable/11/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h stable/11/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h stable/11/contrib/llvm/include/llvm/CodeGen/StackMaps.h stable/11/contrib/llvm/include/llvm/CodeGen/TargetFrameLowering.h stable/11/contrib/llvm/include/llvm/CodeGen/TargetInstrInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/TargetLowering.h stable/11/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h stable/11/contrib/llvm/include/llvm/CodeGen/TargetPassConfig.h stable/11/contrib/llvm/include/llvm/CodeGen/TargetRegisterInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h stable/11/contrib/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/CVRecord.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeView.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewRegisters.def stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/RecordSerialization.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDumper.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeIndex.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h stable/11/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h stable/11/contrib/llvm/include/llvm/DebugInfo/DIContext.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFGdbIndex.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFListTable.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFObject.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFSection.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h stable/11/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h stable/11/contrib/llvm/include/llvm/DebugInfo/MSF/MSFError.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/GenericError.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiStream.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/GSIStreamBuilder.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/GlobalsStream.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/RawError.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/TpiHashing.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/Native/TpiStream.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h stable/11/contrib/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h stable/11/contrib/llvm/include/llvm/Demangle/Demangle.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/JITEventListener.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/JITSymbol.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/Core.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/Layer.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/Legacy.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/NullResolver.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h stable/11/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h stable/11/contrib/llvm/include/llvm/IR/Attributes.h stable/11/contrib/llvm/include/llvm/IR/Attributes.td stable/11/contrib/llvm/include/llvm/IR/BasicBlock.h stable/11/contrib/llvm/include/llvm/IR/CFG.h stable/11/contrib/llvm/include/llvm/IR/CallSite.h stable/11/contrib/llvm/include/llvm/IR/CallingConv.h stable/11/contrib/llvm/include/llvm/IR/Constant.h stable/11/contrib/llvm/include/llvm/IR/Constants.h stable/11/contrib/llvm/include/llvm/IR/DIBuilder.h stable/11/contrib/llvm/include/llvm/IR/DataLayout.h stable/11/contrib/llvm/include/llvm/IR/DebugInfoFlags.def stable/11/contrib/llvm/include/llvm/IR/DebugInfoMetadata.h stable/11/contrib/llvm/include/llvm/IR/DebugLoc.h stable/11/contrib/llvm/include/llvm/IR/DiagnosticInfo.h stable/11/contrib/llvm/include/llvm/IR/DomTreeUpdater.h stable/11/contrib/llvm/include/llvm/IR/Dominators.h stable/11/contrib/llvm/include/llvm/IR/Function.h stable/11/contrib/llvm/include/llvm/IR/GlobalValue.h stable/11/contrib/llvm/include/llvm/IR/IRBuilder.h stable/11/contrib/llvm/include/llvm/IR/IRPrintingPasses.h stable/11/contrib/llvm/include/llvm/IR/InstVisitor.h stable/11/contrib/llvm/include/llvm/IR/InstrTypes.h stable/11/contrib/llvm/include/llvm/IR/Instruction.def stable/11/contrib/llvm/include/llvm/IR/Instruction.h stable/11/contrib/llvm/include/llvm/IR/Instructions.h stable/11/contrib/llvm/include/llvm/IR/IntrinsicInst.h stable/11/contrib/llvm/include/llvm/IR/Intrinsics.td stable/11/contrib/llvm/include/llvm/IR/IntrinsicsAArch64.td stable/11/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td stable/11/contrib/llvm/include/llvm/IR/IntrinsicsHexagon.td stable/11/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td stable/11/contrib/llvm/include/llvm/IR/IntrinsicsWebAssembly.td stable/11/contrib/llvm/include/llvm/IR/IntrinsicsX86.td stable/11/contrib/llvm/include/llvm/IR/LLVMContext.h stable/11/contrib/llvm/include/llvm/IR/LegacyPassManager.h stable/11/contrib/llvm/include/llvm/IR/LegacyPassManagers.h stable/11/contrib/llvm/include/llvm/IR/Metadata.h stable/11/contrib/llvm/include/llvm/IR/Module.h stable/11/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h stable/11/contrib/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h stable/11/contrib/llvm/include/llvm/IR/Operator.h stable/11/contrib/llvm/include/llvm/IR/PassManager.h stable/11/contrib/llvm/include/llvm/IR/PassManagerInternal.h stable/11/contrib/llvm/include/llvm/IR/PatternMatch.h stable/11/contrib/llvm/include/llvm/IR/RuntimeLibcalls.def stable/11/contrib/llvm/include/llvm/IR/Value.h stable/11/contrib/llvm/include/llvm/InitializePasses.h stable/11/contrib/llvm/include/llvm/LTO/Config.h stable/11/contrib/llvm/include/llvm/LTO/LTO.h stable/11/contrib/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h stable/11/contrib/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h stable/11/contrib/llvm/include/llvm/LinkAllPasses.h stable/11/contrib/llvm/include/llvm/MC/MCAsmInfoWasm.h stable/11/contrib/llvm/include/llvm/MC/MCAsmMacro.h stable/11/contrib/llvm/include/llvm/MC/MCAssembler.h stable/11/contrib/llvm/include/llvm/MC/MCCodeView.h stable/11/contrib/llvm/include/llvm/MC/MCContext.h stable/11/contrib/llvm/include/llvm/MC/MCDwarf.h stable/11/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h stable/11/contrib/llvm/include/llvm/MC/MCExpr.h stable/11/contrib/llvm/include/llvm/MC/MCInst.h stable/11/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h stable/11/contrib/llvm/include/llvm/MC/MCInstrDesc.h stable/11/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h stable/11/contrib/llvm/include/llvm/MC/MCObjectStreamer.h stable/11/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h stable/11/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h stable/11/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h stable/11/contrib/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h stable/11/contrib/llvm/include/llvm/MC/MCRegisterInfo.h stable/11/contrib/llvm/include/llvm/MC/MCSchedule.h stable/11/contrib/llvm/include/llvm/MC/MCSection.h stable/11/contrib/llvm/include/llvm/MC/MCStreamer.h stable/11/contrib/llvm/include/llvm/MC/MCSymbolWasm.h stable/11/contrib/llvm/include/llvm/MC/MCWasmObjectWriter.h stable/11/contrib/llvm/include/llvm/MC/MCWin64EH.h stable/11/contrib/llvm/include/llvm/MC/MCWinEH.h stable/11/contrib/llvm/include/llvm/Object/COFF.h stable/11/contrib/llvm/include/llvm/Object/ELF.h stable/11/contrib/llvm/include/llvm/Object/ELFObjectFile.h stable/11/contrib/llvm/include/llvm/Object/ELFTypes.h stable/11/contrib/llvm/include/llvm/Object/Error.h stable/11/contrib/llvm/include/llvm/Object/MachO.h stable/11/contrib/llvm/include/llvm/Object/ObjectFile.h stable/11/contrib/llvm/include/llvm/Object/RelocVisitor.h stable/11/contrib/llvm/include/llvm/Object/Wasm.h stable/11/contrib/llvm/include/llvm/Object/WasmTraits.h stable/11/contrib/llvm/include/llvm/ObjectYAML/COFFYAML.h stable/11/contrib/llvm/include/llvm/ObjectYAML/ELFYAML.h stable/11/contrib/llvm/include/llvm/ObjectYAML/WasmYAML.h stable/11/contrib/llvm/include/llvm/Option/OptTable.h stable/11/contrib/llvm/include/llvm/Pass.h stable/11/contrib/llvm/include/llvm/Passes/PassBuilder.h stable/11/contrib/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h stable/11/contrib/llvm/include/llvm/ProfileData/GCOV.h stable/11/contrib/llvm/include/llvm/ProfileData/InstrProf.h stable/11/contrib/llvm/include/llvm/ProfileData/InstrProfReader.h stable/11/contrib/llvm/include/llvm/ProfileData/SampleProf.h stable/11/contrib/llvm/include/llvm/ProfileData/SampleProfReader.h stable/11/contrib/llvm/include/llvm/ProfileData/SampleProfWriter.h stable/11/contrib/llvm/include/llvm/Support/AArch64TargetParser.def stable/11/contrib/llvm/include/llvm/Support/AMDGPUMetadata.h stable/11/contrib/llvm/include/llvm/Support/ARMTargetParser.def stable/11/contrib/llvm/include/llvm/Support/ARMWinEH.h stable/11/contrib/llvm/include/llvm/Support/Allocator.h stable/11/contrib/llvm/include/llvm/Support/BinaryStreamArray.h stable/11/contrib/llvm/include/llvm/Support/BinaryStreamReader.h stable/11/contrib/llvm/include/llvm/Support/Chrono.h stable/11/contrib/llvm/include/llvm/Support/CodeGen.h stable/11/contrib/llvm/include/llvm/Support/CommandLine.h stable/11/contrib/llvm/include/llvm/Support/Compiler.h stable/11/contrib/llvm/include/llvm/Support/Compression.h stable/11/contrib/llvm/include/llvm/Support/Debug.h stable/11/contrib/llvm/include/llvm/Support/DebugCounter.h stable/11/contrib/llvm/include/llvm/Support/Error.h stable/11/contrib/llvm/include/llvm/Support/ErrorHandling.h stable/11/contrib/llvm/include/llvm/Support/FileOutputBuffer.h stable/11/contrib/llvm/include/llvm/Support/FileSystem.h stable/11/contrib/llvm/include/llvm/Support/FormatVariadicDetails.h stable/11/contrib/llvm/include/llvm/Support/GenericDomTree.h stable/11/contrib/llvm/include/llvm/Support/GenericDomTreeConstruction.h stable/11/contrib/llvm/include/llvm/Support/GraphWriter.h stable/11/contrib/llvm/include/llvm/Support/JSON.h stable/11/contrib/llvm/include/llvm/Support/LowLevelTypeImpl.h stable/11/contrib/llvm/include/llvm/Support/Path.h stable/11/contrib/llvm/include/llvm/Support/ScopedPrinter.h stable/11/contrib/llvm/include/llvm/Support/TargetOpcodes.def stable/11/contrib/llvm/include/llvm/Support/TargetParser.h stable/11/contrib/llvm/include/llvm/Support/Threading.h stable/11/contrib/llvm/include/llvm/Support/Timer.h stable/11/contrib/llvm/include/llvm/Support/Win64EH.h stable/11/contrib/llvm/include/llvm/Support/WithColor.h stable/11/contrib/llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h stable/11/contrib/llvm/include/llvm/Support/X86TargetParser.def stable/11/contrib/llvm/include/llvm/Support/YAMLTraits.h stable/11/contrib/llvm/include/llvm/Support/raw_ostream.h stable/11/contrib/llvm/include/llvm/Support/type_traits.h stable/11/contrib/llvm/include/llvm/TableGen/StringMatcher.h stable/11/contrib/llvm/include/llvm/Target/CodeGenCWrappers.h stable/11/contrib/llvm/include/llvm/Target/GenericOpcodes.td stable/11/contrib/llvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td stable/11/contrib/llvm/include/llvm/Target/Target.td stable/11/contrib/llvm/include/llvm/Target/TargetInstrPredicate.td stable/11/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h stable/11/contrib/llvm/include/llvm/Target/TargetMachine.h stable/11/contrib/llvm/include/llvm/Target/TargetOptions.h stable/11/contrib/llvm/include/llvm/Target/TargetSchedule.td stable/11/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td stable/11/contrib/llvm/include/llvm/Testing/Support/SupportHelpers.h stable/11/contrib/llvm/include/llvm/Transforms/IPO.h stable/11/contrib/llvm/include/llvm/Transforms/IPO/FunctionAttrs.h stable/11/contrib/llvm/include/llvm/Transforms/IPO/FunctionImport.h stable/11/contrib/llvm/include/llvm/Transforms/IPO/SampleProfile.h stable/11/contrib/llvm/include/llvm/Transforms/Instrumentation.h stable/11/contrib/llvm/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/ConstantHoisting.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/GVN.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/JumpThreading.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/LoopUnrollPass.h stable/11/contrib/llvm/include/llvm/Transforms/Scalar/SCCP.h stable/11/contrib/llvm/include/llvm/Transforms/Utils.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/CodeExtractor.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/FunctionImportUtils.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/Local.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/LoopRotationUtils.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/PredicateInfo.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h stable/11/contrib/llvm/include/llvm/Transforms/Utils/UnrollLoop.h stable/11/contrib/llvm/include/llvm/Transforms/Vectorize.h stable/11/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h stable/11/contrib/llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h stable/11/contrib/llvm/include/llvm/XRay/Trace.h stable/11/contrib/llvm/include/llvm/XRay/XRayRecord.h stable/11/contrib/llvm/include/llvm/XRay/YAMLXRayRecord.h stable/11/contrib/llvm/include/llvm/module.modulemap stable/11/contrib/llvm/lib/Analysis/AliasAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp stable/11/contrib/llvm/lib/Analysis/AliasSetTracker.cpp stable/11/contrib/llvm/lib/Analysis/Analysis.cpp stable/11/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp stable/11/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp stable/11/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp stable/11/contrib/llvm/lib/Analysis/CFG.cpp stable/11/contrib/llvm/lib/Analysis/CFGPrinter.cpp stable/11/contrib/llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/CFLGraph.h stable/11/contrib/llvm/lib/Analysis/CGSCCPassManager.cpp stable/11/contrib/llvm/lib/Analysis/CallGraph.cpp stable/11/contrib/llvm/lib/Analysis/CallGraphSCCPass.cpp stable/11/contrib/llvm/lib/Analysis/CaptureTracking.cpp stable/11/contrib/llvm/lib/Analysis/CmpInstAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/ConstantFolding.cpp stable/11/contrib/llvm/lib/Analysis/DemandedBits.cpp stable/11/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/DivergenceAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/EHPersonalities.cpp stable/11/contrib/llvm/lib/Analysis/GlobalsModRef.cpp stable/11/contrib/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/InlineCost.cpp stable/11/contrib/llvm/lib/Analysis/InstructionSimplify.cpp stable/11/contrib/llvm/lib/Analysis/IteratedDominanceFrontier.cpp stable/11/contrib/llvm/lib/Analysis/LazyCallGraph.cpp stable/11/contrib/llvm/lib/Analysis/LazyValueInfo.cpp stable/11/contrib/llvm/lib/Analysis/Lint.cpp stable/11/contrib/llvm/lib/Analysis/Loads.cpp stable/11/contrib/llvm/lib/Analysis/LoopAccessAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/LoopAnalysisManager.cpp stable/11/contrib/llvm/lib/Analysis/LoopInfo.cpp stable/11/contrib/llvm/lib/Analysis/LoopPass.cpp stable/11/contrib/llvm/lib/Analysis/MemDepPrinter.cpp stable/11/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/MemoryLocation.cpp stable/11/contrib/llvm/lib/Analysis/MemorySSA.cpp stable/11/contrib/llvm/lib/Analysis/MemorySSAUpdater.cpp stable/11/contrib/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/MustExecute.cpp stable/11/contrib/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/ObjCARCInstKind.cpp stable/11/contrib/llvm/lib/Analysis/OrderedBasicBlock.cpp stable/11/contrib/llvm/lib/Analysis/PhiValues.cpp stable/11/contrib/llvm/lib/Analysis/ProfileSummaryInfo.cpp stable/11/contrib/llvm/lib/Analysis/RegionPass.cpp stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp stable/11/contrib/llvm/lib/Analysis/ScopedNoAliasAA.cpp stable/11/contrib/llvm/lib/Analysis/SyntheticCountsUtils.cpp stable/11/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp stable/11/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp stable/11/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp stable/11/contrib/llvm/lib/Analysis/TypeMetadataUtils.cpp stable/11/contrib/llvm/lib/Analysis/ValueTracking.cpp stable/11/contrib/llvm/lib/Analysis/VectorUtils.cpp stable/11/contrib/llvm/lib/AsmParser/LLLexer.cpp stable/11/contrib/llvm/lib/AsmParser/LLParser.cpp stable/11/contrib/llvm/lib/AsmParser/LLParser.h stable/11/contrib/llvm/lib/AsmParser/LLToken.h stable/11/contrib/llvm/lib/BinaryFormat/Dwarf.cpp stable/11/contrib/llvm/lib/BinaryFormat/Magic.cpp stable/11/contrib/llvm/lib/BinaryFormat/Wasm.cpp stable/11/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp stable/11/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.cpp stable/11/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.h stable/11/contrib/llvm/lib/Bitcode/Reader/ValueList.cpp stable/11/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp stable/11/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp stable/11/contrib/llvm/lib/CodeGen/Analysis.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/AddressPool.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/WinCFGuard.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.h stable/11/contrib/llvm/lib/CodeGen/AtomicExpandPass.cpp stable/11/contrib/llvm/lib/CodeGen/BranchFolding.cpp stable/11/contrib/llvm/lib/CodeGen/BreakFalseDeps.cpp stable/11/contrib/llvm/lib/CodeGen/BuiltinGCs.cpp stable/11/contrib/llvm/lib/CodeGen/CFIInstrInserter.cpp stable/11/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp stable/11/contrib/llvm/lib/CodeGen/CodeGen.cpp stable/11/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp stable/11/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp stable/11/contrib/llvm/lib/CodeGen/EarlyIfConversion.cpp stable/11/contrib/llvm/lib/CodeGen/ExpandMemCmp.cpp stable/11/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp stable/11/contrib/llvm/lib/CodeGen/GCMetadata.cpp stable/11/contrib/llvm/lib/CodeGen/GCRootLowering.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/Combiner.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalISel/Utils.cpp stable/11/contrib/llvm/lib/CodeGen/GlobalMerge.cpp stable/11/contrib/llvm/lib/CodeGen/IfConversion.cpp stable/11/contrib/llvm/lib/CodeGen/ImplicitNullChecks.cpp stable/11/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp stable/11/contrib/llvm/lib/CodeGen/LatencyPriorityQueue.cpp stable/11/contrib/llvm/lib/CodeGen/LiveDebugValues.cpp stable/11/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp stable/11/contrib/llvm/lib/CodeGen/LiveDebugVariables.h stable/11/contrib/llvm/lib/CodeGen/LiveInterval.cpp stable/11/contrib/llvm/lib/CodeGen/LivePhysRegs.cpp stable/11/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp stable/11/contrib/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp stable/11/contrib/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp stable/11/contrib/llvm/lib/CodeGen/MIRParser/MILexer.cpp stable/11/contrib/llvm/lib/CodeGen/MIRParser/MILexer.h stable/11/contrib/llvm/lib/CodeGen/MIRParser/MIParser.cpp stable/11/contrib/llvm/lib/CodeGen/MIRParser/MIRParser.cpp stable/11/contrib/llvm/lib/CodeGen/MIRPrinter.cpp stable/11/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp stable/11/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp stable/11/contrib/llvm/lib/CodeGen/MachineCSE.cpp stable/11/contrib/llvm/lib/CodeGen/MachineCombiner.cpp stable/11/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp stable/11/contrib/llvm/lib/CodeGen/MachineFunction.cpp stable/11/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp stable/11/contrib/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp stable/11/contrib/llvm/lib/CodeGen/MachineInstr.cpp stable/11/contrib/llvm/lib/CodeGen/MachineInstrBundle.cpp stable/11/contrib/llvm/lib/CodeGen/MachineLICM.cpp stable/11/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp stable/11/contrib/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp stable/11/contrib/llvm/lib/CodeGen/MachineOperand.cpp stable/11/contrib/llvm/lib/CodeGen/MachineOutliner.cpp stable/11/contrib/llvm/lib/CodeGen/MachinePipeliner.cpp stable/11/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp stable/11/contrib/llvm/lib/CodeGen/MachineScheduler.cpp stable/11/contrib/llvm/lib/CodeGen/MachineSink.cpp stable/11/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp stable/11/contrib/llvm/lib/CodeGen/MachineVerifier.cpp stable/11/contrib/llvm/lib/CodeGen/MacroFusion.cpp stable/11/contrib/llvm/lib/CodeGen/OptimizePHIs.cpp stable/11/contrib/llvm/lib/CodeGen/PHIElimination.cpp stable/11/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp stable/11/contrib/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp stable/11/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp stable/11/contrib/llvm/lib/CodeGen/PseudoSourceValue.cpp stable/11/contrib/llvm/lib/CodeGen/ReachingDefAnalysis.cpp stable/11/contrib/llvm/lib/CodeGen/RegAllocFast.cpp stable/11/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp stable/11/contrib/llvm/lib/CodeGen/RegUsageInfoCollector.cpp stable/11/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp stable/11/contrib/llvm/lib/CodeGen/RegisterPressure.cpp stable/11/contrib/llvm/lib/CodeGen/RegisterUsageInfo.cpp stable/11/contrib/llvm/lib/CodeGen/SafeStack.cpp stable/11/contrib/llvm/lib/CodeGen/SafeStackColoring.cpp stable/11/contrib/llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp stable/11/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp stable/11/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp stable/11/contrib/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp stable/11/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp stable/11/contrib/llvm/lib/CodeGen/SlotIndexes.cpp stable/11/contrib/llvm/lib/CodeGen/SplitKit.h stable/11/contrib/llvm/lib/CodeGen/StackColoring.cpp stable/11/contrib/llvm/lib/CodeGen/StackMaps.cpp stable/11/contrib/llvm/lib/CodeGen/StackProtector.cpp stable/11/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp stable/11/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp stable/11/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp stable/11/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp stable/11/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp stable/11/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp stable/11/contrib/llvm/lib/CodeGen/TargetPassConfig.cpp stable/11/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp stable/11/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp stable/11/contrib/llvm/lib/CodeGen/VirtRegMap.cpp stable/11/contrib/llvm/lib/CodeGen/WasmEHPrepare.cpp stable/11/contrib/llvm/lib/CodeGen/WinEHPrepare.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/CVSymbolVisitor.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/EnumTables.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/TypeIndex.cpp stable/11/contrib/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp stable/11/contrib/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp stable/11/contrib/llvm/lib/DebugInfo/MSF/MSFError.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASectionContrib.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASourceFile.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/DIA/DIATable.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/GenericError.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/RawError.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/TpiHashing.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/Native/TpiStream.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDB.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBExtras.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCustom.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolLabel.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp stable/11/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp stable/11/contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp stable/11/contrib/llvm/lib/Demangle/ItaniumDemangle.cpp stable/11/contrib/llvm/lib/Demangle/MicrosoftDemangle.cpp stable/11/contrib/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp stable/11/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp stable/11/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp stable/11/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h stable/11/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/Core.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/Layer.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/Legacy.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/NullResolver.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/OrcCBindings.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h stable/11/contrib/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp stable/11/contrib/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h stable/11/contrib/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp stable/11/contrib/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITSymbol.cpp stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h stable/11/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h stable/11/contrib/llvm/lib/FuzzMutate/IRMutator.cpp stable/11/contrib/llvm/lib/FuzzMutate/RandomIRBuilder.cpp stable/11/contrib/llvm/lib/IR/AsmWriter.cpp stable/11/contrib/llvm/lib/IR/Attributes.cpp stable/11/contrib/llvm/lib/IR/AutoUpgrade.cpp stable/11/contrib/llvm/lib/IR/BasicBlock.cpp stable/11/contrib/llvm/lib/IR/ConstantFold.cpp stable/11/contrib/llvm/lib/IR/Constants.cpp stable/11/contrib/llvm/lib/IR/ConstantsContext.h stable/11/contrib/llvm/lib/IR/Core.cpp stable/11/contrib/llvm/lib/IR/DIBuilder.cpp stable/11/contrib/llvm/lib/IR/DataLayout.cpp stable/11/contrib/llvm/lib/IR/DebugInfo.cpp stable/11/contrib/llvm/lib/IR/DebugInfoMetadata.cpp stable/11/contrib/llvm/lib/IR/DebugLoc.cpp stable/11/contrib/llvm/lib/IR/DiagnosticInfo.cpp stable/11/contrib/llvm/lib/IR/DomTreeUpdater.cpp stable/11/contrib/llvm/lib/IR/Dominators.cpp stable/11/contrib/llvm/lib/IR/Function.cpp stable/11/contrib/llvm/lib/IR/Globals.cpp stable/11/contrib/llvm/lib/IR/IRBuilder.cpp stable/11/contrib/llvm/lib/IR/IRPrintingPasses.cpp stable/11/contrib/llvm/lib/IR/Instruction.cpp stable/11/contrib/llvm/lib/IR/Instructions.cpp stable/11/contrib/llvm/lib/IR/IntrinsicInst.cpp stable/11/contrib/llvm/lib/IR/LLVMContext.cpp stable/11/contrib/llvm/lib/IR/LLVMContextImpl.h stable/11/contrib/llvm/lib/IR/LegacyPassManager.cpp stable/11/contrib/llvm/lib/IR/MDBuilder.cpp stable/11/contrib/llvm/lib/IR/Metadata.cpp stable/11/contrib/llvm/lib/IR/Module.cpp stable/11/contrib/llvm/lib/IR/ModuleSummaryIndex.cpp stable/11/contrib/llvm/lib/IR/SafepointIRVerifier.cpp stable/11/contrib/llvm/lib/IR/Type.cpp stable/11/contrib/llvm/lib/IR/Value.cpp stable/11/contrib/llvm/lib/IR/Verifier.cpp stable/11/contrib/llvm/lib/LTO/LTO.cpp stable/11/contrib/llvm/lib/LTO/LTOBackend.cpp stable/11/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp stable/11/contrib/llvm/lib/LTO/LTOModule.cpp stable/11/contrib/llvm/lib/LTO/ThinLTOCodeGenerator.cpp stable/11/contrib/llvm/lib/LTO/UpdateCompilerUsed.cpp stable/11/contrib/llvm/lib/Linker/IRMover.cpp stable/11/contrib/llvm/lib/MC/ConstantPools.cpp stable/11/contrib/llvm/lib/MC/ELFObjectWriter.cpp stable/11/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp stable/11/contrib/llvm/lib/MC/MCAsmInfoWasm.cpp stable/11/contrib/llvm/lib/MC/MCAsmStreamer.cpp stable/11/contrib/llvm/lib/MC/MCAssembler.cpp stable/11/contrib/llvm/lib/MC/MCCodeView.cpp stable/11/contrib/llvm/lib/MC/MCContext.cpp stable/11/contrib/llvm/lib/MC/MCDwarf.cpp stable/11/contrib/llvm/lib/MC/MCELFObjectTargetWriter.cpp stable/11/contrib/llvm/lib/MC/MCExpr.cpp stable/11/contrib/llvm/lib/MC/MCFragment.cpp stable/11/contrib/llvm/lib/MC/MCInst.cpp stable/11/contrib/llvm/lib/MC/MCInstrAnalysis.cpp stable/11/contrib/llvm/lib/MC/MCInstrDesc.cpp stable/11/contrib/llvm/lib/MC/MCMachOStreamer.cpp stable/11/contrib/llvm/lib/MC/MCNullStreamer.cpp stable/11/contrib/llvm/lib/MC/MCObjectFileInfo.cpp stable/11/contrib/llvm/lib/MC/MCObjectStreamer.cpp stable/11/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp stable/11/contrib/llvm/lib/MC/MCParser/AsmParser.cpp stable/11/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp stable/11/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp stable/11/contrib/llvm/lib/MC/MCParser/MCAsmLexer.cpp stable/11/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp stable/11/contrib/llvm/lib/MC/MCRegisterInfo.cpp stable/11/contrib/llvm/lib/MC/MCSection.cpp stable/11/contrib/llvm/lib/MC/MCSectionELF.cpp stable/11/contrib/llvm/lib/MC/MCStreamer.cpp stable/11/contrib/llvm/lib/MC/MCWasmStreamer.cpp stable/11/contrib/llvm/lib/MC/MCWin64EH.cpp stable/11/contrib/llvm/lib/MC/MachObjectWriter.cpp stable/11/contrib/llvm/lib/MC/WasmObjectWriter.cpp stable/11/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp stable/11/contrib/llvm/lib/Object/ArchiveWriter.cpp stable/11/contrib/llvm/lib/Object/Binary.cpp stable/11/contrib/llvm/lib/Object/COFFObjectFile.cpp stable/11/contrib/llvm/lib/Object/ELF.cpp stable/11/contrib/llvm/lib/Object/ELFObjectFile.cpp stable/11/contrib/llvm/lib/Object/Error.cpp stable/11/contrib/llvm/lib/Object/MachOObjectFile.cpp stable/11/contrib/llvm/lib/Object/ModuleSymbolTable.cpp stable/11/contrib/llvm/lib/Object/Object.cpp stable/11/contrib/llvm/lib/Object/ObjectFile.cpp stable/11/contrib/llvm/lib/Object/WasmObjectFile.cpp stable/11/contrib/llvm/lib/Object/WindowsResource.cpp stable/11/contrib/llvm/lib/ObjectYAML/COFFYAML.cpp stable/11/contrib/llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp stable/11/contrib/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp stable/11/contrib/llvm/lib/ObjectYAML/ELFYAML.cpp stable/11/contrib/llvm/lib/ObjectYAML/WasmYAML.cpp stable/11/contrib/llvm/lib/Option/OptTable.cpp stable/11/contrib/llvm/lib/Passes/PassBuilder.cpp stable/11/contrib/llvm/lib/Passes/PassRegistry.def stable/11/contrib/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp stable/11/contrib/llvm/lib/ProfileData/GCOV.cpp stable/11/contrib/llvm/lib/ProfileData/InstrProf.cpp stable/11/contrib/llvm/lib/ProfileData/InstrProfReader.cpp stable/11/contrib/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp stable/11/contrib/llvm/lib/ProfileData/SampleProf.cpp stable/11/contrib/llvm/lib/ProfileData/SampleProfReader.cpp stable/11/contrib/llvm/lib/ProfileData/SampleProfWriter.cpp stable/11/contrib/llvm/lib/Support/APInt.cpp stable/11/contrib/llvm/lib/Support/BinaryStreamError.cpp stable/11/contrib/llvm/lib/Support/COM.cpp stable/11/contrib/llvm/lib/Support/CachePruning.cpp stable/11/contrib/llvm/lib/Support/CodeGenCoverage.cpp stable/11/contrib/llvm/lib/Support/CommandLine.cpp stable/11/contrib/llvm/lib/Support/Compression.cpp stable/11/contrib/llvm/lib/Support/DebugCounter.cpp stable/11/contrib/llvm/lib/Support/Error.cpp stable/11/contrib/llvm/lib/Support/FileOutputBuffer.cpp stable/11/contrib/llvm/lib/Support/FoldingSet.cpp stable/11/contrib/llvm/lib/Support/FormatVariadic.cpp stable/11/contrib/llvm/lib/Support/Hashing.cpp stable/11/contrib/llvm/lib/Support/Host.cpp stable/11/contrib/llvm/lib/Support/JSON.cpp stable/11/contrib/llvm/lib/Support/Locale.cpp stable/11/contrib/llvm/lib/Support/LockFileManager.cpp stable/11/contrib/llvm/lib/Support/Path.cpp stable/11/contrib/llvm/lib/Support/Process.cpp stable/11/contrib/llvm/lib/Support/RandomNumberGenerator.cpp stable/11/contrib/llvm/lib/Support/Signals.cpp stable/11/contrib/llvm/lib/Support/SourceMgr.cpp stable/11/contrib/llvm/lib/Support/StringSaver.cpp stable/11/contrib/llvm/lib/Support/TargetParser.cpp stable/11/contrib/llvm/lib/Support/TargetRegistry.cpp stable/11/contrib/llvm/lib/Support/Timer.cpp stable/11/contrib/llvm/lib/Support/Triple.cpp stable/11/contrib/llvm/lib/Support/Unix/Path.inc stable/11/contrib/llvm/lib/Support/Unix/Signals.inc stable/11/contrib/llvm/lib/Support/Unix/Threading.inc stable/11/contrib/llvm/lib/Support/Windows/Path.inc stable/11/contrib/llvm/lib/Support/Windows/Process.inc stable/11/contrib/llvm/lib/Support/Windows/Program.inc stable/11/contrib/llvm/lib/Support/Windows/Threading.inc stable/11/contrib/llvm/lib/Support/Windows/WindowsSupport.h stable/11/contrib/llvm/lib/Support/WithColor.cpp stable/11/contrib/llvm/lib/Support/YAMLTraits.cpp stable/11/contrib/llvm/lib/Support/raw_ostream.cpp stable/11/contrib/llvm/lib/TableGen/Main.cpp stable/11/contrib/llvm/lib/TableGen/Record.cpp stable/11/contrib/llvm/lib/TableGen/TGLexer.cpp stable/11/contrib/llvm/lib/TableGen/TGLexer.h stable/11/contrib/llvm/lib/TableGen/TGParser.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64CallLowering.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64CallLowering.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64FastISel.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64InstrFormats.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64LegalizerInfo.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64MacroFusion.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM1.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64Schedule.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h stable/11/contrib/llvm/lib/Target/AArch64/AArch64SystemOperands.td stable/11/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h stable/11/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp stable/11/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp stable/11/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp stable/11/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp stable/11/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.h stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp stable/11/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.h stable/11/contrib/llvm/lib/Target/AArch64/SVEInstrFormats.td stable/11/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp stable/11/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPU.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPU.td stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUGISel.td stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUGenRegisterBankInfo.def stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUInline.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsicInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsicInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUMacroFusion.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUPTNote.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterBanks.td stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/BUFInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/DSInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/FLATInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/GCNILPSched.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/GCNMinRegStrategy.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/GCNProcessors.td stable/11/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h stable/11/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h stable/11/contrib/llvm/lib/Target/AMDGPU/MIMGInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/R600EmitClauseMarkers.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/R600InstrInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/R600Instructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/R600MachineScheduler.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIDefines.h stable/11/contrib/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIFixWWMLiveness.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.h stable/11/contrib/llvm/lib/Target/AMDGPU/SIInsertSkips.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIInstrFormats.td stable/11/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.td stable/11/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/SIIntrinsics.td stable/11/contrib/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.td stable/11/contrib/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/SMInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/SOPInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp stable/11/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTInfo.h stable/11/contrib/llvm/lib/Target/AMDGPU/VOP1Instructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/VOP2Instructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/VOP3Instructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/VOP3PInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/VOPCInstructions.td stable/11/contrib/llvm/lib/Target/AMDGPU/VOPInstructions.td stable/11/contrib/llvm/lib/Target/ARC/ARCTargetMachine.cpp stable/11/contrib/llvm/lib/Target/ARC/InstPrinter/ARCInstPrinter.cpp stable/11/contrib/llvm/lib/Target/ARM/ARM.td stable/11/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h stable/11/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h stable/11/contrib/llvm/lib/Target/ARM/ARMCallLowering.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMCallLowering.h stable/11/contrib/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h stable/11/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMISelLowering.h stable/11/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td stable/11/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMInstrInfo.h stable/11/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td stable/11/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td stable/11/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td stable/11/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td stable/11/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td stable/11/contrib/llvm/lib/Target/ARM/ARMInstructionSelector.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMLegalizerInfo.h stable/11/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMMacroFusion.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMMacroFusion.h stable/11/contrib/llvm/lib/Target/ARM/ARMParallelDSP.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMSubtarget.h stable/11/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.h stable/11/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp stable/11/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp stable/11/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRISelLowering.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRInstrInfo.td stable/11/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.td stable/11/contrib/llvm/lib/Target/AVR/AVRTargetMachine.cpp stable/11/contrib/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp stable/11/contrib/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp stable/11/contrib/llvm/lib/Target/BPF/BPF.h stable/11/contrib/llvm/lib/Target/BPF/BPFAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/BPF/BPFRegisterInfo.h stable/11/contrib/llvm/lib/Target/BPF/BPFTargetMachine.cpp stable/11/contrib/llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp stable/11/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h stable/11/contrib/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp stable/11/contrib/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp stable/11/contrib/llvm/lib/Target/Hexagon/Hexagon.h stable/11/contrib/llvm/lib/Target/Hexagon/Hexagon.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepArch.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepArch.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepIICHVX.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepIICScalar.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepITypes.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepITypes.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepInstrFormats.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepInstrInfo.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepMappings.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepOperands.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonDepTimingClasses.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsics.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV5.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonPatterns.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonPseudo.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonSchedule.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV60.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV62.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV65.td stable/11/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonStoreWidening.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h stable/11/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp stable/11/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.h stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCExpr.cpp stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp stable/11/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h stable/11/contrib/llvm/lib/Target/Hexagon/RDFDeadCode.cpp stable/11/contrib/llvm/lib/Target/Hexagon/RDFGraph.cpp stable/11/contrib/llvm/lib/Target/Hexagon/RDFLiveness.cpp stable/11/contrib/llvm/lib/Target/Lanai/LanaiISelLowering.cpp stable/11/contrib/llvm/lib/Target/Lanai/LanaiInstrInfo.cpp stable/11/contrib/llvm/lib/Target/Lanai/LanaiInstrInfo.h stable/11/contrib/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp stable/11/contrib/llvm/lib/Target/Lanai/LanaiTargetMachine.cpp stable/11/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp stable/11/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h stable/11/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp stable/11/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp stable/11/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h stable/11/contrib/llvm/lib/Target/MSP430/MSP430.h stable/11/contrib/llvm/lib/Target/MSP430/MSP430.td stable/11/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp stable/11/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp stable/11/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h stable/11/contrib/llvm/lib/Target/MSP430/MSP430InstrFormats.td stable/11/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp stable/11/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h stable/11/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.td stable/11/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp stable/11/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.td stable/11/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp stable/11/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp stable/11/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.h stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/MicroMipsInstrFPU.td stable/11/contrib/llvm/lib/Target/Mips/MicroMipsInstrFormats.td stable/11/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp stable/11/contrib/llvm/lib/Target/Mips/Mips.h stable/11/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp stable/11/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp stable/11/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp stable/11/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h stable/11/contrib/llvm/lib/Target/Mips/Mips32r6InstrFormats.td stable/11/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h stable/11/contrib/llvm/lib/Target/Mips/MipsBranchExpansion.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsCCState.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsCallLowering.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsCallLowering.h stable/11/contrib/llvm/lib/Target/Mips/MipsCondMov.td stable/11/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsFastISel.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsISelLowering.h stable/11/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td stable/11/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/MipsInstructionSelector.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsLegalizerInfo.h stable/11/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h stable/11/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td stable/11/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h stable/11/contrib/llvm/lib/Target/Mips/MipsSchedule.td stable/11/contrib/llvm/lib/Target/Mips/MipsScheduleGeneric.td stable/11/contrib/llvm/lib/Target/Mips/MipsSubtarget.h stable/11/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp stable/11/contrib/llvm/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp stable/11/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXTargetStreamer.h stable/11/contrib/llvm/lib/Target/NVPTX/NVPTX.h stable/11/contrib/llvm/lib/Target/NVPTX/NVPTX.td stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.h stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp stable/11/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h stable/11/contrib/llvm/lib/Target/NVPTX/NVVMReflect.cpp stable/11/contrib/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp stable/11/contrib/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp stable/11/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp stable/11/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp stable/11/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h stable/11/contrib/llvm/lib/Target/PowerPC/P9InstrResources.td stable/11/contrib/llvm/lib/Target/PowerPC/PPC.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCExpandISEL.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h stable/11/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrHTM.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrQPX.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrSPE.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCInstrVSX.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h stable/11/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCSchedule440.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleE5500.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleG3.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleG4.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleG4Plus.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleG5.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleP7.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleP8.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCScheduleP9.td stable/11/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp stable/11/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h stable/11/contrib/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp stable/11/contrib/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp stable/11/contrib/llvm/lib/Target/RISCV/InstPrinter/RISCVInstPrinter.cpp stable/11/contrib/llvm/lib/Target/RISCV/InstPrinter/RISCVInstPrinter.h stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h stable/11/contrib/llvm/lib/Target/RISCV/RISCV.h stable/11/contrib/llvm/lib/Target/RISCV/RISCV.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp stable/11/contrib/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/RISCV/RISCVISelLowering.cpp stable/11/contrib/llvm/lib/Target/RISCV/RISCVISelLowering.h stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrFormats.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrFormatsC.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrInfo.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoA.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoC.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoD.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoF.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVInstrInfoM.td stable/11/contrib/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp stable/11/contrib/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp stable/11/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp stable/11/contrib/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp stable/11/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp stable/11/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.h stable/11/contrib/llvm/lib/Target/Sparc/LeonFeatures.td stable/11/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp stable/11/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp stable/11/contrib/llvm/lib/Target/Sparc/Sparc.td stable/11/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp stable/11/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h stable/11/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td stable/11/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td stable/11/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td stable/11/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h stable/11/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp stable/11/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h stable/11/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp stable/11/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h stable/11/contrib/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h stable/11/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZInstrFormats.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h stable/11/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZInstrVector.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZOperators.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h stable/11/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZSchedule.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ13.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ14.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ196.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZEC12.td stable/11/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.h stable/11/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp stable/11/contrib/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h stable/11/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp stable/11/contrib/llvm/lib/Target/TargetMachine.cpp stable/11/contrib/llvm/lib/Target/TargetMachineC.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h stable/11/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyFixupKinds.h stable/11/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h stable/11/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h stable/11/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/README.txt stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssembly.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssembly.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISD.def stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrConv.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrExceptRef.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrFormats.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLowerGlobalDtors.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.td stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp stable/11/contrib/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp stable/11/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp stable/11/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp stable/11/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp stable/11/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h stable/11/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp stable/11/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h stable/11/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp stable/11/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h stable/11/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp stable/11/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h stable/11/contrib/llvm/lib/Target/X86/MCTargetDesc/X86TargetStreamer.h stable/11/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp stable/11/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/X86/ShadowCallStack.cpp stable/11/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp stable/11/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h stable/11/contrib/llvm/lib/Target/X86/X86.h stable/11/contrib/llvm/lib/Target/X86/X86.td stable/11/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp stable/11/contrib/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp stable/11/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp stable/11/contrib/llvm/lib/Target/X86/X86CallLowering.cpp stable/11/contrib/llvm/lib/Target/X86/X86CallLowering.h stable/11/contrib/llvm/lib/Target/X86/X86CallingConv.td stable/11/contrib/llvm/lib/Target/X86/X86CmovConversion.cpp stable/11/contrib/llvm/lib/Target/X86/X86DomainReassignment.cpp stable/11/contrib/llvm/lib/Target/X86/X86FastISel.cpp stable/11/contrib/llvm/lib/Target/X86/X86FixupBWInsts.cpp stable/11/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp stable/11/contrib/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp stable/11/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp stable/11/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp stable/11/contrib/llvm/lib/Target/X86/X86ISelLowering.h stable/11/contrib/llvm/lib/Target/X86/X86Instr3DNow.td stable/11/contrib/llvm/lib/Target/X86/X86InstrAVX512.td stable/11/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td stable/11/contrib/llvm/lib/Target/X86/X86InstrCMovSetCC.td stable/11/contrib/llvm/lib/Target/X86/X86InstrCompiler.td stable/11/contrib/llvm/lib/Target/X86/X86InstrControl.td stable/11/contrib/llvm/lib/Target/X86/X86InstrExtension.td stable/11/contrib/llvm/lib/Target/X86/X86InstrFMA.td stable/11/contrib/llvm/lib/Target/X86/X86InstrFPStack.td stable/11/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td stable/11/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp stable/11/contrib/llvm/lib/Target/X86/X86InstrInfo.h stable/11/contrib/llvm/lib/Target/X86/X86InstrInfo.td stable/11/contrib/llvm/lib/Target/X86/X86InstrMMX.td stable/11/contrib/llvm/lib/Target/X86/X86InstrSSE.td stable/11/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td stable/11/contrib/llvm/lib/Target/X86/X86InstrVecCompiler.td stable/11/contrib/llvm/lib/Target/X86/X86InstrXOP.td stable/11/contrib/llvm/lib/Target/X86/X86InstructionSelector.cpp stable/11/contrib/llvm/lib/Target/X86/X86InterleavedAccess.cpp stable/11/contrib/llvm/lib/Target/X86/X86IntrinsicsInfo.h stable/11/contrib/llvm/lib/Target/X86/X86LegalizerInfo.cpp stable/11/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp stable/11/contrib/llvm/lib/Target/X86/X86MacroFusion.cpp stable/11/contrib/llvm/lib/Target/X86/X86MacroFusion.h stable/11/contrib/llvm/lib/Target/X86/X86OptimizeLEAs.cpp stable/11/contrib/llvm/lib/Target/X86/X86PfmCounters.td stable/11/contrib/llvm/lib/Target/X86/X86RegisterBankInfo.cpp stable/11/contrib/llvm/lib/Target/X86/X86RegisterInfo.td stable/11/contrib/llvm/lib/Target/X86/X86RetpolineThunks.cpp stable/11/contrib/llvm/lib/Target/X86/X86SchedBroadwell.td stable/11/contrib/llvm/lib/Target/X86/X86SchedHaswell.td stable/11/contrib/llvm/lib/Target/X86/X86SchedPredicates.td stable/11/contrib/llvm/lib/Target/X86/X86SchedSandyBridge.td stable/11/contrib/llvm/lib/Target/X86/X86SchedSkylakeClient.td stable/11/contrib/llvm/lib/Target/X86/X86SchedSkylakeServer.td stable/11/contrib/llvm/lib/Target/X86/X86Schedule.td stable/11/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td stable/11/contrib/llvm/lib/Target/X86/X86ScheduleBtVer2.td stable/11/contrib/llvm/lib/Target/X86/X86ScheduleSLM.td stable/11/contrib/llvm/lib/Target/X86/X86ScheduleZnver1.td stable/11/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp stable/11/contrib/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp stable/11/contrib/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h stable/11/contrib/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp stable/11/contrib/llvm/lib/Target/X86/X86Subtarget.cpp stable/11/contrib/llvm/lib/Target/X86/X86Subtarget.h stable/11/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp stable/11/contrib/llvm/lib/Target/X86/X86TargetMachine.h stable/11/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp stable/11/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.h stable/11/contrib/llvm/lib/Target/X86/X86WinEHState.cpp stable/11/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp stable/11/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp stable/11/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp stable/11/contrib/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp stable/11/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h stable/11/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp stable/11/contrib/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp stable/11/contrib/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp stable/11/contrib/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp stable/11/contrib/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h stable/11/contrib/llvm/lib/Transforms/Coroutines/CoroElide.cpp stable/11/contrib/llvm/lib/Transforms/Coroutines/CoroFrame.cpp stable/11/contrib/llvm/lib/Transforms/Coroutines/CoroSplit.cpp stable/11/contrib/llvm/lib/Transforms/Coroutines/Coroutines.cpp stable/11/contrib/llvm/lib/Transforms/IPO/AlwaysInliner.cpp stable/11/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp stable/11/contrib/llvm/lib/Transforms/IPO/CalledValuePropagation.cpp stable/11/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp stable/11/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp stable/11/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp stable/11/contrib/llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp stable/11/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp stable/11/contrib/llvm/lib/Transforms/IPO/FunctionImport.cpp stable/11/contrib/llvm/lib/Transforms/IPO/GlobalDCE.cpp stable/11/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp stable/11/contrib/llvm/lib/Transforms/IPO/IPO.cpp stable/11/contrib/llvm/lib/Transforms/IPO/Inliner.cpp stable/11/contrib/llvm/lib/Transforms/IPO/LoopExtractor.cpp stable/11/contrib/llvm/lib/Transforms/IPO/LowerTypeTests.cpp stable/11/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp stable/11/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp stable/11/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp stable/11/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp stable/11/contrib/llvm/lib/Transforms/IPO/SCCP.cpp stable/11/contrib/llvm/lib/Transforms/IPO/SampleProfile.cpp stable/11/contrib/llvm/lib/Transforms/IPO/SyntheticCountsPropagation.cpp stable/11/contrib/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp stable/11/contrib/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineInternal.h stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp stable/11/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/CFGMST.h stable/11/contrib/llvm/lib/Transforms/Instrumentation/CGProfile.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp stable/11/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp stable/11/contrib/llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h stable/11/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.cpp stable/11/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.h stable/11/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp stable/11/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/BDCE.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/ConstantProp.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/DCE.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/DivRemPairs.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/GVN.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/GVNHoist.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/GVNSink.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/GuardWidening.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LICM.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopDistribute.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopInterchange.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopPassManager.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopPredication.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopSink.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/MergeICmps.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/Scalarizer.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/Sink.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp stable/11/contrib/llvm/lib/Transforms/Utils/AddDiscriminators.cpp stable/11/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp stable/11/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp stable/11/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp stable/11/contrib/llvm/lib/Transforms/Utils/CallPromotionUtils.cpp stable/11/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp stable/11/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp stable/11/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp stable/11/contrib/llvm/lib/Transforms/Utils/CtorUtils.cpp stable/11/contrib/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp stable/11/contrib/llvm/lib/Transforms/Utils/EscapeEnumerator.cpp stable/11/contrib/llvm/lib/Transforms/Utils/Evaluator.cpp stable/11/contrib/llvm/lib/Transforms/Utils/FlattenCFG.cpp stable/11/contrib/llvm/lib/Transforms/Utils/FunctionComparator.cpp stable/11/contrib/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp stable/11/contrib/llvm/lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp stable/11/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp stable/11/contrib/llvm/lib/Transforms/Utils/Local.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp stable/11/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp stable/11/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp stable/11/contrib/llvm/lib/Transforms/Utils/PredicateInfo.cpp stable/11/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp stable/11/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp stable/11/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp stable/11/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp stable/11/contrib/llvm/lib/Transforms/Utils/SplitModule.cpp stable/11/contrib/llvm/lib/Transforms/Utils/Utils.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h stable/11/contrib/llvm/lib/Transforms/Vectorize/VPlan.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/VPlan.h stable/11/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp stable/11/contrib/llvm/lib/Transforms/Vectorize/VPlanValue.h stable/11/contrib/llvm/lib/Transforms/Vectorize/Vectorize.cpp stable/11/contrib/llvm/lib/XRay/InstrumentationMap.cpp stable/11/contrib/llvm/lib/XRay/Trace.cpp stable/11/contrib/llvm/tools/bugpoint/CrashDebugger.cpp stable/11/contrib/llvm/tools/bugpoint/ExecutionDriver.cpp stable/11/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp stable/11/contrib/llvm/tools/bugpoint/ToolRunner.cpp stable/11/contrib/llvm/tools/bugpoint/ToolRunner.h stable/11/contrib/llvm/tools/clang/FREEBSD-Xlist stable/11/contrib/llvm/tools/clang/LICENSE.TXT stable/11/contrib/llvm/tools/clang/include/clang-c/Index.h stable/11/contrib/llvm/tools/clang/include/clang/AST/APValue.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ASTStructuralEquivalence.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ASTVector.h stable/11/contrib/llvm/tools/clang/include/clang/AST/Attr.h stable/11/contrib/llvm/tools/clang/include/clang/AST/AttrIterator.h stable/11/contrib/llvm/tools/clang/include/clang/AST/BaseSubobject.h stable/11/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h stable/11/contrib/llvm/tools/clang/include/clang/AST/Comment.h stable/11/contrib/llvm/tools/clang/include/clang/AST/CommentDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/AST/CommentVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/AST/Decl.h stable/11/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h stable/11/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h stable/11/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h stable/11/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h stable/11/contrib/llvm/tools/clang/include/clang/AST/DeclOpenMP.h stable/11/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h stable/11/contrib/llvm/tools/clang/include/clang/AST/DeclVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h stable/11/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/AST/Expr.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ExprOpenMP.h stable/11/contrib/llvm/tools/clang/include/clang/AST/GlobalDecl.h stable/11/contrib/llvm/tools/clang/include/clang/AST/LexicallyOrderedRecursiveASTVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/AST/Mangle.h stable/11/contrib/llvm/tools/clang/include/clang/AST/NSAPI.h stable/11/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h stable/11/contrib/llvm/tools/clang/include/clang/AST/ODRHash.h stable/11/contrib/llvm/tools/clang/include/clang/AST/OpenMPClause.h stable/11/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.def stable/11/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h stable/11/contrib/llvm/tools/clang/include/clang/AST/RawCommentList.h stable/11/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/AST/Stmt.h stable/11/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h stable/11/contrib/llvm/tools/clang/include/clang/AST/StmtDataCollectors.td stable/11/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h stable/11/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h stable/11/contrib/llvm/tools/clang/include/clang/AST/StmtVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h stable/11/contrib/llvm/tools/clang/include/clang/AST/TemplateName.h stable/11/contrib/llvm/tools/clang/include/clang/AST/Type.h stable/11/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h stable/11/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h stable/11/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h stable/11/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Parser.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDeclContext.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/CloneDetection.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/ConstructionContext.h stable/11/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/AlignedAllocation.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/AllDiagnostics.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/Attr.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAMDGPU.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsHexagon.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPPC.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsWebAssembly.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86_64.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/Cuda.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DebugInfoOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCrossTUKinds.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/Features.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/FileSystemStatCache.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/OpenCLExtensions.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/OpenCLOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/PlistSupport.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/X86Target.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/XRayInstr.h stable/11/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/arm_neon_incl.td stable/11/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h stable/11/contrib/llvm/tools/clang/include/clang/CodeGen/SwiftCallingConv.h stable/11/contrib/llvm/tools/clang/include/clang/CrossTU/CrossTUDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/CrossTU/CrossTranslationUnit.h stable/11/contrib/llvm/tools/clang/include/clang/Driver/Action.h stable/11/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td stable/11/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td stable/11/contrib/llvm/tools/clang/include/clang/Driver/Distro.h stable/11/contrib/llvm/tools/clang/include/clang/Driver/Driver.h stable/11/contrib/llvm/tools/clang/include/clang/Driver/DriverDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/Driver/Job.h stable/11/contrib/llvm/tools/clang/include/clang/Driver/Options.td stable/11/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h stable/11/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/11/contrib/llvm/tools/clang/include/clang/Driver/Types.def stable/11/contrib/llvm/tools/clang/include/clang/Format/Format.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/FrontendDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def stable/11/contrib/llvm/tools/clang/include/clang/Frontend/PCHContainerOperations.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/PrecompiledPreamble.h stable/11/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h stable/11/contrib/llvm/tools/clang/include/clang/Index/IndexDataConsumer.h stable/11/contrib/llvm/tools/clang/include/clang/Index/IndexSymbol.h stable/11/contrib/llvm/tools/clang/include/clang/Index/IndexingAction.h stable/11/contrib/llvm/tools/clang/include/clang/Index/USRGeneration.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/CodeCompletionHandler.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/HeaderMap.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/LexDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/TokenConcatenation.h stable/11/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h stable/11/contrib/llvm/tools/clang/include/clang/Parse/ParseDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/Parse/Parser.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteOptions.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/Overload.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/ParsedAttr.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/Scope.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/Sema.h stable/11/contrib/llvm/tools/clang/include/clang/Sema/SemaDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h stable/11/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h stable/11/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h stable/11/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h stable/11/contrib/llvm/tools/clang/include/clang/Serialization/GlobalModuleIndex.h stable/11/contrib/llvm/tools/clang/include/clang/Serialization/SerializationDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Analyses.def stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Regions.def stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h stable/11/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/AllTUsExecution.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/ArgumentsAdjusters.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabasePluginRegistry.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/DiagnosticsYaml.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/Execution.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/StandaloneExecution.h stable/11/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h stable/11/contrib/llvm/tools/clang/include/clang/module.modulemap stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/TransAPIUses.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/TransAutoreleasePool.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCAttrs.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/TransGCCalls.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/TransProtectedScope.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp stable/11/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp stable/11/contrib/llvm/tools/clang/lib/AST/APValue.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ASTStructuralEquivalence.cpp stable/11/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp stable/11/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp stable/11/contrib/llvm/tools/clang/lib/AST/CommentParser.cpp stable/11/contrib/llvm/tools/clang/lib/AST/CommentSema.cpp stable/11/contrib/llvm/tools/clang/lib/AST/Decl.cpp stable/11/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp stable/11/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp stable/11/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp stable/11/contrib/llvm/tools/clang/lib/AST/DeclOpenMP.cpp stable/11/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp stable/11/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp stable/11/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp stable/11/contrib/llvm/tools/clang/lib/AST/Expr.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ExternalASTMerger.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp stable/11/contrib/llvm/tools/clang/lib/AST/Linkage.h stable/11/contrib/llvm/tools/clang/lib/AST/Mangle.cpp stable/11/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp stable/11/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp stable/11/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ODRHash.cpp stable/11/contrib/llvm/tools/clang/lib/AST/OpenMPClause.cpp stable/11/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp stable/11/contrib/llvm/tools/clang/lib/AST/RawCommentList.cpp stable/11/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp stable/11/contrib/llvm/tools/clang/lib/AST/SelectorLocationsKind.cpp stable/11/contrib/llvm/tools/clang/lib/AST/Stmt.cpp stable/11/contrib/llvm/tools/clang/lib/AST/StmtCXX.cpp stable/11/contrib/llvm/tools/clang/lib/AST/StmtObjC.cpp stable/11/contrib/llvm/tools/clang/lib/AST/StmtOpenMP.cpp stable/11/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp stable/11/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp stable/11/contrib/llvm/tools/clang/lib/AST/Type.cpp stable/11/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp stable/11/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp stable/11/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp stable/11/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp stable/11/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp stable/11/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Parser.cpp stable/11/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/CloneDetection.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/ProgramPoint.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/ThreadSafetyCommon.cpp stable/11/contrib/llvm/tools/clang/lib/Analysis/ThreadSafetyTIL.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Attributes.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Cuda.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/FileSystemStatCache.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Module.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/AArch64.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/AArch64.h stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/AMDGPU.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/AMDGPU.h stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/ARM.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/Hexagon.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/Mips.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/Mips.h stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/NVPTX.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/OSTargets.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/OSTargets.h stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/PPC.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/PPC.h stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/SPIR.h stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/Sparc.h stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/WebAssembly.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/WebAssembly.h stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets/X86.h stable/11/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGCUDANV.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGCoroutine.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenABITypes.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/ConstantEmitter.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/MacroPPCallbacks.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/MacroPPCallbacks.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/SwiftCallingConv.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/VarBypassDetector.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/VarBypassDetector.h stable/11/contrib/llvm/tools/clang/lib/CrossTU/CrossTranslationUnit.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/Action.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/Distro.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/Driver.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/Job.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/AMDGPU.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/AMDGPU.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/AArch64.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/AArch64.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/ARM.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/ARM.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/Mips.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/X86.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/BareMetal.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/CommonArgs.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/CommonArgs.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/CrossWindows.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Cuda.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Cuda.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Darwin.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Darwin.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Fuchsia.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/HIP.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/HIP.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Hexagon.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Hexagon.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Linux.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Linux.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSVC.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSVC.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/MinGW.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/MinGW.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Minix.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/MipsLinux.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/NetBSD.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/NetBSD.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/OpenBSD.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/PS4CPU.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Solaris.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/WebAssembly.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/WebAssembly.h stable/11/contrib/llvm/tools/clang/lib/Driver/Types.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/XRayArgs.cpp stable/11/contrib/llvm/tools/clang/lib/Edit/RewriteObjCFoundationAPI.cpp stable/11/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp stable/11/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp stable/11/contrib/llvm/tools/clang/lib/Format/Format.cpp stable/11/contrib/llvm/tools/clang/lib/Format/FormatToken.h stable/11/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.cpp stable/11/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.h stable/11/contrib/llvm/tools/clang/lib/Format/NamespaceEndCommentsFixer.cpp stable/11/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp stable/11/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h stable/11/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.cpp stable/11/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp stable/11/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h stable/11/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/DiagnosticRenderer.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/PrecompiledPreamble.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FrontendActions.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp stable/11/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp stable/11/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp stable/11/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_runtime_wrapper.h stable/11/contrib/llvm/tools/clang/lib/Headers/adxintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/altivec.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512pfintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512vbmi2intrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512vbmiintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512vbmivlintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/avx512vlvbmi2intrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/cuda_wrappers/new stable/11/contrib/llvm/tools/clang/lib/Headers/emmintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/float.h stable/11/contrib/llvm/tools/clang/lib/Headers/immintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/intrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h stable/11/contrib/llvm/tools/clang/lib/Headers/opencl-c.h stable/11/contrib/llvm/tools/clang/lib/Headers/vecintrin.h stable/11/contrib/llvm/tools/clang/lib/Index/CommentToXML.cpp stable/11/contrib/llvm/tools/clang/lib/Index/IndexBody.cpp stable/11/contrib/llvm/tools/clang/lib/Index/IndexDecl.cpp stable/11/contrib/llvm/tools/clang/lib/Index/IndexSymbol.cpp stable/11/contrib/llvm/tools/clang/lib/Index/IndexTypeSourceInfo.cpp stable/11/contrib/llvm/tools/clang/lib/Index/IndexingAction.cpp stable/11/contrib/llvm/tools/clang/lib/Index/IndexingContext.cpp stable/11/contrib/llvm/tools/clang/lib/Index/SimpleFormatContext.h stable/11/contrib/llvm/tools/clang/lib/Index/USRGeneration.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp stable/11/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseStmtAsm.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp stable/11/contrib/llvm/tools/clang/lib/Parse/Parser.cpp stable/11/contrib/llvm/tools/clang/lib/Rewrite/HTMLRewrite.cpp stable/11/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/ParsedAttr.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/Sema.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaCUDA.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaCoroutine.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h stable/11/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp stable/11/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp stable/11/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp stable/11/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp stable/11/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp stable/11/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp stable/11/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp stable/11/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp stable/11/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AllocationState.h stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CXXSelfAssignmentChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InterCheckerAPI.h stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCPropertyChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Checker.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/DynamicTypeMap.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Environment.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/LoopWidening.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SVals.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/WorkList.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp stable/11/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/ASTDiff/ASTDiff.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/AllTUsExecution.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Core/Diagnostic.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Core/Lookup.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Execution.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Inclusions/HeaderIncludes.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Refactoring/ASTSelection.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Extract/Extract.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Rename/USRFinder.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/StandaloneExecution.cpp stable/11/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp stable/11/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp stable/11/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp stable/11/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp stable/11/contrib/llvm/tools/clang/tools/driver/cc1gen_reproducer_main.cpp stable/11/contrib/llvm/tools/clang/tools/driver/driver.cpp stable/11/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp stable/11/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp stable/11/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp stable/11/contrib/llvm/tools/clang/utils/TableGen/ClangOptionDocEmitter.cpp stable/11/contrib/llvm/tools/clang/utils/TableGen/ClangSACheckersEmitter.cpp stable/11/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp stable/11/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp stable/11/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h stable/11/contrib/llvm/tools/lld/COFF/Chunks.cpp stable/11/contrib/llvm/tools/lld/COFF/Chunks.h stable/11/contrib/llvm/tools/lld/COFF/Config.h stable/11/contrib/llvm/tools/lld/COFF/DLL.cpp stable/11/contrib/llvm/tools/lld/COFF/DLL.h stable/11/contrib/llvm/tools/lld/COFF/Driver.cpp stable/11/contrib/llvm/tools/lld/COFF/Driver.h stable/11/contrib/llvm/tools/lld/COFF/DriverUtils.cpp stable/11/contrib/llvm/tools/lld/COFF/ICF.cpp stable/11/contrib/llvm/tools/lld/COFF/InputFiles.cpp stable/11/contrib/llvm/tools/lld/COFF/InputFiles.h stable/11/contrib/llvm/tools/lld/COFF/LTO.cpp stable/11/contrib/llvm/tools/lld/COFF/MapFile.cpp stable/11/contrib/llvm/tools/lld/COFF/MarkLive.cpp stable/11/contrib/llvm/tools/lld/COFF/MinGW.cpp stable/11/contrib/llvm/tools/lld/COFF/MinGW.h stable/11/contrib/llvm/tools/lld/COFF/Options.td stable/11/contrib/llvm/tools/lld/COFF/PDB.cpp stable/11/contrib/llvm/tools/lld/COFF/PDB.h stable/11/contrib/llvm/tools/lld/COFF/SymbolTable.cpp stable/11/contrib/llvm/tools/lld/COFF/SymbolTable.h stable/11/contrib/llvm/tools/lld/COFF/Symbols.cpp stable/11/contrib/llvm/tools/lld/COFF/Symbols.h stable/11/contrib/llvm/tools/lld/COFF/Writer.cpp stable/11/contrib/llvm/tools/lld/COFF/Writer.h stable/11/contrib/llvm/tools/lld/Common/Args.cpp stable/11/contrib/llvm/tools/lld/Common/ErrorHandler.cpp stable/11/contrib/llvm/tools/lld/Common/Strings.cpp stable/11/contrib/llvm/tools/lld/Common/TargetOptionsCommandFlags.cpp stable/11/contrib/llvm/tools/lld/ELF/AArch64ErrataFix.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/AArch64.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/AMDGPU.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/ARM.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/AVR.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/Hexagon.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/Mips.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/PPC.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/SPARCV9.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/X86.cpp stable/11/contrib/llvm/tools/lld/ELF/Arch/X86_64.cpp stable/11/contrib/llvm/tools/lld/ELF/CMakeLists.txt stable/11/contrib/llvm/tools/lld/ELF/CallGraphSort.cpp stable/11/contrib/llvm/tools/lld/ELF/Config.h stable/11/contrib/llvm/tools/lld/ELF/Driver.cpp stable/11/contrib/llvm/tools/lld/ELF/Driver.h stable/11/contrib/llvm/tools/lld/ELF/DriverUtils.cpp stable/11/contrib/llvm/tools/lld/ELF/EhFrame.cpp stable/11/contrib/llvm/tools/lld/ELF/ICF.cpp stable/11/contrib/llvm/tools/lld/ELF/InputFiles.cpp stable/11/contrib/llvm/tools/lld/ELF/InputFiles.h stable/11/contrib/llvm/tools/lld/ELF/InputSection.cpp stable/11/contrib/llvm/tools/lld/ELF/InputSection.h stable/11/contrib/llvm/tools/lld/ELF/LTO.cpp stable/11/contrib/llvm/tools/lld/ELF/LTO.h stable/11/contrib/llvm/tools/lld/ELF/LinkerScript.cpp stable/11/contrib/llvm/tools/lld/ELF/LinkerScript.h stable/11/contrib/llvm/tools/lld/ELF/MapFile.cpp stable/11/contrib/llvm/tools/lld/ELF/MarkLive.cpp stable/11/contrib/llvm/tools/lld/ELF/Options.td stable/11/contrib/llvm/tools/lld/ELF/OutputSections.cpp stable/11/contrib/llvm/tools/lld/ELF/OutputSections.h stable/11/contrib/llvm/tools/lld/ELF/Relocations.cpp stable/11/contrib/llvm/tools/lld/ELF/Relocations.h stable/11/contrib/llvm/tools/lld/ELF/ScriptLexer.cpp stable/11/contrib/llvm/tools/lld/ELF/ScriptLexer.h stable/11/contrib/llvm/tools/lld/ELF/ScriptParser.cpp stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.cpp stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.h stable/11/contrib/llvm/tools/lld/ELF/Symbols.cpp stable/11/contrib/llvm/tools/lld/ELF/Symbols.h stable/11/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp stable/11/contrib/llvm/tools/lld/ELF/SyntheticSections.h stable/11/contrib/llvm/tools/lld/ELF/Target.cpp stable/11/contrib/llvm/tools/lld/ELF/Target.h stable/11/contrib/llvm/tools/lld/ELF/Thunks.cpp stable/11/contrib/llvm/tools/lld/ELF/Writer.cpp stable/11/contrib/llvm/tools/lld/FREEBSD-Xlist stable/11/contrib/llvm/tools/lld/LICENSE.TXT stable/11/contrib/llvm/tools/lld/docs/NewLLD.rst stable/11/contrib/llvm/tools/lld/docs/README.txt stable/11/contrib/llvm/tools/lld/docs/Readers.rst stable/11/contrib/llvm/tools/lld/docs/ReleaseNotes.rst stable/11/contrib/llvm/tools/lld/docs/WebAssembly.rst stable/11/contrib/llvm/tools/lld/docs/conf.py stable/11/contrib/llvm/tools/lld/docs/index.rst stable/11/contrib/llvm/tools/lld/docs/ld.lld.1 stable/11/contrib/llvm/tools/lld/docs/open_projects.rst stable/11/contrib/llvm/tools/lld/docs/windows_support.rst stable/11/contrib/llvm/tools/lld/include/lld/Common/Args.h stable/11/contrib/llvm/tools/lld/include/lld/Common/ErrorHandler.h stable/11/contrib/llvm/tools/lld/include/lld/Common/LLVM.h stable/11/contrib/llvm/tools/lld/include/lld/Common/Strings.h stable/11/contrib/llvm/tools/lld/include/lld/Common/TargetOptionsCommandFlags.h stable/11/contrib/llvm/tools/lld/include/lld/Common/Threads.h stable/11/contrib/llvm/tools/lld/lib/Driver/DarwinLdDriver.cpp stable/11/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp stable/11/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp stable/11/contrib/llvm/tools/lld/tools/lld/lld.cpp stable/11/contrib/llvm/tools/lldb/FREEBSD-Xlist stable/11/contrib/llvm/tools/lldb/include/lldb/API/LLDB.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBAddress.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBBreakpoint.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBCommandInterpreter.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBCommandReturnObject.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBDebugger.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBDefines.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBFrame.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBMemoryRegionInfo.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBMemoryRegionInfoList.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBModule.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBProcess.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBStructuredData.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBSymbolContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBThreadPlan.h stable/11/contrib/llvm/tools/lldb/include/lldb/API/SBVariablesOptions.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointID.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointIDList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocation.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointName.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointOptions.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolver.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverName.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointSite.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointSiteList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Stoppoint.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/StoppointLocation.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Watchpoint.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/WatchpointList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Breakpoint/WatchpointOptions.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Address.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/AddressRange.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/AddressResolver.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/AddressResolverFileLine.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/AddressResolverName.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Architecture.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ClangForward.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Communication.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Disassembler.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/DumpDataExtractor.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/EmulateInstruction.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/FileLineResolver.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/FileSpecList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/FormatEntity.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/IOHandler.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/LoadedModuleInfoList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Mangled.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/MappedHash.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Module.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ModuleList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ModuleSpec.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Opcode.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/PluginInterface.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/PluginManager.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/RangeMap.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/STLUtils.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/SearchFilter.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Section.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/SourceManager.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/StreamAsynchronousIO.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/StreamBuffer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/StreamFile.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/StructuredDataImpl.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeDenseMap.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeDenseSet.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeSTLMap.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeSTLVector.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeValue.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/UniqueCStringMap.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/UserSettingsController.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/Value.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObject.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectCast.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectChild.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResult.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultCast.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultChild.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultImpl.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectDynamicValue.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectMemory.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectRegister.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h stable/11/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectVariable.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/DataVisualization.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatCache.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatClasses.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormattersContainer.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormattersHelpers.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/LanguageCategory.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/StringPrinter.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategory.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategoryMap.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeFormat.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSummary.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSynthetic.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeValidator.h stable/11/contrib/llvm/tools/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/DWARFExpression.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/Expression.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionParser.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionVariable.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/FunctionCaller.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/IRExecutionUnit.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/IRMemoryMap.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/LLVMUserExpression.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/Materializer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/REPL.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/UserExpression.h stable/11/contrib/llvm/tools/lldb/include/lldb/Expression/UtilityFunction.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/Debug.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/Editline.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/File.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/FileSystem.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/HostInfoBase.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThreadBase.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/MonitoringProcessLauncher.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/PipeBase.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/ProcessRunLock.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/Socket.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/SocketAddress.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/StringConvert.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/Symbols.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/TaskPool.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/XML.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeBreakpointList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeProcessProtocol.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeRegisterContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/openbsd/HostInfoOpenBSD.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostProcessPosix.h stable/11/contrib/llvm/tools/lldb/include/lldb/Host/posix/PipePosix.h stable/11/contrib/llvm/tools/lldb/include/lldb/Initialization/SystemInitializer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Initialization/SystemInitializerCommon.h stable/11/contrib/llvm/tools/lldb/include/lldb/Initialization/SystemLifetimeManager.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandAlias.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandCompletions.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandHistory.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandInterpreter.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObject.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObjectMultiword.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandOptionValidators.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandReturnObject.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionArgParser.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupBoolean.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupFile.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupFormat.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupOutputFile.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupPlatform.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupString.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupUInt64.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupUUID.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupVariable.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValue.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueArgs.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueArray.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueBoolean.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueChar.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueDictionary.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueEnumeration.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFormat.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueLanguage.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValuePathMappings.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueProperties.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueRegex.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueSInt64.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueString.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueUInt64.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueUUID.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/Options.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/Property.h stable/11/contrib/llvm/tools/lldb/include/lldb/Interpreter/ScriptInterpreter.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/Block.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTImporter.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangExternalASTSourceCommon.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangUtil.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/CompileUnit.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/CompilerType.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/DebugMacros.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/Function.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/LineTable.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/ObjectContainer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/ObjectFile.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolContextScope.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolFile.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolVendor.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/Symtab.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/TypeSystem.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindPlan.h stable/11/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindTable.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ABI.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/CPPLanguageRuntime.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/DynamicLoader.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ExecutionContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ExecutionContextScope.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntime.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/Language.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/LanguageRuntime.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/Memory.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/MemoryHistory.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ObjCLanguageRuntime.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/OperatingSystem.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/PathMappingList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/Platform.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/Process.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ProcessLaunchInfo.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ProcessStructReader.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/QueueItem.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/RegisterContext.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/SectionLoadHistory.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/SectionLoadList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/StackFrame.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/StackFrameList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/StackID.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/StopInfo.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/SystemRuntime.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/Target.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/TargetList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/Thread.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlan.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanBase.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunction.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallUserExpression.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanPython.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanRunToAddress.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanShouldStopHere.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepInRange.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepInstruction.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepOut.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepOverRange.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepRange.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepThrough.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepUntil.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanTracer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/UnixSignals.h stable/11/contrib/llvm/tools/lldb/include/lldb/Target/Unwind.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/ArchSpec.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Baton.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/CompletionRequest.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Connection.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/ConstString.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/DataBufferHeap.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/DataBufferLLVM.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/DataEncoder.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/DataExtractor.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/FileSpec.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Iterable.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/LLDBAssert.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Log.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/RegularExpression.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/SelectHelper.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/SharingPtr.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Status.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Stream.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StreamCallback.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StreamGDBRemote.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StreamString.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StreamTee.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StringExtractor.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StringExtractorGDBRemote.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StringLexer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StringList.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/StructuredData.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/Timer.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/UUID.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/UserID.h stable/11/contrib/llvm/tools/lldb/include/lldb/Utility/VMRange.h stable/11/contrib/llvm/tools/lldb/include/lldb/lldb-defines.h stable/11/contrib/llvm/tools/lldb/include/lldb/lldb-enumerations.h stable/11/contrib/llvm/tools/lldb/include/lldb/lldb-forward.h stable/11/contrib/llvm/tools/lldb/include/lldb/lldb-private-forward.h stable/11/contrib/llvm/tools/lldb/include/lldb/lldb-private-interfaces.h stable/11/contrib/llvm/tools/lldb/include/lldb/lldb-private-types.h stable/11/contrib/llvm/tools/lldb/include/lldb/lldb-types.h stable/11/contrib/llvm/tools/lldb/include/lldb/module.modulemap stable/11/contrib/llvm/tools/lldb/source/API/SBAddress.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBAttachInfo.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBBreakpointName.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBBreakpointOptionCommon.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBBroadcaster.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBCommandInterpreter.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBCommandReturnObject.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBCompileUnit.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBData.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBDebugger.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBDeclaration.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBError.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBEvent.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBExpressionOptions.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBFileSpec.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBFileSpecList.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBFrame.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBHostOS.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBLaunchInfo.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBLineEntry.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBListener.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfoList.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBModule.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBModuleSpec.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBPlatform.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBProcess.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBProcessInfo.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBQueue.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBSection.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBSourceManager.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBStream.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBStringList.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBStructuredData.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBSymbolContext.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBSymbolContextList.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBTarget.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBThread.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBThreadPlan.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBType.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBTypeCategory.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBTypeEnumMember.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBTypeFilter.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBTypeFormat.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBTypeNameSpecifier.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBTypeSummary.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBTypeSynthetic.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBValue.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBValueList.cpp stable/11/contrib/llvm/tools/lldb/source/API/SBVariablesOptions.cpp stable/11/contrib/llvm/tools/lldb/source/API/SystemInitializerFull.cpp stable/11/contrib/llvm/tools/lldb/source/API/SystemInitializerFull.h stable/11/contrib/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointID.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointIDList.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointList.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationCollection.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointName.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointOptions.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolver.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverAddress.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverName.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointSite.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointSiteList.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/Stoppoint.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/StoppointCallbackContext.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/StoppointLocation.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/Watchpoint.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/WatchpointList.cpp stable/11/contrib/llvm/tools/lldb/source/Breakpoint/WatchpointOptions.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandCompletions.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectApropos.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectApropos.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpoint.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpoint.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpointCommand.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpointCommand.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectCommands.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectCommands.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectDisassemble.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectDisassemble.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectGUI.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectGUI.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectHelp.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectHelp.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectLog.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectLog.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectMemory.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectMemory.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectMultiword.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlatform.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlatform.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlugin.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlugin.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectQuit.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectQuit.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectRegister.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectRegister.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectSettings.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectSettings.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectSource.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectSource.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectTarget.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectThread.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectThread.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectType.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectType.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectVersion.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectVersion.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpoint.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpoint.h stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpointCommand.cpp stable/11/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpointCommand.h stable/11/contrib/llvm/tools/lldb/source/Core/Address.cpp stable/11/contrib/llvm/tools/lldb/source/Core/AddressRange.cpp stable/11/contrib/llvm/tools/lldb/source/Core/AddressResolverFileLine.cpp stable/11/contrib/llvm/tools/lldb/source/Core/AddressResolverName.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Communication.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Debugger.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Disassembler.cpp stable/11/contrib/llvm/tools/lldb/source/Core/DumpDataExtractor.cpp stable/11/contrib/llvm/tools/lldb/source/Core/DumpRegisterValue.cpp stable/11/contrib/llvm/tools/lldb/source/Core/DynamicLoader.cpp stable/11/contrib/llvm/tools/lldb/source/Core/EmulateInstruction.cpp stable/11/contrib/llvm/tools/lldb/source/Core/FileLineResolver.cpp stable/11/contrib/llvm/tools/lldb/source/Core/FileSpecList.cpp stable/11/contrib/llvm/tools/lldb/source/Core/FormatEntity.cpp stable/11/contrib/llvm/tools/lldb/source/Core/IOHandler.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Mangled.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Module.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ModuleList.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Opcode.cpp stable/11/contrib/llvm/tools/lldb/source/Core/PluginManager.cpp stable/11/contrib/llvm/tools/lldb/source/Core/SearchFilter.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Section.cpp stable/11/contrib/llvm/tools/lldb/source/Core/SourceManager.cpp stable/11/contrib/llvm/tools/lldb/source/Core/StreamAsynchronousIO.cpp stable/11/contrib/llvm/tools/lldb/source/Core/StreamFile.cpp stable/11/contrib/llvm/tools/lldb/source/Core/UserSettingsController.cpp stable/11/contrib/llvm/tools/lldb/source/Core/Value.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObject.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectCast.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectChild.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResult.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResultChild.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResultImpl.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectDynamicValue.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectList.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectMemory.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectRegister.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectSyntheticFilter.cpp stable/11/contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/CXXFunctionPointer.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/DataVisualization.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/DumpValueObjectOptions.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/FormatCache.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/FormatClasses.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/FormatManager.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/FormattersHelpers.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/LanguageCategory.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/StringPrinter.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategory.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategoryMap.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/TypeFormat.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/TypeSummary.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/TypeSynthetic.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/TypeValidator.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/ValueObjectPrinter.cpp stable/11/contrib/llvm/tools/lldb/source/DataFormatters/VectorType.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/DWARFExpression.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/ExpressionSourceCode.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/FunctionCaller.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/IRDynamicChecks.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/IRInterpreter.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/IRMemoryMap.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/LLVMUserExpression.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/Materializer.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/REPL.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/UtilityFunction.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/Editline.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/File.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/FileCache.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/FileSystem.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/Host.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/HostInfoBase.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/HostNativeThreadBase.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/HostThread.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/MainLoop.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/MonitoringProcessLauncher.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/NativeProcessProtocol.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/NativeRegisterContext.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/NativeThreadProtocol.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/ProcessRunLock.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/PseudoTerminal.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/SocketAddress.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/StringConvert.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/Symbols.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/TaskPool.cpp stable/11/contrib/llvm/tools/lldb/source/Host/common/XML.cpp stable/11/contrib/llvm/tools/lldb/source/Host/freebsd/Host.cpp stable/11/contrib/llvm/tools/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Host/netbsd/Host.cpp stable/11/contrib/llvm/tools/lldb/source/Host/netbsd/HostInfoNetBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Host/openbsd/Host.cpp stable/11/contrib/llvm/tools/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp stable/11/contrib/llvm/tools/lldb/source/Host/posix/FileSystem.cpp stable/11/contrib/llvm/tools/lldb/source/Host/posix/HostInfoPosix.cpp stable/11/contrib/llvm/tools/lldb/source/Host/posix/HostProcessPosix.cpp stable/11/contrib/llvm/tools/lldb/source/Host/posix/PipePosix.cpp stable/11/contrib/llvm/tools/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp stable/11/contrib/llvm/tools/lldb/source/Initialization/SystemInitializerCommon.cpp stable/11/contrib/llvm/tools/lldb/source/Initialization/SystemLifetimeManager.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/CommandAlias.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/CommandObject.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectRegexCommand.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectScript.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectScript.h stable/11/contrib/llvm/tools/lldb/source/Interpreter/CommandReturnObject.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionArgParser.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupArchitecture.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupBoolean.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupFile.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupFormat.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupOutputFile.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupPlatform.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupUInt64.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupUUID.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupVariable.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupWatchpoint.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValue.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArch.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArgs.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArray.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueBoolean.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueChar.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueEnumeration.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpec.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFormat.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFormatEntity.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueLanguage.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValuePathMappings.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueProperties.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueRegex.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueSInt64.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueString.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueUInt64.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/OptionValueUUID.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/Options.cpp stable/11/contrib/llvm/tools/lldb/source/Interpreter/Property.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Architecture/Arm/ArchitectureArm.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Architecture/Arm/ArchitectureArm.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.h stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h stable/11/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h stable/11/contrib/llvm/tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxx.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/CF.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/Cocoa.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSArray.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSError.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSException.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSSet.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSString.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/ObjCLanguage.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h stable/11/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h stable/11/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIX.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/ARMUtils.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/FreeBSDSignals.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryThread.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryUnwind.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxSignals.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/MipsLinuxSignals.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/NetBSDSignals.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/NetBSDSignals.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDummy.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextHistory.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextHistory.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMemory.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_i386.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64le.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/StopInfoMachException.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/ThreadMemory.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/MinidumpParser.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/MinidumpTypes.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/ProcessMinidump.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_32.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_32.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.h stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/Process/minidump/ThreadMinidump.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h stable/11/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h stable/11/contrib/llvm/tools/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.h stable/11/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h stable/11/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h stable/11/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp stable/11/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h stable/11/contrib/llvm/tools/lldb/source/Symbol/ArmUnwindInfo.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/Block.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/ClangASTImporter.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/ClangUtil.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/CompactUnwindInfo.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/CompileUnit.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/CompilerType.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/DWARFCallFrameInfo.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/FuncUnwinders.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/Function.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/LineEntry.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/ObjectFile.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/Symbol.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/SymbolContext.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/SymbolFile.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/SymbolVendor.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/Symtab.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/Type.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/TypeList.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/TypeMap.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/TypeSystem.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp stable/11/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ABI.cpp stable/11/contrib/llvm/tools/lldb/source/Target/CPPLanguageRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ExecutionContext.cpp stable/11/contrib/llvm/tools/lldb/source/Target/InstrumentationRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Target/JITLoader.cpp stable/11/contrib/llvm/tools/lldb/source/Target/Language.cpp stable/11/contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Target/Memory.cpp stable/11/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ModuleCache.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ObjCLanguageRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Target/OperatingSystem.cpp stable/11/contrib/llvm/tools/lldb/source/Target/PathMappingList.cpp stable/11/contrib/llvm/tools/lldb/source/Target/Platform.cpp stable/11/contrib/llvm/tools/lldb/source/Target/Process.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ProcessInfo.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ProcessLaunchInfo.cpp stable/11/contrib/llvm/tools/lldb/source/Target/Queue.cpp stable/11/contrib/llvm/tools/lldb/source/Target/QueueItem.cpp stable/11/contrib/llvm/tools/lldb/source/Target/RegisterContext.cpp stable/11/contrib/llvm/tools/lldb/source/Target/RegisterNumber.cpp stable/11/contrib/llvm/tools/lldb/source/Target/SectionLoadHistory.cpp stable/11/contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp stable/11/contrib/llvm/tools/lldb/source/Target/StackFrame.cpp stable/11/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp stable/11/contrib/llvm/tools/lldb/source/Target/StackID.cpp stable/11/contrib/llvm/tools/lldb/source/Target/StopInfo.cpp stable/11/contrib/llvm/tools/lldb/source/Target/SystemRuntime.cpp stable/11/contrib/llvm/tools/lldb/source/Target/Target.cpp stable/11/contrib/llvm/tools/lldb/source/Target/TargetList.cpp stable/11/contrib/llvm/tools/lldb/source/Target/Thread.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadList.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlan.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanBase.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallFunction.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallFunctionUsingABI.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallUserExpression.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanPython.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanRunToAddress.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanShouldStopHere.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInRange.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOut.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverRange.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepThrough.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepUntil.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadPlanTracer.cpp stable/11/contrib/llvm/tools/lldb/source/Target/ThreadSpec.cpp stable/11/contrib/llvm/tools/lldb/source/Target/UnixSignals.cpp stable/11/contrib/llvm/tools/lldb/source/Target/UnwindAssembly.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/CompletionRequest.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/ConstString.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/DataBufferHeap.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/DataBufferLLVM.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/DataEncoder.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/DataExtractor.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/FileSpec.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/JSON.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/LLDBAssert.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Log.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Logging.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Status.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Stream.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/StreamGDBRemote.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/StreamString.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/StringExtractor.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/StringList.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/StructuredData.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/TildeExpressionResolver.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/Timer.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/UUID.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/VASprintf.cpp stable/11/contrib/llvm/tools/lldb/source/Utility/VMRange.cpp stable/11/contrib/llvm/tools/lldb/tools/driver/Driver.cpp stable/11/contrib/llvm/tools/lldb/tools/driver/Driver.h stable/11/contrib/llvm/tools/lldb/tools/driver/Platform.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgSet.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValBase.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValBase.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValConsume.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValFile.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValString.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValThreadGrp.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdBase.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdBreak.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTarget.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdFactory.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnBase.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLog.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnResources.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdin.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIDataTypes.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDebug.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDebug.h stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilFileStd.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilMapIdToVariant.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilString.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-server/SystemInitializerLLGS.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-server/SystemInitializerLLGS.h stable/11/contrib/llvm/tools/lldb/tools/lldb-server/lldb-gdbserver.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-server/lldb-platform.cpp stable/11/contrib/llvm/tools/lldb/tools/lldb-server/lldb-server.cpp stable/11/contrib/llvm/tools/lli/lli.cpp stable/11/contrib/llvm/tools/llvm-ar/llvm-ar.cpp stable/11/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp stable/11/contrib/llvm/tools/llvm-cov/CodeCoverage.cpp stable/11/contrib/llvm/tools/llvm-cov/CoverageExporter.h stable/11/contrib/llvm/tools/llvm-cov/CoverageExporterJson.cpp stable/11/contrib/llvm/tools/llvm-cov/CoverageExporterJson.h stable/11/contrib/llvm/tools/llvm-cov/CoverageViewOptions.h stable/11/contrib/llvm/tools/llvm-cov/SourceCoverageView.cpp stable/11/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp stable/11/contrib/llvm/tools/llvm-cov/TestingSupport.cpp stable/11/contrib/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp stable/11/contrib/llvm/tools/llvm-diff/DifferenceEngine.cpp stable/11/contrib/llvm/tools/llvm-dwarfdump/Statistics.cpp stable/11/contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp stable/11/contrib/llvm/tools/llvm-lto/llvm-lto.cpp stable/11/contrib/llvm/tools/llvm-lto2/llvm-lto2.cpp stable/11/contrib/llvm/tools/llvm-mc/llvm-mc.cpp stable/11/contrib/llvm/tools/llvm-mca/CodeRegion.cpp stable/11/contrib/llvm/tools/llvm-mca/CodeRegion.h stable/11/contrib/llvm/tools/llvm-mca/PipelinePrinter.cpp stable/11/contrib/llvm/tools/llvm-mca/PipelinePrinter.h stable/11/contrib/llvm/tools/llvm-mca/llvm-mca.cpp stable/11/contrib/llvm/tools/llvm-nm/llvm-nm.cpp stable/11/contrib/llvm/tools/llvm-objcopy/ObjcopyOpts.td stable/11/contrib/llvm/tools/llvm-objcopy/StripOpts.td stable/11/contrib/llvm/tools/llvm-objcopy/llvm-objcopy.cpp stable/11/contrib/llvm/tools/llvm-objcopy/llvm-objcopy.h stable/11/contrib/llvm/tools/llvm-objdump/COFFDump.cpp stable/11/contrib/llvm/tools/llvm-objdump/ELFDump.cpp stable/11/contrib/llvm/tools/llvm-objdump/MachODump.cpp stable/11/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp stable/11/contrib/llvm/tools/llvm-objdump/llvm-objdump.h stable/11/contrib/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/DumpOutputStyle.h stable/11/contrib/llvm/tools/llvm-pdbutil/InputFile.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/InputFile.h stable/11/contrib/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.h stable/11/contrib/llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/MinimalTypeDumper.h stable/11/contrib/llvm/tools/llvm-pdbutil/PdbYaml.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/PdbYaml.h stable/11/contrib/llvm/tools/llvm-pdbutil/PrettyClassDefinitionDumper.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/PrettyCompilandDumper.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/PrettyCompilandDumper.h stable/11/contrib/llvm/tools/llvm-pdbutil/PrettyEnumDumper.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/PrettyFunctionDumper.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/PrettyTypeDumper.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/PrettyTypeDumper.h stable/11/contrib/llvm/tools/llvm-pdbutil/PrettyTypedefDumper.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/YAMLOutputStyle.h stable/11/contrib/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp stable/11/contrib/llvm/tools/llvm-pdbutil/llvm-pdbutil.h stable/11/contrib/llvm/tools/llvm-profdata/llvm-profdata.cpp stable/11/contrib/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp stable/11/contrib/llvm/tools/llvm-readobj/ARMWinEHPrinter.h stable/11/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp stable/11/contrib/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h stable/11/contrib/llvm/tools/llvm-readobj/ELFDumper.cpp stable/11/contrib/llvm/tools/llvm-readobj/MachODumper.cpp stable/11/contrib/llvm/tools/llvm-readobj/ObjDumper.h stable/11/contrib/llvm/tools/llvm-readobj/WasmDumper.cpp stable/11/contrib/llvm/tools/llvm-readobj/llvm-readobj.cpp stable/11/contrib/llvm/tools/llvm-readobj/llvm-readobj.h stable/11/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp stable/11/contrib/llvm/tools/llvm-stress/llvm-stress.cpp stable/11/contrib/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp stable/11/contrib/llvm/tools/llvm-xray/xray-account.cpp stable/11/contrib/llvm/tools/llvm-xray/xray-converter.cpp stable/11/contrib/llvm/tools/llvm-xray/xray-graph.cpp stable/11/contrib/llvm/tools/llvm-xray/xray-stacks.cpp stable/11/contrib/llvm/tools/opt/Debugify.cpp stable/11/contrib/llvm/tools/opt/NewPMDriver.cpp stable/11/contrib/llvm/tools/opt/opt.cpp stable/11/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp stable/11/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp stable/11/contrib/llvm/utils/TableGen/CTagsEmitter.cpp stable/11/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp stable/11/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h stable/11/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp stable/11/contrib/llvm/utils/TableGen/CodeGenInstruction.h stable/11/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h stable/11/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp stable/11/contrib/llvm/utils/TableGen/CodeGenRegisters.h stable/11/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp stable/11/contrib/llvm/utils/TableGen/CodeGenSchedule.h stable/11/contrib/llvm/utils/TableGen/CodeGenTarget.cpp stable/11/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp stable/11/contrib/llvm/utils/TableGen/DAGISelMatcher.h stable/11/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp stable/11/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp stable/11/contrib/llvm/utils/TableGen/FastISelEmitter.cpp stable/11/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp stable/11/contrib/llvm/utils/TableGen/GlobalISelEmitter.cpp stable/11/contrib/llvm/utils/TableGen/InfoByHwMode.cpp stable/11/contrib/llvm/utils/TableGen/InfoByHwMode.h stable/11/contrib/llvm/utils/TableGen/InstrDocsEmitter.cpp stable/11/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp stable/11/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp stable/11/contrib/llvm/utils/TableGen/PredicateExpander.cpp stable/11/contrib/llvm/utils/TableGen/PredicateExpander.h stable/11/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp stable/11/contrib/llvm/utils/TableGen/SearchableTableEmitter.cpp stable/11/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp stable/11/contrib/llvm/utils/TableGen/TableGen.cpp stable/11/contrib/llvm/utils/TableGen/TableGenBackends.h stable/11/contrib/llvm/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp stable/11/contrib/llvm/utils/TableGen/X86ModRMFilters.h stable/11/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp stable/11/contrib/openmp/runtime/src/kmp.h stable/11/contrib/openmp/runtime/src/kmp_runtime.cpp stable/11/contrib/openmp/runtime/src/kmp_wrapper_getpid.h stable/11/contrib/openmp/runtime/src/ompt-general.cpp stable/11/etc/mtree/BSD.debug.dist stable/11/etc/mtree/BSD.usr.dist stable/11/gnu/lib/libgcc/Makefile stable/11/lib/Makefile stable/11/lib/clang/freebsd_cc_version.h stable/11/lib/clang/headers/Makefile stable/11/lib/clang/include/clang/Basic/Version.inc stable/11/lib/clang/include/clang/Config/config.h stable/11/lib/clang/include/lld/Common/Version.inc stable/11/lib/clang/include/llvm/Config/AsmParsers.def stable/11/lib/clang/include/llvm/Config/AsmPrinters.def stable/11/lib/clang/include/llvm/Config/Disassemblers.def stable/11/lib/clang/include/llvm/Config/Targets.def stable/11/lib/clang/include/llvm/Config/config.h stable/11/lib/clang/include/llvm/Config/llvm-config.h stable/11/lib/clang/include/llvm/Support/VCSRevision.h stable/11/lib/clang/libclang/Makefile stable/11/lib/clang/liblldb/Makefile stable/11/lib/clang/libllvm/Makefile stable/11/lib/clang/libllvmminimal/Makefile stable/11/lib/clang/llvm.build.mk stable/11/lib/libc++/Makefile stable/11/lib/libclang_rt/Makefile.inc stable/11/lib/libclang_rt/asan/Makefile stable/11/lib/libclang_rt/asan_dynamic/Makefile stable/11/lib/libclang_rt/msan/Makefile stable/11/lib/libclang_rt/safestack/Makefile stable/11/lib/libclang_rt/stats/Makefile stable/11/lib/libclang_rt/tsan/Makefile stable/11/lib/libclang_rt/ubsan_standalone/Makefile stable/11/share/man/man5/src.conf.5 stable/11/share/mk/src.opts.mk stable/11/sys/arm/conf/NOTES stable/11/sys/sys/param.h stable/11/tools/build/mk/OptionalObsoleteFiles.inc stable/11/usr.bin/clang/Makefile stable/11/usr.bin/clang/lld/Makefile stable/11/usr.bin/clang/lldb/Makefile stable/11/usr.bin/clang/llvm-cov/Makefile stable/11/usr.bin/clang/llvm-mca/Makefile stable/11/usr.bin/clang/llvm-objcopy/Makefile stable/11/usr.bin/clang/llvm-objdump/Makefile stable/11/usr.bin/clang/llvm-pdbutil/Makefile stable/11/usr.bin/clang/llvm-tblgen/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/ObsoleteFiles.inc Tue Apr 16 20:05:24 2019 (r346296) @@ -38,6 +38,158 @@ # xargs -n1 | sort | uniq -d; # done +# 20190416: new libc++ import which bumps version from 7.0.1 to 8.0.0. +OLD_FILES+=usr/include/c++/v1/experimental/dynarray +# 20190416: new clang import which bumps version from 7.0.1 to 8.0.0. +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/esan_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/netbsd_syscall_hooks.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/scudo_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/7.0.1/include/sanitizer +OLD_FILES+=usr/lib/clang/7.0.1/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__clang_cuda_device_functions.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__clang_cuda_libdevice_declares.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/7.0.1/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/7.0.1/include/adxintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/altivec.h +OLD_FILES+=usr/lib/clang/7.0.1/include/ammintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/arm64intr.h +OLD_FILES+=usr/lib/clang/7.0.1/include/arm_acle.h +OLD_FILES+=usr/lib/clang/7.0.1/include/arm_fp16.h +OLD_FILES+=usr/lib/clang/7.0.1/include/arm_neon.h +OLD_FILES+=usr/lib/clang/7.0.1/include/armintr.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512bitalgintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vbmi2intrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vlbitalgintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vlvbmi2intrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vlvnniintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vnniintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avx512vpopcntdqvlintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/avxintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/cetintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/cldemoteintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/clwbintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/cpuid.h +OLD_FILES+=usr/lib/clang/7.0.1/include/emmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/gfniintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/htmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/immintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/invpcidintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/7.0.1/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/7.0.1/include/mmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/module.modulemap +OLD_FILES+=usr/lib/clang/7.0.1/include/movdirintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/msa.h +OLD_FILES+=usr/lib/clang/7.0.1/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/opencl-c.h +OLD_FILES+=usr/lib/clang/7.0.1/include/pconfigintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/ptwriteintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/s390intrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/sgxintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/shaintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/smmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/vadefs.h +OLD_FILES+=usr/lib/clang/7.0.1/include/vaesintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/vecintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/vpclmulqdqintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/waitpkgintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/wbnoinvdintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/x86intrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/xopintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/7.0.1/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/7.0.1/include +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.msan-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.msan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.tsan-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/7.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/7.0.1/lib/freebsd +OLD_DIRS+=usr/lib/clang/7.0.1/lib +OLD_DIRS+=usr/lib/clang/7.0.1 # 20190216: new clang import which bumps version from 6.0.1 to 7.0.1. OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/asan_interface.h Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/UPDATING Tue Apr 16 20:05:24 2019 (r346296) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20190416: + Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to + 8.0.0. Please see the 20141231 entry below for information about + prerequisites and upgrading, if you are not already using clang 3.5.0 + or higher. + 20190226: geom_uzip(4) depends on the new module xz. If geom_uzip is statically compiled into your custom kernel, add 'device xz' statement to the Modified: stable/11/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- stable/11/contrib/compiler-rt/LICENSE.TXT Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/LICENSE.TXT Tue Apr 16 20:05:24 2019 (r346296) @@ -14,7 +14,7 @@ Full text of the relevant licenses is included below. University of Illinois/NCSA Open Source License -Copyright (c) 2009-2018 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT All rights reserved. Modified: stable/11/contrib/compiler-rt/include/sanitizer/allocator_interface.h ============================================================================== --- stable/11/contrib/compiler-rt/include/sanitizer/allocator_interface.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/include/sanitizer/allocator_interface.h Tue Apr 16 20:05:24 2019 (r346296) @@ -82,7 +82,6 @@ extern "C" { Currently available with ASan only. */ void __sanitizer_purge_allocator(void); - #ifdef __cplusplus } // extern "C" #endif Modified: stable/11/contrib/compiler-rt/include/sanitizer/common_interface_defs.h ============================================================================== --- stable/11/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Tue Apr 16 20:05:24 2019 (r346296) @@ -124,6 +124,12 @@ extern "C" { // Symbolizes the supplied 'pc' using the format string 'fmt'. // Outputs at most 'out_buf_size' bytes into 'out_buf'. + // If 'out_buf' is not empty then output is zero or more non empty C strings + // followed by single empty C string. Multiple strings can be returned if PC + // corresponds to inlined function. Inlined frames are printed in the order + // from "most-inlined" to the "least-inlined", so the last frame should be the + // not inlined function. + // Inlined frames can be removed with 'symbolize_inline_frames=0'. // The format syntax is described in // lib/sanitizer_common/sanitizer_stacktrace_printer.h. void __sanitizer_symbolize_pc(void *pc, const char *fmt, char *out_buf, Modified: stable/11/contrib/compiler-rt/include/sanitizer/hwasan_interface.h ============================================================================== --- stable/11/contrib/compiler-rt/include/sanitizer/hwasan_interface.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/include/sanitizer/hwasan_interface.h Tue Apr 16 20:05:24 2019 (r346296) @@ -19,6 +19,12 @@ #ifdef __cplusplus extern "C" { #endif + // Initialize shadow but not the rest of the runtime. + // Does not call libc unless there is an error. + // Can be called multiple times, or not at all (in which case shadow will + // be initialized in compiler-inserted __hwasan_init() call). + void __hwasan_shadow_init(void); + // This function may be optionally provided by user and should return // a string containing HWASan runtime options. See asan_flags.h for details. const char* __hwasan_default_options(void); @@ -26,6 +32,51 @@ extern "C" { void __hwasan_enable_allocator_tagging(void); void __hwasan_disable_allocator_tagging(void); + // Mark region of memory with the given tag. Both address and size need to be + // 16-byte aligned. + void __hwasan_tag_memory(const volatile void *p, unsigned char tag, + size_t size); + + /// Set pointer tag. Previous tag is lost. + void *__hwasan_tag_pointer(const volatile void *p, unsigned char tag); + + // Set memory tag from the current SP address to the given address to zero. + // This is meant to annotate longjmp and other non-local jumps. + // This function needs to know the (almost) exact destination frame address; + // clearing shadow for the entire thread stack like __asan_handle_no_return + // does would cause false reports. + void __hwasan_handle_longjmp(const void *sp_dst); + + // Libc hook for thread creation. Should be called in the child thread before + // any instrumented code. + void __hwasan_thread_enter(); + + // Libc hook for thread destruction. No instrumented code should run after + // this call. + void __hwasan_thread_exit(); + + // Print shadow and origin for the memory range to stderr in a human-readable + // format. + void __hwasan_print_shadow(const volatile void *x, size_t size); + + // Print one-line report about the memory usage of the current process. + void __hwasan_print_memory_usage(); + + int __sanitizer_posix_memalign(void **memptr, size_t alignment, size_t size); + void * __sanitizer_memalign(size_t alignment, size_t size); + void * __sanitizer_aligned_alloc(size_t alignment, size_t size); + void * __sanitizer___libc_memalign(size_t alignment, size_t size); + void * __sanitizer_valloc(size_t size); + void * __sanitizer_pvalloc(size_t size); + void __sanitizer_free(void *ptr); + void __sanitizer_cfree(void *ptr); + size_t __sanitizer_malloc_usable_size(const void *ptr); + struct mallinfo __sanitizer_mallinfo(); + int __sanitizer_mallopt(int cmd, int value); + void __sanitizer_malloc_stats(void); + void * __sanitizer_calloc(size_t nmemb, size_t size); + void * __sanitizer_realloc(void *ptr, size_t size); + void * __sanitizer_malloc(size_t size); #ifdef __cplusplus } // extern "C" #endif Modified: stable/11/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h ============================================================================== --- stable/11/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/include/sanitizer/netbsd_syscall_hooks.h Tue Apr 16 20:05:24 2019 (r346296) @@ -21,8 +21,8 @@ // DO NOT EDIT! THIS FILE HAS BEEN GENERATED! // // Generated with: generate_netbsd_syscalls.awk -// Generated date: 2018-03-03 -// Generated from: syscalls.master,v 1.291 2018/01/06 16:41:23 kamil Exp +// Generated date: 2018-10-30 +// Generated from: syscalls.master,v 1.293 2018/07/31 13:00:13 rjs Exp // //===----------------------------------------------------------------------===// #ifndef SANITIZER_NETBSD_SYSCALL_HOOKS_H @@ -986,7 +986,15 @@ #define __sanitizer_syscall_post_fpathconf(res, fd, name) \ __sanitizer_syscall_post_impl_fpathconf(res, (long long)(fd), \ (long long)(name)) -/* syscall 193 has been skipped */ +#define __sanitizer_syscall_pre_getsockopt2(s, level, name, val, avalsize) \ + __sanitizer_syscall_pre_impl_getsockopt2( \ + (long long)(s), (long long)(level), (long long)(name), (long long)(val), \ + (long long)(avalsize)) +#define __sanitizer_syscall_post_getsockopt2(res, s, level, name, val, \ + avalsize) \ + __sanitizer_syscall_post_impl_getsockopt2( \ + res, (long long)(s), (long long)(level), (long long)(name), \ + (long long)(val), (long long)(avalsize)) #define __sanitizer_syscall_pre_getrlimit(which, rlp) \ __sanitizer_syscall_pre_impl_getrlimit((long long)(which), (long long)(rlp)) #define __sanitizer_syscall_post_getrlimit(res, which, rlp) \ @@ -1752,18 +1760,8 @@ __sanitizer_syscall_post_impl___sigaction_sigtramp( \ res, (long long)(signum), (long long)(nsa), (long long)(osa), \ (long long)(tramp), (long long)(vers)) -#define __sanitizer_syscall_pre_pmc_get_info(ctr, op, args) \ - __sanitizer_syscall_pre_impl_pmc_get_info((long long)(ctr), (long long)(op), \ - (long long)(args)) -#define __sanitizer_syscall_post_pmc_get_info(res, ctr, op, args) \ - __sanitizer_syscall_post_impl_pmc_get_info( \ - res, (long long)(ctr), (long long)(op), (long long)(args)) -#define __sanitizer_syscall_pre_pmc_control(ctr, op, args) \ - __sanitizer_syscall_pre_impl_pmc_control((long long)(ctr), (long long)(op), \ - (long long)(args)) -#define __sanitizer_syscall_post_pmc_control(res, ctr, op, args) \ - __sanitizer_syscall_post_impl_pmc_control( \ - res, (long long)(ctr), (long long)(op), (long long)(args)) +/* syscall 341 has been skipped */ +/* syscall 342 has been skipped */ #define __sanitizer_syscall_pre_rasctl(addr, len, op) \ __sanitizer_syscall_pre_impl_rasctl((long long)(addr), (long long)(len), \ (long long)(op)) @@ -3444,7 +3442,13 @@ void __sanitizer_syscall_post_impl_pathconf(long long void __sanitizer_syscall_pre_impl_fpathconf(long long fd, long long name); void __sanitizer_syscall_post_impl_fpathconf(long long res, long long fd, long long name); -/* syscall 193 has been skipped */ +void __sanitizer_syscall_pre_impl_getsockopt2(long long s, long long level, + long long name, long long val, + long long avalsize); +void __sanitizer_syscall_post_impl_getsockopt2(long long res, long long s, + long long level, long long name, + long long val, + long long avalsize); void __sanitizer_syscall_pre_impl_getrlimit(long long which, long long rlp); void __sanitizer_syscall_post_impl_getrlimit(long long res, long long which, long long rlp); @@ -4001,14 +4005,8 @@ void __sanitizer_syscall_pre_impl___sigaction_sigtramp void __sanitizer_syscall_post_impl___sigaction_sigtramp( long long res, long long signum, long long nsa, long long osa, long long tramp, long long vers); -void __sanitizer_syscall_pre_impl_pmc_get_info(long long ctr, long long op, - long long args); -void __sanitizer_syscall_post_impl_pmc_get_info(long long res, long long ctr, - long long op, long long args); -void __sanitizer_syscall_pre_impl_pmc_control(long long ctr, long long op, - long long args); -void __sanitizer_syscall_post_impl_pmc_control(long long res, long long ctr, - long long op, long long args); +/* syscall 341 has been skipped */ +/* syscall 342 has been skipped */ void __sanitizer_syscall_pre_impl_rasctl(long long addr, long long len, long long op); void __sanitizer_syscall_post_impl_rasctl(long long res, long long addr, Modified: stable/11/contrib/compiler-rt/include/xray/xray_log_interface.h ============================================================================== --- stable/11/contrib/compiler-rt/include/xray/xray_log_interface.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/include/xray/xray_log_interface.h Tue Apr 16 20:05:24 2019 (r346296) @@ -158,8 +158,8 @@ struct XRayLogImpl { /// The log initialization routine provided by the implementation, always /// provided with the following parameters: /// - /// - buffer size - /// - maximum number of buffers + /// - buffer size (unused) + /// - maximum number of buffers (unused) /// - a pointer to an argument struct that the implementation MUST handle /// - the size of the argument struct /// @@ -354,26 +354,5 @@ XRayLogFlushStatus __xray_log_process_buffers(void (*P XRayBuffer)); } // extern "C" - -namespace __xray { - -/// DEPRECATED: Use __xray_log_init_mode(...) instead, and provide flag -/// configuration strings to set the options instead. -/// Options used by the LLVM XRay FDR logging implementation. -struct FDRLoggingOptions { - bool ReportErrors = false; - int Fd = -1; -}; - -/// DEPRECATED: Use __xray_log_init_mode(...) instead, and provide flag -/// configuration strings to set the options instead. -/// Options used by the LLVM XRay Basic (Naive) logging implementation. -struct BasicLoggingOptions { - int DurationFilterMicros = 0; - size_t MaxStackDepth = 0; - size_t ThreadBufferSize = 0; -}; - -} // namespace __xray #endif // XRAY_XRAY_LOG_INTERFACE_H Modified: stable/11/contrib/compiler-rt/lib/asan/asan_allocator.h ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_allocator.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_allocator.h Tue Apr 16 20:05:24 2019 (r346296) @@ -148,6 +148,7 @@ const uptr kAllocatorSpace = 0x600000000000ULL; const uptr kAllocatorSize = 0x40000000000ULL; // 4T. typedef DefaultSizeClassMap SizeClassMap; # endif +template struct AP64 { // Allocator64 parameters. Deliberately using a short name. static const uptr kSpaceBeg = kAllocatorSpace; static const uptr kSpaceSize = kAllocatorSize; @@ -155,37 +156,57 @@ struct AP64 { // Allocator64 parameters. Deliberately typedef __asan::SizeClassMap SizeClassMap; typedef AsanMapUnmapCallback MapUnmapCallback; static const uptr kFlags = 0; + using AddressSpaceView = AddressSpaceViewTy; }; -typedef SizeClassAllocator64 PrimaryAllocator; +template +using PrimaryAllocatorASVT = SizeClassAllocator64>; +using PrimaryAllocator = PrimaryAllocatorASVT; #else // Fallback to SizeClassAllocator32. static const uptr kRegionSizeLog = 20; static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog; # if SANITIZER_WORDSIZE == 32 -typedef FlatByteMap ByteMap; +template +using ByteMapASVT = FlatByteMap; # elif SANITIZER_WORDSIZE == 64 -typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap; +template +using ByteMapASVT = + TwoLevelByteMap<(kNumRegions >> 12), 1 << 12, AddressSpaceView>; # endif typedef CompactSizeClassMap SizeClassMap; +template struct AP32 { static const uptr kSpaceBeg = 0; static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE; static const uptr kMetadataSize = 16; typedef __asan::SizeClassMap SizeClassMap; static const uptr kRegionSizeLog = __asan::kRegionSizeLog; - typedef __asan::ByteMap ByteMap; + using AddressSpaceView = AddressSpaceViewTy; + using ByteMap = __asan::ByteMapASVT; typedef AsanMapUnmapCallback MapUnmapCallback; static const uptr kFlags = 0; }; -typedef SizeClassAllocator32 PrimaryAllocator; +template +using PrimaryAllocatorASVT = SizeClassAllocator32 >; +using PrimaryAllocator = PrimaryAllocatorASVT; #endif // SANITIZER_CAN_USE_ALLOCATOR64 static const uptr kNumberOfSizeClasses = SizeClassMap::kNumClasses; -typedef SizeClassAllocatorLocalCache AllocatorCache; -typedef LargeMmapAllocator SecondaryAllocator; -typedef CombinedAllocator AsanAllocator; +template +using AllocatorCacheASVT = + SizeClassAllocatorLocalCache>; +using AllocatorCache = AllocatorCacheASVT; +template +using SecondaryAllocatorASVT = + LargeMmapAllocator; +template +using AsanAllocatorASVT = + CombinedAllocator, + AllocatorCacheASVT, + SecondaryAllocatorASVT>; +using AsanAllocator = AsanAllocatorASVT; struct AsanThreadLocalMallocStorage { uptr quarantine_cache[16]; Modified: stable/11/contrib/compiler-rt/lib/asan/asan_errors.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_errors.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_errors.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -125,9 +125,8 @@ void ErrorAllocTypeMismatch::Print() { Decorator d; Printf("%s", d.Error()); Report("ERROR: AddressSanitizer: %s (%s vs %s) on %p\n", - scariness.GetDescription(), - alloc_names[alloc_type], dealloc_names[dealloc_type], - addr_description.addr); + scariness.GetDescription(), alloc_names[alloc_type], + dealloc_names[dealloc_type], addr_description.Address()); Printf("%s", d.Default()); CHECK_GT(dealloc_stack->size, 0); scariness.Print(); Modified: stable/11/contrib/compiler-rt/lib/asan/asan_errors.h ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_errors.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_errors.h Tue Apr 16 20:05:24 2019 (r346296) @@ -110,8 +110,8 @@ struct ErrorFreeNotMalloced : ErrorBase { struct ErrorAllocTypeMismatch : ErrorBase { const BufferedStackTrace *dealloc_stack; - HeapAddressDescription addr_description; AllocType alloc_type, dealloc_type; + AddressDescription addr_description; ErrorAllocTypeMismatch() = default; // (*) ErrorAllocTypeMismatch(u32 tid, BufferedStackTrace *stack, uptr addr, @@ -119,9 +119,8 @@ struct ErrorAllocTypeMismatch : ErrorBase { : ErrorBase(tid, 10, "alloc-dealloc-mismatch"), dealloc_stack(stack), alloc_type(alloc_type_), - dealloc_type(dealloc_type_) { - GetHeapAddressInformation(addr, 1, &addr_description); - }; + dealloc_type(dealloc_type_), + addr_description(addr, 1, false) {} void Print(); }; Modified: stable/11/contrib/compiler-rt/lib/asan/asan_flags.inc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_flags.inc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_flags.inc Tue Apr 16 20:05:24 2019 (r346296) @@ -152,8 +152,6 @@ ASAN_FLAG(const char *, suppressions, "", "Suppression ASAN_FLAG(bool, halt_on_error, true, "Crash the program after printing the first error report " "(WARNING: USE AT YOUR OWN RISK!)") -ASAN_FLAG(bool, use_odr_indicator, false, - "Use special ODR indicator symbol for ODR violation detection") ASAN_FLAG(bool, allocator_frees_and_returns_null_on_realloc_zero, true, "realloc(p, 0) is equivalent to free(p) by default (Same as the " "POSIX standard). If set to false, realloc(p, 0) will return a " Modified: stable/11/contrib/compiler-rt/lib/asan/asan_fuchsia.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_fuchsia.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_fuchsia.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -190,6 +190,13 @@ static void ThreadExitHook(void *hook, uptr os_id) { AsanThread::TSDDtor(per_thread); } +bool HandleDlopenInit() { + // Not supported on this platform. + static_assert(!SANITIZER_SUPPORTS_INIT_FOR_DLOPEN, + "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be false"); + return false; +} + } // namespace __asan // These are declared (in extern "C") by . Modified: stable/11/contrib/compiler-rt/lib/asan/asan_globals.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_globals.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_globals.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -83,9 +83,11 @@ static bool IsAddressNearGlobal(uptr addr, const __asa } static void ReportGlobal(const Global &g, const char *prefix) { - Report("%s Global[%p]: beg=%p size=%zu/%zu name=%s module=%s dyn_init=%zu\n", - prefix, &g, (void *)g.beg, g.size, g.size_with_redzone, g.name, - g.module_name, g.has_dynamic_init); + Report( + "%s Global[%p]: beg=%p size=%zu/%zu name=%s module=%s dyn_init=%zu " + "odr_indicator=%p\n", + prefix, &g, (void *)g.beg, g.size, g.size_with_redzone, g.name, + g.module_name, g.has_dynamic_init, (void *)g.odr_indicator); if (g.location) { Report(" location (%p): name=%s[%p], %d %d\n", g.location, g.location->filename, g.location->filename, g.location->line_no, @@ -133,6 +135,9 @@ enum GlobalSymbolState { // this method in case compiler instruments global variables through their // local aliases. static void CheckODRViolationViaIndicator(const Global *g) { + // Instrumentation requests to skip ODR check. + if (g->odr_indicator == UINTPTR_MAX) + return; u8 *odr_indicator = reinterpret_cast(g->odr_indicator); if (*odr_indicator == UNREGISTERED) { *odr_indicator = REGISTERED; @@ -183,9 +188,7 @@ static void CheckODRViolationViaPoisoning(const Global // This routine chooses between two different methods of ODR violation // detection. static inline bool UseODRIndicator(const Global *g) { - // Use ODR indicator method iff use_odr_indicator flag is set and - // indicator symbol address is not 0. - return flags()->use_odr_indicator && g->odr_indicator > 0; + return g->odr_indicator > 0; } // Register a global variable. @@ -248,7 +251,7 @@ static void UnregisterGlobal(const Global *g) { // implementation. It might not be worth doing anyway. // Release ODR indicator. - if (UseODRIndicator(g)) { + if (UseODRIndicator(g) && g->odr_indicator != UINTPTR_MAX) { u8 *odr_indicator = reinterpret_cast(g->odr_indicator); *odr_indicator = UNREGISTERED; } Modified: stable/11/contrib/compiler-rt/lib/asan/asan_globals_win.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_globals_win.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_globals_win.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -29,7 +29,7 @@ static void call_on_globals(void (*hook)(__asan_global __asan_global *end = &__asan_globals_end; uptr bytediff = (uptr)end - (uptr)start; if (bytediff % sizeof(__asan_global) != 0) { -#ifdef SANITIZER_DLL_THUNK +#if defined(SANITIZER_DLL_THUNK) || defined(SANITIZER_DYNAMIC_RUNTIME_THUNK) __debugbreak(); #else CHECK("corrupt asan global array"); Modified: stable/11/contrib/compiler-rt/lib/asan/asan_internal.h ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_internal.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_internal.h Tue Apr 16 20:05:24 2019 (r346296) @@ -111,6 +111,11 @@ void *AsanDlSymNext(const char *sym); void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name); +// Returns `true` iff most of ASan init process should be skipped due to the +// ASan library being loaded via `dlopen()`. Platforms may perform any +// `dlopen()` specific initialization inside this function. +bool HandleDlopenInit(); + // Add convenient macro for interface functions that may be represented as // weak hooks. #define ASAN_MALLOC_HOOK(ptr, size) \ Modified: stable/11/contrib/compiler-rt/lib/asan/asan_linux.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_linux.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_linux.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -248,6 +248,13 @@ void *AsanDlSymNext(const char *sym) { return dlsym(RTLD_NEXT, sym); } +bool HandleDlopenInit() { + // Not supported on this platform. + static_assert(!SANITIZER_SUPPORTS_INIT_FOR_DLOPEN, + "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be false"); + return false; +} + } // namespace __asan #endif // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD || Modified: stable/11/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -209,7 +209,7 @@ INTERCEPTOR(struct fake_mallinfo, mallinfo, void) { } INTERCEPTOR(int, mallopt, int cmd, int value) { - return -1; + return 0; } #endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO Modified: stable/11/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -61,4 +61,25 @@ using namespace __asan; #include "sanitizer_common/sanitizer_malloc_mac.inc" +namespace COMMON_MALLOC_NAMESPACE { +bool HandleDlopenInit() { + static_assert(SANITIZER_SUPPORTS_INIT_FOR_DLOPEN, + "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be true"); + // We have no reliable way of knowing how we are being loaded + // so make it a requirement on Apple platforms to set this environment + // variable to indicate that we want to perform initialization via + // dlopen(). + auto init_str = GetEnv("APPLE_ASAN_INIT_FOR_DLOPEN"); + if (!init_str) + return false; + if (internal_strncmp(init_str, "1", 1) != 0) + return false; + // When we are loaded via `dlopen()` path we still initialize the malloc zone + // so Symbolication clients (e.g. `leaks`) that load the ASan allocator can + // find an initialized malloc zone. + InitMallocZoneFields(); + return true; +} +} // namespace COMMON_MALLOC_NAMESPACE + #endif Modified: stable/11/contrib/compiler-rt/lib/asan/asan_malloc_win.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_malloc_win.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_malloc_win.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -14,9 +14,18 @@ #include "sanitizer_common/sanitizer_platform.h" #if SANITIZER_WINDOWS -#define WIN32_LEAN_AND_MEAN -#include +// Intentionally not including windows.h here, to avoid the risk of +// pulling in conflicting declarations of these functions. (With mingw-w64, +// there's a risk of windows.h pulling in stdint.h.) +typedef int BOOL; +typedef void *HANDLE; +typedef const void *LPCVOID; +typedef void *LPVOID; +#define HEAP_ZERO_MEMORY 0x00000008 +#define HEAP_REALLOC_IN_PLACE_ONLY 0x00000010 + + #include "asan_allocator.h" #include "asan_interceptors.h" #include "asan_internal.h" @@ -125,13 +134,18 @@ void *_recalloc_base(void *p, size_t n, size_t elem_si } ALLOCATION_FUNCTION_ATTRIBUTE -size_t _msize(const void *ptr) { +size_t _msize(void *ptr) { GET_CURRENT_PC_BP_SP; (void)sp; return asan_malloc_usable_size(ptr, pc, bp); } ALLOCATION_FUNCTION_ATTRIBUTE +size_t _msize_base(void *ptr) { + return _msize(ptr); +} + +ALLOCATION_FUNCTION_ATTRIBUTE void *_expand(void *memblock, size_t size) { // _expand is used in realloc-like functions to resize the buffer if possible. // We don't want memory to stand still while resizing buffers, so return 0. @@ -226,6 +240,7 @@ void ReplaceSystemMalloc() { TryToOverrideFunction("_recalloc_base", (uptr)_recalloc); TryToOverrideFunction("_recalloc_crt", (uptr)_recalloc); TryToOverrideFunction("_msize", (uptr)_msize); + TryToOverrideFunction("_msize_base", (uptr)_msize); TryToOverrideFunction("_expand", (uptr)_expand); TryToOverrideFunction("_expand_base", (uptr)_expand); Modified: stable/11/contrib/compiler-rt/lib/asan/asan_new_delete.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_new_delete.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_new_delete.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -26,7 +26,7 @@ // anyway by passing extra -export flags to the linker, which is exactly that // dllexport would normally do. We need to export them in order to make the // VS2015 dynamic CRT (MD) work. -#if SANITIZER_WINDOWS +#if SANITIZER_WINDOWS && defined(_MSC_VER) #define CXX_OPERATOR_ATTRIBUTE #define COMMENT_EXPORT(sym) __pragma(comment(linker, "/export:" sym)) #ifdef _WIN64 Modified: stable/11/contrib/compiler-rt/lib/asan/asan_posix.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_posix.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_posix.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -40,6 +40,51 @@ void AsanOnDeadlySignal(int signo, void *siginfo, void // ---------------------- TSD ---------------- {{{1 +#if SANITIZER_NETBSD || SANITIZER_FREEBSD +// Thread Static Data cannot be used in early init on NetBSD and FreeBSD. +// Reuse the Asan TSD API for compatibility with existing code +// with an alternative implementation. + +static void (*tsd_destructor)(void *tsd) = nullptr; + +struct tsd_key { + tsd_key() : key(nullptr) {} + ~tsd_key() { + CHECK(tsd_destructor); + if (key) + (*tsd_destructor)(key); + } + void *key; +}; + +static thread_local struct tsd_key key; + +void AsanTSDInit(void (*destructor)(void *tsd)) { + CHECK(!tsd_destructor); + tsd_destructor = destructor; +} + +void *AsanTSDGet() { + CHECK(tsd_destructor); + return key.key; +} + +void AsanTSDSet(void *tsd) { + CHECK(tsd_destructor); + CHECK(tsd); + CHECK(!key.key); + key.key = tsd; +} + +void PlatformTSDDtor(void *tsd) { + CHECK(tsd_destructor); + CHECK_EQ(key.key, tsd); + key.key = nullptr; + // Make sure that signal handler can not see a stale current thread pointer. + atomic_signal_fence(memory_order_seq_cst); + AsanThread::TSDDtor(tsd); +} +#else static pthread_key_t tsd_key; static bool tsd_key_inited = false; void AsanTSDInit(void (*destructor)(void *tsd)) { @@ -67,6 +112,7 @@ void PlatformTSDDtor(void *tsd) { } AsanThread::TSDDtor(tsd); } +#endif } // namespace __asan #endif // SANITIZER_POSIX Modified: stable/11/contrib/compiler-rt/lib/asan/asan_report.h ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_report.h Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_report.h Tue Apr 16 20:05:24 2019 (r346296) @@ -12,6 +12,9 @@ // ASan-private header for error reporting functions. //===----------------------------------------------------------------------===// +#ifndef ASAN_REPORT_H +#define ASAN_REPORT_H + #include "asan_allocator.h" #include "asan_internal.h" #include "asan_thread.h" @@ -92,3 +95,4 @@ void ReportMacCfReallocUnknown(uptr addr, uptr zone_pt BufferedStackTrace *stack); } // namespace __asan +#endif // ASAN_REPORT_H Modified: stable/11/contrib/compiler-rt/lib/asan/asan_rtems.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_rtems.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_rtems.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -213,6 +213,12 @@ static void HandleExit() { } } +bool HandleDlopenInit() { + // Not supported on this platform. + static_assert(!SANITIZER_SUPPORTS_INIT_FOR_DLOPEN, + "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be false"); + return false; +} } // namespace __asan // These are declared (in extern "C") by . Modified: stable/11/contrib/compiler-rt/lib/asan/asan_rtl.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_rtl.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_rtl.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -383,6 +383,19 @@ void PrintAddressSpaceLayout() { kHighShadowBeg > kMidMemEnd); } +#if defined(__thumb__) && defined(__linux__) +#define START_BACKGROUND_THREAD_IN_ASAN_INTERNAL +#endif + +#ifndef START_BACKGROUND_THREAD_IN_ASAN_INTERNAL +static bool UNUSED __local_asan_dyninit = [] { + MaybeStartBackgroudThread(); + SetSoftRssLimitExceededCallback(AsanSoftRssLimitExceededCallback); + + return false; +}(); +#endif + static void AsanInitInternal() { if (LIKELY(asan_inited)) return; SanitizerToolName = "AddressSanitizer"; @@ -396,6 +409,14 @@ static void AsanInitInternal() { // initialization steps look at flags(). InitializeFlags(); + // Stop performing init at this point if we are being loaded via + // dlopen() and the platform supports it. + if (SANITIZER_SUPPORTS_INIT_FOR_DLOPEN && UNLIKELY(HandleDlopenInit())) { + asan_init_is_running = false; + VReport(1, "AddressSanitizer init is being performed for dlopen().\n"); + return; + } + AsanCheckIncompatibleRT(); AsanCheckDynamicRTPrereqs(); AvoidCVE_2016_2143(); @@ -420,6 +441,8 @@ static void AsanInitInternal() { __asan_option_detect_stack_use_after_return = flags()->detect_stack_use_after_return; + __sanitizer::InitializePlatformEarly(); + // Re-exec ourselves if we need to set additional env or command line args. MaybeReexec(); @@ -447,8 +470,10 @@ static void AsanInitInternal() { allocator_options.SetFrom(flags(), common_flags()); InitializeAllocator(allocator_options); +#ifdef START_BACKGROUND_THREAD_IN_ASAN_INTERNAL MaybeStartBackgroudThread(); SetSoftRssLimitExceededCallback(AsanSoftRssLimitExceededCallback); +#endif // On Linux AsanThread::ThreadStart() calls malloc() that's why asan_inited // should be set to 1 prior to initializing the threads. Modified: stable/11/contrib/compiler-rt/lib/asan/asan_thread.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_thread.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_thread.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -223,9 +223,11 @@ void AsanThread::Init(const InitOptions *options) { atomic_store(&stack_switching_, false, memory_order_release); CHECK_EQ(this->stack_size(), 0U); SetThreadStackAndTls(options); - CHECK_GT(this->stack_size(), 0U); - CHECK(AddrIsInMem(stack_bottom_)); - CHECK(AddrIsInMem(stack_top_ - 1)); + if (stack_top_ != stack_bottom_) { + CHECK_GT(this->stack_size(), 0U); + CHECK(AddrIsInMem(stack_bottom_)); + CHECK(AddrIsInMem(stack_top_ - 1)); + } ClearShadowForThreadStackAndTLS(); fake_stack_ = nullptr; if (__asan_option_detect_stack_use_after_return) @@ -289,20 +291,23 @@ void AsanThread::SetThreadStackAndTls(const InitOption DCHECK_EQ(options, nullptr); uptr tls_size = 0; uptr stack_size = 0; - GetThreadStackAndTls(tid() == 0, const_cast(&stack_bottom_), - const_cast(&stack_size), &tls_begin_, &tls_size); + GetThreadStackAndTls(tid() == 0, &stack_bottom_, &stack_size, &tls_begin_, + &tls_size); stack_top_ = stack_bottom_ + stack_size; tls_end_ = tls_begin_ + tls_size; dtls_ = DTLS_Get(); - int local; - CHECK(AddrIsInStack((uptr)&local)); + if (stack_top_ != stack_bottom_) { + int local; + CHECK(AddrIsInStack((uptr)&local)); + } } #endif // !SANITIZER_FUCHSIA && !SANITIZER_RTEMS void AsanThread::ClearShadowForThreadStackAndTLS() { - PoisonShadow(stack_bottom_, stack_top_ - stack_bottom_, 0); + if (stack_top_ != stack_bottom_) + PoisonShadow(stack_bottom_, stack_top_ - stack_bottom_, 0); if (tls_begin_ != tls_end_) { uptr tls_begin_aligned = RoundDownTo(tls_begin_, SHADOW_GRANULARITY); uptr tls_end_aligned = RoundUpTo(tls_end_, SHADOW_GRANULARITY); @@ -314,6 +319,9 @@ void AsanThread::ClearShadowForThreadStackAndTLS() { bool AsanThread::GetStackFrameAccessByAddr(uptr addr, StackFrameAccess *access) { + if (stack_top_ == stack_bottom_) + return false; + uptr bottom = 0; if (AddrIsInStack(addr)) { bottom = stack_bottom(); Modified: stable/11/contrib/compiler-rt/lib/asan/asan_win.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_win.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_win.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -159,6 +159,14 @@ INTERCEPTOR_WINAPI(DWORD, CreateThread, namespace __asan { void InitializePlatformInterceptors() { + // The interceptors were not designed to be removable, so we have to keep this + // module alive for the life of the process. + HMODULE pinned; + CHECK(GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | + GET_MODULE_HANDLE_EX_FLAG_PIN, + (LPCWSTR)&InitializePlatformInterceptors, + &pinned)); + ASAN_INTERCEPT_FUNC(CreateThread); ASAN_INTERCEPT_FUNC(SetUnhandledExceptionFilter); @@ -312,6 +320,13 @@ int __asan_set_seh_filter() { if (prev_seh_handler != &SEHHandler) default_seh_handler = prev_seh_handler; return 0; +} + +bool HandleDlopenInit() { + // Not supported on this platform. + static_assert(!SANITIZER_SUPPORTS_INIT_FOR_DLOPEN, + "Expected SANITIZER_SUPPORTS_INIT_FOR_DLOPEN to be false"); + return false; } #if !ASAN_DYNAMIC Modified: stable/11/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc ============================================================================== --- stable/11/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc Tue Apr 16 20:05:24 2019 (r346296) @@ -48,6 +48,7 @@ INTERCEPT_WRAP_W_WWW(_recalloc) INTERCEPT_WRAP_W_WWW(_recalloc_base) INTERCEPT_WRAP_W_W(_msize) +INTERCEPT_WRAP_W_W(_msize_base) INTERCEPT_WRAP_W_W(_expand) INTERCEPT_WRAP_W_W(_expand_dbg) Modified: stable/11/contrib/compiler-rt/lib/builtins/arm/addsf3.S ============================================================================== --- stable/11/contrib/compiler-rt/lib/builtins/arm/addsf3.S Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/builtins/arm/addsf3.S Tue Apr 16 20:05:24 2019 (r346296) @@ -178,7 +178,7 @@ LOCAL_LABEL(do_substraction): push {r0, r1, r2, r3} movs r0, r4 - bl __clzsi2 + bl SYMBOL_NAME(__clzsi2) movs r5, r0 pop {r0, r1, r2, r3} // shift = rep_clz(aSignificand) - rep_clz(implicitBit << 3); Modified: stable/11/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S ============================================================================== --- stable/11/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S Tue Apr 16 20:04:22 2019 (r346295) +++ stable/11/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S Tue Apr 16 20:05:24 2019 (r346296) @@ -55,7 +55,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cdcmpeq) mov ip, #APSR_C msr APSR_nzcvq, ip #else - msr CPSR_f, #APSR_C + msr APSR_nzcvq, #APSR_C *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Apr 16 20:06:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABA9A157BD28; Tue, 16 Apr 2019 20:06:40 +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 4FC4A75D1F; Tue, 16 Apr 2019 20:06:40 +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 0F70C247BE; Tue, 16 Apr 2019 20:06:40 +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 x3GK6dSN020343; Tue, 16 Apr 2019 20:06:39 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GK6dpY020342; Tue, 16 Apr 2019 20:06:39 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904162006.x3GK6dpY020342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Apr 2019 20:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346297 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 346297 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FC4A75D1F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 20:06:40 -0000 Author: manu Date: Tue Apr 16 20:06:39 2019 New Revision: 346297 URL: https://svnweb.freebsd.org/changeset/base/346297 Log: arm: Order files.arm to have cloudabi and annapurna sections MFC after: 2 weeks Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Tue Apr 16 20:05:24 2019 (r346296) +++ head/sys/conf/files.arm Tue Apr 16 20:06:39 2019 (r346297) @@ -1,26 +1,7 @@ # $FreeBSD$ -cloudabi32_vdso.o optional compat_cloudabi32 \ - dependency "$S/contrib/cloudabi/cloudabi_vdso_armv6.S" \ - compile-with "${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi/cloudabi_vdso.lds $S/contrib/cloudabi/cloudabi_vdso_armv6.S -o ${.TARGET}" \ - no-obj no-implicit-rule \ - clean "cloudabi32_vdso.o" -# -cloudabi32_vdso_blob.o optional compat_cloudabi32 \ - dependency "cloudabi32_vdso.o" \ - compile-with "${OBJCOPY} --input-target binary --output-target elf32-littlearm --binary-architecture arm cloudabi32_vdso.o ${.TARGET}" \ - no-implicit-rule \ - clean "cloudabi32_vdso_blob.o" -# kern/kern_clocksource.c standard -arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt -arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt -arm/annapurna/alpine/alpine_pci.c optional al_pci fdt -arm/annapurna/alpine/alpine_pci_msix.c optional al_pci fdt -arm/annapurna/alpine/alpine_serdes.c optional al_serdes fdt \ - no-depend \ - compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" arm/arm/autoconf.c standard arm/arm/bcopy_page.S standard arm/arm/bcopyinout.S standard @@ -171,3 +152,25 @@ libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard +# CloudABI support +cloudabi32_vdso.o optional compat_cloudabi32 \ + dependency "$S/contrib/cloudabi/cloudabi_vdso_armv6.S" \ + compile-with "${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi/cloudabi_vdso.lds $S/contrib/cloudabi/cloudabi_vdso_armv6.S -o ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "cloudabi32_vdso.o" +# +cloudabi32_vdso_blob.o optional compat_cloudabi32 \ + dependency "cloudabi32_vdso.o" \ + compile-with "${OBJCOPY} --input-target binary --output-target elf32-littlearm --binary-architecture arm cloudabi32_vdso.o ${.TARGET}" \ + no-implicit-rule \ + clean "cloudabi32_vdso_blob.o" +# + +# Annapurna support +arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt +arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt +arm/annapurna/alpine/alpine_pci.c optional al_pci fdt +arm/annapurna/alpine/alpine_pci_msix.c optional al_pci fdt +arm/annapurna/alpine/alpine_serdes.c optional al_serdes fdt \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" From owner-svn-src-all@freebsd.org Tue Apr 16 20:08:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F973157BDFA; Tue, 16 Apr 2019 20:08:21 +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 A748A75F14; Tue, 16 Apr 2019 20:08:20 +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 7E049247BF; Tue, 16 Apr 2019 20:08:20 +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 x3GK8KBv020457; Tue, 16 Apr 2019 20:08:20 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GK8KuR020456; Tue, 16 Apr 2019 20:08:20 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904162008.x3GK8KuR020456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Apr 2019 20:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346298 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 346298 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A748A75F14 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 20:08:21 -0000 Author: manu Date: Tue Apr 16 20:08:19 2019 New Revision: 346298 URL: https://svnweb.freebsd.org/changeset/base/346298 Log: config: Only warn if duplicate option/device comes from the same file This is useful for arm (possibly other arches too) where we want to have a GENERIC kernel that only include files for the different SoC. Since multiple SoCs/Board needs the same device we would need to do either : Include the device in a generic file Include the device in each file that really needs it Option 1 works but if someone wants to create a specific kernel config (which isn't uncommon for embedded system), he will need to add a lots of nodevice to it. Option 2 also works but produce a lots of warnings. Reviewed by: kevans MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19424 Modified: head/usr.sbin/config/config.h head/usr.sbin/config/config.y Modified: head/usr.sbin/config/config.h ============================================================================== --- head/usr.sbin/config/config.h Tue Apr 16 20:06:39 2019 (r346297) +++ head/usr.sbin/config/config.h Tue Apr 16 20:08:19 2019 (r346298) @@ -86,6 +86,7 @@ struct files_name { struct device { int d_done; /* processed */ char *d_name; /* name of device (e.g. rk11) */ + char *yyfile; /* name of the file that first include the device */ #define UNKNOWN -2 /* -2 means not set yet */ STAILQ_ENTRY(device) d_next; /* Next one in list */ }; @@ -125,6 +126,7 @@ struct opt { char *op_name; char *op_value; int op_ownfile; /* true = own file, false = makefile */ + char *yyfile; /* name of the file that first include the option */ SLIST_ENTRY(opt) op_next; SLIST_ENTRY(opt) op_append; }; Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Tue Apr 16 20:06:39 2019 (r346297) +++ head/usr.sbin/config/config.y Tue Apr 16 20:08:19 2019 (r346298) @@ -382,11 +382,13 @@ finddev(struct device_head *dlist, char *name) static void newdev(char *name) { - struct device *np; + struct device *np, *dp; - if (finddev(&dtab, name)) { - fprintf(stderr, - "WARNING: duplicate device `%s' encountered.\n", name); + if ((dp = finddev(&dtab, name)) != NULL) { + if (strcmp(dp->yyfile, yyfile) == 0) + fprintf(stderr, + "WARNING: duplicate device `%s' encountered in %s\n", + name, yyfile); return; } @@ -394,6 +396,7 @@ newdev(char *name) if (np == NULL) err(EXIT_FAILURE, "calloc"); np->d_name = name; + np->yyfile = strdup(yyfile); STAILQ_INSERT_TAIL(&dtab, np, d_next); } @@ -408,6 +411,7 @@ rmdev_schedule(struct device_head *dh, char *name) dp = finddev(dh, name); if (dp != NULL) { STAILQ_REMOVE(dh, dp, device, d_next); + free(dp->yyfile); free(dp->d_name); free(dp); } @@ -446,8 +450,9 @@ newopt(struct opt_head *list, char *name, char *value, op2 = findopt(list, name); if (op2 != NULL && !append && !dupe) { - fprintf(stderr, - "WARNING: duplicate option `%s' encountered.\n", name); + if (strcmp(op2->yyfile, yyfile) == 0) + fprintf(stderr, + "WARNING: duplicate option `%s' encountered.\n", name); return; } @@ -457,6 +462,7 @@ newopt(struct opt_head *list, char *name, char *value, op->op_name = name; op->op_ownfile = 0; op->op_value = value; + op->yyfile = strdup(yyfile); if (op2 != NULL) { if (append) { while (SLIST_NEXT(op2, op_append) != NULL) @@ -481,6 +487,7 @@ rmopt_schedule(struct opt_head *list, char *name) while ((op = findopt(list, name)) != NULL) { SLIST_REMOVE(list, op, opt, op_next); + free(op->yyfile); free(op->op_name); free(op); } From owner-svn-src-all@freebsd.org Tue Apr 16 20:41:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 326C3157CC88; Tue, 16 Apr 2019 20:41:05 +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 CA7A477231; Tue, 16 Apr 2019 20:41:04 +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 A78D624D36; Tue, 16 Apr 2019 20:41:04 +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 x3GKf4kS037014; Tue, 16 Apr 2019 20:41:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GKf4oQ037013; Tue, 16 Apr 2019 20:41:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904162041.x3GKf4oQ037013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 16 Apr 2019 20:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346299 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 346299 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CA7A477231 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 20:41:05 -0000 Author: emaste Date: Tue Apr 16 20:41:04 2019 New Revision: 346299 URL: https://svnweb.freebsd.org/changeset/base/346299 Log: iflibtxrx.9: update function descriptions to match implementation isc_rxd_refill, isc_rxd_flush return nothing, not void *. isc_txd_credits_update, isc_rxd_available return int, not int *. isc_txd_credits_update has a bool as final argument, not a uint32_t. Prior to r315217 it took four arguments; the final two were uint32_t, bool. Reported by: Gerald Aryeetey MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/share/man/man9/iflibtxrx.9 Modified: head/share/man/man9/iflibtxrx.9 ============================================================================== --- head/share/man/man9/iflibtxrx.9 Tue Apr 16 20:08:19 2019 (r346298) +++ head/share/man/man9/iflibtxrx.9 Tue Apr 16 20:41:04 2019 (r346299) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd March 23, 2017 +.Dd April 16, 2019 .Dt IFLIBTXTX 9 .Os .Sh NAME @@ -19,19 +19,19 @@ .Fa "uint16_t qid" .Fa "uint32_t _pidx_or_credits_" .Fc -.Ft int * +.Ft int .Fo isc_txd_credits_update .Fa "void *sc" .Fa "uint16_t qid" -.Fa "uint32_t credits" +.Fa "bool clear" .Fc -.Ft int * +.Ft int .Fo isc_rxd_available .Fa "void *sc" .Fa "uint16_t qsid" .Fa "uint32_t cidx" .Fc -.Ft void * +.Ft void .Fo isc_rxd_refill .Fa "void *sc" .Fa "uint16_t qsid" @@ -41,7 +41,7 @@ .Fa "caddr_t *vaddrs" .Fa "uint16_t count" .Fc -.Ft void * +.Ft void .Fo isc_rxd_flush .Fa "void *sc" .Fa "uint16_t qsid" From owner-svn-src-all@freebsd.org Tue Apr 16 20:56:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7E65157D21E; Tue, 16 Apr 2019 20:56:52 +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 53D8377CE6; Tue, 16 Apr 2019 20:56:52 +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 2FE11250F2; Tue, 16 Apr 2019 20:56:52 +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 x3GKupk2046861; Tue, 16 Apr 2019 20:56:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GKupx6046860; Tue, 16 Apr 2019 20:56:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904162056.x3GKupx6046860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Apr 2019 20:56: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: r346300 - in stable: 11/sys/net 12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/net 12/sys/net X-SVN-Commit-Revision: 346300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 53D8377CE6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 20:56:53 -0000 Author: kevans Date: Tue Apr 16 20:56:51 2019 New Revision: 346300 URL: https://svnweb.freebsd.org/changeset/base/346300 Log: MFC r345180, r345187: if_bridge(4): Fix module teardown r345180: if_bridge(4): Fix module teardown bridge_rtnode_zone still has outstanding allocations at the time of destruction in the current model because all of the interface teardown happens in a VNET_SYSUNINIT, -after- the MOD_UNLOAD has already been processed. The SYSUNINIT triggers destruction of the interfaces, which then attempts to free the memory from the zone that's already been destroyed, and we hit a panic. Solve this by virtualizing the uma_zone we allocate the rtnodes from to fix the ordering. bridge_rtable_fini should also take care to flush any remaining routes that weren't taken care of when dynamic routes were flushed in bridge_stop. r345187: bridge: Fix STP-related panic After r345180 we need to have the appropriate vnet context set to delete an rtnode in bridge_rtnode_destroy(). That's usually the case, but not when it's called by the STP code (through bstp_notify_rtage()). We have to set the vnet context in bridge_rtable_expire() just as we do in the other STP callback bridge_state_change(). Modified: stable/12/sys/net/if_bridge.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/net/if_bridge.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/net/if_bridge.c ============================================================================== --- stable/12/sys/net/if_bridge.c Tue Apr 16 20:41:04 2019 (r346299) +++ stable/12/sys/net/if_bridge.c Tue Apr 16 20:56:51 2019 (r346300) @@ -235,7 +235,8 @@ static eventhandler_tag bridge_detach_cookie; int bridge_rtable_prune_period = BRIDGE_RTABLE_PRUNE_PERIOD; -uma_zone_t bridge_rtnode_zone; +VNET_DEFINE_STATIC(uma_zone_t, bridge_rtnode_zone); +#define V_bridge_rtnode_zone VNET(bridge_rtnode_zone) static int bridge_clone_create(struct if_clone *, int, caddr_t); static void bridge_clone_destroy(struct ifnet *); @@ -527,6 +528,9 @@ static void vnet_bridge_init(const void *unused __unused) { + V_bridge_rtnode_zone = uma_zcreate("bridge_rtnode", + sizeof(struct bridge_rtnode), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); BRIDGE_LIST_LOCK_INIT(); LIST_INIT(&V_bridge_list); V_bridge_cloner = if_clone_simple(bridge_name, @@ -542,6 +546,7 @@ vnet_bridge_uninit(const void *unused __unused) if_clone_detach(V_bridge_cloner); V_bridge_cloner = NULL; BRIDGE_LIST_LOCK_DESTROY(); + uma_zdestroy(V_bridge_rtnode_zone); } VNET_SYSUNINIT(vnet_bridge_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_bridge_uninit, NULL); @@ -552,9 +557,6 @@ bridge_modevent(module_t mod, int type, void *data) switch (type) { case MOD_LOAD: - bridge_rtnode_zone = uma_zcreate("bridge_rtnode", - sizeof(struct bridge_rtnode), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, 0); bridge_dn_p = bridge_dummynet; bridge_detach_cookie = EVENTHANDLER_REGISTER( ifnet_departure_event, bridge_ifdetach, NULL, @@ -563,7 +565,6 @@ bridge_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: EVENTHANDLER_DEREGISTER(ifnet_departure_event, bridge_detach_cookie); - uma_zdestroy(bridge_rtnode_zone); bridge_dn_p = NULL; break; default: @@ -732,6 +733,9 @@ bridge_clone_destroy(struct ifnet *ifp) bridge_delete_span(sc, bif); } + /* Tear down the routing table. */ + bridge_rtable_fini(sc); + BRIDGE_UNLOCK(sc); callout_drain(&sc->sc_brcallout); @@ -744,9 +748,6 @@ bridge_clone_destroy(struct ifnet *ifp) ether_ifdetach(ifp); if_free(ifp); - /* Tear down the routing table. */ - bridge_rtable_fini(sc); - BRIDGE_LOCK_DESTROY(sc); free(sc, M_DEVBUF); } @@ -2671,7 +2672,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t * initialize the expiration time and Ethernet * address. */ - brt = uma_zalloc(bridge_rtnode_zone, M_NOWAIT | M_ZERO); + brt = uma_zalloc(V_bridge_rtnode_zone, M_NOWAIT | M_ZERO); if (brt == NULL) return (ENOMEM); @@ -2684,7 +2685,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t brt->brt_vlan = vlan; if ((error = bridge_rtnode_insert(sc, brt)) != 0) { - uma_zfree(bridge_rtnode_zone, brt); + uma_zfree(V_bridge_rtnode_zone, brt); return (error); } brt->brt_dst = bif; @@ -2768,11 +2769,14 @@ bridge_timer(void *arg) BRIDGE_LOCK_ASSERT(sc); + /* Destruction of rtnodes requires a proper vnet context */ + CURVNET_SET(sc->sc_ifp->if_vnet); bridge_rtage(sc); if (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING) callout_reset(&sc->sc_brcallout, bridge_rtable_prune_period * hz, bridge_timer, sc); + CURVNET_RESTORE(); } /* @@ -2888,6 +2892,7 @@ bridge_rtable_fini(struct bridge_softc *sc) KASSERT(sc->sc_brtcnt == 0, ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); + bridge_rtflush(sc, 1); free(sc->sc_rthash, M_DEVBUF); } @@ -3030,7 +3035,7 @@ bridge_rtnode_destroy(struct bridge_softc *sc, struct LIST_REMOVE(brt, brt_list); sc->sc_brtcnt--; brt->brt_dst->bif_addrcnt--; - uma_zfree(bridge_rtnode_zone, brt); + uma_zfree(V_bridge_rtnode_zone, brt); } /* @@ -3044,6 +3049,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age) struct bridge_softc *sc = ifp->if_bridge; struct bridge_rtnode *brt; + CURVNET_SET(ifp->if_vnet); BRIDGE_LOCK(sc); /* @@ -3062,6 +3068,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age) } } BRIDGE_UNLOCK(sc); + CURVNET_RESTORE(); } /* From owner-svn-src-all@freebsd.org Tue Apr 16 20:56:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DBE0157D218; Tue, 16 Apr 2019 20:56:52 +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 004F877CE5; Tue, 16 Apr 2019 20:56:52 +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 B64BE250F1; Tue, 16 Apr 2019 20:56:51 +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 x3GKupWF046855; Tue, 16 Apr 2019 20:56:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GKup0d046854; Tue, 16 Apr 2019 20:56:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904162056.x3GKup0d046854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Apr 2019 20:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346300 - in stable: 11/sys/net 12/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/net 12/sys/net X-SVN-Commit-Revision: 346300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 004F877CE5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 20:56:52 -0000 Author: kevans Date: Tue Apr 16 20:56:51 2019 New Revision: 346300 URL: https://svnweb.freebsd.org/changeset/base/346300 Log: MFC r345180, r345187: if_bridge(4): Fix module teardown r345180: if_bridge(4): Fix module teardown bridge_rtnode_zone still has outstanding allocations at the time of destruction in the current model because all of the interface teardown happens in a VNET_SYSUNINIT, -after- the MOD_UNLOAD has already been processed. The SYSUNINIT triggers destruction of the interfaces, which then attempts to free the memory from the zone that's already been destroyed, and we hit a panic. Solve this by virtualizing the uma_zone we allocate the rtnodes from to fix the ordering. bridge_rtable_fini should also take care to flush any remaining routes that weren't taken care of when dynamic routes were flushed in bridge_stop. r345187: bridge: Fix STP-related panic After r345180 we need to have the appropriate vnet context set to delete an rtnode in bridge_rtnode_destroy(). That's usually the case, but not when it's called by the STP code (through bstp_notify_rtage()). We have to set the vnet context in bridge_rtable_expire() just as we do in the other STP callback bridge_state_change(). Modified: stable/11/sys/net/if_bridge.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/net/if_bridge.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/net/if_bridge.c ============================================================================== --- stable/11/sys/net/if_bridge.c Tue Apr 16 20:41:04 2019 (r346299) +++ stable/11/sys/net/if_bridge.c Tue Apr 16 20:56:51 2019 (r346300) @@ -233,7 +233,8 @@ static eventhandler_tag bridge_detach_cookie; int bridge_rtable_prune_period = BRIDGE_RTABLE_PRUNE_PERIOD; -uma_zone_t bridge_rtnode_zone; +static VNET_DEFINE(uma_zone_t, bridge_rtnode_zone); +#define V_bridge_rtnode_zone VNET(bridge_rtnode_zone) static int bridge_clone_create(struct if_clone *, int, caddr_t); static void bridge_clone_destroy(struct ifnet *); @@ -526,6 +527,9 @@ static void vnet_bridge_init(const void *unused __unused) { + V_bridge_rtnode_zone = uma_zcreate("bridge_rtnode", + sizeof(struct bridge_rtnode), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); BRIDGE_LIST_LOCK_INIT(); LIST_INIT(&V_bridge_list); V_bridge_cloner = if_clone_simple(bridge_name, @@ -541,6 +545,7 @@ vnet_bridge_uninit(const void *unused __unused) if_clone_detach(V_bridge_cloner); V_bridge_cloner = NULL; BRIDGE_LIST_LOCK_DESTROY(); + uma_zdestroy(V_bridge_rtnode_zone); } VNET_SYSUNINIT(vnet_bridge_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_bridge_uninit, NULL); @@ -551,9 +556,6 @@ bridge_modevent(module_t mod, int type, void *data) switch (type) { case MOD_LOAD: - bridge_rtnode_zone = uma_zcreate("bridge_rtnode", - sizeof(struct bridge_rtnode), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, 0); bridge_input_p = bridge_input; bridge_output_p = bridge_output; bridge_dn_p = bridge_dummynet; @@ -565,7 +567,6 @@ bridge_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: EVENTHANDLER_DEREGISTER(ifnet_departure_event, bridge_detach_cookie); - uma_zdestroy(bridge_rtnode_zone); bridge_input_p = NULL; bridge_output_p = NULL; bridge_dn_p = NULL; @@ -737,6 +738,9 @@ bridge_clone_destroy(struct ifnet *ifp) bridge_delete_span(sc, bif); } + /* Tear down the routing table. */ + bridge_rtable_fini(sc); + BRIDGE_UNLOCK(sc); callout_drain(&sc->sc_brcallout); @@ -749,9 +753,6 @@ bridge_clone_destroy(struct ifnet *ifp) ether_ifdetach(ifp); if_free(ifp); - /* Tear down the routing table. */ - bridge_rtable_fini(sc); - BRIDGE_LOCK_DESTROY(sc); free(sc, M_DEVBUF); } @@ -2664,7 +2665,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t * initialize the expiration time and Ethernet * address. */ - brt = uma_zalloc(bridge_rtnode_zone, M_NOWAIT | M_ZERO); + brt = uma_zalloc(V_bridge_rtnode_zone, M_NOWAIT | M_ZERO); if (brt == NULL) return (ENOMEM); @@ -2677,7 +2678,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t brt->brt_vlan = vlan; if ((error = bridge_rtnode_insert(sc, brt)) != 0) { - uma_zfree(bridge_rtnode_zone, brt); + uma_zfree(V_bridge_rtnode_zone, brt); return (error); } brt->brt_dst = bif; @@ -2761,11 +2762,14 @@ bridge_timer(void *arg) BRIDGE_LOCK_ASSERT(sc); + /* Destruction of rtnodes requires a proper vnet context */ + CURVNET_SET(sc->sc_ifp->if_vnet); bridge_rtage(sc); if (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING) callout_reset(&sc->sc_brcallout, bridge_rtable_prune_period * hz, bridge_timer, sc); + CURVNET_RESTORE(); } /* @@ -2881,6 +2885,7 @@ bridge_rtable_fini(struct bridge_softc *sc) KASSERT(sc->sc_brtcnt == 0, ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); + bridge_rtflush(sc, 1); free(sc->sc_rthash, M_DEVBUF); } @@ -3023,7 +3028,7 @@ bridge_rtnode_destroy(struct bridge_softc *sc, struct LIST_REMOVE(brt, brt_list); sc->sc_brtcnt--; brt->brt_dst->bif_addrcnt--; - uma_zfree(bridge_rtnode_zone, brt); + uma_zfree(V_bridge_rtnode_zone, brt); } /* @@ -3037,6 +3042,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age) struct bridge_softc *sc = ifp->if_bridge; struct bridge_rtnode *brt; + CURVNET_SET(ifp->if_vnet); BRIDGE_LOCK(sc); /* @@ -3055,6 +3061,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age) } } BRIDGE_UNLOCK(sc); + CURVNET_RESTORE(); } /* From owner-svn-src-all@freebsd.org Tue Apr 16 20:59:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA5DF157D3B8; Tue, 16 Apr 2019 20:59:58 +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 69D2F77FF0; Tue, 16 Apr 2019 20:59:58 +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 466CE250F4; Tue, 16 Apr 2019 20:59:58 +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 x3GKxwA2047040; Tue, 16 Apr 2019 20:59:58 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GKxw2L047039; Tue, 16 Apr 2019 20:59:58 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904162059.x3GKxw2L047039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Apr 2019 20:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346301 - stable/12/lib/libbe X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/lib/libbe X-SVN-Commit-Revision: 346301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 69D2F77FF0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 20:59:59 -0000 Author: kevans Date: Tue Apr 16 20:59:57 2019 New Revision: 346301 URL: https://svnweb.freebsd.org/changeset/base/346301 Log: MFC r346082: libbe(3): use libzfs name validation for datasets/snapshot names Our home-rolled solution didn't quite capture all of the details, and we didn't actually validate snapshot names at all. zfs_name_valid captures the important details, but it doesn't necessarily expose the errors that we're wanting to see in the be_validate_* functions. Validating lengths independently, then the names, should make this a non-issue. Modified: stable/12/lib/libbe/be.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libbe/be.c ============================================================================== --- stable/12/lib/libbe/be.c Tue Apr 16 20:56:51 2019 (r346300) +++ stable/12/lib/libbe/be.c Tue Apr 16 20:59:57 2019 (r346301) @@ -593,6 +593,9 @@ be_validate_snap(libbe_handle_t *lbh, const char *snap if (strlen(snap_name) >= BE_MAXPATHLEN) return (BE_ERR_PATHLEN); + if (!zfs_name_valid(snap_name, ZFS_TYPE_SNAPSHOT)) + return (BE_ERR_INVALIDNAME); + if (!zfs_dataset_exists(lbh->lzh, snap_name, ZFS_TYPE_SNAPSHOT)) return (BE_ERR_NOENT); @@ -646,12 +649,6 @@ be_root_concat(libbe_handle_t *lbh, const char *name, int be_validate_name(libbe_handle_t *lbh, const char *name) { - for (int i = 0; *name; i++) { - char c = *(name++); - if (isalnum(c) || (c == '-') || (c == '_') || (c == '.')) - continue; - return (BE_ERR_INVALIDNAME); - } /* * Impose the additional restriction that the entire dataset name must @@ -659,6 +656,10 @@ be_validate_name(libbe_handle_t *lbh, const char *name */ if (strlen(lbh->root) + 1 + strlen(name) > MAXNAMELEN) return (BE_ERR_PATHLEN); + + if (!zfs_name_valid(name, ZFS_TYPE_DATASET)) + return (BE_ERR_INVALIDNAME); + return (BE_ERR_SUCCESS); } From owner-svn-src-all@freebsd.org Tue Apr 16 21:01:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B312157D4B4; Tue, 16 Apr 2019 21:01:09 +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 1D0ED80207; Tue, 16 Apr 2019 21:01:09 +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 ED77725127; Tue, 16 Apr 2019 21:01:08 +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 x3GL187e047942; Tue, 16 Apr 2019 21:01:08 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GL179e047937; Tue, 16 Apr 2019 21:01:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904162101.x3GL179e047937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Apr 2019 21:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346302 - in stable: 11/stand/efi/fdt 11/stand/fdt 11/stand/powerpc/kboot 11/stand/powerpc/ofw 11/stand/uboot/fdt 12/stand/efi/fdt 12/stand/fdt 12/stand/powerpc/kboot 12/stand/powerpc/o... X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/efi/fdt 11/stand/fdt 11/stand/powerpc/kboot 11/stand/powerpc/ofw 11/stand/uboot/fdt 12/stand/efi/fdt 12/stand/fdt 12/stand/powerpc/kboot 12/stand/powerpc/ofw 12/stand/uboot/fdt X-SVN-Commit-Revision: 346302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1D0ED80207 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 21:01:09 -0000 Author: kevans Date: Tue Apr 16 21:01:07 2019 New Revision: 346302 URL: https://svnweb.freebsd.org/changeset/base/346302 Log: MFC r346132: stand: refactor overlay loading a little bit It was pointed out that manually loading a .dtb to be used rather than relying on platform-specific method for loading .dtb will result in overlays not being applied. This was true because overlay loading was hacked into fdt_platform_load_dtb, rather than done in a way more independent from how the .dtb is loaded. Instead, push overlay loading (for now) out into an fdt_platform_load_overlays. This method easily allows ubldr to pull in any fdt_overlays specified in the ub env, and omits overlay-checking on platforms where they're not tested and/or not desired (e.g. powerpc). If we eventually stop caring about fdt_overlays from ubenv (if we ever cared), this method should get chopped out in favor of just calling fdt_load_dtb_overlays() directly. Modified: stable/11/stand/efi/fdt/efi_fdt.c stable/11/stand/fdt/fdt_loader_cmd.c stable/11/stand/fdt/fdt_platform.h stable/11/stand/powerpc/kboot/kbootfdt.c stable/11/stand/powerpc/ofw/ofwfdt.c stable/11/stand/uboot/fdt/uboot_fdt.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/efi/fdt/efi_fdt.c stable/12/stand/fdt/fdt_loader_cmd.c stable/12/stand/fdt/fdt_platform.h stable/12/stand/powerpc/kboot/kbootfdt.c stable/12/stand/powerpc/ofw/ofwfdt.c stable/12/stand/uboot/fdt/uboot_fdt.c Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/efi/fdt/efi_fdt.c ============================================================================== --- stable/11/stand/efi/fdt/efi_fdt.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/11/stand/efi/fdt/efi_fdt.c Tue Apr 16 21:01:07 2019 (r346302) @@ -52,8 +52,14 @@ fdt_platform_load_dtb(void) return (1); printf("Using DTB provided by EFI at %p.\n", hdr); - fdt_load_dtb_overlays(NULL); return (0); +} + +void +fdt_platform_load_overlays(void) +{ + + fdt_load_dtb_overlays(NULL); } void Modified: stable/11/stand/fdt/fdt_loader_cmd.c ============================================================================== --- stable/11/stand/fdt/fdt_loader_cmd.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/11/stand/fdt/fdt_loader_cmd.c Tue Apr 16 21:01:07 2019 (r346302) @@ -522,6 +522,7 @@ fdt_setup_fdtp() if (fdt_load_dtb(bfp->f_addr) == 0) { printf("Using DTB from loaded file '%s'.\n", bfp->f_name); + fdt_platform_load_overlays(); return (0); } } @@ -531,12 +532,15 @@ fdt_setup_fdtp() if (fdt_load_dtb_addr(fdt_to_load) == 0) { printf("Using DTB from memory address %p.\n", fdt_to_load); + fdt_platform_load_overlays(); return (0); } } - if (fdt_platform_load_dtb() == 0) + if (fdt_platform_load_dtb() == 0) { + fdt_platform_load_overlays(); return (0); + } /* If there is a dtb compiled into the kernel, use it. */ if ((va = fdt_find_static_dtb()) != 0) { Modified: stable/11/stand/fdt/fdt_platform.h ============================================================================== --- stable/11/stand/fdt/fdt_platform.h Tue Apr 16 20:59:57 2019 (r346301) +++ stable/11/stand/fdt/fdt_platform.h Tue Apr 16 21:01:07 2019 (r346302) @@ -51,6 +51,7 @@ int fdt_setup_fdtp(void); /* The platform library needs to implement these functions */ int fdt_platform_load_dtb(void); +void fdt_platform_load_overlays(void); void fdt_platform_fixups(void); #endif /* FDT_PLATFORM_H */ Modified: stable/11/stand/powerpc/kboot/kbootfdt.c ============================================================================== --- stable/11/stand/powerpc/kboot/kbootfdt.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/11/stand/powerpc/kboot/kbootfdt.c Tue Apr 16 21:01:07 2019 (r346302) @@ -177,6 +177,12 @@ fdt_platform_load_dtb(void) } void +fdt_platform_load_overlays(void) +{ + +} + +void fdt_platform_fixups(void) { Modified: stable/11/stand/powerpc/ofw/ofwfdt.c ============================================================================== --- stable/11/stand/powerpc/ofw/ofwfdt.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/11/stand/powerpc/ofw/ofwfdt.c Tue Apr 16 21:01:07 2019 (r346302) @@ -198,6 +198,12 @@ fdt_platform_load_dtb(void) } void +fdt_platform_load_overlays(void) +{ + +} + +void fdt_platform_fixups(void) { Modified: stable/11/stand/uboot/fdt/uboot_fdt.c ============================================================================== --- stable/11/stand/uboot/fdt/uboot_fdt.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/11/stand/uboot/fdt/uboot_fdt.c Tue Apr 16 21:01:07 2019 (r346302) @@ -103,9 +103,14 @@ fdt_platform_load_dtb(void) } exit: - if (rv == 0) - fdt_load_dtb_overlays(ub_env_get("fdt_overlays")); return (rv); +} + +void +fdt_platform_load_overlays(void) +{ + + fdt_load_dtb_overlays(ub_env_get("fdt_overlays")); } void From owner-svn-src-all@freebsd.org Tue Apr 16 21:01:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D781B157D4C6; Tue, 16 Apr 2019 21:01:10 +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 7B1D58020F; Tue, 16 Apr 2019 21:01:10 +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 6BF3E2512A; Tue, 16 Apr 2019 21:01:10 +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 x3GL1A1o047953; Tue, 16 Apr 2019 21:01:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GL19XV047948; Tue, 16 Apr 2019 21:01:09 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904162101.x3GL19XV047948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Apr 2019 21:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346302 - in stable: 11/stand/efi/fdt 11/stand/fdt 11/stand/powerpc/kboot 11/stand/powerpc/ofw 11/stand/uboot/fdt 12/stand/efi/fdt 12/stand/fdt 12/stand/powerpc/kboot 12/stand/powerpc/o... X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/efi/fdt 11/stand/fdt 11/stand/powerpc/kboot 11/stand/powerpc/ofw 11/stand/uboot/fdt 12/stand/efi/fdt 12/stand/fdt 12/stand/powerpc/kboot 12/stand/powerpc/ofw 12/stand/uboot/fdt X-SVN-Commit-Revision: 346302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7B1D58020F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 21:01:11 -0000 Author: kevans Date: Tue Apr 16 21:01:07 2019 New Revision: 346302 URL: https://svnweb.freebsd.org/changeset/base/346302 Log: MFC r346132: stand: refactor overlay loading a little bit It was pointed out that manually loading a .dtb to be used rather than relying on platform-specific method for loading .dtb will result in overlays not being applied. This was true because overlay loading was hacked into fdt_platform_load_dtb, rather than done in a way more independent from how the .dtb is loaded. Instead, push overlay loading (for now) out into an fdt_platform_load_overlays. This method easily allows ubldr to pull in any fdt_overlays specified in the ub env, and omits overlay-checking on platforms where they're not tested and/or not desired (e.g. powerpc). If we eventually stop caring about fdt_overlays from ubenv (if we ever cared), this method should get chopped out in favor of just calling fdt_load_dtb_overlays() directly. Modified: stable/12/stand/efi/fdt/efi_fdt.c stable/12/stand/fdt/fdt_loader_cmd.c stable/12/stand/fdt/fdt_platform.h stable/12/stand/powerpc/kboot/kbootfdt.c stable/12/stand/powerpc/ofw/ofwfdt.c stable/12/stand/uboot/fdt/uboot_fdt.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/stand/efi/fdt/efi_fdt.c stable/11/stand/fdt/fdt_loader_cmd.c stable/11/stand/fdt/fdt_platform.h stable/11/stand/powerpc/kboot/kbootfdt.c stable/11/stand/powerpc/ofw/ofwfdt.c stable/11/stand/uboot/fdt/uboot_fdt.c Directory Properties: stable/11/ (props changed) Modified: stable/12/stand/efi/fdt/efi_fdt.c ============================================================================== --- stable/12/stand/efi/fdt/efi_fdt.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/12/stand/efi/fdt/efi_fdt.c Tue Apr 16 21:01:07 2019 (r346302) @@ -52,8 +52,14 @@ fdt_platform_load_dtb(void) return (1); printf("Using DTB provided by EFI at %p.\n", hdr); - fdt_load_dtb_overlays(NULL); return (0); +} + +void +fdt_platform_load_overlays(void) +{ + + fdt_load_dtb_overlays(NULL); } void Modified: stable/12/stand/fdt/fdt_loader_cmd.c ============================================================================== --- stable/12/stand/fdt/fdt_loader_cmd.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/12/stand/fdt/fdt_loader_cmd.c Tue Apr 16 21:01:07 2019 (r346302) @@ -522,6 +522,7 @@ fdt_setup_fdtp() if (fdt_load_dtb(bfp->f_addr) == 0) { printf("Using DTB from loaded file '%s'.\n", bfp->f_name); + fdt_platform_load_overlays(); return (0); } } @@ -531,12 +532,15 @@ fdt_setup_fdtp() if (fdt_load_dtb_addr(fdt_to_load) == 0) { printf("Using DTB from memory address %p.\n", fdt_to_load); + fdt_platform_load_overlays(); return (0); } } - if (fdt_platform_load_dtb() == 0) + if (fdt_platform_load_dtb() == 0) { + fdt_platform_load_overlays(); return (0); + } /* If there is a dtb compiled into the kernel, use it. */ if ((va = fdt_find_static_dtb()) != 0) { Modified: stable/12/stand/fdt/fdt_platform.h ============================================================================== --- stable/12/stand/fdt/fdt_platform.h Tue Apr 16 20:59:57 2019 (r346301) +++ stable/12/stand/fdt/fdt_platform.h Tue Apr 16 21:01:07 2019 (r346302) @@ -51,6 +51,7 @@ int fdt_setup_fdtp(void); /* The platform library needs to implement these functions */ int fdt_platform_load_dtb(void); +void fdt_platform_load_overlays(void); void fdt_platform_fixups(void); #endif /* FDT_PLATFORM_H */ Modified: stable/12/stand/powerpc/kboot/kbootfdt.c ============================================================================== --- stable/12/stand/powerpc/kboot/kbootfdt.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/12/stand/powerpc/kboot/kbootfdt.c Tue Apr 16 21:01:07 2019 (r346302) @@ -177,6 +177,12 @@ fdt_platform_load_dtb(void) } void +fdt_platform_load_overlays(void) +{ + +} + +void fdt_platform_fixups(void) { Modified: stable/12/stand/powerpc/ofw/ofwfdt.c ============================================================================== --- stable/12/stand/powerpc/ofw/ofwfdt.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/12/stand/powerpc/ofw/ofwfdt.c Tue Apr 16 21:01:07 2019 (r346302) @@ -198,6 +198,12 @@ fdt_platform_load_dtb(void) } void +fdt_platform_load_overlays(void) +{ + +} + +void fdt_platform_fixups(void) { Modified: stable/12/stand/uboot/fdt/uboot_fdt.c ============================================================================== --- stable/12/stand/uboot/fdt/uboot_fdt.c Tue Apr 16 20:59:57 2019 (r346301) +++ stable/12/stand/uboot/fdt/uboot_fdt.c Tue Apr 16 21:01:07 2019 (r346302) @@ -103,9 +103,14 @@ fdt_platform_load_dtb(void) } exit: - if (rv == 0) - fdt_load_dtb_overlays(ub_env_get("fdt_overlays")); return (rv); +} + +void +fdt_platform_load_overlays(void) +{ + + fdt_load_dtb_overlays(ub_env_get("fdt_overlays")); } void From owner-svn-src-all@freebsd.org Tue Apr 16 21:02:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6649E157D72E; Tue, 16 Apr 2019 21:02:43 +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 DCB458069A; Tue, 16 Apr 2019 21:02:42 +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 BAE80252B0; Tue, 16 Apr 2019 21:02:42 +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 x3GL2gEl051853; Tue, 16 Apr 2019 21:02:42 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GL2ghB051852; Tue, 16 Apr 2019 21:02:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904162102.x3GL2ghB051852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Apr 2019 21:02:42 +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: r346303 - in stable: 11/sys/net 12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/net 12/sys/net X-SVN-Commit-Revision: 346303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DCB458069A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 21:02:43 -0000 Author: kevans Date: Tue Apr 16 21:02:41 2019 New Revision: 346303 URL: https://svnweb.freebsd.org/changeset/base/346303 Log: MFC r345192-r345194: if_bridge(4): Drop pointless rtflush r345192: if_bridge(4): Drop pointless rtflush At this point, all routes should've already been dropped by removing all members from the bridge. This condition is in-fact KASSERT'd in the line immediately above where this nop flush was added. r345193: Revert r345192: Too many trees in play for bridge(4) bits An accidental appendage was committed that has not undergone review yet. r345194: if_bridge(4): Drop pointless rtflush At this point, all routes should've already been dropped by removing all members from the bridge. This condition is in-fact KASSERT'd in the line immediately above where this nop flush was added. Modified: stable/12/sys/net/if_bridge.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/net/if_bridge.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/net/if_bridge.c ============================================================================== --- stable/12/sys/net/if_bridge.c Tue Apr 16 21:01:07 2019 (r346302) +++ stable/12/sys/net/if_bridge.c Tue Apr 16 21:02:41 2019 (r346303) @@ -2892,7 +2892,6 @@ bridge_rtable_fini(struct bridge_softc *sc) KASSERT(sc->sc_brtcnt == 0, ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); - bridge_rtflush(sc, 1); free(sc->sc_rthash, M_DEVBUF); } From owner-svn-src-all@freebsd.org Tue Apr 16 21:02:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EA75157D729; Tue, 16 Apr 2019 21:02:43 +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 A7DB580699; Tue, 16 Apr 2019 21:02:42 +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 845B8252AF; Tue, 16 Apr 2019 21:02:42 +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 x3GL2g4o051847; Tue, 16 Apr 2019 21:02:42 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GL2gDv051846; Tue, 16 Apr 2019 21:02:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904162102.x3GL2gDv051846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Apr 2019 21:02:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346303 - in stable: 11/sys/net 12/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/net 12/sys/net X-SVN-Commit-Revision: 346303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A7DB580699 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 21:02:43 -0000 Author: kevans Date: Tue Apr 16 21:02:41 2019 New Revision: 346303 URL: https://svnweb.freebsd.org/changeset/base/346303 Log: MFC r345192-r345194: if_bridge(4): Drop pointless rtflush r345192: if_bridge(4): Drop pointless rtflush At this point, all routes should've already been dropped by removing all members from the bridge. This condition is in-fact KASSERT'd in the line immediately above where this nop flush was added. r345193: Revert r345192: Too many trees in play for bridge(4) bits An accidental appendage was committed that has not undergone review yet. r345194: if_bridge(4): Drop pointless rtflush At this point, all routes should've already been dropped by removing all members from the bridge. This condition is in-fact KASSERT'd in the line immediately above where this nop flush was added. Modified: stable/11/sys/net/if_bridge.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/net/if_bridge.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/net/if_bridge.c ============================================================================== --- stable/11/sys/net/if_bridge.c Tue Apr 16 21:01:07 2019 (r346302) +++ stable/11/sys/net/if_bridge.c Tue Apr 16 21:02:41 2019 (r346303) @@ -2885,7 +2885,6 @@ bridge_rtable_fini(struct bridge_softc *sc) KASSERT(sc->sc_brtcnt == 0, ("%s: %d bridge routes referenced", __func__, sc->sc_brtcnt)); - bridge_rtflush(sc, 1); free(sc->sc_rthash, M_DEVBUF); } From owner-svn-src-all@freebsd.org Tue Apr 16 21:09:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1241E157DB08; Tue, 16 Apr 2019 21:09:59 +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 A8B5680B90; Tue, 16 Apr 2019 21:09:58 +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 97EF7252C4; Tue, 16 Apr 2019 21:09:58 +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 x3GL9w7h052216; Tue, 16 Apr 2019 21:09:58 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GL9vQT052213; Tue, 16 Apr 2019 21:09:57 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904162109.x3GL9vQT052213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Apr 2019 21:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346304 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 346304 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A8B5680B90 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 21:09:59 -0000 Author: kevans Date: Tue Apr 16 21:09:57 2019 New Revision: 346304 URL: https://svnweb.freebsd.org/changeset/base/346304 Log: MFC r345519: DTS/DTSO makeoptions Allow kernel config to specify DTS/DTSO to build, and out-of-tree support This allows for directives such as makeoptions DTS+=/out/of/tree/myboard.dts # in tree! Same rules applied as if this were in a dtb/ module makeoptions DTS+=otherboard.dts to be specified in config(5) and have these built/installed alongside th kernel. The assumption that overlays live in an overlays/ directory is only made for in-tree DTSO, but we still make the assumption that out-of-tree arm64 DTS will be in vendored directories (for now). This lowers the cost to hacking on an overlay or dts by being able to quickly throw it in a custom config, especially if it doesn't fit one of the current dtb/modules quite appropriately or it's not intended for commit there. The build/install targets were split out of dtb.mk to centralize the build logic and leave out the all/realinstall/CLEANFILES additions... it was believed that we didn't want to pollute the kernel build with these. The build rules were converted to suffix rules at the suggestion of Ian to clean things up a little bit in a world where we can have mixed in-tree/out-of-tree DTS/DTSO specified. Added: stable/12/sys/conf/dtb.build.mk - copied unchanged from r345519, head/sys/conf/dtb.build.mk Modified: stable/12/sys/conf/dtb.mk stable/12/sys/conf/kern.post.mk Directory Properties: stable/12/ (props changed) Copied: stable/12/sys/conf/dtb.build.mk (from r345519, head/sys/conf/dtb.build.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/conf/dtb.build.mk Tue Apr 16 21:09:57 2019 (r346304, copy of r345519, head/sys/conf/dtb.build.mk) @@ -0,0 +1,77 @@ +# $FreeBSD$ + +.include +# Grab all the options for a kernel build. For backwards compat, we need to +# do this after bsd.own.mk. +.include "kern.opts.mk" + +DTC?= dtc + +.if !defined(SYSDIR) +.if defined(S) +SYSDIR= ${S} +.else +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys +.if exists(${_dir}/kern/) +SYSDIR= ${_dir:tA} +.endif +.endfor +.endif # defined(S) +.endif # defined(SYSDIR) + +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) +.error "can't find kernel source tree" +.endif + +DTB=${DTS:T:R:S/$/.dtb/} +DTBO=${DTSO:T:R:S/$/.dtbo/} + +.SUFFIXES: .dtb .dts .dtbo .dtso +.PATH.dts: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE} +.PATH.dtso: ${SYSDIR}/dts/${MACHINE}/overlays + +.export DTC ECHO + +.dts.dtb: ${OP_META} + @${ECHO} Generating ${.TARGET} from ${.IMPSRC} + @${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${.IMPSRC} ${.OBJDIR} + +.dtso.dtbo: ${OP_META} + @${ECHO} Generating ${.TARGET} from ${.IMPSRC} + @${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} ${.IMPSRC} ${.OBJDIR} + +# Add dependencies on the source file so that out-of-tree things can be included +# without any .PATH additions. +.for _dts in ${DTS} +${_dts:R:T}.dtb: ${_dts} +.endfor + +.for _dtso in ${DTSO} +${_dtso:R:T}.dtbo: ${_dtso} +.endfor + +_dtbinstall: +# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree +# to make sure the tree is setup properly. We don't recreate it to avoid duplicate +# entries in the NO_ROOT case. + test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR} +.for _dtb in ${DTB} +.if ${MACHINE_CPUARCH} == "aarch64" + # :H:T here to grab the vendor component of the DTB path in a way that + # allows out-of-tree DTS builds, too. We make the assumption that + # out-of-tree DTS will have a similar directory structure to in-tree, + # with .dts files appearing in a vendor/ directory. + test -d ${DESTDIR}${DTBDIR}/${_dtb:H:T} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR}/${_dtb:H:T} + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtb:T} ${DESTDIR}${DTBDIR}/${_dtb:H:T} +.else + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR}/ +.endif +.endfor + test -d ${DESTDIR}${DTBODIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBODIR} +.for _dtbo in ${DTBO} + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtbo} ${DESTDIR}${DTBODIR}/ +.endfor Modified: stable/12/sys/conf/dtb.mk ============================================================================== --- stable/12/sys/conf/dtb.mk Tue Apr 16 21:02:41 2019 (r346303) +++ stable/12/sys/conf/dtb.mk Tue Apr 16 21:09:57 2019 (r346304) @@ -8,6 +8,8 @@ # # DTS List of the dts files to build and install. # +# DTSO List of the dts overlay files to build and install. +# # DTBDIR Base path for dtb modules [/boot/dtb] # # DTBOWN .dtb file owner. [${BINOWN}] @@ -20,7 +22,7 @@ # # +++ targets +++ # -# install: +# install: # install the kernel module; if the Makefile # does not itself define the target install, the targets # beforeinstall and afterinstall may also be used to cause @@ -28,78 +30,15 @@ # is executed. # -.include -# Grab all the options for a kernel build. For backwards compat, we need to -# do this after bsd.own.mk. -.include "kern.opts.mk" +.include "dtb.build.mk" -DTC?= dtc - -# Search for kernel source tree in standard places. -.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/kern/) -SYSDIR= ${_dir:tA} -.endif -.endfor -.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) -.error "can't find kernel source tree" -.endif - -.SUFFIXES: .dtb .dts .dtbo .dtso - -.PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE}/overlays - -DTB=${DTS:R:S/$/.dtb/} -DTBO=${DTSO:R:S/$/.dtbo/} - +.if !target(install) && !target(realinstall) all: ${DTB} ${DTBO} - -.if defined(DTS) -.export DTC ECHO -.for _dts in ${DTS} -${_dts:R:S/$/.dtb/}: ${_dts} ${OP_META} - @${ECHO} Generating ${.TARGET} from ${_dts} - @${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${_dts} ${.OBJDIR} -CLEANFILES+=${_dts:R:S/$/.dtb/} -.endfor -.endif - -.if defined(DTSO) -.export DTC ECHO -.for _dtso in ${DTSO} -${_dtso:R:S/$/.dtbo/}: ${_dtso} ${OP_META} - @${ECHO} Generating ${.TARGET} from ${_dtso} - @${SYSDIR}/tools/fdt/make_dtbo.sh ${SYSDIR} overlays/${_dtso} ${.OBJDIR} -CLEANFILES+=${_dtso:R:S/$/.dtbo/} -.endfor -.endif - -.if !target(install) -.if !target(realinstall) realinstall: _dtbinstall -.ORDER: beforeinstall _kmodinstall -_dtbinstall: -# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree -# to make sure the tree is setup properly. We don't recreate it to avoid duplicate -# entries in the NO_ROOT case. - test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR} -.for _dtb in ${DTB} -.if ${MACHINE_CPUARCH} == "aarch64" - test -d ${DESTDIR}${DTBDIR}/${_dtb:H} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR}/${_dtb:H} - ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ - ${_INSTALLFLAGS} ${_dtb:T} ${DESTDIR}${DTBDIR}/${_dtb:H} -.else - ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ - ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR}/ -.endif -.endfor - test -d ${DESTDIR}${DTBODIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBODIR} -.for _dtbo in ${DTBO} - ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ - ${_INSTALLFLAGS} ${_dtbo} ${DESTDIR}${DTBODIR}/ -.endfor -.endif # !target(realinstall) -.endif # !target(install) +.ORDER: beforeinstall _dtbinstall + +CLEANFILES+=${DTB} ${DTBO} +.endif # !target(install) && !target(realinstall) .include .include Modified: stable/12/sys/conf/kern.post.mk ============================================================================== --- stable/12/sys/conf/kern.post.mk Tue Apr 16 21:02:41 2019 (r346303) +++ stable/12/sys/conf/kern.post.mk Tue Apr 16 21:09:57 2019 (r346304) @@ -8,6 +8,16 @@ # should be defined in the kern.pre.mk so that port makefiles can # override or augment them. +.if defined(DTS) || defined(DTSO) +.include "dtb.build.mk" + +KERNEL_EXTRA+= ${DTB} ${DTBO} +CLEAN+= ${DTB} ${DTBO} + +kernel-install: _dtbinstall +.ORDER: beforeinstall _dtbinstall +.endif + # In case the config had a makeoptions DESTDIR... .if defined(DESTDIR) MKMODULESENV+= DESTDIR="${DESTDIR}" From owner-svn-src-all@freebsd.org Tue Apr 16 21:28:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 801E7157E0D8; Tue, 16 Apr 2019 21:28:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19661814E4; Tue, 16 Apr 2019 21:28:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (unknown [IPv6:2601:648:8880:1e30:50e5:2fcc:d66f:cb37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 3266416B0D; Tue, 16 Apr 2019 21:28:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en To: Hans Petter Selasky , "Andrey V. Elsukov" , Slava Shwartsman , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812051425.wB5EP38T004562@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <7cea5305-4136-a0b6-487b-51307b1c6db9@FreeBSD.org> Date: Tue, 16 Apr 2019 14:28:28 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 19661814E4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 21:28:31 -0000 On 4/16/19 8:32 AM, Hans Petter Selasky wrote: > On 4/16/19 4:39 PM, Andrey V. Elsukov wrote: >> On 05.12.2018 17:25, Slava Shwartsman wrote: >>> Author: slavash >>> Date: Wed Dec 5 14:25:03 2018 >>> New Revision: 341586 >>> URL: https://svnweb.freebsd.org/changeset/base/341586 >>> >>> Log: >>> mlx5en: Implement backpressure indication. >>> >>> The backpressure indication is implemented using an unlimited rate type of >>> mbuf send tag. When the upper layers typically the socket layer has obtained such >>> a tag, it can then query the destination driver queue for the current >>> amount of space available in the send queue. >>> >>> A single mbuf send tag may be referenced multiple times and a refcount has been added >>> to the mlx5e_priv structure to track its usage. Because the send tag resides >>> in the mlx5e_channel structure, there is no need to wait for refcounts to reach >>> zero until the mlx4en(4) driver is detached. The channels structure is persistant >>> during the lifetime of the mlx5en(4) driver it belongs to and can so be accessed >>> without any need of synchronization. >>> >>> The mlx5e_snd_tag structure was extended to contain a type field, because there are now >>> two different tag types which end up in the driver which need to be distinguished. >>> >>> Submitted by: hselasky@ >>> Approved by: hselasky (mentor) >>> MFC after: 1 week >>> Sponsored by: Mellanox Technologies >>> @@ -587,27 +609,33 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) >>> struct mlx5e_sq *sq; >>> int ret; >>> >>> - sq = mlx5e_select_queue(ifp, mb); >>> - if (unlikely(sq == NULL)) { >>> -#ifdef RATELIMIT >>> - /* Check for route change */ >>> - if (mb->m_pkthdr.snd_tag != NULL && >>> - mb->m_pkthdr.snd_tag->ifp != ifp) { >>> + if (mb->m_pkthdr.snd_tag != NULL) { >>> + sq = mlx5e_select_queue_by_send_tag(ifp, mb); >>> + if (unlikely(sq == NULL)) { >>> + /* Check for route change */ >>> + if (mb->m_pkthdr.snd_tag->ifp != ifp) { >>> + /* Free mbuf */ >>> + m_freem(mb); >>> + >>> + /* >>> + * Tell upper layers about route >>> + * change and to re-transmit this >>> + * packet: >>> + */ >>> + return (EAGAIN); >>> + } >> >> Hi, >> >> I just discovered something strange and found that this commit is the >> cause. >> The test system has mlx5en 100G interface. It has two vlans: vlan500 and >> vlan100. >> Via vlan500 it receives some packets flows. Then it routes these packets >> into vlan100. >> But packets are dropped in mlx5e_xmit() with EAGAIN error code. >> >> # dtrace -n 'fbt::ip6_output:return {printf("%d", arg1);}' >> dtrace: description 'fbt::ip6_output:return ' matched 1 probe >> CPU ID FUNCTION:NAME >> 23 54338 ip6_output:return 35 >> 16 54338 ip6_output:return 35 >> 21 54338 ip6_output:return 35 >> 22 54338 ip6_output:return 35 >> 24 54338 ip6_output:return 35 >> 23 54338 ip6_output:return 35 >> 14 54338 ip6_output:return 35 >> ^C >> >> # dtrace -n 'fbt::mlx5e_xmit:return {printf("%d", arg1);}' >> dtrace: description 'fbt::mlx5e_xmit:return ' matched 1 probe >> CPU ID FUNCTION:NAME >> 16 69030 mlx5e_xmit:return 35 >> 23 69030 mlx5e_xmit:return 35 >> 26 69030 mlx5e_xmit:return 35 >> 25 69030 mlx5e_xmit:return 35 >> 24 69030 mlx5e_xmit:return 35 >> 21 69030 mlx5e_xmit:return 35 >> 26 69030 mlx5e_xmit:return 35 >> ^C >> >> The kernel config is GENERIC. >> 13.0-CURRENT #9 r345758+82f3d57(svn_head)-dirty >> > > Hi, > > This might be a case where rcvif in the mbuf's pktheader is not cleared > before the packet is fed back on the wire. > > John Baldwin is working on the send tags implementation, to eliminate > the EAGAIN handling in the network drivers. I will try to push this branch sooner then since it affects more than just TLS. Part of the change includes a new flag we can use to assert that we aren't just getting a stale rcvif (though there are also now assertions in ip_output that should catch this case I think). -- John Baldwin From owner-svn-src-all@freebsd.org Tue Apr 16 21:32:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 677DA157E336; Tue, 16 Apr 2019 21:32:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06C4F818E9; Tue, 16 Apr 2019 21:32:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (unknown [IPv6:2601:648:8880:1e30:50e5:2fcc:d66f:cb37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 660E916C37; Tue, 16 Apr 2019 21:32:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> Date: Tue, 16 Apr 2019 14:32:42 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201904151840.x3FIeaEQ009242@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 06C4F818E9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 21:32:44 -0000 On 4/15/19 11:40 AM, Conrad Meyer wrote: > Author: cem > Date: Mon Apr 15 18:40:36 2019 > New Revision: 346250 > URL: https://svnweb.freebsd.org/changeset/base/346250 > > Log: > random(4): Block read_random(9) on initial seeding > > read_random() is/was used, mostly without error checking, in a lot of > very sensitive places in the kernel -- including seeding the widely used > arc4random(9). > > Most uses, especially arc4random(9), should block until the device is seeded > rather than proceeding with a bogus or empty seed. I did not spy any > obvious kernel consumers where blocking would be inappropriate (in the > sense that lack of entropy would be ok -- I did not investigate locking > angle thoroughly). In many instances, arc4random_buf(9) or that family > of APIs would be more appropriate anyway; that work was done in r345865. There are definitely places arc4random is used where sleeping is not allowed. ipsec generating nonces for AES-CBC is one example I can think of off the top of my head. I think it might be useful to add an explicit WITNESS_WARN in arc4random to catch these cases so they can be found and reasoned about. > This change primarily impacts the behavior of /dev/random on embedded > systems with read-only media that do not configure "nodevice random". We > toggle the default from 'charge on blindly with no entropy' to 'block > indefinitely.' This default is safer, but may cause frustration. Embedded > system designers using FreeBSD have several options. The most obvious is to > plan to have a small writable NVRAM or NAND to persist entropy, like larger > systems. Early entropy can be fed from any loader, or by writing directly > to /dev/random during boot. Some embedded SoCs now provide a fast hardware > entropy source; this would also work for quickly seeding Fortuna. A 3rd > option would be creating an embedded-specific, more simplistic random > module, like that designed by DJB in [1] (this design still requires a small > rewritable media for forward secrecy). Finally, the least preferred option > might be "nodevice random", although I plan to remove this in a subsequent > revision. Note that I actually often run into unseeded systems when doing development using qemu for non-x86 architectures. For example, when booting mips from qemu, there is no loader, the kernel just starts, and since the endian is opposite, I frequently regenerate the filesystem using makefs. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Apr 16 22:42:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D45C157FA71; Tue, 16 Apr 2019 22:42:51 +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 E010B83963; Tue, 16 Apr 2019 22:42:50 +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 B6A9C2637B; Tue, 16 Apr 2019 22:42:50 +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 x3GMgol5003906; Tue, 16 Apr 2019 22:42:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GMgolV003904; Tue, 16 Apr 2019 22:42:50 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904162242.x3GMgolV003904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 16 Apr 2019 22:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346305 - in head/sys/arm: allwinner conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/arm: allwinner conf X-SVN-Commit-Revision: 346305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E010B83963 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 22:42:51 -0000 Author: manu Date: Tue Apr 16 22:42:50 2019 New Revision: 346305 URL: https://svnweb.freebsd.org/changeset/base/346305 Log: arm: allwinner: Makes more device optional MFC after: 2 weeks Modified: head/sys/arm/allwinner/files.allwinner head/sys/arm/conf/GENERIC Modified: head/sys/arm/allwinner/files.allwinner ============================================================================== --- head/sys/arm/allwinner/files.allwinner Tue Apr 16 21:09:57 2019 (r346304) +++ head/sys/arm/allwinner/files.allwinner Tue Apr 16 22:42:50 2019 (r346305) @@ -2,10 +2,10 @@ arm/allwinner/a10_ahci.c optional ahci arm/allwinner/a10_codec.c optional sound -arm/allwinner/a10_dmac.c standard -arm/allwinner/a31_dmac.c standard +arm/allwinner/a10_dmac.c optional a10_dmac +arm/allwinner/a31_dmac.c optional a31_dmac arm/allwinner/a10_ehci.c optional ehci -arm/allwinner/a10_sramc.c standard +arm/allwinner/a10_sramc.c optional SOC_ALLWINNER_A10 arm/allwinner/aw_gpio.c optional gpio arm/allwinner/aw_if_dwc.c optional dwc arm/allwinner/aw_machdep.c standard @@ -13,21 +13,21 @@ arm/allwinner/aw_mmc.c optional mmc | mmccam arm/allwinner/aw_mp.c optional smp arm/allwinner/aw_nmi.c optional intrng arm/allwinner/aw_rsb.c optional rsb | p2wi -arm/allwinner/aw_rtc.c standard +arm/allwinner/aw_rtc.c optional aw_rtc arm/allwinner/aw_syscon.c optional ext_resources syscon -arm/allwinner/aw_ts.c standard +arm/allwinner/aw_ts.c optional aw_thermal arm/allwinner/aw_usbphy.c optional ehci | ohci -arm/allwinner/aw_wdog.c standard +arm/allwinner/aw_wdog.c optional aw_wdog arm/allwinner/axp209.c optional axp209 arm/allwinner/axp81x.c optional axp81x arm/allwinner/if_awg.c optional awg ext_resources syscon arm/allwinner/if_emac.c optional emac -arm/allwinner/sunxi_dma_if.m standard +arm/allwinner/sunxi_dma_if.m optional a10_dmac | a31_dmac dev/iicbus/twsi/a10_twsi.c optional twsi dev/usb/controller/generic_ohci.c optional ohci dev/usb/controller/generic_usb_if.m optional ohci -arm/allwinner/aw_sid.c standard -arm/allwinner/aw_thermal.c standard +arm/allwinner/aw_sid.c optional aw_sid +arm/allwinner/aw_thermal.c optional aw_thermal dev/iicbus/sy8106a.c optional sy8106a arm/allwinner/aw_cir.c optional aw_cir evdev Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Tue Apr 16 21:09:57 2019 (r346304) +++ head/sys/arm/conf/GENERIC Tue Apr 16 22:42:50 2019 (r346305) @@ -181,6 +181,7 @@ device ti_adc # watchdog. device ti_wdt device imxwdt # Watchdog. WARNING: can't be disabled!!! +device aw_wdog # Allwinner Watchdog device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) @@ -253,6 +254,8 @@ device ti_mbox # DMA controller device fslsdma device ti_sdma +device a10_dmac +device a31_dmac # Extensible Firmware Interface options EFI @@ -262,8 +265,15 @@ device cesa device crypto device cryptodev -# imx6 on-chip RTC -device imx6_snvs # On-chip RTC +# RTC +device imx6_snvs # IMX6 On-chip RTC +device aw_rtc # Allwinner On-chip RTC + +# EFUSE +device aw_sid # Allwinner Secure ID EFUSE + +# Thermal sensors +device aw_thermal # Allwinner Thermal Sensor Controller # Flattened Device Tree options FDT # Configure using FDT/DTB data From owner-svn-src-all@freebsd.org Tue Apr 16 22:51:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A2C2157FC88; Tue, 16 Apr 2019 22:51:04 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E098883B84; Tue, 16 Apr 2019 22:51:03 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3GMp2n9097104; Tue, 16 Apr 2019 15:51:02 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3GMp2aF097103; Tue, 16 Apr 2019 15:51:02 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys In-Reply-To: <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> To: John Baldwin Date: Tue, 16 Apr 2019 15:51:02 -0700 (PDT) CC: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: E098883B84 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 22:51:04 -0000 > On 4/15/19 11:40 AM, Conrad Meyer wrote: > > Author: cem > > Date: Mon Apr 15 18:40:36 2019 > > New Revision: 346250 > > URL: https://svnweb.freebsd.org/changeset/base/346250 > > > > Log: > > random(4): Block read_random(9) on initial seeding > > > > read_random() is/was used, mostly without error checking, in a lot of > > very sensitive places in the kernel -- including seeding the widely used > > arc4random(9). > > > > Most uses, especially arc4random(9), should block until the device is seeded > > rather than proceeding with a bogus or empty seed. I did not spy any > > obvious kernel consumers where blocking would be inappropriate (in the > > sense that lack of entropy would be ok -- I did not investigate locking > > angle thoroughly). In many instances, arc4random_buf(9) or that family > > of APIs would be more appropriate anyway; that work was done in r345865. > > There are definitely places arc4random is used where sleeping is not allowed. > ipsec generating nonces for AES-CBC is one example I can think of off the > top of my head. I think it might be useful to add an explicit WITNESS_WARN > in arc4random to catch these cases so they can be found and reasoned about. > > > This change primarily impacts the behavior of /dev/random on embedded > > systems with read-only media that do not configure "nodevice random". We > > toggle the default from 'charge on blindly with no entropy' to 'block > > indefinitely.' This default is safer, but may cause frustration. Embedded > > system designers using FreeBSD have several options. The most obvious is to > > plan to have a small writable NVRAM or NAND to persist entropy, like larger > > systems. Early entropy can be fed from any loader, or by writing directly > > to /dev/random during boot. Some embedded SoCs now provide a fast hardware > > entropy source; this would also work for quickly seeding Fortuna. A 3rd > > option would be creating an embedded-specific, more simplistic random > > module, like that designed by DJB in [1] (this design still requires a small > > rewritable media for forward secrecy). Finally, the least preferred option > > might be "nodevice random", although I plan to remove this in a subsequent > > revision. > > Note that I actually often run into unseeded systems when doing development > using qemu for non-x86 architectures. For example, when booting mips from > qemu, there is no loader, the kernel just starts, and since the endian is > opposite, I frequently regenerate the filesystem using makefs. Isnt this also the case for bhyveload? We do not go through the loader there when we are starting a FreeBSD guest, correct? > John Baldwin -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Apr 16 22:56:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10E9B157FFC8; Tue, 16 Apr 2019 22:56:01 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90498840D7; Tue, 16 Apr 2019 22:56:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f67.google.com with SMTP id f6so19063381iop.3; Tue, 16 Apr 2019 15:56:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=41VlXKvpyvUQSkyagsxvTJMsN5lzY6HrHdtrkLoGMx8=; b=RYy/XjI1wV3RLHXZ7JHngF8XeSXySOoghwcyt949OCSy0c1G8jmmZMm0wM5Zp0zZJV SuRpYxdBCxASA57UItW0Nk5J8QK9N00Tjt9Q1nayGLPu2kyh3zlC0acaqNgs7T6oLQMB 9RlJ0NyF2DyyM5y7NTtLT9nLUQkVOZrBBkEpn8h46YcFdiXVbfVe0T+6cnbyYpp8XOSn 6ULp0f3sRviYuXElsZ5lZtmRt01/QWEMnfSwlXCHBGVj/LA0QbxsfE0cN4AY+VKagdzQ BrHmsfxSOKH/+PRSdz7gGUVBd8G279Oj/L0et6+J7sle/nhhjsB7D5JNhPEA4XfxqDp3 6iLA== X-Gm-Message-State: APjAAAXmsJrJ6VBfkdhffIy83KkIHgNpyKlOIP12OQcaYdon8QLKmjSK 1VHqQG5K6JOaq6lc+M0D5Q3Qj0Nv X-Google-Smtp-Source: APXvYqytdlVO3ff9kEMmgd48JJi0LCrW0ZECcg8O5KkPe6FznxkHNxIl8IupFySE+4GYDJZ61nw9uA== X-Received: by 2002:a6b:f317:: with SMTP id m23mr39953939ioh.136.1555454966712; Tue, 16 Apr 2019 15:49:26 -0700 (PDT) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com. [209.85.166.47]) by smtp.gmail.com with ESMTPSA id o203sm390551itd.1.2019.04.16.15.49.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 15:49:26 -0700 (PDT) Received: by mail-io1-f47.google.com with SMTP id s7so19009243iom.12; Tue, 16 Apr 2019 15:49:26 -0700 (PDT) X-Received: by 2002:a6b:8b90:: with SMTP id n138mr10045058iod.75.1555454966164; Tue, 16 Apr 2019 15:49:26 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> In-Reply-To: <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 15:49:14 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 90498840D7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 22:56:01 -0000 On Tue, Apr 16, 2019 at 2:32 PM John Baldwin wrote: > There are definitely places arc4random is used where sleeping is not allowed. Sure. > ipsec generating nonces for AES-CBC is one example I can think of off the > top of my head. IVs for AES-CBC are also a great example of a case we should be seeded for. > I think it might be useful to add an explicit WITNESS_WARN > in arc4random to catch these cases so they can be found and reasoned about. Well, we kind of want that, but we also want the warning to disappear if the consumer has correctly reasoned about it. E.g., if the thread has verified seeded status with is_random_seeded(), it is no longer possible for a arc4random consumption to block. Right? I think that may be difficult to integrate with the WITNESS_WARN, so even if all consumers are correctly implemented, we will not eliminate the witness warnings. Do you have any ideas? The only dumb proposal I have is burning a flag in td_flags for "this thread checked is_random_seeded(), and it returned true." > Note that I actually often run into unseeded systems when doing development > using qemu for non-x86 architectures. For example, when booting mips from > qemu, there is no loader, the kernel just starts, and since the endian is > opposite, I frequently regenerate the filesystem using makefs. Right. Perhaps we could incorporate boot/entropy generation into makefs? Or pass host entropy into some kernel accessible region (env var, whatever) via qemu? The latter is sort of a general problem for VMs. You want to be able to snapshot and clone a VM without producing reproducible RNG state, but Fortuna doesn't handle that explicitly (aside from future entropy differences and forward secrecy causing quick divergence). Best, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 23:03:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07D4D1580218; Tue, 16 Apr 2019 23:03:59 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f196.google.com (mail-it1-f196.google.com [209.85.166.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8219784568; Tue, 16 Apr 2019 23:03:58 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f196.google.com with SMTP id w15so1501778itc.0; Tue, 16 Apr 2019 16:03:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oG7GaZKB+CcMbCvwNFCxvkj8ZqQAo33dhhD/uuIAOZc=; b=IOs2Oh+OukakBiU3MMdM7suq9yl2IpplTYDGKMuTaCjAzKFxubAaLzRCz7V2K++93Y JX21vLFw6AikUehvTniTwM7B8jRI0BwrG/Qy6OgC0qu4cdcdjLJbfoazGgMaaIVfGVDf BIukekyTlnDAvMxNeF6MtywTAX4l1bUVAaKDKlbpz07F40o2J8DwlOAoix4Gjpj/W3E1 x4F7kBGRaSBsr3FqCCZpVlJfanQJ6EyR8DDWA/Kw2zr2h6Vd8QcPifh3dWvpXKMjTj6n yA1ducvFoFeBLWi/r3sCYJkvVYZveHKogQc6ngNy37U4ZJU6b9Uu3gSZ5T7UsJcVwOjI 3EkQ== X-Gm-Message-State: APjAAAU5tCtoCq7lG3H8eTXD4OndhyMUMFyzm6hfBpDISUqejuCMKvBE HtbUSV1hNSKJn236t4zJtVoOWOjfaDXuqoOn6YbAXOhK X-Google-Smtp-Source: APXvYqwGLqrG6gKhB7RP2bp9N8dXcK7TiMqUJ0Lmt4gmu+0YYpx4l6IhTfB8XfLT/qBORPPW/gBth5IR251ryDdAfT4= X-Received: by 2002:a24:7354:: with SMTP id y81mr32844374itb.87.1555455831515; Tue, 16 Apr 2019 16:03:51 -0700 (PDT) MIME-Version: 1.0 References: <201904160412.x3G4CgN2015092@repo.freebsd.org> <20190416131915.2ocot4nonnf3sl4a@mutt-hbsd> In-Reply-To: From: Ed Maste Date: Tue, 16 Apr 2019 19:03:35 -0400 Message-ID: Subject: Re: svn commit: r346263 - head/contrib/tcpdump To: Conrad Meyer Cc: Shawn Webb , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8219784568 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.960,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 23:03:59 -0000 On Tue, 16 Apr 2019 at 11:38, Conrad Meyer wrote: > > I don't think documenting that makes much sense in general. It would > be extremely burdensome to fully document and quickly become > desynchronized from the code. It's comparable to OpenBSD pledging > differently in different paths of programs. It's probably worth having tcpdump emit a warning if it's not able to enter capability mode as a result of the options in use, if someone's interested in proposing a patch. From owner-svn-src-all@freebsd.org Tue Apr 16 23:08:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD5C0158032A; Tue, 16 Apr 2019 23:08:55 +0000 (UTC) (envelope-from gjb@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 7F3688478E; Tue, 16 Apr 2019 23:08:55 +0000 (UTC) (envelope-from gjb@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 56A96266DD; Tue, 16 Apr 2019 23:08:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3GN8tJP014661; Tue, 16 Apr 2019 23:08:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3GN8tvs014660; Tue, 16 Apr 2019 23:08:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201904162308.x3GN8tvs014660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 16 Apr 2019 23:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346306 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Commit-Revision: 346306 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7F3688478E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 23:08:56 -0000 Author: gjb Date: Tue Apr 16 23:08:54 2019 New Revision: 346306 URL: https://svnweb.freebsd.org/changeset/base/346306 Log: Fix a typo. Submitted by: adamw Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 16 22:42:50 2019 (r346305) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 16 23:08:54 2019 (r346306) @@ -531,7 +531,7 @@ An issue that could result in a system hang during - ZFS vnode reclaimation has been + ZFS vnode reclamation has been fixed. From owner-svn-src-all@freebsd.org Tue Apr 16 23:28:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7032515809D1; Tue, 16 Apr 2019 23:28:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1319A852E5; Tue, 16 Apr 2019 23:28:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (unknown [IPv6:2601:648:8880:1e30:50e5:2fcc:d66f:cb37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 56F4D17853; Tue, 16 Apr 2019 23:28:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: cem@freebsd.org Cc: src-committers , svn-src-all , svn-src-head References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <5d790a56-1498-094e-6bb4-48345a231e55@FreeBSD.org> Date: Tue, 16 Apr 2019 16:28:45 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1319A852E5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 23:28:48 -0000 On 4/16/19 3:49 PM, Conrad Meyer wrote: > On Tue, Apr 16, 2019 at 2:32 PM John Baldwin wrote: >> There are definitely places arc4random is used where sleeping is not allowed. > > Sure. > >> ipsec generating nonces for AES-CBC is one example I can think of off the >> top of my head. > > IVs for AES-CBC are also a great example of a case we should be seeded for. Yes, but we need some kind of non-blocking API, not an unconditionally-blocking API that deadlocks. >> I think it might be useful to add an explicit WITNESS_WARN >> in arc4random to catch these cases so they can be found and reasoned about. > > Well, we kind of want that, but we also want the warning to disappear > if the consumer has correctly reasoned about it. E.g., if the thread > has verified seeded status with is_random_seeded(), it is no longer > possible for a arc4random consumption to block. Right? I think that > may be difficult to integrate with the WITNESS_WARN, so even if all > consumers are correctly implemented, we will not eliminate the witness > warnings. Do you have any ideas? The only dumb proposal I have is > burning a flag in td_flags for "this thread checked > is_random_seeded(), and it returned true." Eh, I thought that we periodically pulled in new entropy to generate a new chacha20 key for the PRNG and that could be blocking as well when I was last reading this code, or is that not correct? Or maybe arc4random passes in a flag to disable reseeding so it isn't blocking once the PRNG has been seeded at least once? Still, what I would suggest is to have the existing arc4random() use WITNESS_WARN. We could provide an alternative API that is non-blocking and returns EWOULDBLOCK. Code that trips over the warning would have to be changed to use the non-blocking API and then deal with EWOULDBLOCK. One way of dealing with that would be to check the is_random_seeded() flag earlier in the function, subsystem, whatever and then the code could assert that the non-blocking API never failed. >> Note that I actually often run into unseeded systems when doing development >> using qemu for non-x86 architectures. For example, when booting mips from >> qemu, there is no loader, the kernel just starts, and since the endian is >> opposite, I frequently regenerate the filesystem using makefs. > > Right. Perhaps we could incorporate boot/entropy generation into > makefs? Or pass host entropy into some kernel accessible region (env > var, whatever) via qemu? The latter is sort of a general problem for > VMs. You want to be able to snapshot and clone a VM without producing > reproducible RNG state, but Fortuna doesn't handle that explicitly > (aside from future entropy differences and forward secrecy causing > quick divergence). There are things like virtio-rng for modern x86 VM environments, but those don't exist on things like the MIPS MALTA machine. I also don't actually care at all (as in absolutely zero) about the entropy of keys generated for a test qemu instance I fire up on my desktop that doesn't permit inbound access from the outside world. Having some kind of tunable / kernel option for those use cases (that isn't the default) doesn't seem unreasonable. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Apr 16 23:31:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CE6B1580C4E; Tue, 16 Apr 2019 23:31:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10ECD8558F; Tue, 16 Apr 2019 23:31:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (unknown [IPv6:2601:648:8880:1e30:50e5:2fcc:d66f:cb37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 593D317854; Tue, 16 Apr 2019 23:31:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: rgrimes@freebsd.org Cc: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <4d6b8a14-b053-9ed1-14b2-bbc359ac9413@FreeBSD.org> Date: Tue, 16 Apr 2019 16:31:36 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 10ECD8558F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 23:31:38 -0000 On 4/16/19 3:51 PM, Rodney W. Grimes wrote: >> On 4/15/19 11:40 AM, Conrad Meyer wrote: >> Note that I actually often run into unseeded systems when doing development >> using qemu for non-x86 architectures. For example, when booting mips from >> qemu, there is no loader, the kernel just starts, and since the endian is >> opposite, I frequently regenerate the filesystem using makefs. > > Isnt this also the case for bhyveload? We do not go through the loader > there when we are starting a FreeBSD guest, correct? bhyveload is effectively the loader in this case. It runs the normal loader scripts and logic and so would load the guests's /boot/entropy and pass it to the guest kernel as metadata just like the regular loader. In addition, bhyve also supports virtio-rng which is another way to provide entropy to guest OS's. That's why in my reply I focused on qemu for mips (or riscv) as for x86 hypervisors there are existing, somewhat-standarized solutions for the hypervisor to provide entropy to the guest. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Apr 16 23:43:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A0A61580F62; Tue, 16 Apr 2019 23:43:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 937AB85D0E; Tue, 16 Apr 2019 23:43:47 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f44.google.com with SMTP id v10so19117088iom.8; Tue, 16 Apr 2019 16:43:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=Qy24jlWnhqpQBTPNsTSLPfsDiCMvmd25HGwOVMlFXow=; b=QSTnTOzWQ96bpYpcvz+hidxk7fqq/lwPghJwPt0DP5vwpQ/yeqb3FzFs0QR/F6IAUJ LNupIozUP5aPFIBE+gUarCI/tMm0JkjvWuiSYHDG6ZZnsCilK9pV9OC1wiryKdsh5y6m 5a3fTVNeExJJmMn31g9wEdi/UajxHcQXMogneVWsjhJJN34XR8hJslTxvX8eT2XtQlyc nc0R0af86sCGHx8rzMUqNYELWIZcJGvu5JTs84abSKv44BGY2oXuVUdY43C/BULS5tcZ yKm2e4OUDx+qULQdAczPs20eW5jrliRDGXwEfky/cNHsSKPUoOOcUlrquQinryz6pVH1 gVmA== X-Gm-Message-State: APjAAAUoZQdHAVxZ7AhTkUsCdMarj2XiZfl/ZkvQsh4b5OPT8sVTtEbp 9eFGhljnkjIVV0mbaVrQhsAcgivF X-Google-Smtp-Source: APXvYqwcrj7OtcJRy++5fhmehGD5wFv/J50bH8JjnN/7oAsAwMjVxsLO+PdsyqlvAaIltWC2NnZ3Zw== X-Received: by 2002:a6b:e317:: with SMTP id u23mr3060182ioc.206.1555458220645; Tue, 16 Apr 2019 16:43:40 -0700 (PDT) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com. [209.85.166.51]) by smtp.gmail.com with ESMTPSA id f14sm20181470ion.46.2019.04.16.16.43.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 16:43:40 -0700 (PDT) Received: by mail-io1-f51.google.com with SMTP id u12so19075363iop.11; Tue, 16 Apr 2019 16:43:40 -0700 (PDT) X-Received: by 2002:a6b:8b90:: with SMTP id n138mr10196268iod.75.1555458220164; Tue, 16 Apr 2019 16:43:40 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> <5d790a56-1498-094e-6bb4-48345a231e55@FreeBSD.org> In-Reply-To: <5d790a56-1498-094e-6bb4-48345a231e55@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 16:43:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 937AB85D0E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 23:43:48 -0000 On Tue, Apr 16, 2019 at 4:28 PM John Baldwin wrote: > Yes, but we need some kind of non-blocking API, not an unconditionally-blocking API > that deadlocks. I'm not sure we do. It would be sufficient to check once at subsystem initialization time. There's no race condition such that we block again once we're seeded. As far as APIs go, read_random_uio is nonblocking, although not an arc4random interface (and quite cumbersome to set up and use). > Eh, I thought that we periodically pulled in new entropy to generate a new chacha20 > key for the PRNG and that could be blocking as well when I was last reading this > code, or is that not correct? No, that's incorrect. We periodically pull new Fortuna (devrandom) output to reseed chacha20 in arc4random, but once Fortuna is "seeded," it *never* blocks ever again. > Or maybe arc4random passes in a flag to disable > reseeding so it isn't blocking once the PRNG has been seeded at least once? As above, *re*seeding arc4random never blocks. > Still, what I would suggest is to have the existing arc4random() use WITNESS_WARN. > We could provide an alternative API that is non-blocking and returns EWOULDBLOCK. I think the alternative EWOULDBLOCK proposal is worse than WITNESS_WARN. But I highlighted some problems with WITNESS_WARN in my earlier email; how would you resolve them? > Code that trips over the warning would have to be changed to use the non-blocking > API and then deal with EWOULDBLOCK. Or it could just check that the random device is seeded, prior to using arc4random? > One way of dealing with that would be to > check the is_random_seeded() flag earlier in the function, subsystem, whatever > and then the code could assert that the non-blocking API never failed. That's more or less the status quo with no-error arc4random, no? > There are things like virtio-rng for modern x86 VM environments, but those don't > exist on things like the MIPS MALTA machine. They probably probe later than SI_SUB_RANDOM too :-(. > I also don't actually care at all (as in > absolutely zero) about the entropy of keys generated for a test qemu instance I fire up > on my desktop that doesn't permit inbound access from the outside world. Having some > kind of tunable / kernel option for those use cases (that isn't the default) doesn't > seem unreasonable. Sure. It would probably be ok to have a knob for that. We would want to be careful about naming it / documenting it; the thing about knobs is people tend to twiddle them. Best, Conrad From owner-svn-src-all@freebsd.org Tue Apr 16 23:48:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F36D81581026; Tue, 16 Apr 2019 23:48:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7775F85F15; Tue, 16 Apr 2019 23:48:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f52.google.com with SMTP id b6so19153012iog.0; Tue, 16 Apr 2019 16:48:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=odsmj96NJ8JIboVrXKLUZGaYvkbPGNeAHxbHowzjxSo=; b=IIb1kBkiqMiHD73R9TruFp6SKYGLMPKipmukfk4kFfdiTQ/fsDEFO5XtqDFVjL45Cr zIPWCGUGwBtYChbxE3Ni2HqVUvIu9IkMhy1fyUdcrcbd8Vcx0qm39WhqYeDnRA7eeK/v K8OxXGlozmfXOBLCtbpATB+3UJpsxTWXgeG8Q72diHvyib1VAoNyi6VeLLGLbp6hPpdt hQ3xoXzk9BTaFOcodn9KRI7zLqpPdWxU3QLkUNdS0qn8MUxrAcELhNiJqzSo2rqz1rpf ryItnMRQDkXzK4C1p+eDXYj+XDNcZCkf+34ny/3rCT1ro1kzVhWlpXrD4F97SV4VEX/Z rlWQ== X-Gm-Message-State: APjAAAX9d9yzIRzaB1t7sZn5Up5X/JZzAqSZUy1XdGf3FKlmh5ExLiBS D0dw8puJb28Sc4JHDCRzTPo7lYC3 X-Google-Smtp-Source: APXvYqyaJUvTbMwg6wOfQgPC9ZYter30Zg52gJBMCqoLKc7V6fjsM1TkD6Z7FaSCNSUA4H6fWy4pwQ== X-Received: by 2002:a5d:97da:: with SMTP id k26mr54184971ios.46.1555458507391; Tue, 16 Apr 2019 16:48:27 -0700 (PDT) Received: from mail-it1-f170.google.com (mail-it1-f170.google.com. [209.85.166.170]) by smtp.gmail.com with ESMTPSA id c13sm19915342iod.88.2019.04.16.16.48.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 16:48:26 -0700 (PDT) Received: by mail-it1-f170.google.com with SMTP id y134so1641479itc.5; Tue, 16 Apr 2019 16:48:26 -0700 (PDT) X-Received: by 2002:a05:660c:111:: with SMTP id w17mr32299105itj.62.1555458506488; Tue, 16 Apr 2019 16:48:26 -0700 (PDT) MIME-Version: 1.0 References: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> <4d6b8a14-b053-9ed1-14b2-bbc359ac9413@FreeBSD.org> In-Reply-To: <4d6b8a14-b053-9ed1-14b2-bbc359ac9413@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 16 Apr 2019 16:48:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 7775F85F15 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2019 23:48:29 -0000 On Tue, Apr 16, 2019 at 4:31 PM John Baldwin wrote: > bhyveload is effectively the loader in this case. It runs the normal loader > scripts and logic and so would load the guests's /boot/entropy and pass it > to the guest kernel as metadata just like the regular loader. Right, except it doesn't seem to do things like nuke /boot/nextboot.conf :-(. > In addition, bhyve also supports virtio-rng which is another way to provide > entropy to guest OS's. That's why in my reply I focused on qemu for mips > (or riscv) as for x86 hypervisors there are existing, somewhat-standarized > solutions for the hypervisor to provide entropy to the guest. Perhaps cryptographically random stack-protector cookies are simply inappropriate for MIPS or RISCV. Do we have any other examples of kernel random consumers blocking after that immediate hiccup is overcome? Best, Conrad From owner-svn-src-all@freebsd.org Wed Apr 17 03:29:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6B3C1584E35; Wed, 17 Apr 2019 03:29:17 +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 868308C6D7; Wed, 17 Apr 2019 03:29:17 +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 637D8139B; Wed, 17 Apr 2019 03:29:17 +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 x3H3THsH054320; Wed, 17 Apr 2019 03:29:17 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3H3TGZp054318; Wed, 17 Apr 2019 03:29:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904170329.x3H3TGZp054318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 17 Apr 2019 03:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346307 - in head: share/man/man4 sys/conf X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: share/man/man4 sys/conf X-SVN-Commit-Revision: 346307 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 868308C6D7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 03:29:18 -0000 Author: kevans Date: Wed Apr 17 03:29:16 2019 New Revision: 346307 URL: https://svnweb.freebsd.org/changeset/base/346307 Log: fdt: further consolidate DTB building and revise manpage FDT_DTS_FILE was built separately with a rule in sys/conf/files and recreated the rules we used in dtb.mk. Now that we have other infrastructure to build a DTB along with the kernel, fold FDT_DTS_FILE into that since it doesn't have any special requirements. fdt(4) never got revised to mention the DTS/DTSO make options, so do that now. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19736 Modified: head/share/man/man4/fdt.4 head/sys/conf/files head/sys/conf/kern.post.mk Modified: head/share/man/man4/fdt.4 ============================================================================== --- head/share/man/man4/fdt.4 Tue Apr 16 23:08:54 2019 (r346306) +++ head/share/man/man4/fdt.4 Wed Apr 17 03:29:16 2019 (r346307) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 12, 2010 +.Dd March 28, 2019 .Dt FDT 4 .Os .Sh NAME @@ -139,6 +139,21 @@ support at the .Fx kernel level. .Bl -tag -width Ar +.It Va makeoptions DTS+=.dts +Specifies device tree source (DTS) files for a given kernel. +The indicated DTS files will be converted (compiled) into a binary form +along with building the kernel itself. +Any DTS file names not written as an absolute path must be specified relative +to the default location of DTS sources i.e., +.Pa sys/dts . +.It Va makeoptions DTSO+=.dtso +Specifies device tree source overlay (DTSO) files for a given kernel. +Overlay files will be built with the kernel as with the makeoption +.Va DTS +described above. +Overlay files specified as relative paths will be relative to the default +location of DTS overlays for the platform being built i.e., +.Pa sys/dts/arm/overlays . .It Va options FDT The primary option for enabling .Nm @@ -153,10 +168,9 @@ drivers, as well as helper routines and libraries. .It Va makeoptions FDT_DTS_FILE=.dts Specifies a preferred (default) device tree source (DTS) file for a given kernel. -The indicated DTS file will be converted (compiled) into a binary form -along with building the kernel itself. -The DTS file name is relative to the default location of DTS sources i.e. -.Pa sys/dts . +It will be built along with the kernel as if it were supplied via the makeoption +.Va DTS +described above. This makeoption is not mandatory unless FDT_DTB_STATIC is also defined (see below). .It Va options FDT_DTB_STATIC Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Apr 16 23:08:54 2019 (r346306) +++ head/sys/conf/files Wed Apr 17 03:29:16 2019 (r346307) @@ -19,17 +19,9 @@ bhnd_nvram_map_data.h optional bhnd \ compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -d" \ no-obj no-implicit-rule before-depend \ clean "bhnd_nvram_map_data.h" -# -# The 'fdt_dtb_file' target covers an actual DTB file name, which is derived -# from the specified source (DTS) file: .dts -> .dtb -# -fdt_dtb_file optional fdt fdt_dtb_static \ - compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}'" \ - no-obj no-implicit-rule before-depend \ - clean "${FDT_DTS_FILE:R}.dtb" fdt_static_dtb.h optional fdt fdt_dtb_static \ compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}'" \ - dependency "fdt_dtb_file" \ + dependency "${FDT_DTS_FILE:T:R}.dtb" \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" feeder_eq_gen.h optional sound \ @@ -1723,7 +1715,7 @@ dev/fdt/fdt_pinctrl.c optional fdt fdt_pinctrl dev/fdt/fdt_pinctrl_if.m optional fdt fdt_pinctrl dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand | fdt mx25l | fdt n25q | fdt at45d dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ - dependency "fdt_dtb_file" + dependency "${FDT_DTS_FILE:T:R}.dtb" dev/fdt/simplebus.c optional fdt dev/fdt/simple_mfd.c optional fdt dev/fe/if_fe.c optional fe Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Apr 16 23:08:54 2019 (r346306) +++ head/sys/conf/kern.post.mk Wed Apr 17 03:29:16 2019 (r346307) @@ -8,6 +8,9 @@ # should be defined in the kern.pre.mk so that port makefiles can # override or augment them. +.if !empty(FDT_DTS_FILE) +DTS+= ${FDT_DTS_FILE} +.endif .if defined(DTS) || defined(DTSO) .include "dtb.build.mk" From owner-svn-src-all@freebsd.org Wed Apr 17 07:47:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C75F1589461; Wed, 17 Apr 2019 07:47:05 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 E26606C92A; Wed, 17 Apr 2019 07:47:04 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8949423F; Wed, 17 Apr 2019 07:47:04 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3H7l4Xm091822; Wed, 17 Apr 2019 07:47:04 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3H7l3ax091818; Wed, 17 Apr 2019 07:47:03 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201904170747.x3H7l3ax091818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 17 Apr 2019 07:47:03 +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: r346308 - in stable/12/release: . tools X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: in stable/12/release: . tools X-SVN-Commit-Revision: 346308 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E26606C92A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.911,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 07:47:05 -0000 Author: cperciva Date: Wed Apr 17 07:47:03 2019 New Revision: 346308 URL: https://svnweb.freebsd.org/changeset/base/346308 Log: MFC r345316, r345317, r345858: r345316: Register ARM64 EC2 AMIs as being for the ARM64 architecture. r345317: Don't install amazon-ssm-agent package into ARM64 AMIs. r345858: Add support for cross-building cloudware images. With these changes it is possible to build ARM64 EC2 AMIs on stable/12 -- said images do not *work* yet, however. Modified: stable/12/release/Makefile.ec2 stable/12/release/Makefile.vm stable/12/release/tools/ec2.conf stable/12/release/tools/vmimage.subr Directory Properties: stable/12/ (props changed) Modified: stable/12/release/Makefile.ec2 ============================================================================== --- stable/12/release/Makefile.ec2 Wed Apr 17 03:29:16 2019 (r346307) +++ stable/12/release/Makefile.ec2 Wed Apr 17 07:47:03 2019 (r346308) @@ -42,6 +42,9 @@ PUBLICSNAP= --publicsnap EC2SNSREL= ${REVISION}-${BRANCH} EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} .endif +.if ${TARGET_ARCH} != "amd64" +EC2ARCH= --${TARGET_ARCH:S/aarch64/arm64/} +.endif CLEANFILES+= ec2ami @@ -82,7 +85,8 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @echo "--------------------------------------------------------------" @false .endif - /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} --sriov --ena \ + /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ + ${EC2ARCH} --sriov --ena \ ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ Modified: stable/12/release/Makefile.vm ============================================================================== --- stable/12/release/Makefile.vm Wed Apr 17 03:29:16 2019 (r346307) +++ stable/12/release/Makefile.vm Wed Apr 17 07:47:03 2019 (r346308) @@ -39,6 +39,24 @@ VAGRANT-VMWARE_FORMAT= vmdk VAGRANT-VMWARE_DESC= Vagrant Image for VMWare VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} +emulator-portinstall: +.if ${TARGET_ARCH} != ${MACHINE_ARCH} +.if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) +.if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static) +.if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile) + env - PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean +.else +.if !exists(/usr/local/sbin/pkg-static) + env ASSUME_ALWAYS_YES=yes pkg bootstrap -y +.endif + env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-user-static +.endif +.endif + +QEMUSTATIC=/usr/local/bin/qemu-${TARGET_ARCH}-static +.endif +.endif + .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE} CLOUDTARGETS+= cw-${_CW:tl} @@ -53,9 +71,10 @@ ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf . endif -cw-${_CW:tl}: +cw-${_CW:tl}: emulator-portinstall mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ + QEMUSTATIC=${QEMUSTATIC} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ Modified: stable/12/release/tools/ec2.conf ============================================================================== --- stable/12/release/tools/ec2.conf Wed Apr 17 03:29:16 2019 (r346307) +++ stable/12/release/tools/ec2.conf Wed Apr 17 07:47:03 2019 (r346308) @@ -6,8 +6,16 @@ # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap further # package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient amazon-ssm-agent" +export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient" +# Include the amazon-ssm-agent package in amd64 images, since some users want +# to be able to use it on systems which are not connected to the Internet. +# (It is not enabled by default, however.) This package does not exist for +# aarch64, so we have to be selective about when we install it. +if [ "${TARGET_ARCH}" = "amd64" ]; then + export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent" +fi + # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" @@ -32,7 +40,7 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite Modified: stable/12/release/tools/vmimage.subr ============================================================================== --- stable/12/release/tools/vmimage.subr Wed Apr 17 03:29:16 2019 (r346307) +++ stable/12/release/tools/vmimage.subr Wed Apr 17 07:47:03 2019 (r346308) @@ -141,10 +141,15 @@ vm_install_base() { hostname="$(echo $(uname -o) | tr '[:upper:]' '[:lower:]')" echo "hostname=\"${hostname}\"" >> ${DESTDIR}/etc/rc.conf + if ! [ -z "${QEMUSTATIC}" ]; then + export EMULATOR=/qemu + cp ${QEMUSTATIC} ${DESTDIR}/${EMULATOR} + fi + mkdir -p ${DESTDIR}/dev mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} /usr/bin/newaliases - chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart + chroot ${DESTDIR} ${EMULATOR} /usr/bin/newaliases + chroot ${DESTDIR} ${EMULATOR} /bin/sh /etc/rc.d/ldconfig forcestart umount_loop ${DESTDIR}/dev cp /etc/resolv.conf ${DESTDIR}/etc/resolv.conf @@ -181,9 +186,9 @@ vm_extra_install_packages() { fi mkdir -p ${DESTDIR}/dev mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg bootstrap -y - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} umount_loop ${DESTDIR}/dev @@ -203,13 +208,16 @@ vm_extra_pre_umount() { # Note: When overriding this function, removing resolv.conf in the # disk image must be included. + if ! [ -z "${QEMUSTATIC}" ]; then + rm -f ${DESTDIR}/${EMULATOR} + fi rm -f ${DESTDIR}/etc/resolv.conf return 0 } vm_extra_pkg_rmcache() { if [ -e ${DESTDIR}/usr/local/sbin/pkg ]; then - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/local/sbin/pkg clean -y -a fi From owner-svn-src-all@freebsd.org Wed Apr 17 09:23:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37A67158BAB7; Wed, 17 Apr 2019 09:23:57 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id C25C06FE5B; Wed, 17 Apr 2019 09:23:56 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [192.168.1.41] (89.red-88-7-96.staticip.rima-tde.net [88.7.96.89]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 142F74E63E; Wed, 17 Apr 2019 09:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; s=mail; t=1555492997; bh=mOyOTV5mUWq5MENqjLxytMasBh/+9s3Lsmm+JgTXJTg=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=ARN3PVD0O9RyHZwfNMZDYZH/YHfrNr9HWl4H2aglhXhl19oVbC+KPzDrMmC2xn4zQ MIdEIpu5GCBNGb4LERlgttLECRp6O16Pr2cFD3uAwzKhML6ouD9LAFlh1zghs0X4UI s2etPHkk8gNeXcKqNLW3kCWbuTzT50Q7DppZdLCLoTSRChHaW1RzLbS9UeAQorLzIM 0XmYxAHyxZbYRBNYUAzQA6PFp1fIcqk76NyyQbaH6S7PRPU8oSALW8/CapDz2c6Ble KCnGtSGlPYm5TyS3f4nJtCEUt/7X1kyCPBXvAYNnwHGhxaVQV1jG8uZb6MVc5wtM8Y 3iutcJNKoJGGg5BF5v4JSs44jdKQ9SH1G+l0enodftP3X/40TlaSlEFx5sD77/GZ13 moJZdoSoDYaLRUjbhjkQzkvEAR1GgjvtNiKMNhALMTTJoxhd6OrjkQ/JW4xtlTLVbW Ff49rPPPjaYkR0Gk2x/fSlEVi+9AvsYP9Pkoponxcl42mfOk/OUc1xYnwftY4KzOQi DAXjopISQ5Hba+GesgX4rRLKZ1Lscz92HOj0d7foITe5Kp7IpXIHaJ53Min5q3CjW7 kH6j/VybygcxQIXss8fpZSwJuNuwamGFgFcPznmLn+WGM3vTlHS+E11nqaTsg8nUhW +P18laAttgCFqYQ6qrrfnYQg= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: svn commit: r346295 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/mv arm/nvidia/tegra124 a... From: Andrew Turner In-Reply-To: <201904162004.x3GK4N7u019636@repo.freebsd.org> Date: Wed, 17 Apr 2019 11:23:15 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201904162004.x3GK4N7u019636@repo.freebsd.org> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: C25C06FE5B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 09:23:57 -0000 > On 16 Apr 2019, at 22:04, Emmanuel Vadot wrote: >=20 > Author: manu > Date: Tue Apr 16 20:04:22 2019 > New Revision: 346295 > URL: https://svnweb.freebsd.org/changeset/base/346295 >=20 > Log: > arm: Add kern_clocksource.c directly in files.arm >=20 > This files is needed and included in all our config so move it to a = common > location. >=20 > MFC after: 2 weeks ... > Modified: head/sys/conf/files.arm > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/files.arm Tue Apr 16 19:46:02 2019 = (r346294) > +++ head/sys/conf/files.arm Tue Apr 16 20:04:22 2019 = (r346295) > @@ -11,6 +11,9 @@ cloudabi32_vdso_blob.o optional = compat_cloudabi32 \ > no-implicit-rule = \ > clean "cloudabi32_vdso_blob.o" > # > + > +kern/kern_clocksource.c standard Could this be moved from the various files.* to files? It seems we = define it as standard on all architectures. Andrew From owner-svn-src-all@freebsd.org Wed Apr 17 12:34:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AC34156AB1D; Wed, 17 Apr 2019 12:34:39 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 A2E56763DD; Wed, 17 Apr 2019 12:34:38 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A4E87379; Wed, 17 Apr 2019 12:34:38 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HCYc3h044324; Wed, 17 Apr 2019 12:34:38 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HCYb40044320; Wed, 17 Apr 2019 12:34:37 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201904171234.x3HCYb40044320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 17 Apr 2019 12:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346309 - in stable/11/release: . tools X-SVN-Group: stable-11 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: in stable/11/release: . tools X-SVN-Commit-Revision: 346309 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A2E56763DD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 12:34:39 -0000 Author: cperciva Date: Wed Apr 17 12:34:37 2019 New Revision: 346309 URL: https://svnweb.freebsd.org/changeset/base/346309 Log: MFC r345316, r345317, r345858: r345316: Register ARM64 EC2 AMIs as being for the ARM64 architecture. r345317: Don't install amazon-ssm-agent package into ARM64 AMIs. r345858: Add support for cross-building cloudware images. With these changes it is possible to build ARM64 EC2 AMIs on stable/12 -- said images do not *work* yet, however. Modified: stable/11/release/Makefile.ec2 stable/11/release/Makefile.vm stable/11/release/tools/ec2.conf stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/release/Makefile.ec2 ============================================================================== --- stable/11/release/Makefile.ec2 Wed Apr 17 07:47:03 2019 (r346308) +++ stable/11/release/Makefile.ec2 Wed Apr 17 12:34:37 2019 (r346309) @@ -42,6 +42,9 @@ PUBLICSNAP= --publicsnap EC2SNSREL= ${REVISION}-${BRANCH} EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} .endif +.if ${TARGET_ARCH} != "amd64" +EC2ARCH= --${TARGET_ARCH:S/aarch64/arm64/} +.endif CLEANFILES+= ec2ami @@ -82,7 +85,8 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @echo "--------------------------------------------------------------" @false .endif - /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} --sriov --ena \ + /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ + ${EC2ARCH} --sriov --ena \ ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ Modified: stable/11/release/Makefile.vm ============================================================================== --- stable/11/release/Makefile.vm Wed Apr 17 07:47:03 2019 (r346308) +++ stable/11/release/Makefile.vm Wed Apr 17 12:34:37 2019 (r346309) @@ -39,6 +39,24 @@ VAGRANT-VMWARE_FORMAT= vmdk VAGRANT-VMWARE_DESC= Vagrant Image for VMWare VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} +emulator-portinstall: +.if ${TARGET_ARCH} != ${MACHINE_ARCH} +.if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) +.if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static) +.if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile) + env - PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean +.else +.if !exists(/usr/local/sbin/pkg-static) + env ASSUME_ALWAYS_YES=yes pkg bootstrap -y +.endif + env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-user-static +.endif +.endif + +QEMUSTATIC=/usr/local/bin/qemu-${TARGET_ARCH}-static +.endif +.endif + .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE} CLOUDTARGETS+= cw-${_CW:tl} @@ -53,9 +71,10 @@ ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf . endif -cw-${_CW:tl}: +cw-${_CW:tl}: emulator-portinstall mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ + QEMUSTATIC=${QEMUSTATIC} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ Modified: stable/11/release/tools/ec2.conf ============================================================================== --- stable/11/release/tools/ec2.conf Wed Apr 17 07:47:03 2019 (r346308) +++ stable/11/release/tools/ec2.conf Wed Apr 17 12:34:37 2019 (r346309) @@ -8,6 +8,14 @@ # package installation as specified via EC2 user-data. export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient" +# Include the amazon-ssm-agent package in amd64 images, since some users want +# to be able to use it on systems which are not connected to the Internet. +# (It is not enabled by default, however.) This package does not exist for +# aarch64, so we have to be selective about when we install it. +if [ "${TARGET_ARCH}" = "amd64" ]; then + export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent" +fi + # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" @@ -32,7 +40,7 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite Modified: stable/11/release/tools/vmimage.subr ============================================================================== --- stable/11/release/tools/vmimage.subr Wed Apr 17 07:47:03 2019 (r346308) +++ stable/11/release/tools/vmimage.subr Wed Apr 17 12:34:37 2019 (r346309) @@ -144,10 +144,15 @@ vm_install_base() { hostname="$(echo $(uname -o) | tr '[:upper:]' '[:lower:]')" echo "hostname=\"${hostname}\"" >> ${DESTDIR}/etc/rc.conf + if ! [ -z "${QEMUSTATIC}" ]; then + export EMULATOR=/qemu + cp ${QEMUSTATIC} ${DESTDIR}/${EMULATOR} + fi + mkdir -p ${DESTDIR}/dev mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} /usr/bin/newaliases - chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart + chroot ${DESTDIR} ${EMULATOR} /usr/bin/newaliases + chroot ${DESTDIR} ${EMULATOR} /bin/sh /etc/rc.d/ldconfig forcestart umount_loop ${DESTDIR}/dev cp /etc/resolv.conf ${DESTDIR}/etc/resolv.conf @@ -184,9 +189,9 @@ vm_extra_install_packages() { fi mkdir -p ${DESTDIR}/dev mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg bootstrap -y - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} umount_loop ${DESTDIR}/dev @@ -206,13 +211,16 @@ vm_extra_pre_umount() { # Note: When overriding this function, removing resolv.conf in the # disk image must be included. + if ! [ -z "${QEMUSTATIC}" ]; then + rm -f ${DESTDIR}/${EMULATOR} + fi rm -f ${DESTDIR}/etc/resolv.conf return 0 } vm_extra_pkg_rmcache() { if [ -e ${DESTDIR}/usr/local/sbin/pkg ]; then - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/local/sbin/pkg clean -y -a fi From owner-svn-src-all@freebsd.org Wed Apr 17 14:12:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13C02156D207; Wed, 17 Apr 2019 14:12:12 +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 AF41881079; Wed, 17 Apr 2019 14:12:11 +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 89F49840D; Wed, 17 Apr 2019 14:12:11 +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 x3HECBYK094896; Wed, 17 Apr 2019 14:12:11 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HECBg7094895; Wed, 17 Apr 2019 14:12:11 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201904171412.x3HECBg7094895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 17 Apr 2019 14:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346310 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 346310 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF41881079 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 14:12:12 -0000 Author: pfg Date: Wed Apr 17 14:12:11 2019 New Revision: 346310 URL: https://svnweb.freebsd.org/changeset/base/346310 Log: Add myself to ports committers. Approved by: pfg (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Apr 17 12:34:37 2019 (r346309) +++ head/share/misc/committers-ports.dot Wed Apr 17 14:12:11 2019 (r346310) @@ -213,6 +213,7 @@ pat [label="Patrick Li\npat@FreeBSD.org\n2001/11/14"] pav [label="Pav Lucistnik\npav@FreeBSD.org\n2003/11/12"] pawel [label="Pawel Pekala\npawel@FreeBSD.org\n2011/03/11"] pclin [label="Po-Chien Lin\npclin@FreeBSD.org\n2013/02/11"] +pfg [label="Pedro Giffuni\npfg@FreeBSD.org\n2019/04/14"] pgj [label="Gabor Pali\npgj@FreeBSD.org\n2009/04/12"] pgollucci [label="Philip M. Gollucci\npgollucci@FreeBSD.org\n2008/07/21"] philip [label="Philip Paeps\nphilip@FreeBSD.org\n2005/10/19"] @@ -727,6 +728,7 @@ tcberner -> pkubaj thierry -> jadawin thierry -> riggs +thierry -> pfg timur -> kbowling From owner-svn-src-all@freebsd.org Wed Apr 17 14:20:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FF6F156D72E; Wed, 17 Apr 2019 14:20:56 +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 DB0E1815B9; Wed, 17 Apr 2019 14:20:55 +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 B6AD88468; Wed, 17 Apr 2019 14:20:55 +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 x3HEKtlx096422; Wed, 17 Apr 2019 14:20:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HEKtd0096421; Wed, 17 Apr 2019 14:20:55 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201904171420.x3HEKtd0096421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 17 Apr 2019 14:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346311 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 346311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DB0E1815B9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 14:20:56 -0000 Author: pfg Date: Wed Apr 17 14:20:55 2019 New Revision: 346311 URL: https://svnweb.freebsd.org/changeset/base/346311 Log: Add orphan mentee. Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Apr 17 14:12:11 2019 (r346310) +++ head/share/misc/committers-src.dot Wed Apr 17 14:20:55 2019 (r346311) @@ -743,6 +743,7 @@ obrien -> gshapiro obrien -> kan obrien -> sam +pfg -> pstef pfg -> fsu peter -> asmodai From owner-svn-src-all@freebsd.org Wed Apr 17 14:24:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5E95156D88E; Wed, 17 Apr 2019 14:24:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87DE881B71; Wed, 17 Apr 2019 14:24:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.5] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id ED2EA1DBA6; Wed, 17 Apr 2019 14:24:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r346310 - head/share/misc From: Pedro Giffuni To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201904171412.x3HECBg7094895@repo.freebsd.org> Organization: FreeBSD Message-ID: <196fba6c-a9b6-6c99-1774-9cac36fd8bef@FreeBSD.org> Date: Wed, 17 Apr 2019 09:24:53 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201904171412.x3HECBg7094895@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 87DE881B71 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 14:24:57 -0000 On 2019-04-17 09:12, Pedro F. Giffuni wrote: > Author: pfg > Date: Wed Apr 17 14:12:11 2019 > New Revision: 346310 > URL: https://svnweb.freebsd.org/changeset/base/346310 > > Log: > Add myself to ports committers. > > Approved by: pfg (mentor) Oops:  I meant thierry (mentor) yikes! Pedro. From owner-svn-src-all@freebsd.org Wed Apr 17 15:27:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22C90156F8E9; Wed, 17 Apr 2019 15:27:12 +0000 (UTC) (envelope-from ian@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 B5CC184666; Wed, 17 Apr 2019 15:27:11 +0000 (UTC) (envelope-from ian@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 A6715901E; Wed, 17 Apr 2019 15:27:11 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HFRBkk033627; Wed, 17 Apr 2019 15:27:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HFRBHD033626; Wed, 17 Apr 2019 15:27:11 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201904171527.x3HFRBHD033626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 17 Apr 2019 15:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346312 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 346312 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B5CC184666 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 15:27:12 -0000 Author: ian Date: Wed Apr 17 15:27:11 2019 New Revision: 346312 URL: https://svnweb.freebsd.org/changeset/base/346312 Log: Only set up the interrupts that will actually be used in arm generic_timer. The code previously set up interrupt handlers for all the interrupt resources available, including for timers that are not in use. That could lead to interrupt storms. For example, if boot firmware enabled the virtual timer but the kernel is using the physical timer, it could get flooded with interrupts on the virtual timer which it cannot shut off. By only setting up an interrupt handler for the hardware that will actually be used, any interrupts from other timer units will remain masked in the interrupt controller. Differential Revision: https://reviews.freebsd.org/D19871 Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Wed Apr 17 14:20:55 2019 (r346311) +++ head/sys/arm/arm/generic_timer.c Wed Apr 17 15:27:11 2019 (r346312) @@ -393,7 +393,7 @@ arm_tmr_attach(device_t dev) pcell_t clock; #endif int error; - int i; + int i, first_timer, last_timer; sc = device_get_softc(dev); if (arm_tmr_sc) @@ -433,17 +433,25 @@ arm_tmr_attach(device_t dev) return (ENXIO); } -#ifdef __arm__ - sc->physical = true; -#else /* __aarch64__ */ - /* If we do not have a virtual timer use the physical. */ - sc->physical = (sc->res[2] == NULL) ? true : false; +#ifdef __aarch64__ + /* Use the virtual timer if we have one. */ + if (sc->res[2] != NULL) { + sc->physical = false; + first_timer = 2; + last_timer = 2; + } else #endif + /* Otherwise set up the secure and non-secure physical timers. */ + { + sc->physical = true; + first_timer = 0; + last_timer = 1; + } arm_tmr_sc = sc; /* Setup secure, non-secure and virtual IRQs handler */ - for (i = 0; i < 3; i++) { + for (i = first_timer; i <= last_timer; i++) { /* If we do not have the interrupt, skip it. */ if (sc->res[i] == NULL) continue; From owner-svn-src-all@freebsd.org Wed Apr 17 15:48:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 338ED1570251; Wed, 17 Apr 2019 15:48:34 +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 C6060852F8; Wed, 17 Apr 2019 15:48:33 +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 984CE93BD; Wed, 17 Apr 2019 15:48:33 +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 x3HFmXZm043821; Wed, 17 Apr 2019 15:48:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HFmXHL043820; Wed, 17 Apr 2019 15:48:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171548.x3HFmXHL043820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 15:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346313 - head/lib/libcasper/services/cap_fileargs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libcasper/services/cap_fileargs X-SVN-Commit-Revision: 346313 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C6060852F8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 15:48:34 -0000 Author: emaste Date: Wed Apr 17 15:48:33 2019 New Revision: 346313 URL: https://svnweb.freebsd.org/changeset/base/346313 Log: cap_fileargs.3: correct 'filerags' typo Submitted by: Bora Özarslan" MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Wed Apr 17 15:27:11 2019 (r346312) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Wed Apr 17 15:48:33 2019 (r346313) @@ -120,7 +120,7 @@ For details see The .Fa fileargs_free close connection to the -.Nm system.filerags +.Nm system.fileargs service and free are structures. The function handle .Dv NULL @@ -139,7 +139,7 @@ expect that all arguments are fetched from the structure. .Sh LIMITS This section describe which values and types should be used to pass arguments to the -.Fa system.filerags +.Fa system.fileargs through the .Fn fileargs_ininv and @@ -181,7 +181,7 @@ Any number of where the name of the element is name of the file which can be opened. .Sh EXAMPLES The following example first parse some options and then create the -.Nm system.filerags +.Nm system.fileargs service with remaining arguments. .Bd -literal int ch, fd, i; From owner-svn-src-all@freebsd.org Wed Apr 17 15:52:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E15615704D9 for ; Wed, 17 Apr 2019 15:52:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B7A885705 for ; Wed, 17 Apr 2019 15:52:37 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1555516355; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=aCP53Qgh/giSIkHqAcqNUdo4JNHZZytTuzIu60Y85pq/TPsDjvcQQKt5KjvAgE5WNTr83pGhf6uqI 3mHNY6xqjrDCj72NFlKz7+X6dgvN/aYpg2pCbrA0FSFn8qcLpaN4izDpmLZVywulumKlzhy1QRyWzM 0tWZZjxPPPt/rdbN6ZvM11VlVcBEwWmW6cqJeaek94TzQ7/ySvCfPVIlz2CO92pA1c43EaPVCPFrUm T1DSMFwHxZkpriv0HBnSeKz+97yjGmi04wQbhQC2faIv3ms1WcAFJQ/CdpGrm+/wRqZU83yX0WjbnW 5i6xHBCUyqYloqQ0vlc2t89Bp/nl0Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=e7EdNozgG2arNfOnQbdc0e1ECcjHv54+1OZaKkc4OOM=; b=mXxx2C4nv80cwjW3DTlfl5XXAbAPs4QImcluk6TirSfJOjZlvpWo6lCK92jujKm9cCj+g/IW9s1KI s4pc/6gOo9PoWYyHVu01yKz9J2mcVdRvp5kampDdeiYccX9iJXlITF35U3s/lKmLOOtQyW5cJ1BRlW psxj+o41gO7W5UDdM4hZRRlGxBgYNyJ+APuJxPbagLvzDC9JyhiD+J+w6f9szG8rn/wIElfVJsnmZS Nm1GZCcsL8CBowqkN2aXnhJyJGDgDwJEu/bG5b+qXhtLiS6H6ZH7ACRLx3mrlCHdRXYM7OwOnu2mvp f2iXQuYxi4zLGXh6iNI5arFoQ53VyAA== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=e7EdNozgG2arNfOnQbdc0e1ECcjHv54+1OZaKkc4OOM=; b=VwA9lxsYJX7O3FRioyP/UqbV7cnLtlesVrGAkRnXxm6gTe37BRrpFTlWn7EkplRlwMza94TyApOTY LypnSpILK8RhKHMcbj786mk4k9h93A0SStIl0USvD99T1XuBiLBwryjuciVz28LoG8HAayjzqEEIl7 xvrzloWtja8xXU87fJ6nzPQ07eF+E1UtipbH2BVdAtQw+fnAOp06uXCjRPp6C7Ygpidx2f+p+3VMF4 UTwKC9pK/6OSWAikRJUuR6ze6H2MLlqKF7nRppORJHx4v2dXu76f3Geo957En58h9i3XQYJ6sPlkX3 8QzDUwn5uCtSlCQzIzR5lyCTCiRaI/g== X-MHO-RoutePath: aGlwcGll X-MHO-User: cf587f98-6128-11e9-919f-112c64a8cf29 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id cf587f98-6128-11e9-919f-112c64a8cf29; Wed, 17 Apr 2019 15:52:33 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3HFqVOa046893; Wed, 17 Apr 2019 09:52:31 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r346295 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/mv arm/nvidia/tegra124 a... From: Ian Lepore To: Andrew Turner , Emmanuel Vadot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 17 Apr 2019 09:52:31 -0600 In-Reply-To: References: <201904162004.x3GK4N7u019636@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6B7A885705 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.990,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 15:52:38 -0000 On Wed, 2019-04-17 at 11:23 +0200, Andrew Turner wrote: > > On 16 Apr 2019, at 22:04, Emmanuel Vadot wrote: > > > > Author: manu > > Date: Tue Apr 16 20:04:22 2019 > > New Revision: 346295 > > URL: https://svnweb.freebsd.org/changeset/base/346295 > > > > Log: > > arm: Add kern_clocksource.c directly in files.arm > > > > This files is needed and included in all our config so move it to > > a common > > location. > > > > MFC after: 2 weeks > > ... > > Modified: head/sys/conf/files.arm > > =================================================================== > > =========== > > --- head/sys/conf/files.arm Tue Apr 16 19:46:02 2019 (r346294) > > +++ head/sys/conf/files.arm Tue Apr 16 20:04:22 2019 (r346295) > > @@ -11,6 +11,9 @@ cloudabi32_vdso_blob.o optional com > > pat_cloudabi32 \ > > no-implicit-rule \ > > clean "cloudabi32_vdso_blob.o" > > # > > + > > +kern/kern_clocksource.c standard > > Could this be moved from the various files.* to files? It seems we > define it as standard on all architectures. > > I thought mips still had some variants that didn't implement event timers. That's why this stuff was ever in arch-specific files, arm and mips had some flavors without ET support. If we no longer have any platforms that need to run without event timers, there is some more extensive cleanup that could be done beyond just moving this entry to sys/conf/files (and I'd be up for doing that work, if I can find time). -- Ian From owner-svn-src-all@freebsd.org Wed Apr 17 16:00:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E72ED157076A; Wed, 17 Apr 2019 16:00:34 +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 8845285ABD; Wed, 17 Apr 2019 16:00:34 +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 63AF49571; Wed, 17 Apr 2019 16:00:34 +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 x3HG0Y75049410; Wed, 17 Apr 2019 16:00:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HG0Ych049409; Wed, 17 Apr 2019 16:00:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171600.x3HG0Ych049409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 16:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346314 - head/lib/libcasper/services/cap_fileargs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libcasper/services/cap_fileargs X-SVN-Commit-Revision: 346314 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8845285ABD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:00:35 -0000 Author: emaste Date: Wed Apr 17 16:00:33 2019 New Revision: 346314 URL: https://svnweb.freebsd.org/changeset/base/346314 Log: cap_fileargs.3: typo and markup corrections Submitted by: Bora Özarslan" MFC after: 1 week MFC with: r346313 Sponsored by: The FreeBSD Foundation Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Wed Apr 17 15:48:33 2019 (r346313) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Wed Apr 17 16:00:33 2019 (r346314) @@ -105,9 +105,9 @@ is equivalent to except that the connection to the Casper needs to be provided. .Pp The functions -.Fn fileargs_ininv +.Fn fileargs_initnv and -.Fn fileargs_cininv +.Fn fileargs_cinitnv are respectively equivalent to .Fn fileargs_init and @@ -141,9 +141,9 @@ structure. This section describe which values and types should be used to pass arguments to the .Fa system.fileargs through the -.Fn fileargs_ininv +.Fn fileargs_initnv and -.Fn fileargs_cinit +.Fn fileargs_cinitnv functions. The .Xr nvlist 9 @@ -225,8 +225,8 @@ fileargs_free(fa); .Xr open 2 , .Xr cap_rights_init 3 , .Xr err 3 , -.Xr fopen 3, -.Xr getopt 3, +.Xr fopen 3 , +.Xr getopt 3 , .Xr capsicum 4 , .Xr nv 9 .Sh BUGS From owner-svn-src-all@freebsd.org Wed Apr 17 16:01:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C14C415707F0; Wed, 17 Apr 2019 16:01:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65B5285CF7; Wed, 17 Apr 2019 16:01:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id B8A231E59C; Wed, 17 Apr 2019 16:01:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: cem@freebsd.org Cc: src-committers , svn-src-all , svn-src-head References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> <5d790a56-1498-094e-6bb4-48345a231e55@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <383a21de-9a7a-2d06-1673-001e84af67f9@FreeBSD.org> Date: Wed, 17 Apr 2019 09:01:42 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 65B5285CF7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:01:47 -0000 On 4/16/19 4:43 PM, Conrad Meyer wrote: > On Tue, Apr 16, 2019 at 4:28 PM John Baldwin wrote: >> Still, what I would suggest is to have the existing arc4random() use WITNESS_WARN. >> We could provide an alternative API that is non-blocking and returns EWOULDBLOCK. > > I think the alternative EWOULDBLOCK proposal is worse than > WITNESS_WARN. But I highlighted some problems with WITNESS_WARN in my > earlier email; how would you resolve them? > >> Code that trips over the warning would have to be changed to use the non-blocking >> API and then deal with EWOULDBLOCK. > > Or it could just check that the random device is seeded, prior to > using arc4random? You're missing the point which is that you've added potential blocking in a lot of places by changing the semantics of arc4random. Unless you're intending to hand-audit all of them (as well as future uses), I think having the existing API be "safe" (and blocking) but use WITNESS_WARN is a way to catch existing and future locking problems. The EWOULDBLOCK API is something a developer would choose and it means they would be aware of the constraint and need to deal with it, either by handling EWOULDBLOCK in some way, or deferring use until seeded, etc. >> One way of dealing with that would be to >> check the is_random_seeded() flag earlier in the function, subsystem, whatever >> and then the code could assert that the non-blocking API never failed. > > That's more or less the status quo with no-error arc4random, no? Except that we don't know which existing or future uses of arc4random need this unless you manually audit all of them (which doesn't help future uses). -- John Baldwin From owner-svn-src-all@freebsd.org Wed Apr 17 16:02:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B0F815709EC; Wed, 17 Apr 2019 16:02:59 +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 AA73386007; Wed, 17 Apr 2019 16:02:58 +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 8029E970C; Wed, 17 Apr 2019 16:02:58 +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 x3HG2wUK054378; Wed, 17 Apr 2019 16:02:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HG2wQq054372; Wed, 17 Apr 2019 16:02:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171602.x3HG2wQq054372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 16:02:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346315 - head/lib/libcasper/services/cap_fileargs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libcasper/services/cap_fileargs X-SVN-Commit-Revision: 346315 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AA73386007 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:02:59 -0000 Author: emaste Date: Wed Apr 17 16:02:57 2019 New Revision: 346315 URL: https://svnweb.freebsd.org/changeset/base/346315 Log: cap_fileargs: add fileargs_lstat service Add fileargs_lstat function to cap_fileargs casper service to be able to lstat files while in capability mode. It can only lstat files given in fileargs_init. Submitted by: Bora Özarslan Reviewed by: oshogbo, cem (partial) MFC after: 3 weeks Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19548 Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 head/lib/libcasper/services/cap_fileargs/cap_fileargs.c head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Wed Apr 17 16:00:33 2019 (r346314) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.3 Wed Apr 17 16:02:57 2019 (r346315) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2018 +.Dd April 17, 2019 .Dt CAP_FILEARGS 3 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nm fileargs_init , .Nm fileargs_initnv , .Nm fileargs_free , +.Nm fileargs_lstat , .Nm fileargs_open , .Nm fileargs_fopen .Nd "library for handling files in capability mode" @@ -43,9 +44,9 @@ .In libcasper.h .In casper/cap_fileargs.h .Ft "fileargs_t *" -.Fn fileargs_init "int argc" "char *argv[]" "int flags" "mode_t mode" "cap_rights_t *rightsp" +.Fn fileargs_init "int argc" "char *argv[]" "int flags" "mode_t mode" "cap_rights_t *rightsp" "int operations" .Ft "fileargs_t *" -.Fn fileargs_cinit "cap_channel_t *cas" "int argc" "char *argv[]" "int flags" "mode_t mode" "cap_rights_t *rightsp" +.Fn fileargs_cinit "cap_channel_t *cas" "int argc" "char *argv[]" "int flags" "mode_t mode" "cap_rights_t *rightsp" "int operations" .Ft "fileargs_t *" .Fn fileargs_cinitnv "cap_channel_t *cas" "nvlist_t *limits" .Ft "fileargs_t *" @@ -53,6 +54,8 @@ .Ft "void" .Fn fileargs_free "fileargs_t *fa" .Ft "int" +.Fn fileargs_lstat "fileargs_t *fa" "const char *path" "struct stat *sb" +.Ft "int" .Fn fileargs_open "fileargs_t *fa" "const char *name" .Ft "FILE *" .Fn fileargs_fopen "fileargs_t *fa" "const char *name" "const char *mode" @@ -97,6 +100,22 @@ The argument contains a list of the capability rights which file should be limited to. For more details of the capability rights see .Xr cap_rights_init 3 . +The +.Fa operations +argument limits the operations that are available using +.Nm system.fileargs . +.Fa operations +is a combination of: +.Bl -ohang -offset indent +.It FA_OPEN +Allow +.Fn fileargs_open +and +.Fn fileargs_fopen . +.It FA_LSTAT +Allow +.Fn fileargs_lstat . +.El .Pp The function .Fn fileargs_cinit @@ -126,6 +145,11 @@ The function handle .Dv NULL argument. .Pp +The function +.Fn fileargs_lstat +is equivalent to +.Xr lstat 2 . +.Pp The functions .Fn fileargs_open and @@ -165,6 +189,15 @@ must contain the The .Va mode argument tells which what mode file should be created. +.It operations (NV_TYPE_NUMBER) +The +.Va operations +limits the usable operations for +.Fa system.fileargs . +The possible values are explained as +.Va operations +argument with +.Fn fileargs_init . .El .Pp The @@ -201,7 +234,7 @@ argv += optind; /* Create capability to the system.fileargs service. */ fa = fileargs_init(argc, argv, O_RDONLY, 0, - cap_rights_init(&rights, CAP_READ)); + cap_rights_init(&rights, CAP_READ), FA_OPEN); if (fa == NULL) err(1, "unable to open system.fileargs service"); @@ -222,6 +255,7 @@ fileargs_free(fa); .Ed .Sh SEE ALSO .Xr cap_enter 2 , +.Xr lstat 2 , .Xr open 2 , .Xr cap_rights_init 3 , .Xr err 3 , Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Apr 17 16:00:33 2019 (r346314) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Apr 17 16:02:57 2019 (r346315) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -59,8 +60,37 @@ struct fileargs { }; static int -fileargs_get_cache(fileargs_t *fa, const char *name) +fileargs_get_lstat_cache(fileargs_t *fa, const char *name, struct stat *sb) { + const nvlist_t *nvl; + size_t size; + const void *buf; + + assert(fa != NULL); + assert(fa->fa_magic == FILEARGS_MAGIC); + assert(name != NULL); + + if (fa->fa_cache == NULL) + return (-1); + + nvl = dnvlist_get_nvlist(fa->fa_cache, name, NULL); + if (nvl == NULL) + return (-1); + + if (!nvlist_exists_binary(nvl, "stat")) { + return (-1); + } + + buf = nvlist_get_binary(nvl, "stat", &size); + assert(size == sizeof(*sb)); + memcpy(sb, buf, size); + + return (0); +} + +static int +fileargs_get_fd_cache(fileargs_t *fa, const char *name) +{ int fd; const nvlist_t *nvl; nvlist_t *tnvl; @@ -80,6 +110,12 @@ fileargs_get_cache(fileargs_t *fa, const char *name) return (-1); tnvl = nvlist_take_nvlist(fa->fa_cache, name); + + if (!nvlist_exists_descriptor(tnvl, "fd")) { + nvlist_destroy(tnvl); + return (-1); + } + fd = nvlist_take_descriptor(tnvl, "fd"); nvlist_destroy(tnvl); @@ -102,7 +138,7 @@ fileargs_set_cache(fileargs_t *fa, nvlist_t *nvl) } static nvlist_t* -fileargs_fetch(fileargs_t *fa, const char *name) +fileargs_fetch(fileargs_t *fa, const char *name, const char *cmd) { nvlist_t *nvl; int serrno; @@ -111,7 +147,7 @@ fileargs_fetch(fileargs_t *fa, const char *name) assert(name != NULL); nvl = nvlist_create(NV_FLAG_NO_UNIQUE); - nvlist_add_string(nvl, "cmd", "open"); + nvlist_add_string(nvl, "cmd", cmd); nvlist_add_string(nvl, "name", name); nvl = cap_xfer_nvlist(fa->fa_chann, nvl); @@ -130,7 +166,7 @@ fileargs_fetch(fileargs_t *fa, const char *name) static nvlist_t * fileargs_create_limit(int argc, const char * const *argv, int flags, - mode_t mode, cap_rights_t *rightsp) + mode_t mode, cap_rights_t *rightsp, int operations) { nvlist_t *limits; int i; @@ -140,6 +176,7 @@ fileargs_create_limit(int argc, const char * const *ar return (NULL); nvlist_add_number(limits, "flags", flags); + nvlist_add_number(limits, "operations", operations); if (rightsp != NULL) { nvlist_add_binary(limits, "cap_rights", rightsp, sizeof(*rightsp)); @@ -172,7 +209,7 @@ fileargs_create(cap_channel_t *chan, int fdflags) fileargs_t * fileargs_init(int argc, char *argv[], int flags, mode_t mode, - cap_rights_t *rightsp) + cap_rights_t *rightsp, int operations) { nvlist_t *limits; @@ -181,7 +218,7 @@ fileargs_init(int argc, char *argv[], int flags, mode_ } limits = fileargs_create_limit(argc, (const char * const *)argv, flags, - mode, rightsp); + mode, rightsp, operations); if (limits == NULL) return (NULL); @@ -190,7 +227,7 @@ fileargs_init(int argc, char *argv[], int flags, mode_ fileargs_t * fileargs_cinit(cap_channel_t *cas, int argc, char *argv[], int flags, - mode_t mode, cap_rights_t *rightsp) + mode_t mode, cap_rights_t *rightsp, int operations) { nvlist_t *limits; @@ -199,7 +236,7 @@ fileargs_cinit(cap_channel_t *cas, int argc, char *arg } limits = fileargs_create_limit(argc, (const char * const *)argv, flags, - mode, rightsp); + mode, rightsp, operations); if (limits == NULL) return (NULL); @@ -234,7 +271,7 @@ fileargs_cinitnv(cap_channel_t *cas, nvlist_t *limits) cap_channel_t *chann; fileargs_t *fa; int serrno, ret; - int flags; + int flags, operations; assert(cas != NULL); @@ -252,6 +289,7 @@ fileargs_cinitnv(cap_channel_t *cas, nvlist_t *limits) } flags = nvlist_get_number(limits, "flags"); + operations = nvlist_get_number(limits, "operations"); /* Limits are consumed no need to free them. */ ret = cap_limit_set(chann, limits); @@ -291,11 +329,11 @@ fileargs_open(fileargs_t *fa, const char *name) return (-1); } - fd = fileargs_get_cache(fa, name); + fd = fileargs_get_fd_cache(fa, name); if (fd != -1) return (fd); - nvl = fileargs_fetch(fa, name); + nvl = fileargs_fetch(fa, name, "open"); if (nvl == NULL) return (-1); @@ -322,6 +360,53 @@ fileargs_fopen(fileargs_t *fa, const char *name, const return (fdopen(fd, mode)); } +int +fileargs_lstat(fileargs_t *fa, const char *name, struct stat *sb) +{ + nvlist_t *nvl; + const void *buf; + size_t size; + char *cmd; + + assert(fa != NULL); + assert(fa->fa_magic == FILEARGS_MAGIC); + + if (name == NULL) { + errno = EINVAL; + return (-1); + } + + if (sb == NULL) { + errno = EFAULT; + return (-1); + } + + if (fa->fa_chann == NULL) { + errno = ENOTCAPABLE; + return (-1); + } + + if (fileargs_get_lstat_cache(fa, name, sb) != -1) + return (0); + + nvl = fileargs_fetch(fa, name, "lstat"); + if (nvl == NULL) + return (-1); + + buf = nvlist_get_binary(nvl, "stat", &size); + assert(size == sizeof(*sb)); + memcpy(sb, buf, size); + + cmd = nvlist_take_string(nvl, "cmd"); + if (strcmp(cmd, "cache") == 0) + fileargs_set_cache(fa, nvl); + else + nvlist_destroy(nvl); + free(cmd); + + return (0); +} + void fileargs_free(fileargs_t *fa) { @@ -348,6 +433,7 @@ static void *cacheposition; static bool allcached; static const cap_rights_t *caprightsp; static int capflags; +static int allowed_operations; static mode_t capmode; static int @@ -382,6 +468,7 @@ fileargs_add_cache(nvlist_t *nvlout, const nvlist_t *l void *cookie; nvlist_t *new; const char *fname; + struct stat sb; if ((capflags & O_CREAT) != 0) { allcached = true; @@ -409,14 +496,25 @@ fileargs_add_cache(nvlist_t *nvlout, const nvlist_t *l continue; } - fd = open_file(fname); - if (fd < 0) { - i--; - continue; + new = nvlist_create(NV_FLAG_NO_UNIQUE); + if ((allowed_operations & FA_OPEN) != 0) { + fd = open_file(fname); + if (fd < 0) { + i--; + nvlist_destroy(new); + continue; + } + nvlist_move_descriptor(new, "fd", fd); } + if ((allowed_operations & FA_LSTAT) != 0) { + if (lstat(fname, &sb) < 0) { + i--; + nvlist_destroy(new); + continue; + } + nvlist_add_binary(new, "stat", &sb, sizeof(sb)); + } - new = nvlist_create(NV_FLAG_NO_UNIQUE); - nvlist_move_descriptor(new, "fd", fd); nvlist_add_nvlist(nvlout, fname, new); } cacheposition = cookie; @@ -424,10 +522,13 @@ fileargs_add_cache(nvlist_t *nvlout, const nvlist_t *l } static bool -fileargs_allowed(const nvlist_t *limits, const nvlist_t *request) +fileargs_allowed(const nvlist_t *limits, const nvlist_t *request, int operation) { const char *name; + if ((allowed_operations & operation) == 0) + return (false); + name = dnvlist_get_string(request, "name", NULL); if (name == NULL) return (false); @@ -450,6 +551,7 @@ fileargs_limit(const nvlist_t *oldlimits, const nvlist return (ENOTCAPABLE); capflags = (int)dnvlist_get_number(newlimits, "flags", 0); + allowed_operations = (int)dnvlist_get_number(newlimits, "operations", 0); if ((capflags & O_CREAT) != 0) capmode = (mode_t)nvlist_get_number(newlimits, "mode"); else @@ -461,6 +563,37 @@ fileargs_limit(const nvlist_t *oldlimits, const nvlist } static int +fileargs_command_lstat(const nvlist_t *limits, nvlist_t *nvlin, + nvlist_t *nvlout) +{ + int stat; + const char *name; + struct stat sb; + + if (limits == NULL) + return (ENOTCAPABLE); + + if (!fileargs_allowed(limits, nvlin, FA_LSTAT)) + return (ENOTCAPABLE); + + name = nvlist_get_string(nvlin, "name"); + + stat = lstat(name, &sb); + if (stat < 0) + return (errno); + + if (!allcached && (lastname == NULL || + strcmp(name, lastname) == 0)) { + nvlist_add_string(nvlout, "cmd", "cache"); + fileargs_add_cache(nvlout, limits, name); + } else { + nvlist_add_string(nvlout, "cmd", "lstat"); + } + nvlist_add_binary(nvlout, "stat", &sb, sizeof(sb)); + return (0); +} + +static int fileargs_command_open(const nvlist_t *limits, nvlist_t *nvlin, nvlist_t *nvlout) { @@ -470,7 +603,7 @@ fileargs_command_open(const nvlist_t *limits, nvlist_t if (limits == NULL) return (ENOTCAPABLE); - if (!fileargs_allowed(limits, nvlin)) + if (!fileargs_allowed(limits, nvlin, FA_OPEN)) return (ENOTCAPABLE); name = nvlist_get_string(nvlin, "name"); @@ -497,6 +630,9 @@ fileargs_command(const char *cmd, const nvlist_t *limi if (strcmp(cmd, "open") == 0) return (fileargs_command_open(limits, nvlin, nvlout)); + + if (strcmp(cmd, "lstat") == 0) + return (fileargs_command_lstat(limits, nvlin, nvlout)); return (EINVAL); } Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.h ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Apr 17 16:00:33 2019 (r346314) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Apr 17 16:02:57 2019 (r346315) @@ -36,16 +36,21 @@ #include +#define FA_OPEN 1 +#define FA_LSTAT 2 + #ifdef WITH_CASPER struct fileargs; typedef struct fileargs fileargs_t; +struct stat; fileargs_t *fileargs_init(int argc, char *argv[], int flags, mode_t mode, - cap_rights_t *rightsp); + cap_rights_t *rightsp, int operations); fileargs_t *fileargs_cinit(cap_channel_t *cas, int argc, char *argv[], - int flags, mode_t mode, cap_rights_t *rightsp); + int flags, mode_t mode, cap_rights_t *rightsp, int operations); fileargs_t *fileargs_initnv(nvlist_t *limits); fileargs_t *fileargs_cinitnv(cap_channel_t *cas, nvlist_t *limits); +int fileargs_lstat(fileargs_t *fa, const char *name, struct stat *sb); int fileargs_open(fileargs_t *fa, const char *name); void fileargs_free(fileargs_t *fa); FILE *fileargs_fopen(fileargs_t *fa, const char *name, const char *mode); @@ -57,7 +62,7 @@ typedef struct fileargs { static inline fileargs_t * fileargs_init(int argc __unused, char *argv[] __unused, int flags, mode_t mode, - cap_rights_t *rightsp __unused) { + cap_rights_t *rightsp __unused, int operations __unused) { fileargs_t *fa; fa = malloc(sizeof(*fa)); @@ -71,10 +76,10 @@ fileargs_init(int argc __unused, char *argv[] __unused static inline fileargs_t * fileargs_cinit(cap_channel_t *cas __unused, int argc, char *argv[], int flags, - mode_t mode, cap_rights_t *rightsp) + mode_t mode, cap_rights_t *rightsp, int operations) { - return (fileargs_init(argc, argv, flags, mode, rightsp)); + return (fileargs_init(argc, argv, flags, mode, rightsp, operations)); } static inline fileargs_t * @@ -85,7 +90,8 @@ fileargs_initnv(nvlist_t *limits) fa = fileargs_init(0, NULL, nvlist_get_number(limits, "flags"), dnvlist_get_number(limits, "mode", 0), - NULL); + NULL, + nvlist_get_number(limits, "operations")); nvlist_destroy(limits); return (fa); @@ -98,6 +104,8 @@ fileargs_cinitnv(cap_channel_t *cas __unused, nvlist_t return (fileargs_initnv(limits)); } +#define fileargs_lstat(fa, name, sb) \ + lstat(name, sb) #define fileargs_open(fa, name) \ open(name, fa->fa_flags, fa->fa_mode) #define fileargs_fopen(fa, name, mode) \ From owner-svn-src-all@freebsd.org Wed Apr 17 16:05:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 033F41570B62; Wed, 17 Apr 2019 16:05:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A25686276; Wed, 17 Apr 2019 16:05:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 009571E6B0; Wed, 17 Apr 2019 16:05:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: cem@freebsd.org Cc: src-committers , svn-src-all , svn-src-head References: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> <4d6b8a14-b053-9ed1-14b2-bbc359ac9413@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <48b25255-3d66-69fc-658b-6176ebaf4640@FreeBSD.org> Date: Wed, 17 Apr 2019 09:05:52 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 9A25686276 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:05:55 -0000 On 4/16/19 4:48 PM, Conrad Meyer wrote: > On Tue, Apr 16, 2019 at 4:31 PM John Baldwin wrote: >> bhyveload is effectively the loader in this case. It runs the normal loader >> scripts and logic and so would load the guests's /boot/entropy and pass it >> to the guest kernel as metadata just like the regular loader. > > Right, except it doesn't seem to do things like nuke /boot/nextboot.conf :-(. It just needs a disk write method I think for that to work, but I'm not sure that's currently in the userboot interface. >> In addition, bhyve also supports virtio-rng which is another way to provide >> entropy to guest OS's. That's why in my reply I focused on qemu for mips >> (or riscv) as for x86 hypervisors there are existing, somewhat-standarized >> solutions for the hypervisor to provide entropy to the guest. > > Perhaps cryptographically random stack-protector cookies are simply > inappropriate for MIPS or RISCV. Do we have any other examples of > kernel random consumers blocking after that immediate hiccup is > overcome? There may be MIPS and RISCV designs that do have suitable entropy available (especially I would expect future RISCV designs to have them), so I think blacklisting stack protector wholesale on those architectures is overboard. I think some sort of off-by-default knob (even a compile option) is fine for people who need fast and loose vs safe as you already agreed to earlier. Also, for development testing we still want coverage of using stack cookies on MIPS and RISCV even if the simulator environment gives not-very-strong cookie values. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Apr 17 16:18:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C2B115710E9; Wed, 17 Apr 2019 16:18:16 +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 BDE2286900; Wed, 17 Apr 2019 16:18:15 +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 9872B98E8; Wed, 17 Apr 2019 16:18:15 +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 x3HGIF5w059580; Wed, 17 Apr 2019 16:18:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HGIERC059575; Wed, 17 Apr 2019 16:18:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171618.x3HGIERC059575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 16:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc X-SVN-Commit-Revision: 346316 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BDE2286900 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:18:16 -0000 Author: emaste Date: Wed Apr 17 16:18:14 2019 New Revision: 346316 URL: https://svnweb.freebsd.org/changeset/base/346316 Log: cap_fileargs: chase r346315, update fileargs_init in consumers Reported by: ci.freebsd.org (8 times so far) MFC after: 3 weeks MFC with: r346315 Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/strings/strings.c head/sbin/savecore/savecore.c head/usr.bin/brandelf/brandelf.c head/usr.bin/head/head.c head/usr.bin/wc/wc.c Modified: head/contrib/elftoolchain/strings/strings.c ============================================================================== --- head/contrib/elftoolchain/strings/strings.c Wed Apr 17 16:02:57 2019 (r346315) +++ head/contrib/elftoolchain/strings/strings.c Wed Apr 17 16:18:14 2019 (r346316) @@ -195,7 +195,7 @@ main(int argc, char **argv) argv += optind; cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL); - fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights); + fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); if (fa == NULL) err(1, "Unable to initialize casper fileargs"); Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Wed Apr 17 16:02:57 2019 (r346315) +++ head/sbin/savecore/savecore.c Wed Apr 17 16:18:14 2019 (r346316) @@ -1030,7 +1030,7 @@ init_caps(int argc, char **argv) */ (void)cap_rights_init(&rights, CAP_PREAD, CAP_WRITE, CAP_IOCTL); capfa = fileargs_init(argc, argv, checkfor || keep ? O_RDONLY : O_RDWR, - 0, &rights); + 0, &rights, FA_OPEN); if (capfa == NULL) { logmsg(LOG_ERR, "fileargs_init(): %m"); exit(1); Modified: head/usr.bin/brandelf/brandelf.c ============================================================================== --- head/usr.bin/brandelf/brandelf.c Wed Apr 17 16:02:57 2019 (r346315) +++ head/usr.bin/brandelf/brandelf.c Wed Apr 17 16:18:14 2019 (r346316) @@ -133,7 +133,7 @@ main(int argc, char **argv) if (flags == O_RDWR) cap_rights_set(&rights, CAP_WRITE); - fa = fileargs_init(argc, argv, flags, 0, &rights); + fa = fileargs_init(argc, argv, flags, 0, &rights, FA_OPEN); if (fa == NULL) errx(1, "unable to init casper"); Modified: head/usr.bin/head/head.c ============================================================================== --- head/usr.bin/head/head.c Wed Apr 17 16:02:57 2019 (r346315) +++ head/usr.bin/head/head.c Wed Apr 17 16:18:14 2019 (r346316) @@ -115,7 +115,7 @@ main(int argc, char *argv[]) argv += optind; fa = fileargs_init(argc, argv, O_RDONLY, 0, - cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL)); + cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL), FA_OPEN); if (fa == NULL) errx(1, "unable to init casper"); Modified: head/usr.bin/wc/wc.c ============================================================================== --- head/usr.bin/wc/wc.c Wed Apr 17 16:02:57 2019 (r346315) +++ head/usr.bin/wc/wc.c Wed Apr 17 16:18:14 2019 (r346316) @@ -133,7 +133,7 @@ main(int argc, char *argv[]) (void)signal(SIGINFO, siginfo_handler); fa = fileargs_init(argc, argv, O_RDONLY, 0, - cap_rights_init(&rights, CAP_READ, CAP_FSTAT)); + cap_rights_init(&rights, CAP_READ, CAP_FSTAT), FA_OPEN); if (fa == NULL) { xo_warn("Unable to init casper"); exit(1); From owner-svn-src-all@freebsd.org Wed Apr 17 16:27:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F2F615717F1; Wed, 17 Apr 2019 16:27:44 +0000 (UTC) (envelope-from ian@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 B26FB87060; Wed, 17 Apr 2019 16:27:43 +0000 (UTC) (envelope-from ian@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 8F3EC9A98; Wed, 17 Apr 2019 16:27:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HGRhQd064939; Wed, 17 Apr 2019 16:27:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HGRhwk064938; Wed, 17 Apr 2019 16:27:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201904171627.x3HGRhwk064938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 17 Apr 2019 16:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346317 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 346317 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B26FB87060 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:27:44 -0000 Author: ian Date: Wed Apr 17 16:27:43 2019 New Revision: 346317 URL: https://svnweb.freebsd.org/changeset/base/346317 Log: Allow this test script to be run from within src/tools/boot dir, and create the temporary image in $TMPDIR. Allow the script to be run from the src/tools/boot directory by using make -V SRCTOP to find the top of the tree, because this script is handy for quick smoke-testing of loader changes, as well as being useful in CI testing. Also, use a temp directory in $TMPDIR to assemble the boot image, and write the boot log file to $TMPDIR. Arrange to have the temporary image clean itself up, but leave the log file in $TMPDIR for post-mortem analysis of failures when the script is run interactively. Differential Revision: https://reviews.freebsd.org/D19876 Modified: head/tools/boot/ci-qemu-test.sh Modified: head/tools/boot/ci-qemu-test.sh ============================================================================== --- head/tools/boot/ci-qemu-test.sh Wed Apr 17 16:18:14 2019 (r346316) +++ head/tools/boot/ci-qemu-test.sh Wed Apr 17 16:27:43 2019 (r346317) @@ -2,62 +2,105 @@ # Install loader, kernel, and enough of userland to boot in QEMU and echo # "Hello world." from init, as a very quick smoke test for CI. Uses QEMU's -# virtual FAT filesystem to avoid the need to create a disk image. +# virtual FAT filesystem to avoid the need to create a disk image. While +# designed for CI automated testing, this script can also be run by hand as +# a quick smoke-test. The rootgen.sh and related scripts generate much more +# extensive tests for many combinations of boot env (ufs, zfs, geli, etc). # # $FreeBSD$ set -e -# Root directory for minimal FreeBSD installation. -ROOTDIR=$(pwd)/fat-root +die() +{ + echo "$*" 1>&2 + exit 1 +} -# Create minimal directory structure. -rm -f $ROOTDIR/efi/boot/BOOTx64.EFI -for dir in dev bin efi/boot etc lib libexec sbin usr/libexec; do - mkdir -p $ROOTDIR/$dir -done +tempdir_cleanup() +{ + trap - EXIT SIGINT SIGHUP SIGTERM SIGQUIT + rm -rf ${ROOTDIR} +} -# Install kernel, loader and minimal userland. -make -DNO_ROOT DESTDIR=$ROOTDIR \ - MODULES_OVERRIDE= \ - WITHOUT_DEBUG_FILES=yes \ - WITHOUT_KERNEL_SYMBOLS=yes \ - installkernel -for dir in stand \ - lib/libc lib/libedit lib/ncurses \ - libexec/rtld-elf \ - bin/sh sbin/init sbin/shutdown; do - make -DNO_ROOT DESTDIR=$ROOTDIR INSTALL="install -U" \ - WITHOUT_MAN= \ - WITHOUT_PROFILE= \ - WITHOUT_TESTS= \ - WITHOUT_TOOLCHAIN= \ - -C $dir install -done +tempdir_setup() +{ + # Create minimal directory structure and populate it. + # Caller must cd ${SRCTOP} before calling this function. -# Put loader in standard EFI location. -mv $ROOTDIR/boot/loader.efi $ROOTDIR/efi/boot/BOOTx64.EFI + for dir in dev bin efi/boot etc lib libexec sbin usr/lib usr/libexec; do + mkdir -p ${ROOTDIR}/${dir} + done -# Configuration files. -cat > $ROOTDIR/boot/loader.conf < ${ROOTDIR}/boot/loader.conf < $ROOTDIR/etc/rc < ${ROOTDIR}/etc/rc <&1 | tee boot.log -grep -q 'Hello world.' boot.log -echo OK + qemu-system-x86_64 -m 256M -bios ${OVMF} \ + -serial stdio -vga none -nographic -monitor none \ + -snapshot -hda fat:${ROOTDIR} 2>&1 | tee ${BOOTLOG} + +# Check whether we succesfully booted... +if grep -q 'Hello world.' ${BOOTLOG}; then + echo "OK" +else + die "Did not boot successfully, see ${BOOTLOG}" +fi From owner-svn-src-all@freebsd.org Wed Apr 17 16:31:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B48B1571AAF; Wed, 17 Apr 2019 16:31:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E14FB872BF; Wed, 17 Apr 2019 16:31:30 +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 BC5E19AE7; Wed, 17 Apr 2019 16:31:30 +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 x3HGVUek066701; Wed, 17 Apr 2019 16:31:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HGVUX1066700; Wed, 17 Apr 2019 16:31:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171631.x3HGVUX1066700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 16:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346318 - head/lib/libcasper/services/cap_fileargs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libcasper/services/cap_fileargs X-SVN-Commit-Revision: 346318 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E14FB872BF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:31:31 -0000 Author: emaste Date: Wed Apr 17 16:31:30 2019 New Revision: 346318 URL: https://svnweb.freebsd.org/changeset/base/346318 Log: cap_fileargs: fix GCC build, don't shadow 'stat' Reported by: ci.freebsd.org MFC after: 3 weeks MFC with: r346315 Sponsored by: The FreeBSD Foundation Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Apr 17 16:27:43 2019 (r346317) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Apr 17 16:31:30 2019 (r346318) @@ -566,7 +566,7 @@ static int fileargs_command_lstat(const nvlist_t *limits, nvlist_t *nvlin, nvlist_t *nvlout) { - int stat; + int error; const char *name; struct stat sb; @@ -578,7 +578,7 @@ fileargs_command_lstat(const nvlist_t *limits, nvlist_ name = nvlist_get_string(nvlin, "name"); - stat = lstat(name, &sb); + error = lstat(name, &sb); if (stat < 0) return (errno); From owner-svn-src-all@freebsd.org Wed Apr 17 16:42:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78E901571D2D; Wed, 17 Apr 2019 16:42:55 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 1A3F987A9B; Wed, 17 Apr 2019 16:42:55 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBC949E11; Wed, 17 Apr 2019 16:42:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HGgsof075254; Wed, 17 Apr 2019 16:42:54 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HGgslA075253; Wed, 17 Apr 2019 16:42:54 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201904171642.x3HGgslA075253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 17 Apr 2019 16:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346319 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 346319 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A3F987A9B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:42:55 -0000 Author: kp Date: Wed Apr 17 16:42:54 2019 New Revision: 346319 URL: https://svnweb.freebsd.org/changeset/base/346319 Log: pf: Fix panic on invalid DIOCRSETTFLAGS If during DIOCRSETTFLAGS pfrio_buffer is NULL copyin() will fault, which we're not allowed to do with a lock held. We must count the number of entries in the table and release the lock during copyin(). Only then can we re-acquire the lock. Note that this is safe, because pfr_set_tflags() will check if the table and entries exist. This was discovered by a local syzcaller instance. MFC after: 1 week Event: Aberdeen hackathon 2019 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Wed Apr 17 16:31:30 2019 (r346318) +++ head/sys/netpfil/pf/pf_ioctl.c Wed Apr 17 16:42:54 2019 (r346319) @@ -3103,24 +3103,24 @@ DIOCCHANGEADDR_error: break; } - PF_RULES_WLOCK(); + PF_RULES_RLOCK(); n = pfr_table_count(&io->pfrio_table, io->pfrio_flags); io->pfrio_size = min(io->pfrio_size, n); + PF_RULES_RUNLOCK(); totlen = io->pfrio_size * sizeof(struct pfr_table); pfrts = mallocarray(io->pfrio_size, sizeof(struct pfr_table), M_TEMP, M_NOWAIT); if (pfrts == NULL) { error = ENOMEM; - PF_RULES_WUNLOCK(); break; } error = copyin(io->pfrio_buffer, pfrts, totlen); if (error) { free(pfrts, M_TEMP); - PF_RULES_WUNLOCK(); break; } + PF_RULES_WLOCK(); error = pfr_set_tflags(pfrts, io->pfrio_size, io->pfrio_setflag, io->pfrio_clrflag, &io->pfrio_nchange, &io->pfrio_ndel, io->pfrio_flags | PFR_FLAG_USERIOCTL); From owner-svn-src-all@freebsd.org Wed Apr 17 16:43:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B6441571D72; Wed, 17 Apr 2019 16:43:32 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E20F87BFF; Wed, 17 Apr 2019 16:43:32 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 089AE12FCE; Wed, 17 Apr 2019 16:43:32 +0000 (UTC) Date: Wed, 17 Apr 2019 16:43:32 +0000 From: Alexey Dokuchaev To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346318 - head/lib/libcasper/services/cap_fileargs Message-ID: <20190417164331.GA14717@FreeBSD.org> References: <201904171631.x3HGVUX1066700@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201904171631.x3HGVUX1066700@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 2E20F87BFF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.932,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:43:32 -0000 On Wed, Apr 17, 2019 at 04:31:30PM +0000, Ed Maste wrote: > New Revision: 346318 > URL: https://svnweb.freebsd.org/changeset/base/346318 > > Log: > cap_fileargs: fix GCC build, don't shadow 'stat' > > @@ -566,7 +566,7 @@ static int > fileargs_command_lstat(const nvlist_t *limits, nvlist_t *nvlin, > nvlist_t *nvlout) > { > - int stat; > + int error; > const char *name; > struct stat sb; > > @@ -578,7 +578,7 @@ fileargs_command_lstat(const nvlist_t *limits, nvlist_ > > name = nvlist_get_string(nvlin, "name"); > > - stat = lstat(name, &sb); > + error = lstat(name, &sb); > if (stat < 0) > return (errno); Looks like "if (stat < 0)" is wrong now. ./danfe From owner-svn-src-all@freebsd.org Wed Apr 17 16:45:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13AC01571EB2; Wed, 17 Apr 2019 16:45:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 AE2C387E2B; Wed, 17 Apr 2019 16:45:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 842E99E12; Wed, 17 Apr 2019 16:45:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HGja7k075445; Wed, 17 Apr 2019 16:45:36 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HGjaYt075444; Wed, 17 Apr 2019 16:45:36 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201904171645.x3HGjaYt075444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 17 Apr 2019 16:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346320 - head/tests/sys/netpfil/pf/ioctl X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/netpfil/pf/ioctl X-SVN-Commit-Revision: 346320 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE2C387E2B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:45:37 -0000 Author: kp Date: Wed Apr 17 16:45:35 2019 New Revision: 346320 URL: https://svnweb.freebsd.org/changeset/base/346320 Log: pf tests: Try to provoke the panic with invalid DIOCRSETTFLAGS There was an issue with copyin() on DIOCRSETTFLAGS, which would panic if pfrio_buffer was NULL. Test for the issue fixed in r346319. MFC after: 1 week Event: Aberdeen hackathon 2019 Modified: head/tests/sys/netpfil/pf/ioctl/validation.c Modified: head/tests/sys/netpfil/pf/ioctl/validation.c ============================================================================== --- head/tests/sys/netpfil/pf/ioctl/validation.c Wed Apr 17 16:42:54 2019 (r346319) +++ head/tests/sys/netpfil/pf/ioctl/validation.c Wed Apr 17 16:45:35 2019 (r346320) @@ -305,6 +305,11 @@ ATF_TC_BODY(settflags, tc) io.pfrio_size = 1 << 28; if (ioctl(dev, DIOCRSETTFLAGS, &io) != 0) atf_tc_fail("Request with size 1 << 24 failed"); + + /* NULL buffer */ + io.pfrio_buffer = NULL; + if (ioctl(dev, DIOCRSETTFLAGS, &io) != -1) + atf_tc_fail("Request with NULL buffer succeeded"); } ATF_TC_CLEANUP(settflags, tc) From owner-svn-src-all@freebsd.org Wed Apr 17 16:45:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F2691571EEF; Wed, 17 Apr 2019 16:45:46 +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 0F2C987EED; Wed, 17 Apr 2019 16:45:46 +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 4FC099E13; Wed, 17 Apr 2019 16:45:43 +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 x3HGjh06075495; Wed, 17 Apr 2019 16:45:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HGjhV1075494; Wed, 17 Apr 2019 16:45:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171645.x3HGjhV1075494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 16:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346321 - head/lib/libcasper/services/cap_fileargs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libcasper/services/cap_fileargs X-SVN-Commit-Revision: 346321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F2C987EED X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:45:46 -0000 Author: emaste Date: Wed Apr 17 16:45:42 2019 New Revision: 346321 URL: https://svnweb.freebsd.org/changeset/base/346321 Log: cap_fileargs: fix test after r346318 Reported by: danfe, mjg MFC after: 3 weeks MFC with: r346315 Sponsored by: The FreeBSD Foundation Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Apr 17 16:45:35 2019 (r346320) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Apr 17 16:45:42 2019 (r346321) @@ -579,7 +579,7 @@ fileargs_command_lstat(const nvlist_t *limits, nvlist_ name = nvlist_get_string(nvlin, "name"); error = lstat(name, &sb); - if (stat < 0) + if (error < 0) return (errno); if (!allcached && (lastname == NULL || From owner-svn-src-all@freebsd.org Wed Apr 17 16:53:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA8C31572211; Wed, 17 Apr 2019 16:53:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8550F88425; Wed, 17 Apr 2019 16:53:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm1-x32c.google.com with SMTP id z6so5064948wmi.0; Wed, 17 Apr 2019 09:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4zVKHO9SQEXTLl1Gc+wirfNUm1cXSr2aEZzspW/TLkg=; b=pC3By7K4TeKLHH+gvbYNBdL4Z7iXoY45TU0wR/jbMaSbLBiemIPLUUiQi/S2QFUyhd mLVD8pjneHoPmYlffEDp1cmq2FLEBIS10f4vgvBOXF8TkXAfQeSY+Z1F3BpvVUQToHB5 KcOB1etUfNAsA+cPgASHouFzbNH63a8MgM4Nfj0/QHT8FP1Fx3yx0Q8pzTiQnO0EyNgj 37njgLfKkPvb+pJtqEZOD9eekaQiKP4Z2CCwx7fi/Sz3CLiaoIheVys2/v+hplMYEukP ZOPDLjeWymEnj8I2GRQUXOpkz+IECRxjLidiKDu+46MAIHUjBvWSbBVhxwaOCJ8qogsw +ZCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4zVKHO9SQEXTLl1Gc+wirfNUm1cXSr2aEZzspW/TLkg=; b=k2kxitOP3kmSOGAyXB036zYl5uDcnldLreY0G3McUrbWlxeCth4lO5asSI0esd1c12 1jTust4ObUD7EijU7LnwNETGg9TEiJmVkCWL+D4sYSOgwl49HdPV15OMAvdiVePwlP+2 0uD8HbssKlEaYI3xQUNQJsJ0qlcqykjIXgZN/mYCzN7gOlnkryDx+Q19Ivc7gScABErV jHw5zYxj+8p1R3afvUtLDQTd472gkmaFYhmj3xFWgT1o7+QmDjHQmwzPVk0aAxjjTXLA XJK/65E8W0EtEps+KK9N2ETyH6utEoUvRFzoE95rK3darzZXQQI6EsFQMSOSORdHv8A/ ndgg== X-Gm-Message-State: APjAAAVRqkaDyc0k5wz7alyl/sxeYOVa+UbBhZT8Eb2m9DFXWlbifrLV 2AqmxuM1narBPA/9sEeKwZfphoXgvqxYE9xdEVxOIA== X-Google-Smtp-Source: APXvYqwByrE577Wx9CNgVo8eWzcclfDWRaqxb/l17/8bHW9Y/85LlSUE8URHMrTQyN+vJYH+1Fi9yKuX2anlt8Qw/8s= X-Received: by 2002:a1c:1f08:: with SMTP id f8mr468636wmf.97.1555520003529; Wed, 17 Apr 2019 09:53:23 -0700 (PDT) MIME-Version: 1.0 References: <201904041632.x34GWR4Z006164@repo.freebsd.org> <20190415024246.GA36864@x-wing> In-Reply-To: <20190415024246.GA36864@x-wing> From: Adrian Chadd Date: Wed, 17 Apr 2019 09:53:11 -0700 Message-ID: Subject: Re: svn commit: r345875 - in head: contrib/elftoolchain/strings usr.bin/strings To: Mariusz Zaborski Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 8550F88425 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=pC3By7K4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2a00:1450:4864:20::32c as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-6.60 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.78)[-0.780,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.81)[ip: (-9.36), ipnet: 2a00:1450::/32(-2.38), asn: 15169(-2.22), country: US(-0.06)]; RCVD_IN_DNSWL_NONE(0.00)[c.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:53:27 -0000 not yet? I'm still debugging other issues; this just pissed off gcc. :) -a On Sun, 14 Apr 2019 at 19:42, Mariusz Zaborski wrote: > On Sun, Apr 14, 2019 at 08:19:22AM -0700, Adrian Chadd wrote: > > This exposed a fun bug - gcc mips 6.4.0 complains about an unused arg > (fa) > > in fileargs_fopen() in the strings change when you compile without casper > > support. I do that on mips. > > > > I have a local change that converts the #define to an inline function so > > the unused arg can be (void)'ed away. Mind if I commit it? > Sounds good to me. > Although you don't have an issue with others services? > > -- > Mariusz Zaborski > oshogbo//vx | http://oshogbo.vexillium.org > FreeBSD committer | https://freebsd.org > Software developer | http://wheelsystems.com > If it's not broken, let's fix it till it is!!1 > > > > > On Thu, 4 Apr 2019 at 09:32, Mariusz Zaborski > wrote: > > > > > Author: oshogbo > > > Date: Thu Apr 4 16:32:27 2019 > > > New Revision: 345875 > > > URL: https://svnweb.freebsd.org/changeset/base/345875 > > > > > > Log: > > > strings: capsicumize it > > > > > > Reviewed by: cem > > > Discussed with: emaste > > > Differential Revision: https://reviews.freebsd.org/D18038 > > > > > > Modified: > > > head/contrib/elftoolchain/strings/strings.c > > > head/usr.bin/strings/Makefile > > > > > > Modified: head/contrib/elftoolchain/strings/strings.c > > > > > > > ============================================================================== > > > --- head/contrib/elftoolchain/strings/strings.c Thu Apr 4 12:02:48 > 2019 > > > (r345874) > > > +++ head/contrib/elftoolchain/strings/strings.c Thu Apr 4 16:32:27 > 2019 > > > (r345875) > > > @@ -25,8 +25,10 @@ > > > */ > > > > > > #include > > > +#include > > > #include > > > > > > +#include > > > #include > > > #include > > > #include > > > @@ -44,6 +46,9 @@ > > > #include > > > #include > > > > > > +#include > > > +#include > > > + > > > #include "_elftc.h" > > > > > > ELFTC_VCSID("$Id: strings.c 3648 2018-11-22 23:26:43Z emaste $"); > > > @@ -85,7 +90,7 @@ static struct option strings_longopts[] = { > > > }; > > > > > > int getcharacter(FILE *, long *); > > > -int handle_file(const char *); > > > +int handle_file(fileargs_t *fa, const char *); > > > int handle_elf(const char *, FILE *); > > > int handle_binary(const char *, FILE *, size_t); > > > int find_strings(const char *, FILE *, off_t, off_t); > > > @@ -99,6 +104,8 @@ void usage(void); > > > int > > > main(int argc, char **argv) > > > { > > > + fileargs_t *fa; > > > + cap_rights_t rights; > > > int ch, rc; > > > > > > rc = 0; > > > @@ -187,27 +194,41 @@ main(int argc, char **argv) > > > argc -= optind; > > > argv += optind; > > > > > > + cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, > CAP_FCNTL); > > > + fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights); > > > + if (fa == NULL) > > > + err(1, "Unable to initialize casper fileargs"); > > > + > > > + caph_cache_catpages(); > > > + if (caph_limit_stdio() < 0 && caph_enter_casper() < 0) { > > > + fileargs_free(fa); > > > + err(1, "Unable to enter capability mode"); > > > + } > > > + > > > if (min_len == 0) > > > min_len = 4; > > > if (*argv == NULL) > > > rc = find_strings("{standard input}", stdin, 0, 0); > > > else while (*argv != NULL) { > > > - if (handle_file(*argv) != 0) > > > + if (handle_file(fa, *argv) != 0) > > > rc = 1; > > > argv++; > > > } > > > + > > > + fileargs_free(fa); > > > + > > > return (rc); > > > } > > > > > > int > > > -handle_file(const char *name) > > > +handle_file(fileargs_t *fa, const char *name) > > > { > > > FILE *pfile; > > > int rt; > > > > > > if (name == NULL) > > > return (1); > > > - pfile = fopen(name, "rb"); > > > + pfile = fileargs_fopen(fa, name, "rb"); > > > if (pfile == NULL) { > > > warnx("'%s': %s", name, strerror(errno)); > > > return (1); > > > > > > Modified: head/usr.bin/strings/Makefile > > > > > > > ============================================================================== > > > --- head/usr.bin/strings/Makefile Thu Apr 4 12:02:48 2019 > > > (r345874) > > > +++ head/usr.bin/strings/Makefile Thu Apr 4 16:32:27 2019 > > > (r345875) > > > @@ -10,6 +10,12 @@ PROG= strings > > > > > > LIBADD= elftc elf > > > > > > +.if ${MK_CASPER} != "no" && !defined(BOOTSTRAPPING) > > > +LIBADD+= casper > > > +LIBADD+= cap_fileargs > > > +CFLAGS+= -DWITH_CASPER > > > +.endif > > > + > > > CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common > > > > > > .include > > > > > > > From owner-svn-src-all@freebsd.org Wed Apr 17 16:58:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A7A81572390; Wed, 17 Apr 2019 16:58:39 +0000 (UTC) (envelope-from adrian@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 1C7278867A; Wed, 17 Apr 2019 16:58:39 +0000 (UTC) (envelope-from adrian@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 EBE3F9FD1; Wed, 17 Apr 2019 16:58:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HGwcrw080599; Wed, 17 Apr 2019 16:58:38 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HGwckd080598; Wed, 17 Apr 2019 16:58:38 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201904171658.x3HGwckd080598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 17 Apr 2019 16:58:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346322 - head/lib/libcasper/services/cap_fileargs X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/lib/libcasper/services/cap_fileargs X-SVN-Commit-Revision: 346322 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1C7278867A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 16:58:39 -0000 Author: adrian Date: Wed Apr 17 16:58:38 2019 New Revision: 346322 URL: https://svnweb.freebsd.org/changeset/base/346322 Log: [casper] fix compilation when casper is disabled. This triggers an error in gcc-mips 6.4.0 complaining about unused arguments. Tested: * compiled/run on mips32; nothing complained. Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.h ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Apr 17 16:45:42 2019 (r346321) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Apr 17 16:58:38 2019 (r346322) @@ -108,8 +108,12 @@ fileargs_cinitnv(cap_channel_t *cas __unused, nvlist_t lstat(name, sb) #define fileargs_open(fa, name) \ open(name, fa->fa_flags, fa->fa_mode) -#define fileargs_fopen(fa, name, mode) \ - fopen(name, mode) +static inline +FILE *fileargs_fopen(fileargs_t *fa, const char *name, const char *mode) +{ + (void) fa; + return (fopen(name, mode)); +} #define fileargs_free(fa) (free(fa)) #endif From owner-svn-src-all@freebsd.org Wed Apr 17 17:00:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38AB01572465; Wed, 17 Apr 2019 17:00:17 +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 A06BC88845; Wed, 17 Apr 2019 17:00:16 +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 7DCA09FD8; Wed, 17 Apr 2019 17:00:16 +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 x3HH0GSa080770; Wed, 17 Apr 2019 17:00:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HH0Gfg080769; Wed, 17 Apr 2019 17:00:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171700.x3HH0Gfg080769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 17:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346323 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 346323 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A06BC88845 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:00:17 -0000 Author: emaste Date: Wed Apr 17 17:00:16 2019 New Revision: 346323 URL: https://svnweb.freebsd.org/changeset/base/346323 Log: readelf: speed up readelf -wo Use an array instead of STAILQ, and sort at the end instead of while adding new elements. PR: 212539 Submitted by: Bora Özarslan Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Apr 17 16:58:38 2019 (r346322) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Apr 17 17:00:16 2019 (r346323) @@ -225,6 +225,15 @@ struct flag_desc { const char *desc; }; +struct loc_at { + Dwarf_Attribute la_at; + Dwarf_Unsigned la_off; + Dwarf_Unsigned la_lowpc; + Dwarf_Half la_cu_psize; + Dwarf_Half la_cu_osize; + Dwarf_Half la_cu_ver; +}; + static void add_dumpop(struct readelf *re, size_t si, const char *sn, int op, int t); static const char *aeabi_adv_simd_arch(uint64_t simd); @@ -341,6 +350,7 @@ static const char *get_string(struct readelf *re, int static const char *get_symbol_name(struct readelf *re, int symtab, int i); static uint64_t get_symbol_value(struct readelf *re, int symtab, int i); static void load_sections(struct readelf *re); +static int loc_at_comparator(const void *la1, const void *la2); static const char *mips_abi_fp(uint64_t fp); static const char *note_type(const char *note_name, unsigned int et, unsigned int nt); @@ -359,7 +369,8 @@ static const char *ppc_abi_vector(uint64_t vec); static void readelf_usage(int status); static void readelf_version(void); static void search_loclist_at(struct readelf *re, Dwarf_Die die, - Dwarf_Unsigned lowpc); + Dwarf_Unsigned lowpc, struct loc_at **la_list, + unsigned int *la_list_len, unsigned int *la_list_cap); static void search_ver(struct readelf *re); static const char *section_type(unsigned int mach, unsigned int stype); static void set_cu_context(struct readelf *re, Dwarf_Half psize, @@ -6034,21 +6045,28 @@ dump_dwarf_str(struct readelf *re) } } -struct loc_at { - Dwarf_Attribute la_at; - Dwarf_Unsigned la_off; - Dwarf_Unsigned la_lowpc; - Dwarf_Half la_cu_psize; - Dwarf_Half la_cu_osize; - Dwarf_Half la_cu_ver; - TAILQ_ENTRY(loc_at) la_next; -}; +static int +loc_at_comparator(const void *la1, const void *la2) +{ + const struct loc_at *left, *right; -static TAILQ_HEAD(, loc_at) lalist = TAILQ_HEAD_INITIALIZER(lalist); + left = (const struct loc_at *)la1; + right = (const struct loc_at *)la2; + if (left->la_off > right->la_off) + return (1); + else if (left->la_off < right->la_off) + return (-1); + else + return (0); +} + static void -search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc) +search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc, + struct loc_at **la_list, unsigned int *la_list_len, + unsigned int *la_list_cap) { + struct loc_at *la; Dwarf_Attribute *attr_list; Dwarf_Die ret_die; Dwarf_Unsigned off; @@ -6057,7 +6075,6 @@ search_loclist_at(struct readelf *re, Dwarf_Die die, D Dwarf_Half attr, form; Dwarf_Bool is_info; Dwarf_Error de; - struct loc_at *la, *nla; int i, ret; is_info = dwarf_get_die_infotypes_flag(die); @@ -6105,33 +6122,21 @@ search_loclist_at(struct readelf *re, Dwarf_Die die, D } else continue; - TAILQ_FOREACH(la, &lalist, la_next) { - if (off == la->la_off) - break; - if (off < la->la_off) { - if ((nla = malloc(sizeof(*nla))) == NULL) - err(EXIT_FAILURE, "malloc failed"); - nla->la_at = attr_list[i]; - nla->la_off = off; - nla->la_lowpc = lowpc; - nla->la_cu_psize = re->cu_psize; - nla->la_cu_osize = re->cu_osize; - nla->la_cu_ver = re->cu_ver; - TAILQ_INSERT_BEFORE(la, nla, la_next); - break; - } + if (*la_list_cap == *la_list_len) { + *la_list = realloc(*la_list, + *la_list_cap * 2 * sizeof(**la_list)); + if (la_list == NULL) + errx(EXIT_FAILURE, "realloc failed"); + *la_list_cap *= 2; } - if (la == NULL) { - if ((nla = malloc(sizeof(*nla))) == NULL) - err(EXIT_FAILURE, "malloc failed"); - nla->la_at = attr_list[i]; - nla->la_off = off; - nla->la_lowpc = lowpc; - nla->la_cu_psize = re->cu_psize; - nla->la_cu_osize = re->cu_osize; - nla->la_cu_ver = re->cu_ver; - TAILQ_INSERT_TAIL(&lalist, nla, la_next); - } + la = &((*la_list)[*la_list_len]); + la->la_at = attr_list[i]; + la->la_off = off; + la->la_lowpc = lowpc; + la->la_cu_psize = re->cu_psize; + la->la_cu_osize = re->cu_osize; + la->la_cu_ver = re->cu_ver; + (*la_list_len)++; } cont_search: @@ -6140,14 +6145,16 @@ cont_search: if (ret == DW_DLV_ERROR) warnx("dwarf_child: %s", dwarf_errmsg(de)); else if (ret == DW_DLV_OK) - search_loclist_at(re, ret_die, lowpc); + search_loclist_at(re, ret_die, lowpc, la_list, + la_list_len, la_list_cap); /* Search sibling. */ ret = dwarf_siblingof_b(re->dbg, die, &ret_die, is_info, &de); if (ret == DW_DLV_ERROR) warnx("dwarf_siblingof: %s", dwarf_errmsg(de)); else if (ret == DW_DLV_OK) - search_loclist_at(re, ret_die, lowpc); + search_loclist_at(re, ret_die, lowpc, la_list, + la_list_len, la_list_cap); } static void @@ -6430,9 +6437,14 @@ dump_dwarf_loclist(struct readelf *re) Dwarf_Signed lcnt; Dwarf_Half tag, version, pointer_size, off_size; Dwarf_Error de; - struct loc_at *la; + struct loc_at *la_list, *left, *right, *la; + unsigned int la_list_len, la_list_cap, duplicates, k; int i, j, ret, has_content; + la_list_len = 0; + la_list_cap = 200; + if ((la_list = calloc(la_list_cap, sizeof(struct loc_at))) == NULL) + errx(EXIT_FAILURE, "calloc failed"); /* Search .debug_info section. */ while ((ret = dwarf_next_cu_header_b(re->dbg, NULL, &version, NULL, &pointer_size, &off_size, NULL, NULL, &de)) == DW_DLV_OK) { @@ -6453,7 +6465,8 @@ dump_dwarf_loclist(struct readelf *re) } /* Search attributes for reference to .debug_loc section. */ - search_loclist_at(re, die, lowpc); + search_loclist_at(re, die, lowpc, &la_list, + &la_list_len, &la_list_cap); } if (ret == DW_DLV_ERROR) warnx("dwarf_next_cu_header: %s", dwarf_errmsg(de)); @@ -6485,17 +6498,37 @@ dump_dwarf_loclist(struct readelf *re) * Search attributes for reference to .debug_loc * section. */ - search_loclist_at(re, die, lowpc); + search_loclist_at(re, die, lowpc, &la_list, + &la_list_len, &la_list_cap); } if (ret == DW_DLV_ERROR) warnx("dwarf_next_cu_header: %s", dwarf_errmsg(de)); } while (dwarf_next_types_section(re->dbg, &de) == DW_DLV_OK); - if (TAILQ_EMPTY(&lalist)) + if (la_list_len == 0) { + free(la_list); return; + } + /* Sort la_list using loc_at_comparator. */ + qsort(la_list, la_list_len, sizeof(struct loc_at), loc_at_comparator); + + /* Get rid of the duplicates in la_list. */ + duplicates = 0; + for (k = 1; k < la_list_len; ++k) { + left = &la_list[k - 1 - duplicates]; + right = &la_list[k]; + + if (left->la_off == right->la_off) + duplicates++; + else + la_list[k - duplicates] = *right; + } + la_list_len -= duplicates; + has_content = 0; - TAILQ_FOREACH(la, &lalist, la_next) { + for (k = 0; k < la_list_len; ++k) { + la = &la_list[k]; if ((ret = dwarf_loclist_n(la->la_at, &llbuf, &lcnt, &de)) != DW_DLV_OK) { if (ret != DW_DLV_NO_ENTRY) @@ -6545,6 +6578,8 @@ dump_dwarf_loclist(struct readelf *re) if (!has_content) printf("\nSection '.debug_loc' has no debugging data.\n"); + + free(la_list); } /* @@ -6892,7 +6927,6 @@ dump_elf(struct readelf *re) static void dump_dwarf(struct readelf *re) { - struct loc_at *la, *_la; Dwarf_Error de; int error; @@ -6929,11 +6963,6 @@ dump_dwarf(struct readelf *re) dump_dwarf_str(re); if (re->dop & DW_O) dump_dwarf_loclist(re); - - TAILQ_FOREACH_SAFE(la, &lalist, la_next, _la) { - TAILQ_REMOVE(&lalist, la, la_next); - free(la); - } dwarf_finish(re->dbg, &de); } From owner-svn-src-all@freebsd.org Wed Apr 17 17:08:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7A1515729D4 for ; Wed, 17 Apr 2019 17:08:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68D0989005 for ; Wed, 17 Apr 2019 17:08:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x841.google.com with SMTP id h39so28228401qte.2 for ; Wed, 17 Apr 2019 10:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z4gCfGlS9QARz41t/La0ab7tehoJuA69FZHemKOFdGc=; b=hrzMQr6cbzQ8lFAjd9t0Ku9BG4SZuO2D7JW2A6ANBrrREeJ2o8xd8dTph5Brx3AcnH gkZZqb6uXvLly92zzFM4uKZGHPgUwWpD68NVBvpS+0lb/eB9kaCneLjTT5cg36tGBmma iYFMq5+71aUiShoKn3R1dQs4dTZDSaA8+l+kExXWEoXxyvl0k6p2gmFaF60qsHf6rSJy 3dqTw1niIhi6bDSBSi/zD/SXGVSsYUhaW6x1xXQgl/Xvu2yBvPWMHm1hr1yMOGdrw9ni m8o1237AMZVY85ccaaILLu0tqaXNUK6orl4fw92K80okzntM0AxApab8GZ9DRLQaUkq0 sa5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z4gCfGlS9QARz41t/La0ab7tehoJuA69FZHemKOFdGc=; b=BJLtxVH16s+piSFIh3gXXiruY2beJVuALvS8rvE6zvKnV9ENy5UFf4BsIrwxgBi3b+ dF04hJjNzTwURRy+3FdJX2bz/2iPEO+QL4J8QLjOfJX4i7Z2bkI38+Fb5x/S/Ug/4WqZ oYWpPo5tl9puAXfjOpa711XsyWxrm3/tFe5nFglAuBpvytnKbibYfhVYnsPdFjb4Um7o EO9IAUqSbcJr7zsPYk658ZjveEiizL4ODYE+irYj0CDxso5YgHUWpFLc/flqaXa1B0BI 6okSlVgbM7RMF7OAFR47wRQM9HHEYafecijf6LKmZrxcK1ZgANfTO6MxX7PRG1Nxx7/A a5ag== X-Gm-Message-State: APjAAAV0aS93SkikRiDoonBZJpDKSKTpPT9khGn85eJMzLfZ7U7+WgNS NbPH2djBxub3RhMjbCU9iKfdIJycbit4iKV9d0/DTA== X-Google-Smtp-Source: APXvYqzuDK4jeVWGx82V/3dwSHv5C8VKVsDboGNIyN9AAUB3Jufibgstu+rIuEZoXgJW46ZYoFrL3QgdiIlSCEpeeec= X-Received: by 2002:ac8:4685:: with SMTP id g5mr72658930qto.242.1555520916889; Wed, 17 Apr 2019 10:08:36 -0700 (PDT) MIME-Version: 1.0 References: <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> In-Reply-To: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> From: Warner Losh Date: Wed, 17 Apr 2019 11:08:24 -0600 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: "Rodney W. Grimes" Cc: John Baldwin , "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 68D0989005 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:08:38 -0000 On Tue, Apr 16, 2019, 4:51 PM Rodney W. Grimes wrote: > > On 4/15/19 11:40 AM, Conrad Meyer wrote: > > > Author: cem > > > Date: Mon Apr 15 18:40:36 2019 > > > New Revision: 346250 > > > URL: https://svnweb.freebsd.org/changeset/base/346250 > > > > > > Log: > > > random(4): Block read_random(9) on initial seeding > > > > > > read_random() is/was used, mostly without error checking, in a lot of > > > very sensitive places in the kernel -- including seeding the widely > used > > > arc4random(9). > > > > > > Most uses, especially arc4random(9), should block until the device > is seeded > > > rather than proceeding with a bogus or empty seed. I did not spy any > > > obvious kernel consumers where blocking would be inappropriate (in > the > > > sense that lack of entropy would be ok -- I did not investigate > locking > > > angle thoroughly). In many instances, arc4random_buf(9) or that > family > > > of APIs would be more appropriate anyway; that work was done in > r345865. > > > > There are definitely places arc4random is used where sleeping is not > allowed. > > ipsec generating nonces for AES-CBC is one example I can think of off the > > top of my head. I think it might be useful to add an explicit > WITNESS_WARN > > in arc4random to catch these cases so they can be found and reasoned > about. > > > > > This change primarily impacts the behavior of /dev/random on embedded > > > systems with read-only media that do not configure "nodevice > random". We > > > toggle the default from 'charge on blindly with no entropy' to 'block > > > indefinitely.' This default is safer, but may cause frustration. > Embedded > > > system designers using FreeBSD have several options. The most > obvious is to > > > plan to have a small writable NVRAM or NAND to persist entropy, like > larger > > > systems. Early entropy can be fed from any loader, or by writing > directly > > > to /dev/random during boot. Some embedded SoCs now provide a fast > hardware > > > entropy source; this would also work for quickly seeding Fortuna. A > 3rd > > > option would be creating an embedded-specific, more simplistic random > > > module, like that designed by DJB in [1] (this design still requires > a small > > > rewritable media for forward secrecy). Finally, the least preferred > option > > > might be "nodevice random", although I plan to remove this in a > subsequent > > > revision. > > > > Note that I actually often run into unseeded systems when doing > development > > using qemu for non-x86 architectures. For example, when booting mips > from > > qemu, there is no loader, the kernel just starts, and since the endian is > > opposite, I frequently regenerate the filesystem using makefs. > > Isnt this also the case for bhyveload? We do not go through the loader > there when we are starting a FreeBSD guest, correct? > Bhyveload is a copy of the boot loader and runs userboot to make it happen. Warner > John Baldwin > -- > Rod Grimes > rgrimes@freebsd.org > > From owner-svn-src-all@freebsd.org Wed Apr 17 17:16:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DC3E1572DB7 for ; Wed, 17 Apr 2019 17:16:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9526689596 for ; Wed, 17 Apr 2019 17:16:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x742.google.com with SMTP id n68so14827648qka.1 for ; Wed, 17 Apr 2019 10:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AzK1QqsIhvko8X6L/mAALXziKCYba6+xw/6grpAL7r0=; b=B2tapYqCXif3reFRUe1MU3/EtBoW5VNOQXrSVyu8OFto/x860UCu+LaLwIhI/jcYsX ULFgGlZfdEcYhlhgHR0L3cho/phGW6RsFzd9mU2CuOpf8wiCPX5kXie08HRCDlCO+OTi DGkqqVLMsr0c2UaroHDv1XZWVsI1lJXYHw5ZPNH+QdZo7kdxtWiaPN+b6qpjxPibxW85 Y1Sm1Vhw66hUUjAKKrgU9OKiGwDF+TcNhPDPtZOm9EVJyef7RV41kSt3EdqPKAUESQVw io/FgjlsZM1XyuRXnjj4uI6dcmJCLez9fdgbpjLlDLERxhtR12qEGPZ/Ol8ZpTXyLWFD bVXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AzK1QqsIhvko8X6L/mAALXziKCYba6+xw/6grpAL7r0=; b=k7bGkiWBKjUBvL9r3g5d+sWDKmcHeF8jSQdOXbV7CjjbditQQizHuWxJ+Xu3/sqQa6 jkWlPsSLdls0oN0E3ttn15OWlyx3rtVnAjJGD1GkQimwPMC0A8sMEgp8wHe31Lyr7Zkg PFEfHmFrA48EXJu0Q8yvQ31rW2bPtubDPyDSkRr63/W3bveL5bauoTwJFJXAw+nRlCOm dxk24Duo76KCWw5eepZCuUkkc1W3ilbOJbbmC/cA5sxrofiMW+xYBEcgZ41SlbwZx2AS uv5Si5Yu27pTq8GpAGbPB3d5XcJp92KnuxDNxg+akdHt9PstIuP0D8rECc+QqPJtUogW pAZA== X-Gm-Message-State: APjAAAW9RXqluuLdIUHLytYKs64RKH/JiLP+skEzkKMDr2U5B8M2umJC iV/Q3HCpYlJAtSa7jzw1KfmlhWmNsjh4/b6bqTJOqg== X-Google-Smtp-Source: APXvYqz4Vm4ZYbGY/j+WuHmwCDXc0mmegMtO26R8LwI73sUy8acjd/2RSetSHbl91Ontn02o/XZPt/9BuVHXUa1QQso= X-Received: by 2002:a37:a02:: with SMTP id 2mr25002843qkk.258.1555521413890; Wed, 17 Apr 2019 10:16:53 -0700 (PDT) MIME-Version: 1.0 References: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> <4d6b8a14-b053-9ed1-14b2-bbc359ac9413@FreeBSD.org> <48b25255-3d66-69fc-658b-6176ebaf4640@FreeBSD.org> In-Reply-To: <48b25255-3d66-69fc-658b-6176ebaf4640@FreeBSD.org> From: Warner Losh Date: Wed, 17 Apr 2019 11:16:42 -0600 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: John Baldwin Cc: "Conrad E. Meyer" , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 9526689596 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:16:55 -0000 On Wed, Apr 17, 2019 at 10:06 AM John Baldwin wrote: > On 4/16/19 4:48 PM, Conrad Meyer wrote: > > On Tue, Apr 16, 2019 at 4:31 PM John Baldwin wrote: > >> bhyveload is effectively the loader in this case. It runs the normal > loader > >> scripts and logic and so would load the guests's /boot/entropy and pass > it > >> to the guest kernel as metadata just like the regular loader. > > > > Right, except it doesn't seem to do things like nuke /boot/nextboot.conf > :-(. > > It just needs a disk write method I think for that to work, but I'm not > sure > that's currently in the userboot interface. > It isn't. Write support was added to the boot loader after bhyveload was forked. It hasn't been updated. > >> In addition, bhyve also supports virtio-rng which is another way to > provide > >> entropy to guest OS's. That's why in my reply I focused on qemu for > mips > >> (or riscv) as for x86 hypervisors there are existing, > somewhat-standarized > >> solutions for the hypervisor to provide entropy to the guest. > > > > Perhaps cryptographically random stack-protector cookies are simply > > inappropriate for MIPS or RISCV. Do we have any other examples of > > kernel random consumers blocking after that immediate hiccup is > > overcome? > > There may be MIPS and RISCV designs that do have suitable entropy available > (especially I would expect future RISCV designs to have them), so I think > blacklisting stack protector wholesale on those architectures is overboard. > I think some sort of off-by-default knob (even a compile option) is fine > for > people who need fast and loose vs safe as you already agreed to earlier. > > Also, for development testing we still want coverage of using stack cookies > on MIPS and RISCV even if the simulator environment gives not-very-strong > cookie values. I'm going to put a very fine point on this: any hard-requirement of entropy sources is a non-starter. If you require that, your commit will be backed out and/or hacked around by the addition of a nob in the future. It will happen. Don't pretend you can say 'but things weren't random enough' will carry the day. It will not. That's why I specifically requested a MD routine to be called when there's no source of entropy: that will let special needs folks do the right thing. It's also why I asked for a way to say "don't ever block waiting for entropy, soldier on the best you can, but set some variable that can be exposed to userland so that early in /etc/rc automation can be written to decide what to do when that condition exists: generate entropy and reboot, report it to some central control, nothing" since that will give the tools for different reactions. For our application it is *NEVER* OK to block the boot because there's not enough randomness. We'd rather solider on with crappy randomness and want the boot to proceed not matter what. We want the information that we had to make compromises along the way to make it happen so we can decide the right course of action for our appliances. Warner From owner-svn-src-all@freebsd.org Wed Apr 17 17:18:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A63831572E40; Wed, 17 Apr 2019 17:18:45 +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 4330189707; Wed, 17 Apr 2019 17:18:45 +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 188DEA333; Wed, 17 Apr 2019 17:18:45 +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 x3HHIi6A091427; Wed, 17 Apr 2019 17:18:44 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HHIi3G091423; Wed, 17 Apr 2019 17:18:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904171718.x3HHIi3G091423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 17 Apr 2019 17:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346324 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 346324 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4330189707 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:18:45 -0000 Author: kevans Date: Wed Apr 17 17:18:43 2019 New Revision: 346324 URL: https://svnweb.freebsd.org/changeset/base/346324 Log: net: adjust randomized address bits Give devices that need a MAC a 16-bit allocation out of the FreeBSD Foundation OUI range. Change the name ether_fakeaddr to ether_gen_addr now that we're dealing real MAC addresses with a real OUI rather than random locally-administered addresses. Reviewed by: bz, rgrimes Differential Revision: https://reviews.freebsd.org/D19587 Modified: head/sys/net/ethernet.h head/sys/net/ieee_oui.h head/sys/net/if_bridge.c head/sys/net/if_ethersubr.c head/sys/net/if_vxlan.c Modified: head/sys/net/ethernet.h ============================================================================== --- head/sys/net/ethernet.h Wed Apr 17 17:00:16 2019 (r346323) +++ head/sys/net/ethernet.h Wed Apr 17 17:18:43 2019 (r346324) @@ -422,7 +422,7 @@ void ether_vlan_mtap(struct bpf_if *, struct mbuf *, struct mbuf *ether_vlanencap(struct mbuf *, uint16_t); bool ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, uint16_t vid, uint8_t pcp); -void ether_fakeaddr(struct ether_addr *hwaddr); +void ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr); #ifdef _SYS_EVENTHANDLER_H_ /* new ethernet interface attached event */ Modified: head/sys/net/ieee_oui.h ============================================================================== --- head/sys/net/ieee_oui.h Wed Apr 17 17:00:16 2019 (r346323) +++ head/sys/net/ieee_oui.h Wed Apr 17 17:18:43 2019 (r346324) @@ -67,3 +67,14 @@ /* Allocate 20 bits to bhyve */ #define OUI_FREEBSD_BHYVE_LOW OUI_FREEBSD(0x000001) #define OUI_FREEBSD_BHYVE_HIGH OUI_FREEBSD(0x0fffff) + +/* + * Allocate 16 bits for a pool to give to various interfaces that need a + * generated address, but don't quite need to slice off a whole section of + * the OUI (e.g. cloned interfaces, one-off NICs of various vendors). + * + * ether_gen_addr should be used to generate an address from this pool. + */ +#define OUI_FREEBSD_GENERATED_MASK 0x10ffff +#define OUI_FREEBSD_GENERATED_LOW OUI_FREEBSD(0x100000) +#define OUI_FREEBSD_GENERATED_HIGH OUI_FREEBSD(OU_FREEBSD_GENERATED_MASK) Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Wed Apr 17 17:00:16 2019 (r346323) +++ head/sys/net/if_bridge.c Wed Apr 17 17:18:43 2019 (r346324) @@ -671,7 +671,7 @@ bridge_clone_create(struct if_clone *ifc, int unit, ca getcredhostid(curthread->td_ucred, &hostid); do { if (fb || hostid == 0) { - ether_fakeaddr(&sc->sc_defaddr); + ether_gen_addr(ifp, &sc->sc_defaddr); } else { sc->sc_defaddr.octet[0] = 0x2; sc->sc_defaddr.octet[1] = (hostid >> 24) & 0xff; Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Wed Apr 17 17:00:16 2019 (r346323) +++ head/sys/net/if_ethersubr.c Wed Apr 17 17:18:43 2019 (r346324) @@ -42,11 +42,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -54,6 +56,7 @@ #include #include +#include #include #include #include @@ -85,6 +88,8 @@ #endif #include +#include + #ifdef CTASSERT CTASSERT(sizeof (struct ether_header) == ETHER_ADDR_LEN * 2 + 2); CTASSERT(sizeof (struct ether_addr) == ETHER_ADDR_LEN); @@ -1401,19 +1406,37 @@ ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, return (true); } +/* + * Allocate an address from the FreeBSD Foundation OUI. This uses a + * cryptographic hash function on the containing jail's UUID and the interface + * name to attempt to provide a unique but stable address. Pseudo-interfaces + * which require a MAC address should use this function to allocate + * non-locally-administered addresses. + */ void -ether_fakeaddr(struct ether_addr *hwaddr) +ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) { +#define ETHER_GEN_ADDR_BUFSIZ HOSTUUIDLEN + IFNAMSIZ + 2 + SHA1_CTX ctx; + char buf[ETHER_GEN_ADDR_BUFSIZ]; + char uuid[HOSTUUIDLEN + 1]; + uint64_t addr; + int i, sz; + char digest[SHA1_RESULTLEN]; - /* - * Generate a convenient locally administered address, - * 'bsd' + random 24 low-order bits. 'b' is 0x62, which has the locally - * assigned bit set, and the broadcast/multicast bit clear. - */ - arc4rand(hwaddr->octet, ETHER_ADDR_LEN, 1); - hwaddr->octet[0] = 'b'; - hwaddr->octet[1] = 's'; - hwaddr->octet[2] = 'd'; + getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); + sz = snprintf(buf, ETHER_GEN_ADDR_BUFSIZ, "%s-%s", uuid, ifp->if_xname); + SHA1Init(&ctx); + SHA1Update(&ctx, buf, sz); + SHA1Final(digest, &ctx); + + addr = ((digest[0] << 16) | (digest[1] << 8) | digest[2]) & + OUI_FREEBSD_GENERATED_MASK; + addr = OUI_FREEBSD(addr); + for (i = 0; i < ETHER_ADDR_LEN; ++i) { + hwaddr->octet[i] = addr >> ((ETHER_ADDR_LEN - i - 1) * 8) & + 0xFF; + } } DECLARE_MODULE(ether, ether_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); Modified: head/sys/net/if_vxlan.c ============================================================================== --- head/sys/net/if_vxlan.c Wed Apr 17 17:00:16 2019 (r346323) +++ head/sys/net/if_vxlan.c Wed Apr 17 17:18:43 2019 (r346324) @@ -2754,7 +2754,7 @@ vxlan_clone_create(struct if_clone *ifc, int unit, cad ifmedia_add(&sc->vxl_media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&sc->vxl_media, IFM_ETHER | IFM_AUTO); - ether_fakeaddr(&sc->vxl_hwaddr); + ether_gen_addr(ifp, &sc->vxl_hwaddr); ether_ifattach(ifp, sc->vxl_hwaddr.octet); ifp->if_baudrate = 0; From owner-svn-src-all@freebsd.org Wed Apr 17 17:19:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA0991572E8F; Wed, 17 Apr 2019 17:19: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 8F823898A6; Wed, 17 Apr 2019 17:19:20 +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 635FFA35F; Wed, 17 Apr 2019 17:19:20 +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 x3HHJKiY091501; Wed, 17 Apr 2019 17:19:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HHJKac091500; Wed, 17 Apr 2019 17:19:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171719.x3HHJKac091500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 17:19:20 +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: r346325 - in stable/12/sys: arm/ti/cpsw dev/fdt X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/12/sys: arm/ti/cpsw dev/fdt X-SVN-Commit-Revision: 346325 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F823898A6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:19:21 -0000 Author: emaste Date: Wed Apr 17 17:19:19 2019 New Revision: 346325 URL: https://svnweb.freebsd.org/changeset/base/346325 Log: MFC r345855: cpsw: use `phy-handle` in FDT to find PHY address In r337703 DTS files were updated to Linux 4.18, including Linux commit 4d8b032d3c03f4e9788a18bbb51b10e6c9e8a56b which removed the `phy_id` property from am335x-bone-common (as the property was deprecated). Use `phy-handle` via fdt_get_phyaddr, keeping the existing code as a fallback for old DTBs. PR: 236624 Submitted by: manu, Gerald Aryeetey Reported by: Gerald Aryeetey Reviewed by: manu Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/arm/ti/cpsw/if_cpsw.c stable/12/sys/dev/fdt/fdt_common.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- stable/12/sys/arm/ti/cpsw/if_cpsw.c Wed Apr 17 17:18:43 2019 (r346324) +++ stable/12/sys/arm/ti/cpsw/if_cpsw.c Wed Apr 17 17:19:19 2019 (r346325) @@ -82,6 +82,8 @@ __FBSDID("$FreeBSD$"); #include #include + +#include #ifdef CPSW_ETHERSWITCH #include @@ -742,7 +744,7 @@ cpsw_get_fdt_data(struct cpsw_softc *sc, int port) phandle_t child; unsigned long mdio_child_addr; - /* Find any slave with phy_id */ + /* Find any slave with phy-handle/phy_id */ phy = -1; vlan = -1; for (child = OF_child(sc->node); child != 0; child = OF_peer(child)) { @@ -756,11 +758,15 @@ cpsw_get_fdt_data(struct cpsw_softc *sc, int port) if (mdio_child_addr != slave_mdio_addr[port]) continue; - len = OF_getproplen(child, "phy_id"); - if (len / sizeof(pcell_t) == 2) { - /* Get phy address from fdt */ - if (OF_getencprop(child, "phy_id", phy_id, len) > 0) - phy = phy_id[1]; + if (fdt_get_phyaddr(child, NULL, &phy, NULL) != 0){ + /* Users with old DTB will have phy_id instead */ + phy = -1; + len = OF_getproplen(child, "phy_id"); + if (len / sizeof(pcell_t) == 2) { + /* Get phy address from fdt */ + if (OF_getencprop(child, "phy_id", phy_id, len) > 0) + phy = phy_id[1]; + } } len = OF_getproplen(child, "dual_emac_res_vlan"); Modified: stable/12/sys/dev/fdt/fdt_common.c ============================================================================== --- stable/12/sys/dev/fdt/fdt_common.c Wed Apr 17 17:18:43 2019 (r346324) +++ stable/12/sys/dev/fdt/fdt_common.c Wed Apr 17 17:19:19 2019 (r346325) @@ -399,6 +399,9 @@ fdt_get_phyaddr(phandle_t node, device_t dev, int *phy *phy_addr = phy_reg; + if (phy_sc == NULL) + return (0); + /* * Search for softc used to communicate with phy. */ From owner-svn-src-all@freebsd.org Wed Apr 17 17:19:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A14221572F04; Wed, 17 Apr 2019 17:19:55 +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 4297A899C3; Wed, 17 Apr 2019 17:19:55 +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 1F299A361; Wed, 17 Apr 2019 17:19:55 +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 x3HHJtro091587; Wed, 17 Apr 2019 17:19:55 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HHJsp6091586; Wed, 17 Apr 2019 17:19:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904171719.x3HHJsp6091586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 17 Apr 2019 17:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346326 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 346326 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4297A899C3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:19:55 -0000 Author: kevans Date: Wed Apr 17 17:19:54 2019 New Revision: 346326 URL: https://svnweb.freebsd.org/changeset/base/346326 Log: iflib: Use new ether_gen_addr, restricting addresses to that subset Differential Revision: https://reviews.freebsd.org/D19587 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Apr 17 17:19:19 2019 (r346325) +++ head/sys/net/iflib.c Wed Apr 17 17:19:54 2019 (r346326) @@ -37,15 +37,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include -#include #include #include #include #include -#include #include #include #include @@ -207,7 +204,7 @@ struct iflib_ctx { #define isc_legacy_intr ifc_txrx.ift_legacy_intr eventhandler_tag ifc_vlan_attach_event; eventhandler_tag ifc_vlan_detach_event; - uint8_t ifc_mac[ETHER_ADDR_LEN]; + struct ether_addr ifc_mac; char ifc_mtx_name[16]; }; @@ -250,7 +247,7 @@ void iflib_set_mac(if_ctx_t ctx, uint8_t mac[ETHER_ADDR_LEN]) { - bcopy(mac, ctx->ifc_mac, ETHER_ADDR_LEN); + bcopy(mac, ctx->ifc_mac.octet, ETHER_ADDR_LEN); } if_softc_ctx_t @@ -1276,38 +1273,6 @@ prefetch2cachelines(void *x) #endif static void -iflib_gen_mac(if_ctx_t ctx) -{ - struct thread *td; - MD5_CTX mdctx; - char uuid[HOSTUUIDLEN+1]; - char buf[HOSTUUIDLEN+16]; - uint8_t *mac; - unsigned char digest[16]; - - td = curthread; - mac = ctx->ifc_mac; - uuid[HOSTUUIDLEN] = 0; - bcopy(td->td_ucred->cr_prison->pr_hostuuid, uuid, HOSTUUIDLEN); - snprintf(buf, HOSTUUIDLEN+16, "%s-%s", uuid, device_get_nameunit(ctx->ifc_dev)); - /* - * Generate a pseudo-random, deterministic MAC - * address based on the UUID and unit number. - * The FreeBSD Foundation OUI of 58-9C-FC is used. - */ - MD5Init(&mdctx); - MD5Update(&mdctx, buf, strlen(buf)); - MD5Final(digest, &mdctx); - - mac[0] = 0x58; - mac[1] = 0x9C; - mac[2] = 0xFC; - mac[3] = digest[0]; - mac[4] = digest[1]; - mac[5] = digest[2]; -} - -static void iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid) { iflib_fl_t fl; @@ -4579,7 +4544,7 @@ iflib_device_register(device_t dev, void *sc, if_share } } - ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac); + ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); if ((err = IFDI_ATTACH_POST(ctx)) != 0) { device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err); @@ -4668,7 +4633,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc goto fail_unlock; } if (sctx->isc_flags & IFLIB_GEN_MAC) - iflib_gen_mac(ctx); + ether_gen_addr(ifp, &ctx->ifc_mac); if ((err = IFDI_CLONEATTACH(ctx, clctx->cc_ifc, clctx->cc_name, clctx->cc_params)) != 0) { device_printf(dev, "IFDI_CLONEATTACH failed %d\n", err); @@ -4689,7 +4654,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc ifp->if_flags |= IFF_NOGROUP; if (sctx->isc_flags & IFLIB_PSEUDO) { - ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac); + ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); if ((err = IFDI_ATTACH_POST(ctx)) != 0) { device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err); @@ -4796,7 +4761,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc /* * XXX What if anything do we want to do about interrupts? */ - ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac); + ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); if ((err = IFDI_ATTACH_POST(ctx)) != 0) { device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err); goto fail_detach; From owner-svn-src-all@freebsd.org Wed Apr 17 17:30:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00D5315737E3; Wed, 17 Apr 2019 17:30:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f169.google.com (mail-it1-f169.google.com [209.85.166.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92FB68A311; Wed, 17 Apr 2019 17:30:55 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f169.google.com with SMTP id f22so5686793ita.3; Wed, 17 Apr 2019 10:30:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=jqZvV7uXjg9GSxh31V27bRdpI0JW3VVN1ga39jurcII=; b=U30HBo3k798EXetekclTI5JSENg3WkMWobZZQ06tdrzgyVZtywaH30OcBu2mwCPvNw hse0oilMC0emjI3jlVJ9LYlx0Js38JyRQtM+jjoQUHNrRlZP1LS1qoujM3FCL5Fcw15F 3B9N9BsSTNKU/8gVu4kNHC4uS5tDYRgfLrcZSvmByV51oOnMTD44NiWvquznucBtZI/U bD3rRJKGJ5q/VoBoCWQn9UklhBNyD0ssaUB7st/u8AzCgRQryHFMU6m1WiKcmB4Xp2uu TmDgNUj9Oyt1d322WeVu7ZdEOksoRZgxu0//5EiOIuo9cblJr7DVRwtiMmHAHCamRZUF 16nQ== X-Gm-Message-State: APjAAAXxi8nszGK0lTl1vDXhL1srMCahfAA/+bV5uUJ+vNsWdCoZ5W+z Rrrr7nBHZPjNQJGephH7mcF4GITU X-Google-Smtp-Source: APXvYqyD8Mw4Q2czp1UMpLpq4EQv1zklhnlXzrp1CCFUBNV/uXNnIACLV/Suv9H6pPe6RR89DNi8eA== X-Received: by 2002:a24:5447:: with SMTP id t68mr797920ita.28.1555522249319; Wed, 17 Apr 2019 10:30:49 -0700 (PDT) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com. [209.85.166.50]) by smtp.gmail.com with ESMTPSA id b17sm21469444ion.0.2019.04.17.10.30.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 10:30:49 -0700 (PDT) Received: by mail-io1-f50.google.com with SMTP id v4so21283220ioj.5; Wed, 17 Apr 2019 10:30:49 -0700 (PDT) X-Received: by 2002:a6b:691a:: with SMTP id e26mr31309579ioc.124.1555522249032; Wed, 17 Apr 2019 10:30:49 -0700 (PDT) MIME-Version: 1.0 References: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> <4d6b8a14-b053-9ed1-14b2-bbc359ac9413@FreeBSD.org> <48b25255-3d66-69fc-658b-6176ebaf4640@FreeBSD.org> In-Reply-To: <48b25255-3d66-69fc-658b-6176ebaf4640@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 17 Apr 2019 10:30:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 92FB68A311 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:30:56 -0000 On Wed, Apr 17, 2019 at 9:06 AM John Baldwin wrote: > > On 4/16/19 4:48 PM, Conrad Meyer wrote: > > Perhaps cryptographically random stack-protector cookies are simply > > inappropriate for MIPS or RISCV. Do we have any other examples of > > kernel random consumers blocking after that immediate hiccup is > > overcome? > > There may be MIPS and RISCV designs that do have suitable entropy available > (especially I would expect future RISCV designs to have them), so I think > blacklisting stack protector wholesale on those architectures is overboard. The difficulty is how early __stack_chk_init runs vs when entropy might be available. If some MIPS or RISCV design shows up with a fast HWRNG source, great! > I think some sort of off-by-default knob (even a compile option) is fine for > people who need fast and loose vs safe as you already agreed to earlier. > > Also, for development testing we still want coverage of using stack cookies > on MIPS and RISCV even if the simulator environment gives not-very-strong > cookie values. Right. There's a difference between removing random stack cookies and removing stack cookies entirely; I agree some benefit remains for development. Best, Conrad From owner-svn-src-all@freebsd.org Wed Apr 17 17:44:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC35A1573FA7; Wed, 17 Apr 2019 17:44:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f194.google.com (mail-it1-f194.google.com [209.85.166.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76BE88AD41; Wed, 17 Apr 2019 17:44:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f194.google.com with SMTP id f22so5767409ita.3; Wed, 17 Apr 2019 10:44:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=N0LHj1zKA1tsqFuEKQ471jQTsnOmHDs7uuv69zXbhXM=; b=jv1nnDHkN1blCY+zm57NPd4Tm/BgEoFVYiOBlCAs5ARxAlce6oaBMaROYFqXbl2axB b1BONVWWE/D5XAhHjzcCDxWM2AlD5HKUtGEf0mpIF/nLvBQYiteRqs6HuGEchrYhVfur gXIqkkpQ03kYe5lCv9lltizPuRNyLgyB7n/UKb+hn25AXgtzg8BtgkpL9j4HznJt0FCV H8BgGkWfvK2bGacXcqDgFAbag9iUMQIjBSArcWKlZWU4THCHwlQkWEWrZSgurNZ2Dtik /8Ln+lvmrt3wtid/k5iOxHyVfcOHWVPWeOsJ06pwkrfcXEeMHkvKwAuGTlBtRsn5l2KG bHjQ== X-Gm-Message-State: APjAAAVvo9XXiUAIt/M9gAI2aeuoyQgR98bFStL6gXYIoniPDbiv/zah 6FhuEfu3O9O6YybmKIUfVebI0pGx X-Google-Smtp-Source: APXvYqyJ2Jt3snTOqh1L1f0YCe6JNn+wAhh41f65bZ/Ic0PLHLEzcKn8BxcwLDqdFvyEMaRF7gH2DQ== X-Received: by 2002:a24:68c2:: with SMTP id v185mr720348itb.94.1555522571090; Wed, 17 Apr 2019 10:36:11 -0700 (PDT) Received: from mail-io1-f41.google.com (mail-io1-f41.google.com. [209.85.166.41]) by smtp.gmail.com with ESMTPSA id m132sm21391683ioa.53.2019.04.17.10.36.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 10:36:10 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id x3so21239776iol.10; Wed, 17 Apr 2019 10:36:10 -0700 (PDT) X-Received: by 2002:a6b:691a:: with SMTP id e26mr31328433ioc.124.1555522570364; Wed, 17 Apr 2019 10:36:10 -0700 (PDT) MIME-Version: 1.0 References: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> <4d6b8a14-b053-9ed1-14b2-bbc359ac9413@FreeBSD.org> <48b25255-3d66-69fc-658b-6176ebaf4640@FreeBSD.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 17 Apr 2019 10:35:59 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 76BE88AD41 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:44:26 -0000 Hi Warner, On Wed, Apr 17, 2019 at 10:16 AM Warner Losh wrote: > I'm going to put a very fine point on this: any hard-requirement of entro= py sources is a non-starter. If you require that, your commit will be backe= d out and/or hacked around by the addition of a nob in the future. It will = happen. Don't pretend you can say 'but things weren't random enough' will c= arry the day. It will not. > > That's why I specifically requested a MD routine to be called when there'= s no source of entropy: that will let special needs folks do the right thin= g. It's also why I asked for a way to say "don't ever block waiting for ent= ropy, soldier on the best you can, but set some variable that can be expose= d to userland so that early in /etc/rc automation can be written to decide = what to do when that condition exists: generate entropy and reboot, report = it to some central control, nothing" since that will give the tools for dif= ferent reactions. > > For our application it is *NEVER* OK to block the boot because there's no= t enough randomness. We'd rather solider on with crappy randomness and want= the boot to proceed not matter what. We want the information that we had t= o make compromises along the way to make it happen so we can decide the rig= ht course of action for our appliances. I think John's proposed big knob to disable hard-requirement of entropy, and a warning on dmesg, pretty much covers your applications' needs. Do you agree? The random framework has already got ways to register random sources; special needs MD folks can always register their own fako fast random source. I.e., the randomdev entropy intake framework is already general with room for MD-specific drivers (of which several exist today). Take care, Conrad From owner-svn-src-all@freebsd.org Wed Apr 17 17:47:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B96CA15740F1 for ; Wed, 17 Apr 2019 17:47:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DB4B8AF2E for ; Wed, 17 Apr 2019 17:47:11 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1555522261; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=ln/4P8MJhYuEPbUC5DYcz0Eeb6PQQRsnusHkHelzWZhlguwCF/yCyrXAmdGH79DtGkzLPN8JLCChD JxMfqQkGaayAV0do469opdVggWRj0z0x3/uVr5qEzRSt1QNzj3MlRI4SaZUQzGumamEZf+kTIJaKep 31ORIhHGuHJV4xd9TzUoDWZQUgdigkWiDSlWFSc5OfEXtiG4NpWyIb+cDJobzOlN7rVlSpdZgFCI69 nI+JGBE8B+AnxxHzHdIJh6Xl/WhiAKhSmccayYLZpmN0EwQJFw8bO/VH41e5KBsZOxIKDpS5D2MOvd zdwyem4iXwWMHgTxSFLLI8gMBwJ5cNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=C/lvUl4nM5Ri2eeM6ee2kNdj9jNLip6kilaqv+O7BUw=; b=GO3Xh0N1DWKXy70MFcXenepvnKtpJ7vYFigTzko61Dg60BoCWkoRKX44LUSHrWMN7VfH4V7OvmTi8 G8+bq1UEPvo8GrRKBzjDo9sExzMJ0RoVu3hu8ujnzhORvVh1unz6GkCE4VNMnhmsCC0oFNJgRivtO6 Fs+rhZJyWUWopcmEsIWSOcihBji4SkZkeBVjfCr44NphNV2jA7Vgd0biDmlQN8joj1JZ77dwvaIX0R 79c7ckBMBN53f5AvhdfaxF33sDwUB0KZzCYmpXytQiRGo1u9dgxFLRtm74Fwi/ZxHQ0wOVMe/xzjHm 4jfLicFmjAhHrJZQf7XaDZUyjtUe0sw== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=C/lvUl4nM5Ri2eeM6ee2kNdj9jNLip6kilaqv+O7BUw=; b=vmiSwwjG/OgGe5Pl5o+3pVSy7WBWMaKinqHItQ2Xkxk3+Cl7O21JJ+9BMV9ityUrgl1YtrbE7EWhb MQUjZSdjaP3SQuIe3OvZbg9vIHMKVTmtRIfaqf4aNGY8MVCY/oJE2FD35/c/mo/eefztarLYN2HvMN JiJWRlhRkkZaA3BIU+otppjm64ZbaTdg1vRdMpmFLmFxMP8mICEBn8nPjInMgFQgenWdGSiFlrUKvz aqRUeQvDIMSN+0FeSltoZNwJ8Un09u81YVSNfYOl8EKwjYNAb6Gpe0I9ItxaCeUjTO7TXf68Jlba/8 9VRhtE9d1Lqimg068H9Bbk0RlStisVw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 8febce89-6136-11e9-990e-673a89bc4518 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 8febce89-6136-11e9-990e-673a89bc4518; Wed, 17 Apr 2019 17:30:59 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3HHUvCE047206; Wed, 17 Apr 2019 11:30:58 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <78a8423ede681a7ab6572c508ec800d9cffb562b.camel@freebsd.org> Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys From: Ian Lepore To: Warner Losh , John Baldwin Cc: "Conrad E. Meyer" , src-committers , svn-src-all , svn-src-head Date: Wed, 17 Apr 2019 11:30:57 -0600 In-Reply-To: References: <201904162251.x3GMp2aF097103@gndrsh.dnsmgr.net> <4d6b8a14-b053-9ed1-14b2-bbc359ac9413@FreeBSD.org> <48b25255-3d66-69fc-658b-6176ebaf4640@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 2DB4B8AF2E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.991,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:47:12 -0000 On Wed, 2019-04-17 at 11:16 -0600, Warner Losh wrote: > On Wed, Apr 17, 2019 at 10:06 AM John Baldwin wrote: > > > On 4/16/19 4:48 PM, Conrad Meyer wrote: > > > On Tue, Apr 16, 2019 at 4:31 PM John Baldwin wrote: > > > > bhyveload is effectively the loader in this case. It runs the normal > > > > loader > > > > scripts and logic and so would load the guests's /boot/entropy and pass > > > > it > > > > to the guest kernel as metadata just like the regular loader. > > > > > > Right, except it doesn't seem to do things like nuke /boot/nextboot.conf > > > > :-(. > > > > It just needs a disk write method I think for that to work, but I'm not > > sure > > that's currently in the userboot interface. > > > > It isn't. Write support was added to the boot loader after bhyveload was > forked. It hasn't been updated. > > > > > > In addition, bhyve also supports virtio-rng which is another way to > > > > provide > > > > entropy to guest OS's. That's why in my reply I focused on qemu for > > > > mips > > > > (or riscv) as for x86 hypervisors there are existing, > > > > somewhat-standarized > > > > solutions for the hypervisor to provide entropy to the guest. > > > > > > Perhaps cryptographically random stack-protector cookies are simply > > > inappropriate for MIPS or RISCV. Do we have any other examples of > > > kernel random consumers blocking after that immediate hiccup is > > > overcome? > > > > There may be MIPS and RISCV designs that do have suitable entropy available > > (especially I would expect future RISCV designs to have them), so I think > > blacklisting stack protector wholesale on those architectures is overboard. > > I think some sort of off-by-default knob (even a compile option) is fine > > for > > people who need fast and loose vs safe as you already agreed to earlier. > > > > Also, for development testing we still want coverage of using stack cookies > > on MIPS and RISCV even if the simulator environment gives not-very-strong > > cookie values. > > > I'm going to put a very fine point on this: any hard-requirement of entropy > sources is a non-starter. If you require that, your commit will be backed > out and/or hacked around by the addition of a nob in the future. It will > happen. Don't pretend you can say 'but things weren't random enough' will > carry the day. It will not. > > That's why I specifically requested a MD routine to be called when there's > no source of entropy: that will let special needs folks do the right thing. > It's also why I asked for a way to say "don't ever block waiting for > entropy, soldier on the best you can, but set some variable that can be > exposed to userland so that early in /etc/rc automation can be written to > decide what to do when that condition exists: generate entropy and reboot, > report it to some central control, nothing" since that will give the tools > for different reactions. > > For our application it is *NEVER* OK to block the boot because there's not > enough randomness. We'd rather solider on with crappy randomness and want > the boot to proceed not matter what. We want the information that we had to > make compromises along the way to make it happen so we can decide the right > course of action for our appliances. > > Warner I'll add a big +1 to all of that, it all directly applies to our embedded products at $work as well, and would give us the control we need to handle things in an application-specific way. -- Ian From owner-svn-src-all@freebsd.org Wed Apr 17 17:50:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78E4815741B7; Wed, 17 Apr 2019 17:50:45 +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 1D9B78B23B; Wed, 17 Apr 2019 17:50:45 +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 E2E80A89B; Wed, 17 Apr 2019 17:50:44 +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 x3HHoiUU006960; Wed, 17 Apr 2019 17:50:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HHoicp006959; Wed, 17 Apr 2019 17:50:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171750.x3HHoicp006959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 17:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346327 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 346327 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1D9B78B23B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:50:45 -0000 Author: emaste Date: Wed Apr 17 17:50:44 2019 New Revision: 346327 URL: https://svnweb.freebsd.org/changeset/base/346327 Log: readelf: use size_t for object counts PR: 212539 Reported by: cem Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Apr 17 17:19:54 2019 (r346326) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Apr 17 17:50:44 2019 (r346327) @@ -370,7 +370,7 @@ static void readelf_usage(int status); static void readelf_version(void); static void search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc, struct loc_at **la_list, - unsigned int *la_list_len, unsigned int *la_list_cap); + size_t *la_list_len, size_t *la_list_cap); static void search_ver(struct readelf *re); static const char *section_type(unsigned int mach, unsigned int stype); static void set_cu_context(struct readelf *re, Dwarf_Half psize, @@ -6063,8 +6063,7 @@ loc_at_comparator(const void *la1, const void *la2) static void search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc, - struct loc_at **la_list, unsigned int *la_list_len, - unsigned int *la_list_cap) + struct loc_at **la_list, size_t *la_list_len, size_t *la_list_cap) { struct loc_at *la; Dwarf_Attribute *attr_list; @@ -6438,7 +6437,8 @@ dump_dwarf_loclist(struct readelf *re) Dwarf_Half tag, version, pointer_size, off_size; Dwarf_Error de; struct loc_at *la_list, *left, *right, *la; - unsigned int la_list_len, la_list_cap, duplicates, k; + size_t la_list_len, la_list_cap; + unsigned int duplicates, k; int i, j, ret, has_content; la_list_len = 0; From owner-svn-src-all@freebsd.org Wed Apr 17 17:57:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CABCF157457B; Wed, 17 Apr 2019 17:57:16 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40C838B719; Wed, 17 Apr 2019 17:57:15 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555523826; bh=H1Ug1rWhhWg3pouBuYjnhp98CxU1Ql3ad+c7f73/xec=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=CBu+0rRP/owjsm5u4jIsWkMO8xi0rUPu8sffKEy/8y6TXXxs83XegKHHBLGB+kzqK YPv95nGUfqSPU0YGhAuskAhnDo+cBh/LeiKLUBdGaLnAfJMch++9pV76t4kSCEICkk 78G9L7K3j1K36VPN10HKN1aeD2PMHHcD+f+K9lys= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de ([89.12.18.195]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mh6lB-1hTgls0D4b-00MKKv; Wed, 17 Apr 2019 19:51:53 +0200 Date: Wed, 17 Apr 2019 19:51:18 +0200 From: "O. Hartmann" To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc Message-ID: <20190417195145.6824c0f9@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201904171618.x3HGIERC059575@repo.freebsd.org> References: <201904171618.x3HGIERC059575@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:XAajlszpofkuWjQS0owKBWbpS0F71Cll1llhLZehwcKYwpTFfeE 1uFLskOY+9UTE42via8Oado3fSOVEiBUwu/XlrIg/U5II9u1yNvUdusOhQbG5wSEO750q8m ckD+Jmv6OeotKNjMapTgvK1hXdQ768Cc1rtUbmdIi9BaYTU3V50Kj+7IoIZd3d5R35GIg9R FJLlveYDkNr9GKOHfK4zw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:BW4aerVCrMo=:LH/8RkDZonWKNie7LBy1x2 vcUOy78irze7PW3lbQccCZFQK6KvirxLT+Olm5Xa6lCQhtZXOUgL4kDsiwDaYv8VLjRnkoZoT 0R5CYNy3B2vjIl23OVpLAwX5WWjpnht+0NkcxrQ874UmLA1GCljCsSL7cDjkYF2t3SqVvzCWY TiRAdNSDqSRRU+e47iv97S2P3PLCbqlcarn/eybR8WCN7+7RW0xWNVTsbv+VRqipCzVC0piam VNLSGZgBrVFBKvuuAGQpB1DnA+pTGF+euy8P4D3igVbTSwUdeILUiXt5KLP6FkHxwRUEfr65L BHfODs7jKEIgb0lgyFyDuYne2by3xHDFZg431G8WytXK2RMD2dAWgoNkLwxrF2o2VG68lrvwo /GAb62CeILMgqmqqjh+ApJU9XIilE8a9cqsyQ52AQREd7qRgbkIgxRAS+/6uYo8t7RtvasuB8 nRYJhHPANpWaDtvrPslxwXQs1N/Ld+/hVkXX1W0AbKqqe3kHgCG9lvD79SGiD6bzXLPOjfZ91 I7N8fYDnXDbrTbCCdFJbReyWLOAb8gA6zKirmQCW0Xxc/hAFfKOW9aPYESM0g6j/8hLXbVuXK c6NvbH2ymGPxG3viUrZfUx2aHK5oiBYNrc5sH7skEENOxBQQQAbTM1TydFcTcaZx0O6517clZ iJ02LNWSnyVsI9WNF0iZFwdE+2GNkoD8uIPmYJP1jYXzIZSSFgMu/hYT7Znmfo2w0OD05oetn 1Eor7F2qpvK/Q/Mpc6/EpT2XE2feHKsWDV86abpYaotvW0i9S9wjUWg4MnpOuo7NByFL+c5o/ UIfMgrQOD3T0/NfZ5PVQ24l4Zh2BlFxpjkwis6H7zKILVFxVwGfoDMMvLD+YzxVjEWU+4PNbP 9KDkFirdjZgLWh/FSMogAgHG26XFa9BmnUSoQn1G0Ya+DTCQVr9HDUmBLaOH/MLA1JDK+zU9s N9fYjnZjVwA== X-Rspamd-Queue-Id: 40C838B719 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 17:57:17 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIFdl ZCwgMTcgQXByIDIwMTkgMTY6MTg6MTQgKzAwMDAgKFVUQykNCkVkIE1hc3RlIDxlbWFzdGVARnJl ZUJTRC5vcmc+IHNjaHJpZWI6DQoNCj4gQXV0aG9yOiBlbWFzdGUNCj4gRGF0ZTogV2VkIEFwciAx NyAxNjoxODoxNCAyMDE5DQo+IE5ldyBSZXZpc2lvbjogMzQ2MzE2DQo+IFVSTDogaHR0cHM6Ly9z dm53ZWIuZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jhc2UvMzQ2MzE2DQo+IA0KPiBMb2c6DQo+ICAg Y2FwX2ZpbGVhcmdzOiBjaGFzZSByMzQ2MzE1LCB1cGRhdGUgZmlsZWFyZ3NfaW5pdCBpbiBjb25z dW1lcnMNCj4gICANCj4gICBSZXBvcnRlZCBieToJY2kuZnJlZWJzZC5vcmcgKDggdGltZXMgc28g ZmFyKQ0KPiAgIE1GQyBhZnRlcjoJMyB3ZWVrcw0KPiAgIE1GQyB3aXRoOglyMzQ2MzE1DQo+ICAg U3BvbnNvcmVkIGJ5OglUaGUgRnJlZUJTRCBGb3VuZGF0aW9uDQo+IA0KPiBNb2RpZmllZDoNCj4g ICBoZWFkL2NvbnRyaWIvZWxmdG9vbGNoYWluL3N0cmluZ3Mvc3RyaW5ncy5jDQo+ICAgaGVhZC9z YmluL3NhdmVjb3JlL3NhdmVjb3JlLmMNCj4gICBoZWFkL3Vzci5iaW4vYnJhbmRlbGYvYnJhbmRl bGYuYw0KPiAgIGhlYWQvdXNyLmJpbi9oZWFkL2hlYWQuYw0KPiAgIGhlYWQvdXNyLmJpbi93Yy93 Yy5jDQo+IA0KPiBNb2RpZmllZDogaGVhZC9jb250cmliL2VsZnRvb2xjaGFpbi9zdHJpbmdzL3N0 cmluZ3MuYw0KPiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQvY29udHJpYi9lbGZ0 b29sY2hhaW4vc3RyaW5ncy9zdHJpbmdzLmMJV2VkIEFwciAxNyAxNjowMjo1NyAyMDE5DQo+IChy MzQ2MzE1KSArKysgaGVhZC9jb250cmliL2VsZnRvb2xjaGFpbi9zdHJpbmdzL3N0cmluZ3MuYwlX ZWQgQXByIDE3IDE2OjE4OjE0DQo+IDIwMTkJKHIzNDYzMTYpIEBAIC0xOTUsNyArMTk1LDcgQEAg bWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3YpDQo+ICAJYXJndiArPSBvcHRpbmQ7DQo+ICANCj4g IAljYXBfcmlnaHRzX2luaXQoJnJpZ2h0cywgQ0FQX1JFQUQsIENBUF9TRUVLLCBDQVBfRlNUQVQs IENBUF9GQ05UTCk7DQo+IC0JZmEgPSBmaWxlYXJnc19pbml0KGFyZ2MsIGFyZ3YsIE9fUkRPTkxZ LCAwLCAmcmlnaHRzKTsNCj4gKwlmYSA9IGZpbGVhcmdzX2luaXQoYXJnYywgYXJndiwgT19SRE9O TFksIDAsICZyaWdodHMsIEZBX09QRU4pOw0KPiAgCWlmIChmYSA9PSBOVUxMKQ0KPiAgCQllcnIo MSwgIlVuYWJsZSB0byBpbml0aWFsaXplIGNhc3BlciBmaWxlYXJncyIpOw0KPiAgDQo+IA0KPiBN b2RpZmllZDogaGVhZC9zYmluL3NhdmVjb3JlL3NhdmVjb3JlLmMNCj4gPT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09DQo+IC0tLSBoZWFkL3NiaW4vc2F2ZWNvcmUvc2F2ZWNvcmUuYwlXZWQgQXByIDE3IDE2 OjAyOjU3IDIwMTkJKHIzNDYzMTUpDQo+ICsrKyBoZWFkL3NiaW4vc2F2ZWNvcmUvc2F2ZWNvcmUu YwlXZWQgQXByIDE3IDE2OjE4OjE0IDIwMTkJKHIzNDYzMTYpDQo+IEBAIC0xMDMwLDcgKzEwMzAs NyBAQCBpbml0X2NhcHMoaW50IGFyZ2MsIGNoYXIgKiphcmd2KQ0KPiAgCSAqLw0KPiAgCSh2b2lk KWNhcF9yaWdodHNfaW5pdCgmcmlnaHRzLCBDQVBfUFJFQUQsIENBUF9XUklURSwgQ0FQX0lPQ1RM KTsNCj4gIAljYXBmYSA9IGZpbGVhcmdzX2luaXQoYXJnYywgYXJndiwgY2hlY2tmb3IgfHwga2Vl cCA/IE9fUkRPTkxZIDogT19SRFdSLA0KPiAtCSAgICAwLCAmcmlnaHRzKTsNCj4gKwkgICAgMCwg JnJpZ2h0cywgRkFfT1BFTik7DQo+ICAJaWYgKGNhcGZhID09IE5VTEwpIHsNCj4gIAkJbG9nbXNn KExPR19FUlIsICJmaWxlYXJnc19pbml0KCk6ICVtIik7DQo+ICAJCWV4aXQoMSk7DQo+IA0KPiBN b2RpZmllZDogaGVhZC91c3IuYmluL2JyYW5kZWxmL2JyYW5kZWxmLmMNCj4gPT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09DQo+IC0tLSBoZWFkL3Vzci5iaW4vYnJhbmRlbGYvYnJhbmRlbGYuYwlXZWQgQXBy IDE3IDE2OjAyOjU3IDIwMTkJKHIzNDYzMTUpDQo+ICsrKyBoZWFkL3Vzci5iaW4vYnJhbmRlbGYv YnJhbmRlbGYuYwlXZWQgQXByIDE3IDE2OjE4OjE0IDIwMTkJKHIzNDYzMTYpDQo+IEBAIC0xMzMs NyArMTMzLDcgQEAgbWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3YpDQo+ICAJaWYgKGZsYWdzID09 IE9fUkRXUikNCj4gIAkJY2FwX3JpZ2h0c19zZXQoJnJpZ2h0cywgQ0FQX1dSSVRFKTsNCj4gIA0K PiAtCWZhID0gZmlsZWFyZ3NfaW5pdChhcmdjLCBhcmd2LCBmbGFncywgMCwgJnJpZ2h0cyk7DQo+ ICsJZmEgPSBmaWxlYXJnc19pbml0KGFyZ2MsIGFyZ3YsIGZsYWdzLCAwLCAmcmlnaHRzLCBGQV9P UEVOKTsNCj4gIAlpZiAoZmEgPT0gTlVMTCkNCj4gIAkJZXJyeCgxLCAidW5hYmxlIHRvIGluaXQg Y2FzcGVyIik7DQo+ICANCj4gDQo+IE1vZGlmaWVkOiBoZWFkL3Vzci5iaW4vaGVhZC9oZWFkLmMN Cj4gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09DQo+IC0tLSBoZWFkL3Vzci5iaW4vaGVhZC9oZWFkLmMJ V2VkIEFwciAxNyAxNjowMjo1NyAyMDE5CShyMzQ2MzE1KQ0KPiArKysgaGVhZC91c3IuYmluL2hl YWQvaGVhZC5jCVdlZCBBcHIgMTcgMTY6MTg6MTQgMjAxOQkocjM0NjMxNikNCj4gQEAgLTExNSw3 ICsxMTUsNyBAQCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pDQo+ICAJYXJndiArPSBvcHRp bmQ7DQo+ICANCj4gIAlmYSA9IGZpbGVhcmdzX2luaXQoYXJnYywgYXJndiwgT19SRE9OTFksIDAs DQo+IC0JICAgIGNhcF9yaWdodHNfaW5pdCgmcmlnaHRzLCBDQVBfUkVBRCwgQ0FQX0ZTVEFULCBD QVBfRkNOVEwpKTsNCj4gKwkgICAgY2FwX3JpZ2h0c19pbml0KCZyaWdodHMsIENBUF9SRUFELCBD QVBfRlNUQVQsIENBUF9GQ05UTCksIEZBX09QRU4pOw0KPiAgCWlmIChmYSA9PSBOVUxMKQ0KPiAg CQllcnJ4KDEsICJ1bmFibGUgdG8gaW5pdCBjYXNwZXIiKTsNCj4gIA0KPiANCj4gTW9kaWZpZWQ6 IGhlYWQvdXNyLmJpbi93Yy93Yy5jDQo+ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KPiAtLS0gaGVh ZC91c3IuYmluL3djL3djLmMJV2VkIEFwciAxNyAxNjowMjo1NyAyMDE5CShyMzQ2MzE1KQ0KPiAr KysgaGVhZC91c3IuYmluL3djL3djLmMJV2VkIEFwciAxNyAxNjoxODoxNCAyMDE5CShyMzQ2MzE2 KQ0KPiBAQCAtMTMzLDcgKzEzMyw3IEBAIG1haW4oaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkNCj4g IAkodm9pZClzaWduYWwoU0lHSU5GTywgc2lnaW5mb19oYW5kbGVyKTsNCj4gIA0KPiAgCWZhID0g ZmlsZWFyZ3NfaW5pdChhcmdjLCBhcmd2LCBPX1JET05MWSwgMCwNCj4gLQkgICAgY2FwX3JpZ2h0 c19pbml0KCZyaWdodHMsIENBUF9SRUFELCBDQVBfRlNUQVQpKTsNCj4gKwkgICAgY2FwX3JpZ2h0 c19pbml0KCZyaWdodHMsIENBUF9SRUFELCBDQVBfRlNUQVQpLCBGQV9PUEVOKTsNCj4gIAlpZiAo ZmEgPT0gTlVMTCkgew0KPiAgCQl4b193YXJuKCJVbmFibGUgdG8gaW5pdCBjYXNwZXIiKTsNCj4g IAkJZXhpdCgxKTsNCj4gX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX18NCj4gc3ZuLXNyYy1oZWFkQGZyZWVic2Qub3JnIG1haWxpbmcgbGlzdA0KPiBodHRwczov L2xpc3RzLmZyZWVic2Qub3JnL21haWxtYW4vbGlzdGluZm8vc3ZuLXNyYy1oZWFkDQo+IFRvIHVu c3Vic2NyaWJlLCBzZW5kIGFueSBtYWlsIHRvICJzdm4tc3JjLWhlYWQtdW5zdWJzY3JpYmVAZnJl ZWJzZC5vcmciDQoNClRoaXMgY29tbWl0IHNlZW1zIHRvIGJyZWFrIGJ1aWxkd29ybGQgb24gbXkg aW5zdGFsbGF0aW9uczoNCg0KWy4uLl0NCkJ1aWxkaW5nIC91c3Ivb2JqL3Vzci9zcmMvYW1kNjQu YW1kNjQvdG1wL29iai10b29scy91c3IuYmluL3N0cmluZ3Mvc3RyaW5ncy5vDQotIC0tLSBzdHJp bmdzLm8gLS0tDQovdXNyL3NyYy9jb250cmliL2VsZnRvb2xjaGFpbi9zdHJpbmdzL3N0cmluZ3Mu YzoxOTg6NTU6IGVycm9yOiB1c2Ugb2YgdW5kZWNsYXJlZCBpZGVudGlmaWVyDQonRkFfT1BFTicg ZmEgPSBmaWxlYXJnc19pbml0KGFyZ2MsIGFyZ3YsIE9fUkRPTkxZLCAwLCAmcmlnaHRzLCBGQV9P UEVOKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBeDQoxIGVycm9yIGdlbmVyYXRlZC4NCioqKiBbc3RyaW5ncy5vXSBFcnJvciBj b2RlIDENCg0KDQpLaW5kIHJlZ2FyZHMsDQoNCk8uIEhhcnRtYW5uDQoNCi0gLS0gDQpPLiBIYXJ0 bWFubg0KDQpJY2ggd2lkZXJzcHJlY2hlIGRlciBOdXR6dW5nIG9kZXIgw5xiZXJtaXR0bHVuZyBt ZWluZXIgRGF0ZW4gZsO8cg0KV2VyYmV6d2Vja2Ugb2RlciBmw7xyIGRpZSBNYXJrdC0gb2RlciBN ZWludW5nc2ZvcnNjaHVuZyAowqcgMjggQWJzLiA0IEJEU0cpLg0KLS0tLS1CRUdJTiBQR1AgU0lH TkFUVVJFLS0tLS0NCg0KaUhVRUFSWUlBQjBXSVFTeThJQnhBUERrcVZCYVRKNDROMVpaUGJhNVJ3 VUNYTGRuc1FBS0NSQTROMVpaUGJhNQ0KUjJIU0FQNGtlU1N5UEwva0ZMZkpGWUlnYVNTUzN4Y0NX NnRIanUyVE0rNTA4c1pRbUFFQXYzSHlVVHlibGE3ZA0KdjhpeHBicGhROVAwb09NaFBUZHFHcWhz aWVBbk93Yz0NCj1hK1l0DQotLS0tLUVORCBQR1AgU0lHTkFUVVJFLS0tLS0NCg== From owner-svn-src-all@freebsd.org Wed Apr 17 18:05:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4331415748EA; Wed, 17 Apr 2019 18:05:47 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id D71CC8BC9E; Wed, 17 Apr 2019 18:05:46 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [192.168.1.41] (89.red-88-7-96.staticip.rima-tde.net [88.7.96.89]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 396234E632; Wed, 17 Apr 2019 18:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; s=mail; t=1555524344; bh=+e45QVdIYJQk78d4l3r/wtPRw+D60e9/T/mEz6VvwCM=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=sK5SrVgQJU1b0U0dmZntYzlr8LtrpFxasRRRZoh+MhBVSg6U6ENw5fpWvm4IDDPjM wwKuq9+tfBs+ZD3MZ63nJtwLQ0cW9vcsIxWNWOnrHQNZr7PsmXHyc5Erg9UtK2CRln 6YShPWTUcC2xVcp92wZY8oZSuotSd6kmjrS1yoQQmfQaV7bh0TX8ObMJ69ZmVsFv06 J5xLkBnzv3elqSsb29VphEELcL91hkLxKZB71f5mA7kctpPM6i8zdLH3onAch2Q4VN mvnwmO1zfsCZ6zVlXpmcFxn6HR+bRYZkZgh6t59InJrNcb3QiAgmuVvOa0fWQEOgbd +yzDu0xmpb+aX6CT1a+qhQYLpeqg9CYGg6PeDQE62TmSXZZ8MJpQFHwRZ5zBYu1cOT qVDrS7i9xDPqEiGosqMC7FtIEUTLVdQFbRqp0RBtJulZM6AFIEXa/ftrL3KmkSOWXI yHRlLyMErZe7FPWDPEH/SwxDtWUPGYC3kGf/mp/t+5VKdN6j2W7G98jMheEYcZz95y +36rUheNzGTnVAjceb0J/2JKoDtZFr3sea/HzppH/gal/HZ859KGi0qRvfj4z1bnvq Q7VA306myOxS843WNE/qexf9EszpZlF3pAfuBlHPjw/nyNQyWksJpz29OOS25Ww5g6 xqTT8f4+4ujiotjXC+dPZcJ0= From: Andrew Turner Message-Id: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: svn commit: r346295 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/mv arm/nvidia/tegra124 a... Date: Wed, 17 Apr 2019 20:05:43 +0200 In-Reply-To: Cc: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Ian Lepore References: <201904162004.x3GK4N7u019636@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: D71CC8BC9E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 18:05:47 -0000 > On 17 Apr 2019, at 17:52, Ian Lepore wrote: >=20 > On Wed, 2019-04-17 at 11:23 +0200, Andrew Turner wrote: >>> On 16 Apr 2019, at 22:04, Emmanuel Vadot wrote: >>>=20 >>> Author: manu >>> Date: Tue Apr 16 20:04:22 2019 >>> New Revision: 346295 >>> URL: https://svnweb.freebsd.org/changeset/base/346295 >>>=20 >>> Log: >>> arm: Add kern_clocksource.c directly in files.arm >>>=20 >>> This files is needed and included in all our config so move it to >>> a common >>> location. >>>=20 >>> MFC after: 2 weeks >>=20 >> ... >>> Modified: head/sys/conf/files.arm >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- head/sys/conf/files.arm Tue Apr 16 19:46:02 2019 = (r346294) >>> +++ head/sys/conf/files.arm Tue Apr 16 20:04:22 2019 = (r346295) >>> @@ -11,6 +11,9 @@ cloudabi32_vdso_blob.o optional = com >>> pat_cloudabi32 \ >>> no-implicit-rule = \ >>> clean "cloudabi32_vdso_blob.o" >>> # >>> + >>> +kern/kern_clocksource.c standard >>=20 >> Could this be moved from the various files.* to files? It seems we >> define it as standard on all architectures. >>=20 >>=20 >=20 > I thought mips still had some variants that didn't implement event > timers. That's why this stuff was ever in arch-specific files, arm = and > mips had some flavors without ET support. I think it used to be the case on arm. A grep seems to think it=E2=80=99s = enabled on all architectures now: grep kern_clocksource files.* files.amd64:kern/kern_clocksource.c standard files.arm:kern/kern_clocksource.c standard files.arm64:kern/kern_clocksource.c standard files.i386:kern/kern_clocksource.c standard files.mips:kern/kern_clocksource.c standard files.powerpc:kern/kern_clocksource.c standard files.riscv:kern/kern_clocksource.c standard files.sparc64:kern/kern_clocksource.c standard Andrew From owner-svn-src-all@freebsd.org Wed Apr 17 18:08:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46C941574A52; Wed, 17 Apr 2019 18:08:22 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C18FE8BEA2; Wed, 17 Apr 2019 18:08:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f48.google.com with SMTP id p16so21406174iod.2; Wed, 17 Apr 2019 11:08:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=25UmBtc9HFlYLIS8E/28Z8IXOIrF2VTG7EPUUutq/6Q=; b=JY3DMcAQxGYrBxVd6RhZNYEFu01ETwIpp8DFkg2/djEzvUkBS04TF5iyy5ov9qek2w OYLMt4lgmDmAk4wKDduse5g2W5f87As77LSrNCXDqIeloVcFZdsLgdhycoRkshZLdENe 4WTsvo6twYvQgrhXEQgqZ5G4QVxE3nqcuMmXXJYq85WMNtCV93bMnmUyp9tIaNHnb9f0 tXrJ88RY6mGUYuKTMMXj+LM4Tv7WAfTCF2nX9gtBhDVElPwUGroqAJTl48AhtXkZeNOo US4FsVG+DllVwVunjXAMoTehfDUOoWhg4SDGliJl7Ke22fc/Bc26sKCRMLBwgeiJirMP IvSA== X-Gm-Message-State: APjAAAX1rnTHlit4e9qwWXnu3OBtnBXW5zksdyeJPPueQyQNpRXDaEld 097fboacd/KRxHT3s60+5pioPjmm X-Google-Smtp-Source: APXvYqzUuEtB2fD8OpXjCrZsyO15AMev9y3xEwFJ/F3NUZaLEVICbtEdNNmiwBDGOq6DQI1qXDOHHg== X-Received: by 2002:a5e:d510:: with SMTP id e16mr773614iom.297.1555524021294; Wed, 17 Apr 2019 11:00:21 -0700 (PDT) Received: from mail-it1-f179.google.com (mail-it1-f179.google.com. [209.85.166.179]) by smtp.gmail.com with ESMTPSA id v23sm20398139ioq.6.2019.04.17.11.00.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 11:00:21 -0700 (PDT) Received: by mail-it1-f179.google.com with SMTP id 139so5846283ita.4; Wed, 17 Apr 2019 11:00:21 -0700 (PDT) X-Received: by 2002:a05:6638:28c:: with SMTP id c12mr33927696jaq.87.1555524020968; Wed, 17 Apr 2019 11:00:20 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> <457a2c63-f062-8fc6-15d4-6f5b93981930@FreeBSD.org> <5d790a56-1498-094e-6bb4-48345a231e55@FreeBSD.org> <383a21de-9a7a-2d06-1673-001e84af67f9@FreeBSD.org> In-Reply-To: <383a21de-9a7a-2d06-1673-001e84af67f9@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 17 Apr 2019 11:00:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: C18FE8BEA2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 18:08:22 -0000 Hi John, On Wed, Apr 17, 2019 at 9:01 AM John Baldwin wrote: > You're missing the point which is that you've added potential blocking in a lot of > places by changing the semantics of arc4random. I get it. The thing is, it's a weird blocking semantic. It's not the same as any other blocking semantic we have elsewhere in the kernel. It can't happen in any particular call. Once it unblocks, it's nonblocking forever after. So if the caller a priori knows that random is seeded, it's not a blocking operation. > Unless you're intending to > hand-audit all of them (as well as future uses), I think having the existing > API be "safe" (and blocking) but use WITNESS_WARN is a way to catch existing > and future locking problems. This would essentially just force auditing, no? I guess it helps highlight instances that are (a) actually inside a locked region and (b) run by users. I'm on board with this approach. My only concern is that we will have false positives (and continue to have false positives after true positives are made safe). One thing we could do is teach WITNESS about random's seeded/not status. Let's take away: I'll owe you a differential implementing some version of this proposal, as well as a separate one for the giant unsafe-random knob, and we can discuss the technical details offline. Expect something today, if at all possible. > The EWOULDBLOCK API is something a developer > would choose and it means they would be aware of the constraint and need to > deal with it, either by handling EWOULDBLOCK in some way, or deferring use > until seeded, etc. Ok; if it is attached to a specific need, and it has '__attribute__((warn_unused_result))' attached to it, I'm tentatively ok with the idea. I don't want to add additional interfaces that don't get used, or make it easy to accidentally get non-results. Best regards, Conrad From owner-svn-src-all@freebsd.org Wed Apr 17 18:08:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18E321574A9E; Wed, 17 Apr 2019 18:08:33 +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 AF7CA8BF71; Wed, 17 Apr 2019 18:08:32 +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 E9468AC3A; Wed, 17 Apr 2019 18:08:28 +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 x3HI8ShW017243; Wed, 17 Apr 2019 18:08:28 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HI8SCX017242; Wed, 17 Apr 2019 18:08:28 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904171808.x3HI8SCX017242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 17 Apr 2019 18:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346328 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 346328 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF7CA8BF71 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 18:08:33 -0000 Author: kevans Date: Wed Apr 17 18:08:28 2019 New Revision: 346328 URL: https://svnweb.freebsd.org/changeset/base/346328 Log: Compile sha1.c when ether support is included sha1 is used by ether_gen_addr after r346324. Perhaps in an ideal world we could detect that the kernel's been compiled without sha1_* bits included and silently fallback to arc4random instead because these platforms/kernel configs are far and few between. It's fairly lightweight, though, so just include it for now. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 17 17:50:44 2019 (r346327) +++ head/sys/conf/files Wed Apr 17 18:08:28 2019 (r346328) @@ -680,8 +680,8 @@ crypto/rijndael/rijndael-alg-fst.c optional crypto | e crypto/rijndael/rijndael-api-fst.c optional ekcd | geom_bde | random !random_loadable crypto/rijndael/rijndael-api.c optional crypto | ipsec | ipsec_support | \ wlan_ccmp -crypto/sha1.c optional carp | crypto | ipsec | \ - ipsec_support | netgraph_mppc_encryption | sctp +crypto/sha1.c optional carp | crypto | ether | ipsec | \ + ipsec_support | netgraph_mppc_encryption | sctp crypto/sha2/sha256c.c optional crypto | ekcd | geom_bde | ipsec | \ ipsec_support | random !random_loadable | sctp | zfs crypto/sha2/sha512c.c optional crypto | geom_bde | ipsec | \ From owner-svn-src-all@freebsd.org Wed Apr 17 18:22:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A19AA157521E; Wed, 17 Apr 2019 18:22:45 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 804E28CA57; Wed, 17 Apr 2019 18:22:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wr1-x429.google.com with SMTP id s15so33170004wra.12; Wed, 17 Apr 2019 11:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PJ9kbcJCtaQ5smMbT6vrY8BlH/XWFuYJIzSHDIcU5xw=; b=H28mYt2AwRoBOoVgdjJQ3k56s8ADu+7G8KTrECZpSWJBJbDr71C+OK7iKM4PN4rPzV 6uBzuIGCeSm9D2LcTZNFathL7LeV5VQWKAZ1oTUnbTWCk+N1F7qvMGG1UPR1DrplXI0N +j1WqkRiwNwZK3hnw9czq/oxFBcxfZSY65pEb2neA04jOarkNuwCFUYwf423VaD5RER2 X/D8yMuiIUDvGBgkBiJMFelsf2BHesTlU9hT9jAZFGq60om9GxnYtqfKZJhAwsoSPzcB qZodfvgFovwmD+MH7TFRnSvziWD8U3tIIuo9VBYyUohP+Cxr05mqgPme1JBucciT6JbU lmOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PJ9kbcJCtaQ5smMbT6vrY8BlH/XWFuYJIzSHDIcU5xw=; b=eSUiaw9qZiPuOmk76RYQN3TYvQ8idip/35EOIhM9dgthOyNwEnkEWAHqotEgwrZwrd t6Lv8glC/+0mG5Cj4kOuUKWUse4sjPU+I6tEVZDXqKvmOuIDZ9B/kAM0d8GmwERMoq5d v4JaKWiWnqRmPeAmcz9XyrNGHnveg1wxQ3z1HVk7lo+c9UMVBqDoQSRNMjhoyHaPQ7Oe rBgmDqRIwXYzPIlf2VdFnjRRCsnaFxliZeDCdd5zOCzT3E/eGCt1hSk2SsdMW7xZmUPu mWJPDpGr+xhV4XG/8tBxdTmLkiT17JrOjxl0dQw87KlH3kI0vStPX5UN+okH4ok1iQBJ CofA== X-Gm-Message-State: APjAAAV3/GrGLY6ysfSgw+xtwOSq77yjUCeGJsxJ5Xzuv5M0Zpa4MVpg oDNNlaFI/ORX/qBxfOxTVTvsC5XC2wikAMXIgpgR5A== X-Google-Smtp-Source: APXvYqyn5HQQ4H2MYjJP67VEKEuDfCZvPy7X0nABbsW+NzIfNhHl3LU7SCRrbpRBCFXsBBQYaM6ANLMHG/nm3XkmdgA= X-Received: by 2002:adf:c788:: with SMTP id l8mr57231269wrg.143.1555525362747; Wed, 17 Apr 2019 11:22:42 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> In-Reply-To: <201904151840.x3FIeaEQ009242@repo.freebsd.org> From: Adrian Chadd Date: Wed, 17 Apr 2019 11:22:29 -0700 Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 804E28CA57 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=H28mYt2A; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2a00:1450:4864:20::429 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-6.73 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[9.2.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.77)[ip: (-9.19), ipnet: 2a00:1450::/32(-2.38), asn: 15169(-2.22), country: US(-0.06)]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 18:22:46 -0000 On Mon, 15 Apr 2019 at 11:40, Conrad Meyer wrote: > Author: cem > Date: Mon Apr 15 18:40:36 2019 > New Revision: 346250 > URL: https://svnweb.freebsd.org/changeset/base/346250 > > Log: > random(4): Block read_random(9) on initial seeding > Sniffle, this broke on my mips boards whilst debugging why I'm seeing transmit crashes and other bad behaviours. if_arge has some hacks to randomly allocate mac addresses if the board doesn't supply them. This is going to be a common thing to deal with during board bring-up before you do things like, I dunno, make storage work. I'm going to fix if_arge to use the new API to generate MAC addresses but there'll be other places where this will bite you. Please reconsider this a bit. I know people are trying to improve our security and cryptography support. But some of us are trying to use FreeBSD code in fun places and maybe occasionally do some more porting work. :-) -adrian From owner-svn-src-all@freebsd.org Wed Apr 17 18:27:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB55B157549B; Wed, 17 Apr 2019 18:27:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f174.google.com (mail-it1-f174.google.com [209.85.166.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8740E8CD65; Wed, 17 Apr 2019 18:27:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f174.google.com with SMTP id f22so6004064ita.3; Wed, 17 Apr 2019 11:27:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=QGP7F9m4o/RsepS72FdozeGpLOMdlnr2ofMC6Id59e0=; b=hScPq0cAcamBmRJAMP1xO+MK3Y8ZyXXRC9pG9fg0oxVdsusWUI5qAlzNCoTpinX0AU QDcxwFH+hKPN7G5IOl12rhsA23JasLZDygR6nrbWOZwVvXu+ilKZBvi5VI5ZEgqleAZd JBwDyhzP70ZB5oRH5VdHS4NZrE+69oJYklXXp7NKdul31N2mJfR4aJs00830q6CeTD7j X7/sL39XtmzzHEXgewjVVqSre2STsy57INngrh8rwvKMEL4kTMBMMkUEtwrG7H6nxsyi W1blp4MzgfKPgk2W6iG6ShCAe6Hf/MeOWXFSlGZk1JSjQcqd/r8JCWSdKa4LzRNKp3ik Y5Cw== X-Gm-Message-State: APjAAAUmuhPual2i3PESQkp1V7ImIZfnZDkl1Y86yH27i7pp5QY5mtqZ lpZptnTzB1QTWVKV0BBahvilk1Ng X-Google-Smtp-Source: APXvYqwG41FXn6IodcrGBQ9SjFT6gInOvxDQOGinCZkeci/8WW3J0ZaTVquDJUyYV44X9cZ9+YTRpA== X-Received: by 2002:a05:6638:26e:: with SMTP id x14mr821880jaq.32.1555525662447; Wed, 17 Apr 2019 11:27:42 -0700 (PDT) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com. [209.85.166.53]) by smtp.gmail.com with ESMTPSA id s10sm20547337ioc.54.2019.04.17.11.27.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 11:27:42 -0700 (PDT) Received: by mail-io1-f53.google.com with SMTP id s7so2194668iom.12; Wed, 17 Apr 2019 11:27:42 -0700 (PDT) X-Received: by 2002:a6b:c84e:: with SMTP id y75mr40997792iof.107.1555525661861; Wed, 17 Apr 2019 11:27:41 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 17 Apr 2019 11:27:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys To: Adrian Chadd Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 8740E8CD65 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 18:27:49 -0000 Hey Adrian, As discussed with John and Warner upthread, I hope to have a patch out for review later today to give folks a knob to disable this. It may even make sense to default it on, at least for !x86. I am happy to CC you on review if you like. Take care, Conrad On Wed, Apr 17, 2019 at 11:22 AM Adrian Chadd wrot= e: > > > > On Mon, 15 Apr 2019 at 11:40, Conrad Meyer wrote: >> >> Author: cem >> Date: Mon Apr 15 18:40:36 2019 >> New Revision: 346250 >> URL: https://svnweb.freebsd.org/changeset/base/346250 >> >> Log: >> random(4): Block read_random(9) on initial seeding > > > Sniffle, this broke on my mips boards whilst debugging why I'm seeing tra= nsmit crashes and other bad behaviours. if_arge has some hacks to randomly = allocate mac addresses if the board doesn't supply them. This is going to b= e a common thing to deal with during board bring-up before you do things li= ke, I dunno, make storage work. I'm going to fix if_arge to use the new API= to generate MAC addresses but there'll be other places where this will bit= e you. > > Please reconsider this a bit. I know people are trying to improve our sec= urity and cryptography support. But some of us are trying to use FreeBSD co= de in fun places and maybe occasionally do some more porting work. :-) > > > -adrian > > From owner-svn-src-all@freebsd.org Wed Apr 17 19:16:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25D2A1576646; Wed, 17 Apr 2019 19:16:27 +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 BDEBB8F284; Wed, 17 Apr 2019 19:16:26 +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 A1DEEB857; Wed, 17 Apr 2019 19:16:26 +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 x3HJGQLM055935; Wed, 17 Apr 2019 19:16:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HJGQvl055934; Wed, 17 Apr 2019 19:16:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171916.x3HJGQvl055934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 19:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346329 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 346329 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BDEBB8F284 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 19:16:27 -0000 Author: emaste Date: Wed Apr 17 19:16:26 2019 New Revision: 346329 URL: https://svnweb.freebsd.org/changeset/base/346329 Log: Install some entropy for QEMU CI smoke test See r346250 and followup commits and mailing list discussion. We currently fail to boot properly in the absense of boot-time entropy. Sponsored by: The FreeBSD Foundation Modified: head/tools/boot/ci-qemu-test.sh Modified: head/tools/boot/ci-qemu-test.sh ============================================================================== --- head/tools/boot/ci-qemu-test.sh Wed Apr 17 18:08:28 2019 (r346328) +++ head/tools/boot/ci-qemu-test.sh Wed Apr 17 19:16:26 2019 (r346329) @@ -68,6 +68,9 @@ echo "Hello world." /sbin/shutdown -p now EOF + # Entropy needed to boot, see r346250 and followup commits/discussion. + dd if=/dev/random of=${ROOTDIR}/boot/entropy bs=4k count=1 + # Remove unnecessary files to keep FAT filesystem size down. rm -rf ${ROOTDIR}/METALOG ${ROOTDIR}/usr/lib } From owner-svn-src-all@freebsd.org Wed Apr 17 19:24:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3601D1576A4E; Wed, 17 Apr 2019 19:24:42 +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 C752E8F874; Wed, 17 Apr 2019 19:24:41 +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 B699FBA2F; Wed, 17 Apr 2019 19:24:41 +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 x3HJOfwP061078; Wed, 17 Apr 2019 19:24:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HJOfiX061077; Wed, 17 Apr 2019 19:24:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904171924.x3HJOfiX061077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 17 Apr 2019 19:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346330 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 346330 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C752E8F874 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 19:24:42 -0000 Author: emaste Date: Wed Apr 17 19:24:41 2019 New Revision: 346330 URL: https://svnweb.freebsd.org/changeset/base/346330 Log: Put QEMU CI smoke test boot log in /tmp if TMPDIR not set Sponsored by: The FreeBSD Foundation Modified: head/tools/boot/ci-qemu-test.sh Modified: head/tools/boot/ci-qemu-test.sh ============================================================================== --- head/tools/boot/ci-qemu-test.sh Wed Apr 17 19:16:26 2019 (r346329) +++ head/tools/boot/ci-qemu-test.sh Wed Apr 17 19:24:41 2019 (r346330) @@ -95,7 +95,7 @@ trap tempdir_cleanup EXIT SIGINT SIGHUP SIGTERM SIGQUI ( cd ${SRCTOP} && tempdir_setup ) # And, boot in QEMU. -: ${BOOTLOG:=${TMPDIR}/ci-qemu-test-boot.log} +: ${BOOTLOG:=${TMPDIR:-/tmp}/ci-qemu-test-boot.log} timeout 300 \ qemu-system-x86_64 -m 256M -bios ${OVMF} \ -serial stdio -vga none -nographic -monitor none \ From owner-svn-src-all@freebsd.org Wed Apr 17 19:42:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 729911576F07; Wed, 17 Apr 2019 19:42:22 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D2FA79008B; Wed, 17 Apr 2019 19:42:19 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id GqRchT3XZldkPGqRdh8alz; Wed, 17 Apr 2019 13:42:11 -0600 X-Authority-Analysis: v=2.3 cv=Ko4zJleN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=8nJEP1OIZ-IA:10 a=oexKYjalfGEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=I6yUJlocKgAmpqPFSQ4A:9 a=ujYVat4fVGMNhHHV:21 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 0D1C19FB; Wed, 17 Apr 2019 12:42:08 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x3HJfmxa090934; Wed, 17 Apr 2019 12:41:48 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x3HJfmee090931; Wed, 17 Apr 2019 12:41:48 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201904171941.x3HJfmee090931@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "O. Hartmann" cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc In-Reply-To: Message from "O. Hartmann" of "Wed, 17 Apr 2019 19:51:18 +0200." <20190417195145.6824c0f9@thor.intern.walstatt.dynvpn.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Wed, 17 Apr 2019 12:41:48 -0700 X-CMAE-Envelope: MS4wfH9c/N9rJwfMu4tAy3Z3R51gre7O2Kot8t853ldJkEMc6j6ngYkCuHjsPRopGQSVxqb6QmTB1Sql4CMfrGHt0yhZJNJ2geEsDD60mFBZdcRnDuJOE9cz Hiq3+xRjiA5r38OwyTCSzVerccyWodG38mlchq+Opo/RoLAKbSMOHw63k5ZsU+zhL0YvBwmLVpvyVvuV2CshN4ET5AzE2BV6pP8vxF+hqQc35cNUftB/BlUb 42LAYWzBIy32Z8L0krAtXhpwtOGvnSwYCyhWU2y6Yp1jvMe3azA7/s8SP/+A/FccHvBK797U0Hl2a1BX8NSokMZio1yAzkeRy2YCTRLkx3k= X-Rspamd-Queue-Id: D2FA79008B X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.16 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; IP_SCORE(-2.52)[ip: (-6.93), ipnet: 64.59.128.0/20(-3.16), asn: 6327(-2.41), country: CA(-0.09)]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[spqr.komquats.com]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[13.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 19:42:22 -0000 In message <20190417195145.6824c0f9@thor.intern.walstatt.dynvpn.de>, "O. Hartma nn" writes: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Am Wed, 17 Apr 2019 16:18:14 +0000 (UTC) > Ed Maste schrieb: > > > Author: emaste > > Date: Wed Apr 17 16:18:14 2019 > > New Revision: 346316 > > URL: https://svnweb.freebsd.org/changeset/base/346316 > > > > Log: > > cap_fileargs: chase r346315, update fileargs_init in consumers > > > > Reported by: ci.freebsd.org (8 times so far) > > MFC after: 3 weeks > > MFC with: r346315 > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/contrib/elftoolchain/strings/strings.c > > head/sbin/savecore/savecore.c > > head/usr.bin/brandelf/brandelf.c > > head/usr.bin/head/head.c > > head/usr.bin/wc/wc.c > > > > Modified: head/contrib/elftoolchain/strings/strings.c > > =========================================================================== > === > > --- head/contrib/elftoolchain/strings/strings.c Wed Apr 17 16:02:57 201 > 9 > > (r346315) +++ head/contrib/elftoolchain/strings/strings.c Wed Apr 17 16:1 > 8:14 > > 2019 (r346316) @@ -195,7 +195,7 @@ main(int argc, char **argv) > > argv += optind; > > > > cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL); > > - fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights); > > + fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > if (fa == NULL) > > err(1, "Unable to initialize casper fileargs"); > > > > > > Modified: head/sbin/savecore/savecore.c > > =========================================================================== > === > > --- head/sbin/savecore/savecore.c Wed Apr 17 16:02:57 2019 (r34631 > 5) > > +++ head/sbin/savecore/savecore.c Wed Apr 17 16:18:14 2019 (r34631 > 6) > > @@ -1030,7 +1030,7 @@ init_caps(int argc, char **argv) > > */ > > (void)cap_rights_init(&rights, CAP_PREAD, CAP_WRITE, CAP_IOCTL); > > capfa = fileargs_init(argc, argv, checkfor || keep ? O_RDONLY : O_RDWR, > > - 0, &rights); > > + 0, &rights, FA_OPEN); > > if (capfa == NULL) { > > logmsg(LOG_ERR, "fileargs_init(): %m"); > > exit(1); > > > > Modified: head/usr.bin/brandelf/brandelf.c > > =========================================================================== > === > > --- head/usr.bin/brandelf/brandelf.c Wed Apr 17 16:02:57 2019 > (r346315) > > +++ head/usr.bin/brandelf/brandelf.c Wed Apr 17 16:18:14 2019 > (r346316) > > @@ -133,7 +133,7 @@ main(int argc, char **argv) > > if (flags == O_RDWR) > > cap_rights_set(&rights, CAP_WRITE); > > > > - fa = fileargs_init(argc, argv, flags, 0, &rights); > > + fa = fileargs_init(argc, argv, flags, 0, &rights, FA_OPEN); > > if (fa == NULL) > > errx(1, "unable to init casper"); > > > > > > Modified: head/usr.bin/head/head.c > > =========================================================================== > === > > --- head/usr.bin/head/head.c Wed Apr 17 16:02:57 2019 (r34631 > 5) > > +++ head/usr.bin/head/head.c Wed Apr 17 16:18:14 2019 (r34631 > 6) > > @@ -115,7 +115,7 @@ main(int argc, char *argv[]) > > argv += optind; > > > > fa = fileargs_init(argc, argv, O_RDONLY, 0, > > - cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL)); > > + cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL), FA_OPEN); > > if (fa == NULL) > > errx(1, "unable to init casper"); > > > > > > Modified: head/usr.bin/wc/wc.c > > =========================================================================== > === > > --- head/usr.bin/wc/wc.c Wed Apr 17 16:02:57 2019 (r346315) > > +++ head/usr.bin/wc/wc.c Wed Apr 17 16:18:14 2019 (r346316) > > @@ -133,7 +133,7 @@ main(int argc, char *argv[]) > > (void)signal(SIGINFO, siginfo_handler); > > > > fa = fileargs_init(argc, argv, O_RDONLY, 0, > > - cap_rights_init(&rights, CAP_READ, CAP_FSTAT)); > > + cap_rights_init(&rights, CAP_READ, CAP_FSTAT), FA_OPEN); > > if (fa == NULL) { > > xo_warn("Unable to init casper"); > > exit(1); > > _______________________________________________ > > svn-src-head@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > This commit seems to break buildworld on my installations: > > [...] > Building /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/usr.bin/strings/strings.o > - --- strings.o --- > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of undecla > red identifier > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > ^ > 1 error generated. > *** [strings.o] Error code 1 Try this. We shouldn't use headers in /usr/include, only the ones in src/. Index: tools/build/Makefile =================================================================== --- tools/build/Makefile (revision 346330) +++ tools/build/Makefile (working copy) @@ -59,9 +59,7 @@ INCS+= libcasper.h .endif -.if !exists(/usr/include/casper/cap_fileargs.h) CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs. h -.endif .if empty(SRCS) SRCS= dummy.c I found a number of bugs like this one in heimdal in base and in ntp previously. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Apr 17 20:00:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C6E715779FC for ; Wed, 17 Apr 2019 20:00:05 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f179.google.com (mail-it1-f179.google.com [209.85.166.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 778F490AFD for ; Wed, 17 Apr 2019 20:00:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f179.google.com with SMTP id a190so6798001ite.4 for ; Wed, 17 Apr 2019 13:00:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:cc; bh=oliKEeX5LVs4UAtoKJXGziii1cXIejgiXKULEHpqBr4=; b=EYqSY8ppPrXBXUvATc8pZRRdTM4UQ9KUX1/kbb0SxQmrECuBbDuSpUSKcgMF+7BYL4 70QcTCly8Vbu+ZTjRqGhWmNxQlDiUH9Ycs91Y3lk/SZ86EGQpsoEqj36elDyEW7jrCuE mhTfJvgGqvEiH3K3efif8qhNqUgT9W3aYeNYm3KahsVHgQ9F6XaKT9Z0AcMyjlsgfBa9 wKUp6EW6KIQo77wO/wUYEGNjBccRX6+qGmARuFK5fvTNrTI5c5a9gtik+rcdjtcAOkFG anLjxdwMChQwlNo412+zFUZNryKIue1TjpckFu9nR2yE9PwjVt3B/ATPWOLOr3TYNKrP rU4A== X-Gm-Message-State: APjAAAXMA9oHVFxZs0lExlems7K2GG2o7aXwwYN1A8it7EQ/7p+rXhuQ qzQHQo9cZgChmZ/5+ysQY1bE0HHA X-Google-Smtp-Source: APXvYqwBo7fB2noQZSRku6sVQnJ40YzfreushERAlyxx2U8OFdfhgsnCfpxU7yjfPBijsIag4Hwwbw== X-Received: by 2002:a24:4150:: with SMTP id x77mr359586ita.42.1555531202629; Wed, 17 Apr 2019 13:00:02 -0700 (PDT) Received: from mail-it1-f174.google.com (mail-it1-f174.google.com. [209.85.166.174]) by smtp.gmail.com with ESMTPSA id k2sm20418830ion.11.2019.04.17.13.00.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 13:00:02 -0700 (PDT) Received: by mail-it1-f174.google.com with SMTP id f22so6428022ita.3 for ; Wed, 17 Apr 2019 13:00:02 -0700 (PDT) X-Received: by 2002:a05:660c:10:: with SMTP id q16mt296715itj.149.1555531202079; Wed, 17 Apr 2019 13:00:02 -0700 (PDT) MIME-Version: 1.0 References: <201904151840.x3FIeaEQ009242@repo.freebsd.org> In-Reply-To: <201904151840.x3FIeaEQ009242@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 17 Apr 2019 12:59:50 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 778F490AFD X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.179 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-3.77 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; MISSING_TO(2.00)[]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; IP_SCORE(-2.80)[ip: (-7.81), ipnet: 209.85.128.0/17(-3.88), asn: 15169(-2.22), country: US(-0.06)]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[179.166.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 20:00:05 -0000 On Mon, Apr 15, 2019 at 11:40 AM Conrad Meyer wrote: > > Author: cem > Date: Mon Apr 15 18:40:36 2019 > New Revision: 346250 > URL: https://svnweb.freebsd.org/changeset/base/346250 > > Log: > random(4): Block read_random(9) on initial seeding Hi, For anyone interested in a change to restore the previous behavior (optionally, but on by default for now), please see https://reviews.freebsd.org/D19944 . Thanks, Conrad From owner-svn-src-all@freebsd.org Wed Apr 17 20:08:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B3421577DD2; Wed, 17 Apr 2019 20:08:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 91DEC910CF; Wed, 17 Apr 2019 20:08:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BECDC2AE; Wed, 17 Apr 2019 20:08:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HK83en082071; Wed, 17 Apr 2019 20:08:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HK81ml082062; Wed, 17 Apr 2019 20:08:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201904172008.x3HK81ml082062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 17 Apr 2019 20:08: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: r346331 - in stable/12: gnu/lib lib/libomp share/man/man5 share/mk tools/build/mk tools/build/options X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/12: gnu/lib lib/libomp share/man/man5 share/mk tools/build/mk tools/build/options X-SVN-Commit-Revision: 346331 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91DEC910CF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 20:08:04 -0000 Author: dim Date: Wed Apr 17 20:08:01 2019 New Revision: 346331 URL: https://svnweb.freebsd.org/changeset/base/346331 Log: After r346168, also merge build infrastructure for LLVM libomp. MFC r345235: Add lib/libomp, with a Makefile, and generated configuration headers. Not connected to the main build yet, as there is still the issue of the GNU omp.h header conflicting with the LLVM one. (That is, if MK_GCC is enabled.) PR: 236062 MFC r345236: Connect lib/libomp to the build. * Set MK_OPENMP to yes by default only on amd64, for now. * Bump __FreeBSD_version to signal this addition. * Ensure gcc's conflicting omp.h is not installed if MK_OPENMP is yes. * Update OptionalObsoleteFiles.inc to cope with the conflicting omp.h. * Regenerate src.conf(5) with new WITH/WITHOUT fragments. Relnotes: yes PR: 236062 MFC r345242: Explicitly link libomp.so against -lpthread, as it depends on pthread functionality. This should make example OpenMP programs work out of the box. Reported by: jbeich PR: 236062, 236581 MFC r345278: Also explicitly link libomp.so against -lm, as it transitively depends on scalbn and a few other math functions, via libcompiler-rt. This should allow OpenMP programs to link with BFD linkers too. Reported by: jbeich PR: 236062, 236581 MFC r345282: Remove --as-needed from the linker flags for libomp.so, as these actually prevent the transitive dependency on libm. Reported by: jbeich PR: 236062, 236581 MFC r345291: Turn on MK_OPENMP for i386 by default, now that it can build. Noticed by: jbeich PR: 236062, 236582 Added: stable/12/lib/libomp/ - copied from r345235, head/lib/libomp/ stable/12/tools/build/options/WITHOUT_OPENMP - copied unchanged from r345236, head/tools/build/options/WITHOUT_OPENMP stable/12/tools/build/options/WITH_OPENMP - copied unchanged from r345236, head/tools/build/options/WITH_OPENMP Modified: stable/12/gnu/lib/Makefile stable/12/lib/libomp/Makefile stable/12/share/man/man5/src.conf.5 stable/12/share/mk/src.opts.mk stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/12/gnu/lib/Makefile ============================================================================== --- stable/12/gnu/lib/Makefile Wed Apr 17 19:24:41 2019 (r346330) +++ stable/12/gnu/lib/Makefile Wed Apr 17 20:08:01 2019 (r346331) @@ -4,7 +4,10 @@ SUBDIR= csu SUBDIR.${MK_DIALOG}+= libdialog -SUBDIR.${MK_GCC}+= libgcov libgomp +SUBDIR.${MK_GCC}+= libgcov +.if ${MK_GCC} != "no" && ${MK_OPENMP} == "no" +SUBDIR+= libgomp +.endif SUBDIR.${MK_SSP}+= libssp SUBDIR.${MK_TESTS}+= tests Modified: stable/12/lib/libomp/Makefile ============================================================================== --- head/lib/libomp/Makefile Sat Mar 16 15:01:36 2019 (r345235) +++ stable/12/lib/libomp/Makefile Wed Apr 17 20:08:01 2019 (r346331) @@ -58,12 +58,14 @@ CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti LDFLAGS+= -Wl,--warn-shared-textrel -LDFLAGS+= -Wl,--as-needed LDFLAGS+= -Wl,--gc-sections LDFLAGS+= -Wl,-z,noexecstack LDFLAGS+= -Wl,-fini=__kmp_internal_end_fini LDFLAGS+= -Wl,-soname,libomp.so VERSION_MAP= ${OMPSRC}/exports_so.txt + +LIBADD+= pthread +LIBADD+= m .include Modified: stable/12/share/man/man5/src.conf.5 ============================================================================== --- stable/12/share/man/man5/src.conf.5 Wed Apr 17 19:24:41 2019 (r346330) +++ stable/12/share/man/man5/src.conf.5 Wed Apr 17 20:08:01 2019 (r346331) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd April 12, 2019 +.Dd April 17, 2019 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1477,6 +1477,16 @@ Set to build the non-essential components of the Infiniband software stack, mostly examples. .It Va WITH_OPENLDAP Enable building openldap support for kerberos. +.It Va WITHOUT_OPENMP +Set to not build LLVM's OpenMP runtime. +.Pp +This is a default setting on +arm/arm, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64. +.It Va WITH_OPENMP +Set to build LLVM's OpenMP runtime. +.Pp +This is a default setting on +amd64/amd64 and i386/i386. .It Va WITHOUT_OPENSSH Set to not build OpenSSH. .It Va WITHOUT_OPENSSL Modified: stable/12/share/mk/src.opts.mk ============================================================================== --- stable/12/share/mk/src.opts.mk Wed Apr 17 19:24:41 2019 (r346330) +++ stable/12/share/mk/src.opts.mk Wed Apr 17 20:08:01 2019 (r346331) @@ -396,6 +396,12 @@ __DEFAULT_YES_OPTIONS+=NVME __DEFAULT_NO_OPTIONS+=NVME .endif +.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "amd64" || ${__T} == "i386") +__DEFAULT_YES_OPTIONS+=OPENMP +.else +__DEFAULT_NO_OPTIONS+=OPENMP +.endif + .include # Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Apr 17 19:24:41 2019 (r346330) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Apr 17 20:08:01 2019 (r346331) @@ -2734,7 +2734,9 @@ OLD_FILES+=usr/include/gcc/4.2/altivec.h OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h OLD_FILES+=usr/include/gcc/4.2/spe.h .endif +.if ${MK_OPENMP} == no OLD_FILES+=usr/include/omp.h +.endif OLD_FILES+=usr/lib/libgcov.a OLD_FILES+=usr/lib/libgomp.a OLD_FILES+=usr/lib/libgomp.so @@ -7189,6 +7191,13 @@ OLD_FILES+=usr/share/man/man8/ntpdate.8.gz OLD_FILES+=usr/share/man/man8/ntpdc.8.gz OLD_FILES+=usr/share/man/man8/ntpq.8.gz OLD_FILES+=usr/share/man/man8/ntptime.8.gz +.endif + +.if ${MK_OPENSSH} == no +.if ${MK_GCC} == no +OLD_FILES+=usr/include/omp.h +.endif +OLD_LIBS+=usr/lib/libomp.so .endif .if ${MK_OPENSSH} == no Copied: stable/12/tools/build/options/WITHOUT_OPENMP (from r345236, head/tools/build/options/WITHOUT_OPENMP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tools/build/options/WITHOUT_OPENMP Wed Apr 17 20:08:01 2019 (r346331, copy of r345236, head/tools/build/options/WITHOUT_OPENMP) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build LLVM's OpenMP runtime. Copied: stable/12/tools/build/options/WITH_OPENMP (from r345236, head/tools/build/options/WITH_OPENMP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tools/build/options/WITH_OPENMP Wed Apr 17 20:08:01 2019 (r346331, copy of r345236, head/tools/build/options/WITH_OPENMP) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build LLVM's OpenMP runtime. From owner-svn-src-all@freebsd.org Wed Apr 17 20:09:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B1A31577E8C; Wed, 17 Apr 2019 20:09:03 +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 01F2E9126F; Wed, 17 Apr 2019 20:09:03 +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 B9672C2B9; Wed, 17 Apr 2019 20:09: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 x3HK92ZU082288; Wed, 17 Apr 2019 20:09:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HK91Sa082284; Wed, 17 Apr 2019 20:09:01 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904172009.x3HK91Sa082284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 17 Apr 2019 20:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346332 - in head: share/man/man9 sys/conf sys/dev/ofw X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head: share/man/man9 sys/conf sys/dev/ofw X-SVN-Commit-Revision: 346332 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01F2E9126F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 20:09:03 -0000 Author: manu Date: Wed Apr 17 20:09:01 2019 New Revision: 346332 URL: https://svnweb.freebsd.org/changeset/base/346332 Log: ofw_graph: Add functions for graph bindings Those functions are helpers to work on graph bindings. graphs are mostly use with video related devices. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/graph.txt?id=4436a3711e3249840e0679e92d3c951bcaf25515 MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19877 Added: head/share/man/man9/ofw_graph.9 (contents, props changed) head/sys/dev/ofw/ofw_graph.c (contents, props changed) head/sys/dev/ofw/ofw_graph.h (contents, props changed) Modified: head/sys/conf/files Added: head/share/man/man9/ofw_graph.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/ofw_graph.9 Wed Apr 17 20:09:01 2019 (r346332) @@ -0,0 +1,106 @@ +.\" Copyright (c) 2019 Emmanuel Vadot +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd April 10, 2019 +.Dt ofw_graph 9 +.Os +.Sh NAME +.Nm ofw_graph , +.Nm ofw_graph_get_port_by_idx , +.Nm ofw_graph_port_get_num_endpoints , +.Nm ofw_graph_get_endpoint_by_idx , +.Nm ofw_graph_get_remote_endpoint , +.Nm ofw_graph_get_remote_parent , +.Nm ofw_graph_get_device_by_port_ep , +.Nd Helpers for the graph bindings +.Sh SYNOPSIS +.In dev/ofw/openfirm.h +.In dev/ofw/ofw_graph.h +.Ft phandle_t +.Fn ofw_graph_get_port_by_idx "phandle_t node" "uint32_t idx" +.Ft size_t +.Fn ofw_graph_port_get_num_endpoints "phandle_t port" +.Ft phandle_t +.Fn ofw_graph_get_endpoint_by_idx "phandle_t port" "uint32_t idx" +.Ft phandle_t +.Fn ofw_graph_get_remote_endpoint "phandle_t endpoint" +.Ft phandle_t +.Fn ofw_graph_get_remote_parent "phandle_t remote" +.Ft device_t +.Fn ofw_graph_get_device_by_port_ep "phandle_t node" "uint32_t port_id" "uin32_t ep_id" +.Sh DESCRIPTION +.Pp +The ofw_graph functions are helpers to parse the DTS graph bindings +.Pp +.Fn ofw_graph_get_port_by_idx +return the port with id +.Fa idx . +It will first check node named +.Fa port@idx +and then fallback on checking the +.Fa ports +child for a child node matching the id. If no ports matching +.Fa idx +is found the function return 0. +.Pp +.Fn ofw_graph_port_get_num_endpoints +returns the number of endpoints a port node have. +.Pp +.Fn ofw_graph_get_endpoint_by_idx +return the endpoint with id +.Fa idx . +It will first check if there is a single child named +.Fa endpoint +and returns it if there is. If there is multiple endpoints it will check +the +.Fa reg +property and returns the correct +.Fa phandle_t +or 0 if none match. +.Pp +.Fn ofw_graph_get_remote_endpoint +returns the +.Fa remote-endpoint +property if it exists or 0. +.Pp +.Fn ofw_graph_get_remote_parent +returns the device node corresponding to the +.Fa remote-endpoint +phandle or 0 if none. +.Fn ofw_graph_get_device_by_port_ep +returns the device associated with the port and endpoint or +.Fa NULL +if none. The device driver should have called +.Fn OF_device_register_xref +before. +.Fn +.Sh HISTORY +The +.Nm ofw_graph +functions first appeared in +.Fx 13.0 . +The +.Nm ofw_graph +functions and manual page were written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 17 20:08:01 2019 (r346331) +++ head/sys/conf/files Wed Apr 17 20:09:01 2019 (r346332) @@ -2536,6 +2536,7 @@ dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt +dev/ofw/ofw_graph.c optional fdt dev/ofw/ofw_subr.c optional fdt dev/ofw/ofwbus.c optional fdt dev/ofw/openfirm.c optional fdt Added: head/sys/dev/ofw/ofw_graph.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ofw/ofw_graph.c Wed Apr 17 20:09:01 2019 (r346332) @@ -0,0 +1,186 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * 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, + * without modification, immediately at the beginning of the file. + * 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. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "ofw_bus_if.h" + +#define PORT_MAX_NAME 8 + +phandle_t +ofw_graph_get_port_by_idx(phandle_t node, uint32_t idx) +{ + phandle_t ports, child; + uint32_t reg; + char portnode[PORT_MAX_NAME]; + + /* First try to find a port@ node */ + snprintf(portnode, sizeof(portnode), "port@%d", idx); + child = ofw_bus_find_child(node, portnode); + if (child != 0) + return (child); + + /* Next try to look under ports */ + ports = ofw_bus_find_child(node, "ports"); + if (ports == 0) + return (0); + + for (child = OF_child(ports); child != 0; child = OF_peer(child)) { + if (OF_getencprop(child, "reg", ®, sizeof(uint32_t)) <= 0 || + reg != idx) + continue; + + return (child); + } + + return (0); +} + +size_t +ofw_graph_port_get_num_endpoints(phandle_t port) +{ + phandle_t child; + char *name; + size_t num = 0; + int ret; + + for (num = 0, child = OF_child(port); child != 0; + child = OF_peer(child)) { + ret = OF_getprop_alloc(child, "name", (void **)&name); + if (ret == -1) + continue; + if (strcmp(name, "endpoint") == 0) + num++; + else if (strncmp(name, "endpoint@", 9) == 0) + num++; + free(name, M_OFWPROP); + } + + return (num); +} + +phandle_t +ofw_graph_get_endpoint_by_idx(phandle_t port, uint32_t idx) +{ + phandle_t endpoint, child; + uint32_t reg; + + /* First test if we have only one endpoint */ + endpoint = ofw_bus_find_child(port, "endpoint"); + if (endpoint != 0) + return (endpoint); + + /* Then test all childs based on the reg property */ + for (child = OF_child(port); child != 0; child = OF_peer(child)) { + if (OF_getencprop(child, "reg", ®, sizeof(uint32_t)) <= 0 || + reg != idx) + continue; + + return (child); + } + + return (0); +} + +phandle_t +ofw_graph_get_remote_endpoint(phandle_t endpoint) +{ + phandle_t remote; + + if (OF_getencprop(endpoint, "remote-endpoint", &remote, + sizeof(phandle_t)) <= 0) + return (0); + + return (remote); +} + +phandle_t +ofw_graph_get_remote_parent(phandle_t remote) +{ + phandle_t node; + char *name; + int ret; + + /* get the endpoint node */ + node = OF_node_from_xref(remote); + + /* go to the port@X node */ + node = OF_parent(node); + /* go to the ports node or parent */ + node = OF_parent(node); + + /* if the node name is 'ports' we need to go up one last time */ + ret = OF_getprop_alloc(node, "name", (void **)&name); + if (ret == -1) { + printf("%s: Node %x don't have a name, abort\n", __func__, node); + node = 0; + goto end; + } + if (strcmp("ports", name) == 0) + node = OF_parent(node); + +end: + free(name, M_OFWPROP); + return (node); +} + +device_t +ofw_graph_get_device_by_port_ep(phandle_t node, uint32_t port_id, uint32_t ep_id) +{ + phandle_t outport, port, endpoint, remote; + + port = ofw_graph_get_port_by_idx(node, port_id); + if (port == 0) + return (NULL); + endpoint = ofw_graph_get_endpoint_by_idx(port, ep_id); + if (endpoint == 0) + return NULL; + remote = ofw_graph_get_remote_endpoint(endpoint); + if (remote == 0) + return (NULL); + outport = ofw_graph_get_remote_parent(remote); + if (outport == 0) + return (NULL); + + return (OF_device_from_xref(OF_xref_from_node(outport))); +} Added: head/sys/dev/ofw/ofw_graph.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ofw/ofw_graph.h Wed Apr 17 20:09:01 2019 (r346332) @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * 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, + * without modification, immediately at the beginning of the file. + * 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. + * + * $FreeBSD$ + */ + +#ifndef _OFW_GRAPH_H_ +#define _OFW_GRAPH_H_ + +phandle_t ofw_graph_get_port_by_idx(phandle_t node, uint32_t idx); +phandle_t ofw_graph_get_remote_endpoint(phandle_t endpoint); +size_t ofw_graph_port_get_num_endpoints(phandle_t port); +phandle_t ofw_graph_get_endpoint_by_idx(phandle_t port, uint32_t idx); +phandle_t ofw_graph_get_remote_parent(phandle_t remote); + +device_t ofw_graph_get_device_by_port_ep(phandle_t node, uint32_t port_id, uint32_t ep_id); + +#endif /* _OFW_GRAPH_H_ */ + From owner-svn-src-all@freebsd.org Wed Apr 17 20:16:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 521BE157846C; Wed, 17 Apr 2019 20:16:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 E9E9A91AC5; Wed, 17 Apr 2019 20:16:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0393C47E; Wed, 17 Apr 2019 20:16:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HKGohT087350; Wed, 17 Apr 2019 20:16:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HKGnu4087343; Wed, 17 Apr 2019 20:16:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201904172016.x3HKGnu4087343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 17 Apr 2019 20:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346333 - in stable/11: gnu/lib lib/libomp share/man/man5 share/mk tools/build/mk tools/build/options X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/11: gnu/lib lib/libomp share/man/man5 share/mk tools/build/mk tools/build/options X-SVN-Commit-Revision: 346333 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E9E9A91AC5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 20:16:51 -0000 Author: dim Date: Wed Apr 17 20:16:48 2019 New Revision: 346333 URL: https://svnweb.freebsd.org/changeset/base/346333 Log: After r346168, also merge build infrastructure for LLVM libomp. MFC r345235: Add lib/libomp, with a Makefile, and generated configuration headers. Not connected to the main build yet, as there is still the issue of the GNU omp.h header conflicting with the LLVM one. (That is, if MK_GCC is enabled.) PR: 236062 MFC r345236: Connect lib/libomp to the build. * Set MK_OPENMP to yes by default only on amd64, for now. * Bump __FreeBSD_version to signal this addition. * Ensure gcc's conflicting omp.h is not installed if MK_OPENMP is yes. * Update OptionalObsoleteFiles.inc to cope with the conflicting omp.h. * Regenerate src.conf(5) with new WITH/WITHOUT fragments. Relnotes: yes PR: 236062 MFC r345242: Explicitly link libomp.so against -lpthread, as it depends on pthread functionality. This should make example OpenMP programs work out of the box. Reported by: jbeich PR: 236062, 236581 MFC r345278: Also explicitly link libomp.so against -lm, as it transitively depends on scalbn and a few other math functions, via libcompiler-rt. This should allow OpenMP programs to link with BFD linkers too. Reported by: jbeich PR: 236062, 236581 MFC r345282: Remove --as-needed from the linker flags for libomp.so, as these actually prevent the transitive dependency on libm. Reported by: jbeich PR: 236062, 236581 MFC r345291: Turn on MK_OPENMP for i386 by default, now that it can build. Noticed by: jbeich PR: 236062, 236582 Added: stable/11/lib/libomp/ - copied from r345235, head/lib/libomp/ stable/11/tools/build/options/WITHOUT_OPENMP - copied unchanged from r345236, head/tools/build/options/WITHOUT_OPENMP stable/11/tools/build/options/WITH_OPENMP - copied unchanged from r345236, head/tools/build/options/WITH_OPENMP Modified: stable/11/gnu/lib/Makefile stable/11/lib/libomp/Makefile stable/11/share/man/man5/src.conf.5 stable/11/share/mk/src.opts.mk stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/gnu/lib/Makefile ============================================================================== --- stable/11/gnu/lib/Makefile Wed Apr 17 20:09:01 2019 (r346332) +++ stable/11/gnu/lib/Makefile Wed Apr 17 20:16:48 2019 (r346333) @@ -6,7 +6,7 @@ SUBDIR= csu SUBDIR+= libdialog SUBDIR+= libgcc -.if ${MK_GCC} != "no" +.if ${MK_GCC} != "no" && ${MK_OPENMP} == "no" SUBDIR+= libgcov libgomp .endif Modified: stable/11/lib/libomp/Makefile ============================================================================== --- head/lib/libomp/Makefile Sat Mar 16 15:01:36 2019 (r345235) +++ stable/11/lib/libomp/Makefile Wed Apr 17 20:16:48 2019 (r346333) @@ -58,12 +58,14 @@ CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti LDFLAGS+= -Wl,--warn-shared-textrel -LDFLAGS+= -Wl,--as-needed LDFLAGS+= -Wl,--gc-sections LDFLAGS+= -Wl,-z,noexecstack LDFLAGS+= -Wl,-fini=__kmp_internal_end_fini LDFLAGS+= -Wl,-soname,libomp.so VERSION_MAP= ${OMPSRC}/exports_so.txt + +LIBADD+= pthread +LIBADD+= m .include Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Wed Apr 17 20:09:01 2019 (r346332) +++ stable/11/share/man/man5/src.conf.5 Wed Apr 17 20:16:48 2019 (r346333) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd October 10, 2018 +.Dd April 17, 2019 .Dt SRC.CONF 5 .Os .Sh NAME @@ -300,6 +300,8 @@ When set, it enforces these options: .It .Va WITHOUT_CTF .It +.Va WITHOUT_LOADER_ZFS +.It .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG @@ -314,6 +316,8 @@ When set, it enforces these options: .Va WITHOUT_CLANG_EXTRAS .It .Va WITHOUT_CLANG_FULL +.It +.Va WITHOUT_LLVM_COV .El .It Va WITH_CLANG Set to build the Clang C/C++ compiler during the normal phase of the build. @@ -461,6 +465,8 @@ When set, it enforces these options: .Va WITHOUT_GNUCXX .It .Va WITHOUT_GROFF +.It +.Va WITHOUT_LLVM_COV .El .It Va WITHOUT_DEBUG_FILES Set to avoid building or installing standalone debug files for each @@ -985,16 +991,30 @@ Set to use LLVM's LLD as the system linker, instead of .Pp This is a default setting on arm64/aarch64. +.It Va WITHOUT_LLVM_COV +Set to not build the +.Xr llvm-cov 1 +tool. +.Pp +This is a default setting on +sparc64/sparc64. +.It Va WITH_LLVM_COV +Set to build the +.Xr llvm-cov 1 +tool. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_LLVM_LIBUNWIND Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +arm/arm, arm/armeb, arm/armv6, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLVM_LIBUNWIND Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). .Pp This is a default setting on -arm64/aarch64. +amd64/amd64, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and pc98/i386. .It Va WITHOUT_LLVM_TARGET_AARCH64 Set to not build LLVM target support for AArch64. .Pp @@ -1067,7 +1087,12 @@ This option is a nop on all other platforms. Disable inclusion of GELI crypto support in the boot chain binaries. .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_LOADER_LUA +Set to build LUA bindings for the boot loader. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64 and mips/mipsn32. .It Va WITHOUT_LOADER_OFW Disable building of openfirmware bootloader components. .Pp @@ -1088,6 +1113,8 @@ Set to build ubldr. .Pp This is a default setting on arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64. +.It Va WITHOUT_LOADER_ZFS +Set to not build ZFS file system boot loader support. .It Va WITHOUT_LOCALES Set to not build localization files; see .Xr locale 1 . @@ -1300,6 +1327,16 @@ Set to build the non-essential components of the Infiniband software stack, mostly examples. .It Va WITH_OPENLDAP Enable building openldap support for kerberos. +.It Va WITHOUT_OPENMP +Set to not build LLVM's OpenMP runtime. +.Pp +This is a default setting on +arm/arm, arm/armeb, arm/armv6, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_OPENMP +Set to build LLVM's OpenMP runtime. +.Pp +This is a default setting on +amd64/amd64, i386/i386 and pc98/i386. .It Va WITHOUT_OPENSSH Set to not build OpenSSH. .It Va WITHOUT_OPENSSL @@ -1601,6 +1638,8 @@ When set, it enforces these options: .Va WITHOUT_LLD .It .Va WITHOUT_LLDB +.It +.Va WITHOUT_LLVM_COV .El .It Va WITHOUT_UNBOUND Set to not build @@ -1651,7 +1690,7 @@ without support for the IEEE 802.1X protocol and witho support for EAP-PEAP, EAP-TLS, EAP-LEAP, and EAP-TTLS protocols (usable only via 802.1X). .It Va WITHOUT_ZFS -Set to not build ZFS file system. +Set to not build ZFS file system kernel module, libraries, and user commands. .It Va WITHOUT_ZONEINFO Set to not build the timezone database. When set, it enforces these options: Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Wed Apr 17 20:09:01 2019 (r346332) +++ stable/11/share/mk/src.opts.mk Wed Apr 17 20:16:48 2019 (r346333) @@ -337,6 +337,12 @@ __DEFAULT_YES_OPTIONS+=OFED __DEFAULT_NO_OPTIONS+=OFED .endif +.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "amd64" || ${__T} == "i386") +__DEFAULT_YES_OPTIONS+=OPENMP +.else +__DEFAULT_NO_OPTIONS+=OPENMP +.endif + .include # Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Apr 17 20:09:01 2019 (r346332) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Apr 17 20:16:48 2019 (r346333) @@ -2429,7 +2429,9 @@ OLD_FILES+=usr/include/gcc/4.2/altivec.h OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h OLD_FILES+=usr/include/gcc/4.2/spe.h .endif +.if ${MK_OPENMP} == no OLD_FILES+=usr/include/omp.h +.endif OLD_FILES+=usr/lib/libgcov.a OLD_FILES+=usr/lib/libgomp.a OLD_FILES+=usr/lib/libgomp.so @@ -6843,6 +6845,13 @@ OLD_FILES+=usr/share/man/man8/ntpdate.8.gz OLD_FILES+=usr/share/man/man8/ntpdc.8.gz OLD_FILES+=usr/share/man/man8/ntpq.8.gz OLD_FILES+=usr/share/man/man8/ntptime.8.gz +.endif + +.if ${MK_OPENSSH} == no +.if ${MK_GCC} == no +OLD_FILES+=usr/include/omp.h +.endif +OLD_LIBS+=usr/lib/libomp.so .endif .if ${MK_OPENSSH} == no Copied: stable/11/tools/build/options/WITHOUT_OPENMP (from r345236, head/tools/build/options/WITHOUT_OPENMP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITHOUT_OPENMP Wed Apr 17 20:16:48 2019 (r346333, copy of r345236, head/tools/build/options/WITHOUT_OPENMP) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build LLVM's OpenMP runtime. Copied: stable/11/tools/build/options/WITH_OPENMP (from r345236, head/tools/build/options/WITH_OPENMP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_OPENMP Wed Apr 17 20:16:48 2019 (r346333, copy of r345236, head/tools/build/options/WITH_OPENMP) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build LLVM's OpenMP runtime. From owner-svn-src-all@freebsd.org Wed Apr 17 21:17:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D3F1579F25; Wed, 17 Apr 2019 21:17:27 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47EFC943D8; Wed, 17 Apr 2019 21:17:26 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x3HLHIx9060586 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 17 Apr 2019 14:17:18 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x3HLHIxr060585; Wed, 17 Apr 2019 14:17:18 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 17 Apr 2019 14:17:18 -0700 From: Gleb Smirnoff To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346319 - head/sys/netpfil/pf Message-ID: <20190417211718.GX1243@FreeBSD.org> References: <201904171642.x3HGgslA075253@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201904171642.x3HGgslA075253@repo.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 47EFC943D8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.988,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 21:17:28 -0000 Kristof, On Wed, Apr 17, 2019 at 04:42:54PM +0000, Kristof Provost wrote: K> Modified: head/sys/netpfil/pf/pf_ioctl.c K> ============================================================================== K> --- head/sys/netpfil/pf/pf_ioctl.c Wed Apr 17 16:31:30 2019 (r346318) K> +++ head/sys/netpfil/pf/pf_ioctl.c Wed Apr 17 16:42:54 2019 (r346319) K> @@ -3103,24 +3103,24 @@ DIOCCHANGEADDR_error: K> break; K> } K> K> - PF_RULES_WLOCK(); K> + PF_RULES_RLOCK(); K> n = pfr_table_count(&io->pfrio_table, io->pfrio_flags); K> io->pfrio_size = min(io->pfrio_size, n); K> + PF_RULES_RUNLOCK(); K> K> totlen = io->pfrio_size * sizeof(struct pfr_table); K> pfrts = mallocarray(io->pfrio_size, sizeof(struct pfr_table), K> M_TEMP, M_NOWAIT); K> if (pfrts == NULL) { K> error = ENOMEM; K> - PF_RULES_WUNLOCK(); K> break; K> } K> error = copyin(io->pfrio_buffer, pfrts, totlen); K> if (error) { K> free(pfrts, M_TEMP); K> - PF_RULES_WUNLOCK(); K> break; K> } K> + PF_RULES_WLOCK(); K> error = pfr_set_tflags(pfrts, io->pfrio_size, K> io->pfrio_setflag, io->pfrio_clrflag, &io->pfrio_nchange, K> &io->pfrio_ndel, io->pfrio_flags | PFR_FLAG_USERIOCTL); Couple comments: 1) Now we can malloc with M_WAITOK. 2) Are we sure that table count won't change while we dropped the lock? -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Wed Apr 17 21:45:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84473157AA74; Wed, 17 Apr 2019 21:45:20 +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 26715953E7; Wed, 17 Apr 2019 21:45:20 +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 14B29D446; Wed, 17 Apr 2019 21:45:20 +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 x3HLjJSt035505; Wed, 17 Apr 2019 21:45:19 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HLjJ22035504; Wed, 17 Apr 2019 21:45:19 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201904172145.x3HLjJ22035504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 17 Apr 2019 21:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346334 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 346334 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 26715953E7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 21:45:20 -0000 Author: manu Date: Wed Apr 17 21:45:19 2019 New Revision: 346334 URL: https://svnweb.freebsd.org/changeset/base/346334 Log: arm: allwinner: Fix audio for Allwinner H3/H5 Due to three conditions the codec driver for Allwinner A10/A20 and H3/H5 did not work properly here: Wrong bit position for the analog audio reset Hardware Reset of codec was not de-asserted correctly Linux DTS file did not contain the address of the analog register the way as the driver was expecting it. This patch proposes fixes for those three parts. Submitted by: freebsdnewbie@freenet.de (Manuel Stühn) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19910 Modified: head/sys/arm/allwinner/a10_codec.c Modified: head/sys/arm/allwinner/a10_codec.c ============================================================================== --- head/sys/arm/allwinner/a10_codec.c Wed Apr 17 20:16:48 2019 (r346333) +++ head/sys/arm/allwinner/a10_codec.c Wed Apr 17 21:45:19 2019 (r346334) @@ -164,7 +164,7 @@ struct a10codec_chinfo { struct a10codec_info { device_t dev; - struct resource *res[3]; + struct resource *res[2]; struct mtx *lock; bus_dma_tag_t dmat; unsigned dmasize; @@ -178,11 +178,12 @@ struct a10codec_info { static struct resource_spec a10codec_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, - { SYS_RES_MEMORY, 1, RF_ACTIVE | RF_OPTIONAL }, - { SYS_RES_IRQ, 0, RF_ACTIVE }, { -1, 0 } }; +#define CODEC_ANALOG_READ(sc, reg) bus_read_4((sc)->res[1], (reg)) +#define CODEC_ANALOG_WRITE(sc, reg, val) bus_write_4((sc)->res[1], (reg), (val)) + #define CODEC_READ(sc, reg) bus_read_4((sc)->res[0], (reg)) #define CODEC_WRITE(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) @@ -372,7 +373,7 @@ MIXER_DECLARE(a10_mixer); */ #define H3_PR_CFG 0x00 -#define H3_AC_PR_RST (1 << 18) +#define H3_AC_PR_RST (1 << 28) #define H3_AC_PR_RW (1 << 24) #define H3_AC_PR_ADDR_SHIFT 16 #define H3_AC_PR_ADDR_MASK (0x1f << H3_AC_PR_ADDR_SHIFT) @@ -424,23 +425,23 @@ h3_pr_read(struct a10codec_info *sc, u_int addr) uint32_t val; /* Read current value */ - val = bus_read_4(sc->res[1], H3_PR_CFG); + val = CODEC_ANALOG_READ(sc, H3_PR_CFG); /* De-assert reset */ val |= H3_AC_PR_RST; - bus_write_4(sc->res[1], H3_PR_CFG, val); + CODEC_ANALOG_WRITE(sc, H3_PR_CFG, val); /* Read mode */ val &= ~H3_AC_PR_RW; - bus_write_4(sc->res[1], H3_PR_CFG, val); + CODEC_ANALOG_WRITE(sc, H3_PR_CFG, val); /* Set address */ val &= ~H3_AC_PR_ADDR_MASK; val |= (addr << H3_AC_PR_ADDR_SHIFT); - bus_write_4(sc->res[1], H3_PR_CFG, val); + CODEC_ANALOG_WRITE(sc, H3_PR_CFG, val); /* Read data */ - return (bus_read_4(sc->res[1], H3_PR_CFG) & H3_ACDA_PR_RDAT_MASK); + return (CODEC_ANALOG_READ(sc , H3_PR_CFG) & H3_ACDA_PR_RDAT_MASK); } static void @@ -449,25 +450,25 @@ h3_pr_write(struct a10codec_info *sc, u_int addr, u_in uint32_t val; /* Read current value */ - val = bus_read_4(sc->res[1], H3_PR_CFG); + val = CODEC_ANALOG_READ(sc, H3_PR_CFG); /* De-assert reset */ val |= H3_AC_PR_RST; - bus_write_4(sc->res[1], H3_PR_CFG, val); + CODEC_ANALOG_WRITE(sc, H3_PR_CFG, val); /* Set address */ val &= ~H3_AC_PR_ADDR_MASK; val |= (addr << H3_AC_PR_ADDR_SHIFT); - bus_write_4(sc->res[1], H3_PR_CFG, val); + CODEC_ANALOG_WRITE(sc, H3_PR_CFG, val); /* Write data */ val &= ~H3_ACDA_PR_WDAT_MASK; val |= (data << H3_ACDA_PR_WDAT_SHIFT); - bus_write_4(sc->res[1], H3_PR_CFG, val); + CODEC_ANALOG_WRITE(sc, H3_PR_CFG, val); /* Write mode */ val |= H3_AC_PR_RW; - bus_write_4(sc->res[1], H3_PR_CFG, val); + CODEC_ANALOG_WRITE(sc, H3_PR_CFG, val); } static void @@ -483,8 +484,28 @@ h3_pr_set_clear(struct a10codec_info *sc, u_int addr, static int h3_mixer_init(struct snd_mixer *m) { + int rid=1; + pcell_t reg[2]; + phandle_t analogref; struct a10codec_info *sc = mix_getdevinfo(m); + if (OF_getencprop(ofw_bus_get_node(sc->dev), "allwinner,codec-analog-controls", + &analogref, sizeof(analogref)) <= 0) { + return (ENXIO); + } + + if (OF_getencprop(OF_node_from_xref(analogref), "reg", + reg, sizeof(reg)) <= 0) { + return (ENXIO); + } + + sc->res[1] = bus_alloc_resource(sc->dev, SYS_RES_MEMORY, &rid, reg[0], + reg[0]+reg[1], reg[1], RF_ACTIVE ); + + if (sc->res[1] == NULL) { + return (ENXIO); + } + mix_setdevs(m, SOUND_MASK_PCM | SOUND_MASK_VOLUME | SOUND_MASK_RECLEV | SOUND_MASK_MIC | SOUND_MASK_LINE | SOUND_MASK_LINE1); mix_setrecdevs(m, SOUND_MASK_MIC | SOUND_MASK_LINE | SOUND_MASK_LINE1 | @@ -940,6 +961,7 @@ a10codec_chan_trigger(kobj_t obj, void *data, int go) switch (go) { case PCMTRIG_START: ch->run = 1; + a10codec_stop(ch); a10codec_start(ch); break; case PCMTRIG_STOP: @@ -1124,8 +1146,7 @@ a10codec_attach(device_t dev) } /* De-assert hwreset */ - if (hwreset_get_by_ofw_name(dev, 0, "apb", &rst) == 0 || - hwreset_get_by_ofw_name(dev, 0, "ahb", &rst) == 0) { + if (hwreset_get_by_ofw_idx(dev, 0, 0, &rst) == 0) { error = hwreset_deassert(rst); if (error != 0) { device_printf(dev, "cannot de-assert reset\n"); @@ -1137,15 +1158,6 @@ a10codec_attach(device_t dev) val = CODEC_READ(sc, AC_DAC_DPC(sc)); val |= DAC_DPC_EN_DA; CODEC_WRITE(sc, AC_DAC_DPC(sc), val); - -#ifdef notdef - error = snd_setup_intr(dev, sc->irq, INTR_MPSAFE, a10codec_intr, sc, - &sc->ih); - if (error != 0) { - device_printf(dev, "could not setup interrupt handler\n"); - goto fail; - } -#endif if (mixer_init(dev, sc->cfg->mixer_class, sc)) { device_printf(dev, "mixer_init failed\n"); From owner-svn-src-all@freebsd.org Wed Apr 17 22:05:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43625157AE9F; Wed, 17 Apr 2019 22:05:33 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D22D295BE8; Wed, 17 Apr 2019 22:05:32 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 6C28F10F0; Wed, 17 Apr 2019 22:05:32 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [192.168.228.1] (host1.test.ravensoft.telecomplete.net [213.160.118.146]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 4E0E51A8BE; Thu, 18 Apr 2019 00:05:29 +0200 (CEST) From: "Kristof Provost" To: "Gleb Smirnoff" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346319 - head/sys/netpfil/pf Date: Wed, 17 Apr 2019 23:05:26 +0100 X-Mailer: MailMate (2.0BETAr6135) Message-ID: <8B606261-B614-474F-AA73-217FE09E28BA@FreeBSD.org> In-Reply-To: <20190417211718.GX1243@FreeBSD.org> References: <201904171642.x3HGgslA075253@repo.freebsd.org> <20190417211718.GX1243@FreeBSD.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: D22D295BE8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8; format=flowed; markup=markdown Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 22:05:33 -0000 On 17 Apr 2019, at 22:17, Gleb Smirnoff wrote: > Kristof, > > On Wed, Apr 17, 2019 at 04:42:54PM +0000, Kristof Provost wrote: > K> Modified: head/sys/netpfil/pf/pf_ioctl.c > K> > ============================================================================== > K> --- head/sys/netpfil/pf/pf_ioctl.c Wed Apr 17 16:31:30 > 2019 (r346318) > K> +++ head/sys/netpfil/pf/pf_ioctl.c Wed Apr 17 16:42:54 > 2019 (r346319) > K> @@ -3103,24 +3103,24 @@ DIOCCHANGEADDR_error: > K> break; > K> } > K> > K> - PF_RULES_WLOCK(); > K> + PF_RULES_RLOCK(); > K> n = pfr_table_count(&io->pfrio_table, io->pfrio_flags); > K> io->pfrio_size = min(io->pfrio_size, n); > K> + PF_RULES_RUNLOCK(); > K> > K> totlen = io->pfrio_size * sizeof(struct pfr_table); > K> pfrts = mallocarray(io->pfrio_size, sizeof(struct pfr_table), > K> M_TEMP, M_NOWAIT); > K> if (pfrts == NULL) { > K> error = ENOMEM; > K> - PF_RULES_WUNLOCK(); > K> break; > K> } > K> error = copyin(io->pfrio_buffer, pfrts, totlen); > K> if (error) { > K> free(pfrts, M_TEMP); > K> - PF_RULES_WUNLOCK(); > K> break; > K> } > K> + PF_RULES_WLOCK(); > K> error = pfr_set_tflags(pfrts, io->pfrio_size, > K> io->pfrio_setflag, io->pfrio_clrflag, &io->pfrio_nchange, > K> &io->pfrio_ndel, io->pfrio_flags | PFR_FLAG_USERIOCTL); > > Couple comments: > > 1) Now we can malloc with M_WAITOK. > That’s a good point. I’ll see about changing that tomorrow. > 2) Are we sure that table count won't change while we dropped the > lock? > No, the table count can indeed change while we’re unlocked. It doesn’t really matter though. The initial count only serves to limit the memory allocation to something sane. pfr_set_tflags() still does appropriate checks. It’s always been possible for the table count to change between user space preparing its request and it being handled in the kernel, so that was always a possibility. Regards, Kristof From owner-svn-src-all@freebsd.org Wed Apr 17 22:05:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8951157AEC7; Wed, 17 Apr 2019 22:05:44 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64FF795CA8; Wed, 17 Apr 2019 22:05:43 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3HM5bPV002270; Wed, 17 Apr 2019 15:05:37 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3HM5bur002269; Wed, 17 Apr 2019 15:05:37 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904172205.x3HM5bur002269@gndrsh.dnsmgr.net> Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc In-Reply-To: <201904171941.x3HJfmee090931@slippy.cwsent.com> To: Cy Schubert Date: Wed, 17 Apr 2019 15:05:37 -0700 (PDT) CC: "O. Hartmann" , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 64FF795CA8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 22:05:45 -0000 > In message <20190417195145.6824c0f9@thor.intern.walstatt.dynvpn.de>, > "O. Hartma > nn" writes: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > Am Wed, 17 Apr 2019 16:18:14 +0000 (UTC) > > Ed Maste schrieb: > > > > > Author: emaste > > > Date: Wed Apr 17 16:18:14 2019 > > > New Revision: 346316 > > > URL: https://svnweb.freebsd.org/changeset/base/346316 > > > > > > Log: > > > cap_fileargs: chase r346315, update fileargs_init in consumers > > > > > > Reported by: ci.freebsd.org (8 times so far) > > > MFC after: 3 weeks > > > MFC with: r346315 > > > Sponsored by: The FreeBSD Foundation > > > > > > Modified: > > > head/contrib/elftoolchain/strings/strings.c > > > head/sbin/savecore/savecore.c > > > head/usr.bin/brandelf/brandelf.c > > > head/usr.bin/head/head.c > > > head/usr.bin/wc/wc.c > > > > > > Modified: head/contrib/elftoolchain/strings/strings.c > > > =========================================================================== > > === > > > --- head/contrib/elftoolchain/strings/strings.c Wed Apr 17 16:02:57 201 > > 9 > > > (r346315) +++ head/contrib/elftoolchain/strings/strings.c Wed Apr 17 16:1 > > 8:14 > > > 2019 (r346316) @@ -195,7 +195,7 @@ main(int argc, char **argv) > > > argv += optind; > > > > > > cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL); > > > - fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights); > > > + fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > > if (fa == NULL) > > > err(1, "Unable to initialize casper fileargs"); > > > > > > > > > Modified: head/sbin/savecore/savecore.c > > > =========================================================================== > > === > > > --- head/sbin/savecore/savecore.c Wed Apr 17 16:02:57 2019 (r34631 > > 5) > > > +++ head/sbin/savecore/savecore.c Wed Apr 17 16:18:14 2019 (r34631 > > 6) > > > @@ -1030,7 +1030,7 @@ init_caps(int argc, char **argv) > > > */ > > > (void)cap_rights_init(&rights, CAP_PREAD, CAP_WRITE, CAP_IOCTL); > > > capfa = fileargs_init(argc, argv, checkfor || keep ? O_RDONLY : O_RDWR, > > > - 0, &rights); > > > + 0, &rights, FA_OPEN); > > > if (capfa == NULL) { > > > logmsg(LOG_ERR, "fileargs_init(): %m"); > > > exit(1); > > > > > > Modified: head/usr.bin/brandelf/brandelf.c > > > =========================================================================== > > === > > > --- head/usr.bin/brandelf/brandelf.c Wed Apr 17 16:02:57 2019 > > (r346315) > > > +++ head/usr.bin/brandelf/brandelf.c Wed Apr 17 16:18:14 2019 > > (r346316) > > > @@ -133,7 +133,7 @@ main(int argc, char **argv) > > > if (flags == O_RDWR) > > > cap_rights_set(&rights, CAP_WRITE); > > > > > > - fa = fileargs_init(argc, argv, flags, 0, &rights); > > > + fa = fileargs_init(argc, argv, flags, 0, &rights, FA_OPEN); > > > if (fa == NULL) > > > errx(1, "unable to init casper"); > > > > > > > > > Modified: head/usr.bin/head/head.c > > > =========================================================================== > > === > > > --- head/usr.bin/head/head.c Wed Apr 17 16:02:57 2019 (r34631 > > 5) > > > +++ head/usr.bin/head/head.c Wed Apr 17 16:18:14 2019 (r34631 > > 6) > > > @@ -115,7 +115,7 @@ main(int argc, char *argv[]) > > > argv += optind; > > > > > > fa = fileargs_init(argc, argv, O_RDONLY, 0, > > > - cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL)); > > > + cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL), FA_OPEN); > > > if (fa == NULL) > > > errx(1, "unable to init casper"); > > > > > > > > > Modified: head/usr.bin/wc/wc.c > > > =========================================================================== > > === > > > --- head/usr.bin/wc/wc.c Wed Apr 17 16:02:57 2019 (r346315) > > > +++ head/usr.bin/wc/wc.c Wed Apr 17 16:18:14 2019 (r346316) > > > @@ -133,7 +133,7 @@ main(int argc, char *argv[]) > > > (void)signal(SIGINFO, siginfo_handler); > > > > > > fa = fileargs_init(argc, argv, O_RDONLY, 0, > > > - cap_rights_init(&rights, CAP_READ, CAP_FSTAT)); > > > + cap_rights_init(&rights, CAP_READ, CAP_FSTAT), FA_OPEN); > > > if (fa == NULL) { > > > xo_warn("Unable to init casper"); > > > exit(1); > > > _______________________________________________ > > > svn-src-head@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > > > This commit seems to break buildworld on my installations: > > > > [...] > > Building /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/usr.bin/strings/strings.o > > - --- strings.o --- > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of undecla > > red identifier > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > ^ > > 1 error generated. > > *** [strings.o] Error code 1 > > Try this. We shouldn't use headers in /usr/include, only the ones in > src/. > > Index: tools/build/Makefile > =================================================================== > --- tools/build/Makefile (revision 346330) > +++ tools/build/Makefile (working copy) > @@ -59,9 +59,7 @@ > INCS+= libcasper.h > .endif > > -.if !exists(/usr/include/casper/cap_fileargs.h) > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs. > h > -.endif > > .if empty(SRCS) > SRCS= dummy.c > > I found a number of bugs like this one in heimdal in base and in ntp > previously. > Cy Schubert This is in general a huge problem area dating back to when I fixed "make includes" to at least be some what correct. Rather than all these one off hacks of doing fooINC+= the make includes target should be fixed such that we boot strap a proper "includes" tree, preferable in /usr/obj/${SRCTOP} and use that in all places that need build tree (not host tree) include files. If you find yourself doing the above it means that something is missing from "make includes", as that file should of been populated into /usr/includes early in the build process. Doing the /usr/obj/${SRCTOP}/usr/include/ would fix all places that need hacks like above. Regards, Rod -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Apr 17 22:41:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FFC7157BAC8; Wed, 17 Apr 2019 22:41:28 +0000 (UTC) (envelope-from erj@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 164CD96D1C; Wed, 17 Apr 2019 22:41:28 +0000 (UTC) (envelope-from erj@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 E2805DD00; Wed, 17 Apr 2019 22:41:27 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HMfRnW065492; Wed, 17 Apr 2019 22:41:27 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HMfR3E065490; Wed, 17 Apr 2019 22:41:27 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201904172241.x3HMfR3E065490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 17 Apr 2019 22:41:27 +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: r346335 - stable/12/sys/dev/ixgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: erj X-SVN-Commit-Paths: stable/12/sys/dev/ixgbe X-SVN-Commit-Revision: 346335 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 164CD96D1C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 22:41:28 -0000 Author: erj Date: Wed Apr 17 22:41:27 2019 New Revision: 346335 URL: https://svnweb.freebsd.org/changeset/base/346335 Log: MFC r344643 and r345306 Includes two ixgbe/ixv fixes: ixgbe(4): Fix panic triggered by assertion from interrupt ixv(4): Add missing IFLIB_IS_VF flag in iflib shared ctx Sponsored by: Intel Corporation Modified: stable/12/sys/dev/ixgbe/if_ix.c stable/12/sys/dev/ixgbe/if_ixv.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/12/sys/dev/ixgbe/if_ix.c Wed Apr 17 21:45:19 2019 (r346334) +++ stable/12/sys/dev/ixgbe/if_ix.c Wed Apr 17 22:41:27 2019 (r346335) @@ -2064,7 +2064,7 @@ ixgbe_msix_que(void *arg) /* Protect against spurious interrupts */ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - return 0; + return (FILTER_HANDLED); ixgbe_disable_queue(adapter, que->msix); ++que->irqs; Modified: stable/12/sys/dev/ixgbe/if_ixv.c ============================================================================== --- stable/12/sys/dev/ixgbe/if_ixv.c Wed Apr 17 21:45:19 2019 (r346334) +++ stable/12/sys/dev/ixgbe/if_ixv.c Wed Apr 17 22:41:27 2019 (r346335) @@ -220,7 +220,7 @@ static struct if_shared_ctx ixv_sctx_init = { .isc_vendor_info = ixv_vendor_info_array, .isc_driver_version = ixv_driver_version, .isc_driver = &ixv_if_driver, - .isc_flags = IFLIB_TSO_INIT_IP, + .isc_flags = IFLIB_IS_VF | IFLIB_TSO_INIT_IP, .isc_nrxd_min = {MIN_RXD}, .isc_ntxd_min = {MIN_TXD}, From owner-svn-src-all@freebsd.org Wed Apr 17 22:45:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54769157BB56; Wed, 17 Apr 2019 22:45:20 +0000 (UTC) (envelope-from erj@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 E748C96F91; Wed, 17 Apr 2019 22:45:19 +0000 (UTC) (envelope-from erj@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 BDDADDE9B; Wed, 17 Apr 2019 22:45:19 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HMjJcp066532; Wed, 17 Apr 2019 22:45:19 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HMjJpn066530; Wed, 17 Apr 2019 22:45:19 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201904172245.x3HMjJpn066530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 17 Apr 2019 22:45: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: r346336 - in stable/12/sys: dev/e1000 net X-SVN-Group: stable-12 X-SVN-Commit-Author: erj X-SVN-Commit-Paths: in stable/12/sys: dev/e1000 net X-SVN-Commit-Revision: 346336 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E748C96F91 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 22:45:20 -0000 Author: erj Date: Wed Apr 17 22:45:19 2019 New Revision: 346336 URL: https://svnweb.freebsd.org/changeset/base/346336 Log: MFC r344817 Remove references to CONTIGMALLOC_WORKS in iflib and em From Jake: "The iflib_fl_setup() function tries to pick various buffer sizes based on the max_frame_size value defined by the parent driver. However, this code was wrapped under CONTIGMALLOC_WORKS, which was never actually defined anywhere. This same code pattern was used in if_em.c, likely trying to match what iflib uses. Since CONTIGMALLOC_WORKS is not defined, remove this dead code from iflib_fl_setup and if_em.c Given that various iflib drivers appear to be using a similar calculation, it might be worth making this buffer size a value that the driver can peek at in the future." Submitted by: Jacob Keller Reviewed by: shurd@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D19199 Modified: stable/12/sys/dev/e1000/if_em.c stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/e1000/if_em.c ============================================================================== --- stable/12/sys/dev/e1000/if_em.c Wed Apr 17 22:41:27 2019 (r346335) +++ stable/12/sys/dev/e1000/if_em.c Wed Apr 17 22:45:19 2019 (r346336) @@ -1276,15 +1276,8 @@ em_if_init(if_ctx_t ctx) */ if (adapter->hw.mac.max_frame_size <= 2048) adapter->rx_mbuf_sz = MCLBYTES; -#ifndef CONTIGMALLOC_WORKS else adapter->rx_mbuf_sz = MJUMPAGESIZE; -#else - else if (adapter->hw.mac.max_frame_size <= 4096) - adapter->rx_mbuf_sz = MJUMPAGESIZE; - else - adapter->rx_mbuf_sz = MJUM9BYTES; -#endif em_initialize_receive_unit(ctx); /* Use real VLAN Filter support? */ Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Wed Apr 17 22:41:27 2019 (r346335) +++ stable/12/sys/net/iflib.c Wed Apr 17 22:45:19 2019 (r346336) @@ -2182,17 +2182,8 @@ iflib_fl_setup(iflib_fl_t fl) */ if (sctx->isc_max_frame_size <= 2048) fl->ifl_buf_size = MCLBYTES; -#ifndef CONTIGMALLOC_WORKS else fl->ifl_buf_size = MJUMPAGESIZE; -#else - else if (sctx->isc_max_frame_size <= 4096) - fl->ifl_buf_size = MJUMPAGESIZE; - else if (sctx->isc_max_frame_size <= 9216) - fl->ifl_buf_size = MJUM9BYTES; - else - fl->ifl_buf_size = MJUM16BYTES; -#endif if (fl->ifl_buf_size > ctx->ifc_max_fl_buf_size) ctx->ifc_max_fl_buf_size = fl->ifl_buf_size; fl->ifl_cltype = m_gettype(fl->ifl_buf_size); From owner-svn-src-all@freebsd.org Wed Apr 17 23:02:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 825D7157BF58; Wed, 17 Apr 2019 23:02:40 +0000 (UTC) (envelope-from erj@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 1F2E8976F6; Wed, 17 Apr 2019 23:02:40 +0000 (UTC) (envelope-from erj@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 A917FE1F7; Wed, 17 Apr 2019 23:02:39 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HN2dje076942; Wed, 17 Apr 2019 23:02:39 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HN2cSe076935; Wed, 17 Apr 2019 23:02:38 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201904172302.x3HN2cSe076935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 17 Apr 2019 23:02: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: r346337 - in stable/12/sys: dev/e1000 dev/ixgbe dev/ixl net sys X-SVN-Group: stable-12 X-SVN-Commit-Author: erj X-SVN-Commit-Paths: in stable/12/sys: dev/e1000 dev/ixgbe dev/ixl net sys X-SVN-Commit-Revision: 346337 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1F2E8976F6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 23:02:40 -0000 Author: erj Date: Wed Apr 17 23:02:37 2019 New Revision: 346337 URL: https://svnweb.freebsd.org/changeset/base/346337 Log: MFC r345303, r345305, r345657, r345658 Includes: - iflib: prevent possible infinite loop in iflib_encap - iflib: expose the Rx mbuf buffer size to drivers - iflib: hold the CTX lock in iflib_pseudo_register - iflib: return ENETDOWN when the network device is down Modified: stable/12/sys/dev/e1000/if_em.c stable/12/sys/dev/ixgbe/if_ix.c stable/12/sys/dev/ixgbe/if_ixv.c stable/12/sys/dev/ixl/if_iavf.c stable/12/sys/dev/ixl/ixl_pf_main.c stable/12/sys/net/iflib.c stable/12/sys/net/iflib.h stable/12/sys/sys/param.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/e1000/if_em.c ============================================================================== --- stable/12/sys/dev/e1000/if_em.c Wed Apr 17 22:45:19 2019 (r346336) +++ stable/12/sys/dev/e1000/if_em.c Wed Apr 17 23:02:37 2019 (r346337) @@ -1270,14 +1270,7 @@ em_if_init(if_ctx_t ctx) /* Setup Multicast table */ em_if_multi_set(ctx); - /* - * Figure out the desired mbuf - * pool for doing jumbos - */ - if (adapter->hw.mac.max_frame_size <= 2048) - adapter->rx_mbuf_sz = MCLBYTES; - else - adapter->rx_mbuf_sz = MJUMPAGESIZE; + adapter->rx_mbuf_sz = iflib_get_rx_mbuf_sz(ctx); em_initialize_receive_unit(ctx); /* Use real VLAN Filter support? */ Modified: stable/12/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/12/sys/dev/ixgbe/if_ix.c Wed Apr 17 22:45:19 2019 (r346336) +++ stable/12/sys/dev/ixgbe/if_ix.c Wed Apr 17 23:02:37 2019 (r346337) @@ -2880,10 +2880,7 @@ ixgbe_if_init(if_ctx_t ctx) ixgbe_if_multi_set(ctx); /* Determine the correct mbuf pool, based on frame size */ - if (adapter->max_frame_size <= MCLBYTES) - adapter->rx_mbuf_sz = MCLBYTES; - else - adapter->rx_mbuf_sz = MJUMPAGESIZE; + adapter->rx_mbuf_sz = iflib_get_rx_mbuf_sz(ctx); /* Configure RX settings */ ixgbe_initialize_receive_units(ctx); Modified: stable/12/sys/dev/ixgbe/if_ixv.c ============================================================================== --- stable/12/sys/dev/ixgbe/if_ixv.c Wed Apr 17 22:45:19 2019 (r346336) +++ stable/12/sys/dev/ixgbe/if_ixv.c Wed Apr 17 23:02:37 2019 (r346337) @@ -629,14 +629,7 @@ ixv_if_init(if_ctx_t ctx) /* Setup Multicast table */ ixv_if_multi_set(ctx); - /* - * Determine the correct mbuf pool - * for doing jumbo/headersplit - */ - if (ifp->if_mtu > ETHERMTU) - adapter->rx_mbuf_sz = MJUMPAGESIZE; - else - adapter->rx_mbuf_sz = MCLBYTES; + adapter->rx_mbuf_sz = iflib_get_rx_mbuf_sz(ctx); /* Configure RX settings */ ixv_initialize_receive_units(ctx); Modified: stable/12/sys/dev/ixl/if_iavf.c ============================================================================== --- stable/12/sys/dev/ixl/if_iavf.c Wed Apr 17 22:45:19 2019 (r346336) +++ stable/12/sys/dev/ixl/if_iavf.c Wed Apr 17 23:02:37 2019 (r346337) @@ -614,7 +614,6 @@ iavf_send_vc_msg(struct iavf_sc *sc, u32 op) static void iavf_init_queues(struct ixl_vsi *vsi) { - if_softc_ctx_t scctx = vsi->shared; struct ixl_tx_queue *tx_que = vsi->tx_queues; struct ixl_rx_queue *rx_que = vsi->rx_queues; struct rx_ring *rxr; @@ -625,10 +624,7 @@ iavf_init_queues(struct ixl_vsi *vsi) for (int i = 0; i < vsi->num_rx_queues; i++, rx_que++) { rxr = &rx_que->rxr; - if (scctx->isc_max_frame_size <= MCLBYTES) - rxr->mbuf_sz = MCLBYTES; - else - rxr->mbuf_sz = MJUMPAGESIZE; + rxr->mbuf_sz = iflib_get_rx_mbuf_sz(vsi->ctx); wr32(vsi->hw, rxr->tail, 0); } Modified: stable/12/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- stable/12/sys/dev/ixl/ixl_pf_main.c Wed Apr 17 22:45:19 2019 (r346336) +++ stable/12/sys/dev/ixl/ixl_pf_main.c Wed Apr 17 23:02:37 2019 (r346337) @@ -1300,10 +1300,7 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) struct i40e_hmc_obj_rxq rctx; /* Next setup the HMC RX Context */ - if (scctx->isc_max_frame_size <= MCLBYTES) - rxr->mbuf_sz = MCLBYTES; - else - rxr->mbuf_sz = MJUMPAGESIZE; + rxr->mbuf_sz = iflib_get_rx_mbuf_sz(vsi->ctx); u16 max_rxmax = rxr->mbuf_sz * hw->func_caps.rx_buf_chain_len; Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Wed Apr 17 22:45:19 2019 (r346336) +++ stable/12/sys/net/iflib.c Wed Apr 17 23:02:37 2019 (r346337) @@ -171,6 +171,7 @@ struct iflib_ctx { uint32_t ifc_if_flags; uint32_t ifc_flags; uint32_t ifc_max_fl_buf_size; + uint32_t ifc_rx_mbuf_sz; int ifc_link_state; int ifc_link_irq; @@ -2167,7 +2168,6 @@ iflib_fl_setup(iflib_fl_t fl) { iflib_rxq_t rxq = fl->ifl_rxq; if_ctx_t ctx = rxq->ifr_ctx; - if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; bit_nclear(fl->ifl_rx_bitmap, 0, fl->ifl_size - 1); /* @@ -2176,14 +2176,7 @@ iflib_fl_setup(iflib_fl_t fl) iflib_fl_bufs_free(fl); /* Now replenish the mbufs */ MPASS(fl->ifl_credits == 0); - /* - * XXX don't set the max_frame_size to larger - * than the hardware can handle - */ - if (sctx->isc_max_frame_size <= 2048) - fl->ifl_buf_size = MCLBYTES; - else - fl->ifl_buf_size = MJUMPAGESIZE; + fl->ifl_buf_size = ctx->ifc_rx_mbuf_sz; if (fl->ifl_buf_size > ctx->ifc_max_fl_buf_size) ctx->ifc_max_fl_buf_size = fl->ifl_buf_size; fl->ifl_cltype = m_gettype(fl->ifl_buf_size); @@ -2309,6 +2302,27 @@ iflib_timer(void *arg) } static void +iflib_calc_rx_mbuf_sz(if_ctx_t ctx) +{ + if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; + + /* + * XXX don't set the max_frame_size to larger + * than the hardware can handle + */ + if (sctx->isc_max_frame_size <= MCLBYTES) + ctx->ifc_rx_mbuf_sz = MCLBYTES; + else + ctx->ifc_rx_mbuf_sz = MJUMPAGESIZE; +} + +uint32_t +iflib_get_rx_mbuf_sz(if_ctx_t ctx) +{ + return (ctx->ifc_rx_mbuf_sz); +} + +static void iflib_init_locked(if_ctx_t ctx) { if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; @@ -2342,6 +2356,14 @@ iflib_init_locked(if_ctx_t ctx) CALLOUT_UNLOCK(txq); iflib_netmap_txq_init(ctx, txq); } + + /* + * Calculate a suitable Rx mbuf size prior to calling IFDI_INIT, so + * that drivers can use the value when setting up the hardware receive + * buffers. + */ + iflib_calc_rx_mbuf_sz(ctx); + #ifdef INVARIANTS i = if_getdrvflags(ifp); #endif @@ -3280,9 +3302,14 @@ defrag: txq->ift_mbuf_defrag++; m_head = m_defrag(*m_headp, M_NOWAIT); } - remap++; - if (__predict_false(m_head == NULL)) + /* + * remap should never be >1 unless bus_dmamap_load_mbuf_sg + * failed to map an mbuf that was run through m_defrag + */ + MPASS(remap <= 1); + if (__predict_false(m_head == NULL || remap > 1)) goto defrag_failed; + remap++; *m_headp = m_head; goto retry; break; @@ -3871,7 +3898,7 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) if (__predict_false((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || !LINK_ACTIVE(ctx))) { DBG_COUNTER_INC(tx_frees); m_freem(m); - return (ENOBUFS); + return (ENETDOWN); } MPASS(m->m_nextpkt == NULL); @@ -4634,10 +4661,10 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc * XXX sanity check that ntxd & nrxd are a power of 2 */ iflib_reset_qvalues(ctx); - + CTX_LOCK(ctx); if ((err = IFDI_ATTACH_PRE(ctx)) != 0) { device_printf(dev, "IFDI_ATTACH_PRE failed %d\n", err); - goto fail_ctx_free; + goto fail_unlock; } if (sctx->isc_flags & IFLIB_GEN_MAC) iflib_gen_mac(ctx); @@ -4790,6 +4817,7 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter); iflib_add_device_sysctl_post(ctx); ctx->ifc_flags |= IFC_INIT_DONE; + CTX_UNLOCK(ctx); return (0); fail_detach: ether_ifdetach(ctx->ifc_ifp); @@ -4798,6 +4826,8 @@ fail_queues: iflib_rx_structures_free(ctx); fail_iflib_detach: IFDI_DETACH(ctx); +fail_unlock: + CTX_UNLOCK(ctx); fail_ctx_free: free(ctx->ifc_softc, M_IFLIB); free(ctx, M_IFLIB); Modified: stable/12/sys/net/iflib.h ============================================================================== --- stable/12/sys/net/iflib.h Wed Apr 17 22:45:19 2019 (r346336) +++ stable/12/sys/net/iflib.h Wed Apr 17 23:02:37 2019 (r346337) @@ -381,6 +381,8 @@ void iflib_set_mac(if_ctx_t ctx, uint8_t mac[ETHER_ADD void iflib_request_reset(if_ctx_t ctx); uint8_t iflib_in_detach(if_ctx_t ctx); +uint32_t iflib_get_rx_mbuf_sz(if_ctx_t ctx); + /* * If the driver can plug cleanly in to newbus use these */ Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Wed Apr 17 22:45:19 2019 (r346336) +++ stable/12/sys/sys/param.h Wed Apr 17 23:02:37 2019 (r346337) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200506 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200507 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Wed Apr 17 23:09:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92766157C015; Wed, 17 Apr 2019 23:09:08 +0000 (UTC) (envelope-from erj@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 31B4E97882; Wed, 17 Apr 2019 23:09:08 +0000 (UTC) (envelope-from erj@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 B5899E201; Wed, 17 Apr 2019 23:09:07 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3HN97kN077262; Wed, 17 Apr 2019 23:09:07 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3HN96Cv077258; Wed, 17 Apr 2019 23:09:06 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201904172309.x3HN96Cv077258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 17 Apr 2019 23:09: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: r346338 - in stable/12: share/man/man9 sys/net sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: erj X-SVN-Commit-Paths: in stable/12: share/man/man9 sys/net sys/sys X-SVN-Commit-Revision: 346338 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 31B4E97882 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 23:09:08 -0000 Author: erj Date: Wed Apr 17 23:09:06 2019 New Revision: 346338 URL: https://svnweb.freebsd.org/changeset/base/346338 Log: MFC r345312 iflib: mark isc_driver_version as constant From Jake: The iflib core never modifies the isc_driver_version string. Allow drivers to safely assign pointers to constant buffers by marking this parameter const. (Additional comment by erj: This also adds a new sysctl_add_oid macro, SYSCTL_ADD_CONST_STRING, for displaying const strings). Submitted by: Jacob Keller Reviewed by: erj@, gallatin@, jhb@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D19577 Modified: stable/12/share/man/man9/sysctl.9 stable/12/sys/net/iflib.c stable/12/sys/net/iflib.h stable/12/sys/sys/sysctl.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/sysctl.9 ============================================================================== --- stable/12/share/man/man9/sysctl.9 Wed Apr 17 23:02:37 2019 (r346337) +++ stable/12/share/man/man9/sysctl.9 Wed Apr 17 23:09:06 2019 (r346338) @@ -43,6 +43,7 @@ .Nm SYSCTL_ADD_S32 , .Nm SYSCTL_ADD_S64 , .Nm SYSCTL_ADD_STRING , +.Nm SYSCTL_ADD_CONST_STRING , .Nm SYSCTL_ADD_STRUCT , .Nm SYSCTL_ADD_U8 , .Nm SYSCTL_ADD_U16 , @@ -70,6 +71,7 @@ .Nm SYSCTL_S32 , .Nm SYSCTL_S64 , .Nm SYSCTL_STRING , +.Nm SYSCTL_CONST_STRING , .Nm SYSCTL_STRUCT , .Nm SYSCTL_U8 , .Nm SYSCTL_U16 , @@ -225,6 +227,16 @@ .Fa "const char *descr" .Fc .Ft struct sysctl_oid * +.Fo SYSCTL_ADD_CONST_STRING +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "const char *ptr" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * .Fo SYSCTL_ADD_STRUCT .Fa "struct sysctl_ctx_list *ctx" .Fa "struct sysctl_oid_list *parent" @@ -351,6 +363,7 @@ .Fn SYSCTL_S32 parent number name ctlflags ptr val descr .Fn SYSCTL_S64 parent number name ctlflags ptr val descr .Fn SYSCTL_STRING parent number name ctlflags arg len descr +.Fn SYSCTL_CONST_STRING parent number name ctlflags arg descr .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr .Fn SYSCTL_U8 parent number name ctlflags ptr val descr .Fn SYSCTL_U16 parent number name ctlflags ptr val descr @@ -512,6 +525,11 @@ If the .Fa len argument in zero, the string length is computed at every access to the OID using .Xr strlen 3 . +Use the +.Fn SYSCTL_CONST_STRING +macro or the +.Fn SYSCTL_ADD_CONST_STRING +function to add a sysctl for a constant string. .Sh CREATING OPAQUE SYSCTLS The .Fn SYSCTL_OPAQUE @@ -558,6 +576,7 @@ Static sysctls are declared using one of the .Fn SYSCTL_S32 , .Fn SYSCTL_S64 , .Fn SYSCTL_STRING , +.Fn SYSCTL_CONST_STRING , .Fn SYSCTL_STRUCT , .Fn SYSCTL_U8 , .Fn SYSCTL_U16 , @@ -583,6 +602,7 @@ Dynamic nodes are created using one of the .Fn SYSCTL_ADD_S32 , .Fn SYSCTL_ADD_S64 , .Fn SYSCTL_ADD_STRING , +.Fn SYSCTL_ADD_CONST_STRING , .Fn SYSCTL_ADD_STRUCT , .Fn SYSCTL_ADD_U8 , .Fn SYSCTL_ADD_U16 , Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Wed Apr 17 23:02:37 2019 (r346337) +++ stable/12/sys/net/iflib.c Wed Apr 17 23:09:06 2019 (r346338) @@ -6244,8 +6244,8 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx) CTLFLAG_RD, NULL, "IFLIB fields"); oid_list = SYSCTL_CHILDREN(node); - SYSCTL_ADD_STRING(ctx_list, oid_list, OID_AUTO, "driver_version", - CTLFLAG_RD, ctx->ifc_sctx->isc_driver_version, 0, + SYSCTL_ADD_CONST_STRING(ctx_list, oid_list, OID_AUTO, "driver_version", + CTLFLAG_RD, ctx->ifc_sctx->isc_driver_version, "driver version"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_ntxqs", Modified: stable/12/sys/net/iflib.h ============================================================================== --- stable/12/sys/net/iflib.h Wed Apr 17 23:02:37 2019 (r346337) +++ stable/12/sys/net/iflib.h Wed Apr 17 23:09:06 2019 (r346338) @@ -248,7 +248,7 @@ struct if_shared_ctx { /* fields necessary for probe */ pci_vendor_info_t *isc_vendor_info; - char *isc_driver_version; + const char *isc_driver_version; /* optional function to transform the read values to match the table*/ void (*isc_parse_devinfo) (uint16_t *device_id, uint16_t *subvendor_id, uint16_t *subdevice_id, uint16_t *rev_id); Modified: stable/12/sys/sys/sysctl.h ============================================================================== --- stable/12/sys/sys/sysctl.h Wed Apr 17 23:02:37 2019 (r346337) +++ stable/12/sys/sys/sysctl.h Wed Apr 17 23:09:06 2019 (r346338) @@ -351,6 +351,25 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); NULL); \ }) +/* Oid for a constant '\0' terminated string. */ +#define SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr) \ + SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \ + __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \ + CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING) + +#define SYSCTL_ADD_CONST_STRING(ctx, parent, nbr, name, access, arg, descr) \ +({ \ + char *__arg = __DECONST(char *, arg); \ + CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \ + sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING|(access), \ + __arg, 0, sysctl_handle_string, "A", __DESCR(descr), \ + NULL); \ +}) + /* Oid for a bool. If ptr is NULL, val is returned. */ #define SYSCTL_NULL_BOOL_PTR ((bool *)NULL) #define SYSCTL_BOOL(parent, nbr, name, access, ptr, val, descr) \ From owner-svn-src-all@freebsd.org Thu Apr 18 00:38:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A045E157DE9A; Thu, 18 Apr 2019 00:38:55 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 4439D6B72D; Thu, 18 Apr 2019 00:38:55 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F1F9F1D4; Thu, 18 Apr 2019 00:38:55 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3I0csVm024200; Thu, 18 Apr 2019 00:38:54 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3I0csMH024199; Thu, 18 Apr 2019 00:38:54 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201904180038.x3I0csMH024199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 18 Apr 2019 00:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346340 - stable/11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/11/release/tools X-SVN-Commit-Revision: 346340 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4439D6B72D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 00:38:55 -0000 Author: cperciva Date: Thu Apr 18 00:38:54 2019 New Revision: 346340 URL: https://svnweb.freebsd.org/changeset/base/346340 Log: Fix cross-building VMs with a non-/usr/src source directory. The path /usr/src was hard-coded here, resulting in mkimg not being able to find the bootfiles. Direct commit to stable/11 because the code in HEAD and stable/12 is completely different due to changes in OBJDIR layout. Modified: stable/11/release/tools/vmimage.subr Modified: stable/11/release/tools/vmimage.subr ============================================================================== --- stable/11/release/tools/vmimage.subr Wed Apr 17 23:32:38 2019 (r346339) +++ stable/11/release/tools/vmimage.subr Thu Apr 18 00:38:54 2019 (r346340) @@ -16,8 +16,9 @@ write_partition_layout() { _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" _OBJDIR="$(realpath ${_OBJDIR})" - if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then - BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/stand" + _WORLDDIR="$(realpath ${WORLDDIR})" + if [ -d "${_OBJDIR%%${_WORLDDIR}}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="/${_OBJDIR%%${_WORLDDIR}}/${TARGET}.${TARGET_ARCH}${_WORLDDIR}/stand" else BOOTFILES="/${_OBJDIR}/stand" fi From owner-svn-src-all@freebsd.org Thu Apr 18 00:58:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF399157EA94; Thu, 18 Apr 2019 00:58:41 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82DEA6CC70; Thu, 18 Apr 2019 00:58:41 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f67.google.com with SMTP id i21so53705iol.7; Wed, 17 Apr 2019 17:58:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i0fssQ5ZeijeH/kQvUd0Vze+UazvvBpfXl+vk1c44Dc=; b=jMBweIcGeVuqi8Xb3bptzk3ufOiRP/YR2gaZr7o4PM2H5K0MqeQvUNoFGkqAZJguZb U238Fp8C9vdl0/U2/8O6vdBR744vog8kn+CvjZ/POym/bdg9Vivdnvtq92IZvovCJKD8 M1XJrZDIMrQLqepgIub5VVoI2+jk0eZ40JbqxCV19GYiSVb9sGIWyToyGNE0sqthzrnx OX32D7Mjx9NeoBhmLSc1Rc+H/oRXRTEDKFYK9S0Ko9jH/828Gt49EMsV2r/N51vO68jf I+GIeJxQZYWsB2ztl9Dd/T6j8+fpLfcHBHruaJMhYgcG7Cgzw77xTHd/rqpf6PMo4UWK ZvmA== X-Gm-Message-State: APjAAAWnLN+rTrHan7syPWsiKW76HNtwDk8GI0QfuF4ZguOd8LkMANR8 57FgYtXPXu8bg++/x3lN1ynuwjqpYx0KiE64bV4= X-Google-Smtp-Source: APXvYqwcnDH812sUDfpUoBR0j7bJx4UlEPrMXuVEG1fyut4X5aFauwNIBuvTSk3eRBiGfhK5QbpTa9V9PrmwsZverPU= X-Received: by 2002:a6b:6006:: with SMTP id r6mr1954517iog.294.1555548643443; Wed, 17 Apr 2019 17:50:43 -0700 (PDT) MIME-Version: 1.0 References: <20190417195145.6824c0f9@thor.intern.walstatt.dynvpn.de> <201904171941.x3HJfmee090931@slippy.cwsent.com> In-Reply-To: <201904171941.x3HJfmee090931@slippy.cwsent.com> From: Ed Maste Date: Wed, 17 Apr 2019 20:50:31 -0400 Message-ID: Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc To: Cy Schubert Cc: "O. Hartmann" , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 82DEA6CC70 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 00:58:42 -0000 On Wed, 17 Apr 2019 at 15:42, Cy Schubert wrote: > > -.if !exists(/usr/include/casper/cap_fileargs.h) > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs. > h > -.endif Yes I think this change is correct as an immediate workaround for this issue (until we sort out header bootstrapping in a more holistic way). Please commit it, or I will if you don't get to it soon. From owner-svn-src-all@freebsd.org Thu Apr 18 01:02:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40C51157EDDB; Thu, 18 Apr 2019 01:02:01 +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 DAF666D24B; Thu, 18 Apr 2019 01:02:00 +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 7817DF69F; Thu, 18 Apr 2019 01:02:00 +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 x3I120I0040288; Thu, 18 Apr 2019 01:02:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3I120ms040287; Thu, 18 Apr 2019 01:02:00 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201904180102.x3I120ms040287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 18 Apr 2019 01:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346341 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 346341 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DAF666D24B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 01:02:01 -0000 Author: cy Date: Thu Apr 18 01:02:00 2019 New Revision: 346341 URL: https://svnweb.freebsd.org/changeset/base/346341 Log: As an interim measure until a more permanent solution is implemented workaround the following error: /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of undeclared identifier 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); Reported by: O. Hartmann Reported by: Michael Butler Reported by: gjb@ & cy@ (implicit) Reviewed by: emaste@ Noted by: rgrimes@ Modified: head/tools/build/Makefile Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 (r346340) +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 (r346341) @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h INCS+= libcasper.h .endif -.if !exists(/usr/include/casper/cap_fileargs.h) CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h -.endif .if empty(SRCS) SRCS= dummy.c From owner-svn-src-all@freebsd.org Thu Apr 18 01:03:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2350A157EE5B; Thu, 18 Apr 2019 01:03:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 983BE6D43A; Thu, 18 Apr 2019 01:03:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id GvS8hVc2JGusjGvSAhGI4y; Wed, 17 Apr 2019 19:03:03 -0600 X-Authority-Analysis: v=2.3 cv=fOdHIqSe c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=oexKYjalfGEA:10 a=xfDLHkLGAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=R8O-uMdQVzs9i371vuoA:9 a=CjuIK1q_8ugA:10 a=UJ0tAi3fqDAA:10 a=IfaqVvZgccqrtc8gcwf2:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 3418ED7A; Wed, 17 Apr 2019 18:03:00 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x3I12fh4002409; Wed, 17 Apr 2019 18:02:41 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x3I12eT3002339; Wed, 17 Apr 2019 18:02:40 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201904180102.x3I12eT3002339@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ed Maste cc: Cy Schubert , "O. Hartmann" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc In-Reply-To: Message from Ed Maste of "Wed, 17 Apr 2019 20:50:31 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Apr 2019 18:02:40 -0700 X-CMAE-Envelope: MS4wfM5fmsC3J1ZoKODeHWToWp+vBx5lBQXgimOTBK4faY5z/Dd6BoCY7NsqRdA6lnHNVO8cNRKTWugbMIg4hkezO47Z6tE1wHD8IhX7jLp6Dtyj/BGEel3o IRnbkbBWe7UU3T6pZHCjaHLFzi7q78u3qzTLJDebAWWPB8aGi4tws0Kq3Wl3iYvwp4hy+dDf5K5QSGRLrIC9Z50HYEs4yMnCAX+ZgCMMHQZiDa9/P8svUhYt TGSzVzU8UkXVwz846ukoNRvoM6VM9waO0cMIMKluQwrsvlGSq0FSo2XsEmgLb/EnicYIhCqG1/tlc5J3tRcpKfgt8ol5eUOFmZtwmtQEPS4= X-Rspamd-Queue-Id: 983BE6D43A X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.02 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCPT_COUNT_FIVE(0.00)[6]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.35)[ip: (-6.09), ipnet: 64.59.128.0/20(-3.15), asn: 6327(-2.41), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 01:03:13 -0000 In message , Ed Maste writes: > On Wed, 17 Apr 2019 at 15:42, Cy Schubert wrote: > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs. > > h > > -.endif > > Yes I think this change is correct as an immediate workaround for this > issue (until we sort out header bootstrapping in a more holistic way). > Please commit it, or I will if you don't get to it soon. Committed. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Apr 18 01:07:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45544157EFC7; Thu, 18 Apr 2019 01:07:29 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A19966D690; Thu, 18 Apr 2019 01:07:28 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3I17QY7002946; Wed, 17 Apr 2019 18:07:26 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3I17QDc002945; Wed, 17 Apr 2019 18:07:26 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net> Subject: Re: svn commit: r346341 - head/tools/build In-Reply-To: <201904180102.x3I120ms040287@repo.freebsd.org> To: Cy Schubert Date: Wed, 17 Apr 2019 18:07:26 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: A19966D690 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.940,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 01:07:29 -0000 > Author: cy > Date: Thu Apr 18 01:02:00 2019 > New Revision: 346341 > URL: https://svnweb.freebsd.org/changeset/base/346341 > > Log: > As an interim measure until a more permanent solution is implemented > workaround the following error: > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of > undeclared identifier > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > Reported by: O. Hartmann > Reported by: Michael Butler > Reported by: gjb@ & cy@ (implicit) > Reviewed by: emaste@ > Noted by: rgrimes@ > > Modified: > head/tools/build/Makefile > > Modified: head/tools/build/Makefile > ============================================================================== > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 (r346340) > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 (r346341) > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h > INCS+= libcasper.h > .endif > > -.if !exists(/usr/include/casper/cap_fileargs.h) > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h > -.endif As a further note, we should probably hunt for any thing that is explicity looking at /usr/include/... in a Makefile, as that is minimally missing a ${DESTDIR} argument. The above may of actually worked if it had been written: .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) someone may wish to test that. Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake. > .if empty(SRCS) > SRCS= dummy.c -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Apr 18 01:15:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6289E157F74E; Thu, 18 Apr 2019 01:15:49 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f196.google.com (mail-it1-f196.google.com [209.85.166.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EBE366DD81; Thu, 18 Apr 2019 01:15:48 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f196.google.com with SMTP id y134so807689itc.5; Wed, 17 Apr 2019 18:15:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EDaAnmcYncE0b2BHECTYUFYLl/nial95/K3PF0ePBLw=; b=CeKbGxwb29XPI6Q5CjVSk4ADb8IpV4UULI/ij9+swdLPDTgKaZAfl6gjGVnnObQ3Hd e4qR3zr6byCPJERgi8aTKzo8RddkX5jeZYVb1cm3K+//SgDn+6d34vfruFnbRZNKxMbH 3+iXY/TJRYAEXZv/YbajZo+AYPXpcPJfK+p0D2oKpIVlx+FnQeucNs1U3Qk7xEeGTdQ6 Nl0nVI10Y6zCHJS70RD7MV2A7URnRZrFW5jYPDEd5jR/A6L6YLtl5v/HdAty+Placwip DaBBdjW2C0TkHJzBoaenv4uiFh8D34+1YQQOIU5hPtBeIO5ifq3mswtExR918x70n4Sl udqw== X-Gm-Message-State: APjAAAU6goA6O9rw+n11XBnBRZDd8LH0Y5yR9LmxDjnAhOeMbTo0nFZg 7/4ykVXRAbOUA/E1Aa/WV/yQQoDQ0ZdiK4vSTAQ= X-Google-Smtp-Source: APXvYqxA8ts/mcE/eKp/qM6nggYUOeCdhohRGQttm4vVgiL/JOBaXIqCM6UWV/PfbL/cokdeN7fg/12bUwDrz3X5MYE= X-Received: by 2002:a24:7354:: with SMTP id y81mr1237637itb.87.1555549650446; Wed, 17 Apr 2019 18:07:30 -0700 (PDT) MIME-Version: 1.0 References: <20190417195145.6824c0f9@thor.intern.walstatt.dynvpn.de> <201904171941.x3HJfmee090931@slippy.cwsent.com> In-Reply-To: From: Ed Maste Date: Wed, 17 Apr 2019 21:07:18 -0400 Message-ID: Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc To: Cy Schubert Cc: "O. Hartmann" , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: EBE366DD81 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 01:15:49 -0000 On Wed, 17 Apr 2019 at 20:50, Ed Maste wrote: > > On Wed, 17 Apr 2019 at 15:42, Cy Schubert wrote: > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs. > > h > > -.endif > > Yes I think this change is correct as an immediate workaround for this > issue (until we sort out header bootstrapping in a more holistic way). > Please commit it, or I will if you don't get to it soon. Or maybe this, similar to the existing tests in tools/build/Makefile: Index: tools/build/Makefile =================================================================== --- tools/build/Makefile (revision 346340) +++ tools/build/Makefile (working copy) @@ -59,7 +59,10 @@ INCS+= libcasper.h .endif -.if !exists(/usr/include/casper/cap_fileargs.h) +.if exists(/usr/include/casper/cap_fileargs.h) +_WITH_FA_OPEN!= grep -c FA_OPEN /usr/include/casper/cap_fileargs.h || true +.endif +.if !defined(_WITH_FA_OPEN) || ${_WITH_FA_OPEN} == 0 CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h .endif From owner-svn-src-all@freebsd.org Thu Apr 18 01:17:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0212E157FA52; Thu, 18 Apr 2019 01:17:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F17B56E138; Thu, 18 Apr 2019 01:17:30 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id Gvg7hVk4FGusjGvg9hGKGw; Wed, 17 Apr 2019 19:17:29 -0600 X-Authority-Analysis: v=2.3 cv=fOdHIqSe c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=oexKYjalfGEA:10 a=xfDLHkLGAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=k8PgTzd3dCnHDGy2r_oA:9 a=CjuIK1q_8ugA:10 a=DoawHyg_QpkA:10 a=IfaqVvZgccqrtc8gcwf2:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 248C2EC0; Wed, 17 Apr 2019 18:17:27 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x3I1H8wI065561; Wed, 17 Apr 2019 18:17:08 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x3I1H70l065558; Wed, 17 Apr 2019 18:17:07 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201904180117.x3I1H70l065558@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ed Maste cc: Cy Schubert , "O. Hartmann" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc In-Reply-To: Message from Ed Maste of "Wed, 17 Apr 2019 21:07:18 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Apr 2019 18:17:07 -0700 X-CMAE-Envelope: MS4wfPu6zz9jw2PCA8Y3/uiOPzmFzrX0ET9q6JejXthFvT2o1Sr9KyVKrNp3H9V3WGYIOvQS/jVMWt5T98ml3ZaChbdrIskhpMR/0ueZZi4yhRxyKtPyNySV 97mnl4lbOqXxhYBtOmJjKmKTp/g7P3N7HT62XFDdTc707628I4kElp+ODxDbZHTwQDgb3nxHrmj9jrp6y1iFQq6jJmqpQoXjh3X24FN3QyF4NNcEFopyjqpk 9+ds6SYRlaMSRLjgb/RWcXLFVcx4AwBYwA2LrXLThSFfkFRhoOppATa++0t3QKo2iZgdLREMDIrhVEOWLyEiGDGsAvd/cyQ+zghC4Cejcdo= X-Rspamd-Queue-Id: F17B56E138 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.02 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCPT_COUNT_FIVE(0.00)[6]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.34)[ip: (-6.05), ipnet: 64.59.128.0/20(-3.15), asn: 6327(-2.41), country: CA(-0.09)]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 01:17:32 -0000 In message , Ed Maste writes: > On Wed, 17 Apr 2019 at 20:50, Ed Maste wrote: > > > > On Wed, 17 Apr 2019 at 15:42, Cy Schubert wrote > : > > > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filearg > s. > > > h > > > -.endif > > > > Yes I think this change is correct as an immediate workaround for this > > issue (until we sort out header bootstrapping in a more holistic way). > > Please commit it, or I will if you don't get to it soon. > > Or maybe this, similar to the existing tests in tools/build/Makefile: > > Index: tools/build/Makefile > =================================================================== > --- tools/build/Makefile (revision 346340) > +++ tools/build/Makefile (working copy) > @@ -59,7 +59,10 @@ > INCS+= libcasper.h > .endif > > -.if !exists(/usr/include/casper/cap_fileargs.h) > +.if exists(/usr/include/casper/cap_fileargs.h) > +_WITH_FA_OPEN!= grep -c FA_OPEN /usr/include/casper/cap_fileargs.h || true > +.endif > +.if !defined(_WITH_FA_OPEN) || ${_WITH_FA_OPEN} == 0 > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h > .endif This only tests for the FA_OPEN. It will miss any new macro definitions should there be any at some point in the future. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Apr 18 01:23:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15D911580294; Thu, 18 Apr 2019 01:23:16 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f194.google.com (mail-it1-f194.google.com [209.85.166.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6F3C6E84C; Thu, 18 Apr 2019 01:23:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f194.google.com with SMTP id y204so847871itf.3; Wed, 17 Apr 2019 18:23:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M/8pk3OHNtWkWl/2CNV8byvl+QdOD+o4Q5DOsZsuvDA=; b=jZGvvHf2s1rmU4MAGU30z6P4syQXEbtDjU+x7LCCSCSle/Q/c+rPgrFnEdVP9qz+ai TTqR7ZuoCR2njLe/E9zJzKCEoTOwxU3VuQjolJ3uhR+rWRBsIAHOm9zeSewB3iILgCSo jDgh+kliiKL48gCjzjs4Tx1/OULRYoc4EPiZ/LBxps94xRiFzfvVf8O3/QS3Fu9vyr2h RgnnTve1J4ZUwN5J+ZcoviktrtIdPxAhzfMKrP77psjRcVLgo67QbYvlV+3Yp19fqSUI A1y35t1QIiOzSPzP5ZRr/OXC0PnHSGAZFgQ2zaix83jvEcifgTlFh2X7utY9ttbjE307 1HFQ== X-Gm-Message-State: APjAAAW51bDaj7ZcN6hx+AmkibbKegLFdJmmpMh5yV4OFPYd8WQwZ9Jx ydGvRhInu3XfwGDTVUSBp3WtzM11MUkTaC2YmfU= X-Google-Smtp-Source: APXvYqxj6mZX7hVlDM7Y3F8AcXCwJPlqQdx4eyRqUuKSpgS6/xPYeUwVthiM6K1wZAE/Ap3XqTPTSbdRc/7ymcUZL58= X-Received: by 2002:a24:7354:: with SMTP id y81mr1277438itb.87.1555550594688; Wed, 17 Apr 2019 18:23:14 -0700 (PDT) MIME-Version: 1.0 References: <201904180117.x3I1H70l065558@slippy.cwsent.com> In-Reply-To: <201904180117.x3I1H70l065558@slippy.cwsent.com> From: Ed Maste Date: Wed, 17 Apr 2019 21:23:02 -0400 Message-ID: Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc To: Cy Schubert Cc: "O. Hartmann" , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A6F3C6E84C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 01:23:16 -0000 On Wed, 17 Apr 2019 at 21:17, Cy Schubert wrote: > > This only tests for the FA_OPEN. It will miss any new macro definitions > should there be any at some point in the future. Yes, this should be replaced with a more holistic approach to addressing includes. From owner-svn-src-all@freebsd.org Thu Apr 18 02:32:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B30C15830BA; Thu, 18 Apr 2019 02:32:05 +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 1E62370CB1; Thu, 18 Apr 2019 02:32:05 +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 ED75218641; Thu, 18 Apr 2019 02:32:04 +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 x3I2W4OP087169; Thu, 18 Apr 2019 02:32:04 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3I2W4MS087168; Thu, 18 Apr 2019 02:32:04 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201904180232.x3I2W4MS087168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 18 Apr 2019 02:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346342 - 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: 346342 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E62370CB1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 02:32:05 -0000 Author: rmacklem Date: Thu Apr 18 02:32:04 2019 New Revision: 346342 URL: https://svnweb.freebsd.org/changeset/base/346342 Log: MFC: r345866 Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled. The code enabled when "DEBUG" is defined uses mem_alloc(), which is a malloc(.., M_RPC, M_WAITOK | M_ZERO), but then calls gss_release_buffer() which does a free(.., M_GSSAPI) to free the memory. This patch fixes the problem by replacing mem_alloc() with a malloc(.., M_GSSAPI, M_WAITOK | M_ZERO). This bug affects almost no one, since the sources are not normally built with "DEBUG" defined. 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 Thu Apr 18 01:02:00 2019 (r346341) +++ stable/12/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Apr 18 02:32:04 2019 (r346342) @@ -758,7 +758,7 @@ gss_oid_to_str(OM_uint32 *minor_status, gss_OID oid, g * here for "{ " and "}\0". */ string_length += 4; - if ((bp = (char *) mem_alloc(string_length))) { + if ((bp = malloc(string_length, M_GSSAPI, M_WAITOK | M_ZERO))) { strcpy(bp, "{ "); number = (unsigned long) cp[0]; sprintf(numstr, "%ld ", number/40); From owner-svn-src-all@freebsd.org Thu Apr 18 02:48:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 236F3158395C; Thu, 18 Apr 2019 02:48:00 +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 B6BE47145C; Thu, 18 Apr 2019 02:47:59 +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 861B218944; Thu, 18 Apr 2019 02:47:59 +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 x3I2lxZb093613; Thu, 18 Apr 2019 02:47:59 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3I2lxQ7093612; Thu, 18 Apr 2019 02:47:59 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201904180247.x3I2lxQ7093612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 18 Apr 2019 02:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346343 - stable/11/sys/rpc/rpcsec_gss X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/sys/rpc/rpcsec_gss X-SVN-Commit-Revision: 346343 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B6BE47145C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 02:48:00 -0000 Author: rmacklem Date: Thu Apr 18 02:47:59 2019 New Revision: 346343 URL: https://svnweb.freebsd.org/changeset/base/346343 Log: MFC: r345866 Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled. The code enabled when "DEBUG" is defined uses mem_alloc(), which is a malloc(.., M_RPC, M_WAITOK | M_ZERO), but then calls gss_release_buffer() which does a free(.., M_GSSAPI) to free the memory. This patch fixes the problem by replacing mem_alloc() with a malloc(.., M_GSSAPI, M_WAITOK | M_ZERO). This bug affects almost no one, since the sources are not normally built with "DEBUG" defined. Modified: stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Apr 18 02:32:04 2019 (r346342) +++ stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Apr 18 02:47:59 2019 (r346343) @@ -755,7 +755,7 @@ gss_oid_to_str(OM_uint32 *minor_status, gss_OID oid, g * here for "{ " and "}\0". */ string_length += 4; - if ((bp = (char *) mem_alloc(string_length))) { + if ((bp = malloc(string_length, M_GSSAPI, M_WAITOK | M_ZERO))) { strcpy(bp, "{ "); number = (unsigned long) cp[0]; sprintf(numstr, "%ld ", number/40); From owner-svn-src-all@freebsd.org Thu Apr 18 02:54:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03F4115840E2; Thu, 18 Apr 2019 02:54:08 +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 9C4BA71B3A; Thu, 18 Apr 2019 02:54:07 +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 77ACB18AF6; Thu, 18 Apr 2019 02:54:07 +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 x3I2s7Cr098908; Thu, 18 Apr 2019 02:54:07 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3I2s7bS098907; Thu, 18 Apr 2019 02:54:07 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201904180254.x3I2s7bS098907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 18 Apr 2019 02:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r346344 - stable/10/sys/rpc/rpcsec_gss X-SVN-Group: stable-10 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/10/sys/rpc/rpcsec_gss X-SVN-Commit-Revision: 346344 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9C4BA71B3A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 02:54:08 -0000 Author: rmacklem Date: Thu Apr 18 02:54:07 2019 New Revision: 346344 URL: https://svnweb.freebsd.org/changeset/base/346344 Log: MFC: r345866 Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled. The code enabled when "DEBUG" is defined uses mem_alloc(), which is a malloc(.., M_RPC, M_WAITOK | M_ZERO), but then calls gss_release_buffer() which does a free(.., M_GSSAPI) to free the memory. This patch fixes the problem by replacing mem_alloc() with a malloc(.., M_GSSAPI, M_WAITOK | M_ZERO). This bug affects almost no one, since the sources are not normally built with "DEBUG" defined. Modified: stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Apr 18 02:47:59 2019 (r346343) +++ stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Apr 18 02:54:07 2019 (r346344) @@ -738,7 +738,7 @@ gss_oid_to_str(OM_uint32 *minor_status, gss_OID oid, g * here for "{ " and "}\0". */ string_length += 4; - if ((bp = (char *) mem_alloc(string_length))) { + if ((bp = malloc(string_length, M_GSSAPI, M_WAITOK | M_ZERO))) { strcpy(bp, "{ "); number = (unsigned long) cp[0]; sprintf(numstr, "%ld ", number/40); From owner-svn-src-all@freebsd.org Thu Apr 18 03:23:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBF7115858B4 for ; Thu, 18 Apr 2019 03:23:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CFC472F96 for ; Thu, 18 Apr 2019 03:23:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x841.google.com with SMTP id w5so693109qtb.11 for ; Wed, 17 Apr 2019 20:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ewK9keJRP5t4VixrU6IeJSzOmWYHy/kUZx+tMORUx6k=; b=pPevSvl3PCUR6X8u66MjJCNaDmb4/yR7BIv9NLtHdHQHhB6Op/08gZzUwzTwYO8DB5 8UGoHqtdOvKFgPfUSObp/EJ1m6FMrGIXNHC7ecP4zdltPld/H8xlWuWaIA/d3brvQgCx QprZ6JSTVUgdw1tXO40AUfOwE4FPSu7NPGNq5ATk2EF7z+snl0N9h6I31cp9+lFzU0T/ SJKWvNH+Z5hMETcm2zZITThjhE1GlFii5eTHeG1HVX4RP/f/dUuvZOuH+tVOAVHiemyh 49lbKlS/X8uVlbT1cHhyQ5yTUqOFpY7mbQfl3tI5V57XwoGBx2j1fUMF2rjwHSQADqZs jSoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ewK9keJRP5t4VixrU6IeJSzOmWYHy/kUZx+tMORUx6k=; b=LYs92V9NmdZGak9Ggul9hmlPWhyxZEBnOK1GB0+uB5iDVaIyQidSM3A7RwtLcggqPM +nrQ8tZGM4mZ8wXEMTduiDMqwdmTKlazqN2ZkGow9sYGwCb2KjTYhJNAf0iR6xcl6dat PEUC64+RWwk1ONevqwh3wVY2WtbVbWOuPbZ2ELlDN/wYz0smkOjg8hG0/7zXohe62NlI FAXnob8REmgCnmpbSjXGzsXQddP9eF5/G13pf7GJ9QeafCEIY6RGesr0qGUMlQIKeFlQ iv8hTmjdo14sxXY5Ai83rZM2ng+OJ/XaFFJgPmJuXcAsYfiz4sn6R7GWt+YtZmIadvfH xP9A== X-Gm-Message-State: APjAAAUzZ/gSjZAVzTD26E4bHdLS/C9eJCQQXoGQ37bV9I0r5CnzvjWx OFbHj51UT/Bb+FkK7gSFo4cqLPxESD0aaC3kAUQIMA== X-Google-Smtp-Source: APXvYqx0RNSiNB2qxcrqVZir/n3vYHDyTrTP/toP3wA5m/3ZHsvumKdFRzvkumuMha57xPZjTrTudiLbFPgR4UIabEQ= X-Received: by 2002:a0c:ba10:: with SMTP id w16mr75026184qvf.115.1555557812546; Wed, 17 Apr 2019 20:23:32 -0700 (PDT) MIME-Version: 1.0 References: <201904162004.x3GK4N7u019636@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 17 Apr 2019 21:23:21 -0600 Message-ID: Subject: Re: svn commit: r346295 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/mv arm/nvidia/tegra124 a... To: Andrew Turner Cc: Ian Lepore , Emmanuel Vadot , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 6CFC472F96 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 03:23:34 -0000 On Wed, Apr 17, 2019 at 12:06 PM Andrew Turner wrote= : > > > On 17 Apr 2019, at 17:52, Ian Lepore wrote: > > On Wed, 2019-04-17 at 11:23 +0200, Andrew Turner wrote: > > On 16 Apr 2019, at 22:04, Emmanuel Vadot wrote: > > Author: manu > Date: Tue Apr 16 20:04:22 2019 > New Revision: 346295 > URL: https://svnweb.freebsd.org/changeset/base/346295 > > Log: > arm: Add kern_clocksource.c directly in files.arm > > This files is needed and included in all our config so move it to > a common > location. > > MFC after: 2 weeks > > > ... > > Modified: head/sys/conf/files.arm > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- head/sys/conf/files.arm Tue Apr 16 19:46:02 2019 (r346294) > +++ head/sys/conf/files.arm Tue Apr 16 20:04:22 2019 (r346295) > @@ -11,6 +11,9 @@ cloudabi32_vdso_blob.o optional com > pat_cloudabi32 \ > no-implicit-rule \ > clean "cloudabi32_vdso_blob.o" > # > + > +kern/kern_clocksource.c standard > > > Could this be moved from the various files.* to files? It seems we > define it as standard on all architectures. > > > > I thought mips still had some variants that didn't implement event > timers. That's why this stuff was ever in arch-specific files, arm and > mips had some flavors without ET support. > > > I think it used to be the case on arm. A grep seems to think it=E2=80=99s= enabled > on all architectures now: > > grep kern_clocksource files.* > files.amd64:kern/kern_clocksource.c standard > files.arm:kern/kern_clocksource.c standard > files.arm64:kern/kern_clocksource.c standard > files.i386:kern/kern_clocksource.c standard > files.mips:kern/kern_clocksource.c standard > files.powerpc:kern/kern_clocksource.c standard > files.riscv:kern/kern_clocksource.c standard > files.sparc64:kern/kern_clocksource.c standard > Looks like it can be hoisted and required for all new architectures. Warner From owner-svn-src-all@freebsd.org Thu Apr 18 03:32:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A3331585DFE; Thu, 18 Apr 2019 03:32:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9980C73590; Thu, 18 Apr 2019 03:32:25 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id GxmfhXZMZldkPGxmgh9s6q; Wed, 17 Apr 2019 21:32:23 -0600 X-Authority-Analysis: v=2.3 cv=Ko4zJleN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=oexKYjalfGEA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=iaTFZB6CAAAA:8 a=zxA2vyXaAAAA:8 a=YxBL1-UpAAAA:8 a=o9UH0ns-ChN0zhiAKN8A:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=QWXrQ9iV8q7LKaLQ9lfw:22 a=nK2txNHJmq7TfjpuLlwI:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 5510C5F9; Wed, 17 Apr 2019 20:32:20 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x3I3WKT9096495; Wed, 17 Apr 2019 20:32:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x3I3WJTt096491; Wed, 17 Apr 2019 20:32:19 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201904180332.x3I3WJTt096491@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346341 - head/tools/build In-Reply-To: Message from "Rodney W. Grimes" of "Wed, 17 Apr 2019 18:07:26 -0700." <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Apr 2019 20:32:19 -0700 X-CMAE-Envelope: MS4wfFa9WCV4vGiRNi64+Xc2puERGOfhdRwvPfsLMCQcq+lqiSBkvqgmiojF9vDBVhPpr6qX8jXQ3VoNYpu1b42jUBtgv5Jj8EmUzzWVni3T22ver7kX5pi0 f1T6dBoO4W7Kcdou+FSkVh2Y+5SA4dG3Ale6KWyjyWt/Bcajp4hCef3Om++kixOaW9lxC2WynWisQgGukhaKqynuvLFmOdkffN0pSJmH/IDCtAAldqfUoQlu AtyF7kL+0F9lLdWLXyzNRUwWBMv2M46Jpjv4O7oJmn23rVY2YM1ssgEEZhPLqLf4KVrFkjECEuECE+XKODo2EA== X-Rspamd-Queue-Id: 9980C73590 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.11 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-2.44)[ip: (-6.55), ipnet: 64.59.128.0/20(-3.15), asn: 6327(-2.41), country: CA(-0.09)]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[12.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 03:32:27 -0000 In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > > Author: cy > > Date: Thu Apr 18 01:02:00 2019 > > New Revision: 346341 > > URL: https://svnweb.freebsd.org/changeset/base/346341 > > > > Log: > > As an interim measure until a more permanent solution is implemented > > workaround the following error: > > > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of > > undeclared identifier > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > > > Reported by: O. Hartmann > > Reported by: Michael Butler > > Reported by: gjb@ & cy@ (implicit) > > Reviewed by: emaste@ > > Noted by: rgrimes@ > > > > Modified: > > head/tools/build/Makefile > > > > Modified: head/tools/build/Makefile > > =========================================================================== > === > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 (r34634 > 0) > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 (r34634 > 1) > > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h > > INCS+= libcasper.h > > .endif > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea > rgs.h > > -.endif > > As a further note, we should probably hunt for any thing > that is explicity looking at /usr/include/... in a Makefile, > as that is minimally missing a ${DESTDIR} argument. > > The above may of actually worked if it had been written: > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) > someone may wish to test that. > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake. This is a better solution. I tested this in a tree with a duplicated environment: Problem solved. Before this is committed it should be tested on one of the universe machines. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Apr 18 03:59:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FFD41586A75 for ; Thu, 18 Apr 2019 03:59:01 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAE8E74953 for ; Thu, 18 Apr 2019 03:59:00 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1555559939; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=MmP13xKm/TcTfjxkNrmvJMXOi10cxDdFfArp0kOIt1TAvFLMQehkLylljbtTpXQEwSi9SLlJbKpTj y/VgiU/1+M4WtM0wONhtbYRZP801om19plVf2eJYr7kbjBGFQcBis/CAfEQslMDE2FweM0VWAqvJx+ R7U+cAMoa2s3cf1S3EcSUT+1uI5p7nXXjhvOYEa8mGHhC8LnBVH2IqPmsMV4dvROXFiAzazkVOp4U1 S1JobSXQY44FGw1C9OBZgGRqNbXMmuTtefyDr4jYnIhigLRNRASsTrlStMkkMxWPgCzQHhgWysFF5S w3kCOogY6uk2DWUd49Svz6w6FjNWf+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=9xBd3RRjOpajcMhiX5EWBANgA0MbD9QOp9d3myxnPU8=; b=PXTyQvL5gUiBUjBi8lt44jWgG64GnrEOXCg9nnz5cGNCZBHSojqGYP1gCj6QsaY6w+pHZA1r+n3iy J5sxX8yBPh+9A27aP9+XxjcUTRzvBhuzolxJtqeEtKVRJQ+hMyQMTcKaXvjeeVtnCbfKK03VyI5yar 4tD0LboId81w4jPfHqzU8euwYUoyqXbSwX0g2d/YQTGKit13dmYCrk5sPPms/ZvRVv2nhC8hCgy8lF uh0ZBdrbvKOIUXjFpySFvRS56gd2j2Lzhu9Yi4QQ+aH2BJxTahSAdzoHEGSwHZFPAuihPzWHIf6lb3 6wVXgV4sUKVYYb2OzFME4dbAK+xLRog== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=9xBd3RRjOpajcMhiX5EWBANgA0MbD9QOp9d3myxnPU8=; b=o+DGenKAJ1VMoKZQEs8eHdER6LDMPhkPtUFmsDTQalkyg7GAKu3Jc9nK5IIEKy+x5blmSyHyjNRz9 kmvQHe0X5kTPeZxKpcwlRRDNLRat9ZoLOMxboNFAYZsZXoR3FMr1beeMKOGk3VFrAxkcegiAH5Lr91 yiYw2pSp2a8Fzw/oErlE+ykx0nZ/IVpxLdIBnun2Rmt11KJrab8SrOYXf5jeefIym98sGBjmXKNx1+ h9wZGwqMGmOCwnMDTIlJH2Lnfm/iifVhUr9tKKrOxF1uKrFR1c2D7tDYMAnLxdlbfJ/URDmUdsor2N UweTzqtLl97QqYBVJMbDlpZuV1XmgaQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 49b6675b-618e-11e9-919f-112c64a8cf29 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 49b6675b-618e-11e9-919f-112c64a8cf29; Thu, 18 Apr 2019 03:58:57 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3I3wthg049245; Wed, 17 Apr 2019 21:58:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r346341 - head/tools/build From: Ian Lepore To: Cy Schubert , rgrimes@freebsd.org Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 17 Apr 2019 21:58:55 -0600 In-Reply-To: <201904180332.x3I3WJTt096491@slippy.cwsent.com> References: <201904180332.x3I3WJTt096491@slippy.cwsent.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: DAE8E74953 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 03:59:01 -0000 On Wed, 2019-04-17 at 20:32 -0700, Cy Schubert wrote: > In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, "Rodney > W. > Grimes" > writes: > > > Author: cy > > > Date: Thu Apr 18 01:02:00 2019 > > > New Revision: 346341 > > > URL: https://svnweb.freebsd.org/changeset/base/346341 > > > > > > Log: > > > As an interim measure until a more permanent solution is > > > implemented > > > workaround the following error: > > > > > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: > > > use of > > > undeclared identifier > > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, > > > FA_OPEN); > > > > > > Reported by: O. Hartmann > > > Reported by: Michael Butler > > > Reported by: gjb@ & cy@ (implicit) > > > Reviewed by: emaste@ > > > Noted by: rgrimes@ > > > > > > Modified: > > > head/tools/build/Makefile > > > > > > Modified: head/tools/build/Makefile > > > ================================================================= > > > ========== > > > > === > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 ( > > > r34634 > > > > 0) > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 ( > > > r34634 > > > > 1) > > > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h > > > INCS+= libcasper.h > > > .endif > > > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/c > > > ap_filea > > > > rgs.h > > > -.endif > > > > As a further note, we should probably hunt for any thing > > that is explicity looking at /usr/include/... in a Makefile, > > as that is minimally missing a ${DESTDIR} argument. > > > > The above may of actually worked if it had been written: > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) > > someone may wish to test that. > > > > Also a pathname rooted at / without ${DESTDIR} is almost certainly > > a mistake. > > This is a better solution. I tested this in a tree with a duplicated > environment: Problem solved. Before this is committed it should be > tested on one of the universe machines. > > I'm having a hard time understanding how adding $DESTDIR is any kind of solution to something that happens at build time as opposed to install time. I typically run buildworld/kernel without DESTDIR defined. -- Ian From owner-svn-src-all@freebsd.org Thu Apr 18 04:06:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46DC31586E87; Thu, 18 Apr 2019 04:06:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5531674DD4; Thu, 18 Apr 2019 04:06:00 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id GyJ9hl9Cfo7SQGyJAh1tID; Wed, 17 Apr 2019 22:05:58 -0600 X-Authority-Analysis: v=2.3 cv=Go88BX9C c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=oexKYjalfGEA:10 a=6I5d2MoRAAAA:8 a=iKhvJSA4AAAA:8 a=iaTFZB6CAAAA:8 a=zxA2vyXaAAAA:8 a=YxBL1-UpAAAA:8 a=L7ZJcP9EYGOl6B3A_wAA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=odh9cflL3HIXMm4fY7Wr:22 a=QWXrQ9iV8q7LKaLQ9lfw:22 a=nK2txNHJmq7TfjpuLlwI:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E20546D5; Wed, 17 Apr 2019 21:05:54 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x3I45sIc050488; Wed, 17 Apr 2019 21:05:54 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x3I45sQo050485; Wed, 17 Apr 2019 21:05:54 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201904180405.x3I45sQo050485@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: Cy Schubert , rgrimes@freebsd.org, Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346341 - head/tools/build In-Reply-To: Message from Ian Lepore of "Wed, 17 Apr 2019 21:58:55 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Apr 2019 21:05:54 -0700 X-CMAE-Envelope: MS4wfExrx2ewOWNds1FaxKlSB4fCz3lG4cQl2/6A8+VhAQ0KQfYJ8uhMfjwRrfAH/U8sN/UTBrq7hSt8K2JRjWwaNP+4dmS79q60UK7BFFgXEHY6E9O84OGm aTjEtHGYavt/aMs9uqa2eT3eu+uv8qQUZTmkAEQKLTZej2/PE6WMhfb0fD/ZD5mOrw0ej4G9e8+JEwEVA2gwfAu2l9rVoi1BUglkZmazaythsnQgl6epYD1m llGh5RfjG1hyDIgtI1v4xdy7K2qxl94WhcYc0R6941i1HMCDiQaiNuiblievgB/+2XJTeEmzsqz6fvGgweYmHNlGUu49p87I+O6ar/29aD0= X-Rspamd-Queue-Id: 5531674DD4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.33)[ip: (-6.01), ipnet: 64.59.128.0/20(-3.14), asn: 6327(-2.40), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 04:06:02 -0000 In message , Ian Le pore writes: > On Wed, 2019-04-17 at 20:32 -0700, Cy Schubert wrote: > > In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, "Rodney > > W. > > Grimes" > > writes: > > > > Author: cy > > > > Date: Thu Apr 18 01:02:00 2019 > > > > New Revision: 346341 > > > > URL: https://svnweb.freebsd.org/changeset/base/346341 > > > > > > > > Log: > > > > As an interim measure until a more permanent solution is > > > > implemented > > > > workaround the following error: > > > > > > > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: > > > > use of > > > > undeclared identifier > > > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, > > > > FA_OPEN); > > > > > > > > Reported by: O. Hartmann > > > > Reported by: Michael Butler > > > > Reported by: gjb@ & cy@ (implicit) > > > > Reviewed by: emaste@ > > > > Noted by: rgrimes@ > > > > > > > > Modified: > > > > head/tools/build/Makefile > > > > > > > > Modified: head/tools/build/Makefile > > > > ================================================================= > > > > ========== > > > > > > === > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 ( > > > > r34634 > > > > > > 0) > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 ( > > > > r34634 > > > > > > 1) > > > > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h > > > > INCS+= libcasper.h > > > > .endif > > > > > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/c > > > > ap_filea > > > > > > rgs.h > > > > -.endif > > > > > > As a further note, we should probably hunt for any thing > > > that is explicity looking at /usr/include/... in a Makefile, > > > as that is minimally missing a ${DESTDIR} argument. > > > > > > The above may of actually worked if it had been written: > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) > > > someone may wish to test that. > > > > > > Also a pathname rooted at / without ${DESTDIR} is almost certainly > > > a mistake. > > > > This is a better solution. I tested this in a tree with a duplicated > > environment: Problem solved. Before this is committed it should be > > tested on one of the universe machines. > > > > > > I'm having a hard time understanding how adding $DESTDIR is any kind of > solution to something that happens at build time as opposed to install > time. I typically run buildworld/kernel without DESTDIR defined. $DESTDIR is also used as a destination for the temporary build directory $WORLDTMP, i.e. /usr/obj/${ARCH}/tmp, also known as $SYSROOT. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Apr 18 05:37:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CD7A15888EE; Thu, 18 Apr 2019 05:37:19 +0000 (UTC) (envelope-from imp@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 0F07D771B0; Thu, 18 Apr 2019 05:37:19 +0000 (UTC) (envelope-from imp@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 C715B1A750; Thu, 18 Apr 2019 05:37:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3I5bITa082997; Thu, 18 Apr 2019 05:37:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3I5bIDQ082996; Thu, 18 Apr 2019 05:37:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201904180537.x3I5bIDQ082996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 18 Apr 2019 05:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346345 - in head/stand/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: include libefi X-SVN-Commit-Revision: 346345 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F07D771B0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 05:37:19 -0000 Author: imp Date: Thu Apr 18 05:37:18 2019 New Revision: 346345 URL: https://svnweb.freebsd.org/changeset/base/346345 Log: Add a more generic efi_setenv function. efi_setenv allows any UEFI variable to be set. Modified: head/stand/efi/include/efilib.h head/stand/efi/libefi/efienv.c Modified: head/stand/efi/include/efilib.h ============================================================================== --- head/stand/efi/include/efilib.h Thu Apr 18 02:54:07 2019 (r346344) +++ head/stand/efi/include/efilib.h Thu Apr 18 05:37:18 2019 (r346345) @@ -125,6 +125,7 @@ void cpy16to8(const CHAR16 *, char *, size_t); EFI_STATUS efi_freebsd_getenv(const char *v, void *data, __size_t *len); EFI_STATUS efi_getenv(EFI_GUID *g, const char *v, void *data, __size_t *len); EFI_STATUS efi_global_getenv(const char *v, void *data, __size_t *len); +EFI_STATUS efi_setenv(EFI_GUID *guid, const char *varname, UINT32 attr, void *data, __size_t len); EFI_STATUS efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr); /* guids and names */ Modified: head/stand/efi/libefi/efienv.c ============================================================================== --- head/stand/efi/libefi/efienv.c Thu Apr 18 02:54:07 2019 (r346344) +++ head/stand/efi/libefi/efienv.c Thu Apr 18 05:37:18 2019 (r346345) @@ -68,6 +68,25 @@ efi_freebsd_getenv(const char *v, void *data, size_t * return (efi_getenv(&FreeBSDBootVarGUID, v, data, len)); } +/* + * efi_setenv -- Sets an env variable. + */ +EFI_STATUS +efi_setenv(EFI_GUID *guid, const char *varname, UINT32 attr, void *data, __size_t len) +{ + EFI_STATUS rv; + CHAR16 *uv; + size_t ul; + + uv = NULL; + if (utf8_to_ucs2(varname, &uv, &ul) != 0) + return (EFI_OUT_OF_RESOURCES); + + rv = RS->SetVariable(uv, guid, attr, len, data); + free(uv); + return (rv); +} + EFI_STATUS efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr) { From owner-svn-src-all@freebsd.org Thu Apr 18 05:40:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB2AC15889CA; Thu, 18 Apr 2019 05:40:51 +0000 (UTC) (envelope-from imp@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 5DD4077358; Thu, 18 Apr 2019 05:40:51 +0000 (UTC) (envelope-from imp@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 395731A765; Thu, 18 Apr 2019 05:40:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3I5epgp086204; Thu, 18 Apr 2019 05:40:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3I5eo96086202; Thu, 18 Apr 2019 05:40:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201904180540.x3I5eo96086202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 18 Apr 2019 05:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346346 - in head/stand/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: include libefi X-SVN-Commit-Revision: 346346 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DD4077358 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 05:40:51 -0000 Author: imp Date: Thu Apr 18 05:40:50 2019 New Revision: 346346 URL: https://svnweb.freebsd.org/changeset/base/346346 Log: Add efi_delenv Add an interface to remove / delete UEFI variables. Modified: head/stand/efi/include/efilib.h head/stand/efi/libefi/efienv.c Modified: head/stand/efi/include/efilib.h ============================================================================== --- head/stand/efi/include/efilib.h Thu Apr 18 05:37:18 2019 (r346345) +++ head/stand/efi/include/efilib.h Thu Apr 18 05:40:50 2019 (r346346) @@ -122,6 +122,7 @@ void cpy16to8(const CHAR16 *, char *, size_t); * the loader setting / getting FreeBSD specific variables. */ +EFI_STATUS efi_delenv(EFI_GUID *guid, const char *varname); EFI_STATUS efi_freebsd_getenv(const char *v, void *data, __size_t *len); EFI_STATUS efi_getenv(EFI_GUID *g, const char *v, void *data, __size_t *len); EFI_STATUS efi_global_getenv(const char *v, void *data, __size_t *len); Modified: head/stand/efi/libefi/efienv.c ============================================================================== --- head/stand/efi/libefi/efienv.c Thu Apr 18 05:37:18 2019 (r346345) +++ head/stand/efi/libefi/efienv.c Thu Apr 18 05:40:50 2019 (r346346) @@ -103,3 +103,21 @@ efi_setenv_freebsd_wcs(const char *varname, CHAR16 *va return (rv); } +/* + * efi_delenv -- deletes the specified env variable + */ +EFI_STATUS +efi_delenv(EFI_GUID *guid, const char *name) +{ + CHAR16 *var; + size_t len; + EFI_STATUS rv; + + var = NULL; + if (utf8_to_ucs2(name, &var, &len) != 0) + return (EFI_OUT_OF_RESOURCES); + + rv = RS->SetVariable(var, guid, 0, 0, NULL); + free(var); + return rv; +} From owner-svn-src-all@freebsd.org Thu Apr 18 10:54:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2AC9156CEC7; Thu, 18 Apr 2019 10:54:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 66F95888A2; Thu, 18 Apr 2019 10:54:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 445631DDCD; Thu, 18 Apr 2019 10:54:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IAs9S8050891; Thu, 18 Apr 2019 10:54:09 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IAs9kF050890; Thu, 18 Apr 2019 10:54:09 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201904181054.x3IAs9kF050890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 18 Apr 2019 10:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346347 - head/tests/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/netpfil/pf X-SVN-Commit-Revision: 346347 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 66F95888A2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 10:54:09 -0000 Author: kp Date: Thu Apr 18 10:54:08 2019 New Revision: 346347 URL: https://svnweb.freebsd.org/changeset/base/346347 Log: pf tests: Fail the test if we can't set the rules The test should fail if pf rules can't be set. This is helpful both while writing tests and to verify that pfctl works as expected. MFC after: 1 week Event: Aberdeen hackathon 2019 Modified: head/tests/sys/netpfil/pf/utils.subr Modified: head/tests/sys/netpfil/pf/utils.subr ============================================================================== --- head/tests/sys/netpfil/pf/utils.subr Thu Apr 18 05:40:50 2019 (r346346) +++ head/tests/sys/netpfil/pf/utils.subr Thu Apr 18 10:54:08 2019 (r346347) @@ -40,6 +40,10 @@ pft_set_rules() printf "$1\n" shift done | jexec ${jname} pfctl -f - + if [ $? -ne 0 ]; + then + atf_fail "Failed to set PF rules in ${jname}" + fi } pft_cleanup() From owner-svn-src-all@freebsd.org Thu Apr 18 11:06:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06D7A156D207; Thu, 18 Apr 2019 11:06:46 +0000 (UTC) (envelope-from thj@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 9DB8188D7E; Thu, 18 Apr 2019 11:06:45 +0000 (UTC) (envelope-from thj@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 790391DF8D; Thu, 18 Apr 2019 11:06:45 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IB6jWJ056326; Thu, 18 Apr 2019 11:06:45 GMT (envelope-from thj@FreeBSD.org) Received: (from thj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IB6jwb056325; Thu, 18 Apr 2019 11:06:45 GMT (envelope-from thj@FreeBSD.org) Message-Id: <201904181106.x3IB6jwb056325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org using -f From: Tom Jones Date: Thu, 18 Apr 2019 11:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346348 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: thj X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 346348 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9DB8188D7E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 11:06:46 -0000 Author: thj Date: Thu Apr 18 11:06:45 2019 New Revision: 346348 URL: https://svnweb.freebsd.org/changeset/base/346348 Log: Add a bugs section to pflog man page FreeBSD does not set the pid field in the pfloghdr struct. This field is populated on other platforms, document this to save people from trying to use this field. Event: Aberdeen hackathon 2019 Reviewed by: kp, bcr, bz Approved by: bz (mentor) Differential Revision: https://reviews.freebsd.org/D19952 Modified: head/share/man/man4/pflog.4 Modified: head/share/man/man4/pflog.4 ============================================================================== --- head/share/man/man4/pflog.4 Thu Apr 18 10:54:08 2019 (r346347) +++ head/share/man/man4/pflog.4 Thu Apr 18 11:06:45 2019 (r346348) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2019 +.Dd April 18, 2019 .Dt PFLOG 4 .Os .Sh NAME @@ -110,5 +110,7 @@ The .Nm device first appeared in .Ox 3.0 . -.\" .Sh BUGS -.\" Anything here? +.Sh BUGS +FreeBSD does not set a process id in the +.Fa pid +field in pfloghdr. From owner-svn-src-all@freebsd.org Thu Apr 18 11:11:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E65B7156D303; Thu, 18 Apr 2019 11:11:57 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A12389201; Thu, 18 Apr 2019 11:11:57 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 160F122089; Thu, 18 Apr 2019 07:11:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 18 Apr 2019 07:11:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=uDC8Ge 7OwgyrTwySDanzwM6YawowEkgGv0LH5ouQukk=; b=iCSKyLOgCUDx9vdJL5Ih2B tGPUWG4vGFBlaHkjrV7bVw5KWhwc/QMAmFPXagc9QYRMYvFPRTGPQlYfmaicvJbP MjwnImHh7bAJ4/nZ75Vnpa2EFavE7+Ngvj6zdccleKUSEMpcyL18MexjCby4mKOj 05DIZU8k1YivgsdyKZBa467fB0M6/tcpwHUNfMdjSI7jJMk8zMQe2lF+HFaV2i9W G4YU+sEEcqUXgvILkPFJzw/LPGmZYNUZmcYWvVpeGoWIaqUpDJ4iSju4EvEz2piI Kc1n3jusAuEszM2RHanbjwkTUqN4g2214Wqt4Zk57uKr/LpTpIHc2/SfXdgiP7lA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrfeehgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuogfuohhrthgvugftvggtihhpvdculdegtddmnecujf gurhepfffhvffukfhfgggtuggjfgesthdtredttdervdenucfhrhhomhepvfhomhculfho nhgvshcuoehthhhjsehfrhgvvggsshgurdhorhhgqeenucffohhmrghinhepfhhrvggvsg hsugdrohhrghenucfkphepudefjedrhedtrddujedruddvnecurfgrrhgrmhepmhgrihhl fhhrohhmpehthhhjsehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from tom-desk.erg.abdn.ac.uk (tom-desk.erg.abdn.ac.uk [137.50.17.12]) by mail.messagingengine.com (Postfix) with ESMTPA id D2062103C9; Thu, 18 Apr 2019 07:11:49 -0400 (EDT) Date: Thu, 18 Apr 2019 12:13:56 +0100 From: Tom Jones To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346348 - head/share/man/man4 Message-ID: <20190418111356.GC51517@tom-desk.erg.abdn.ac.uk> References: <201904181106.x3IB6jwb056325@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201904181106.x3IB6jwb056325@repo.freebsd.org> User-Agent: Mutt/1.11.1 (2018-12-01) X-Rspamd-Queue-Id: 8A12389201 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 11:11:58 -0000 On Thu, Apr 18, 2019 at 11:06:45AM +0000, Tom Jones wrote: > Author: thj > Date: Thu Apr 18 11:06:45 2019 > New Revision: 346348 > URL: https://svnweb.freebsd.org/changeset/base/346348 > > Log: > Add a bugs section to pflog man page > > FreeBSD does not set the pid field in the pfloghdr struct. This field is > populated on other platforms, document this to save people from trying > to use this field. > > Event: Aberdeen hackathon 2019 > Reviewed by: kp, bcr, bz > Approved by: bz (mentor) > Differential Revision: https://reviews.freebsd.org/D19952 > > Modified: > head/share/man/man4/pflog.4 Should also reference https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=122773 - [tj] From owner-svn-src-all@freebsd.org Thu Apr 18 11:37:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79753156DBD9; Thu, 18 Apr 2019 11:37:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 21A3589CF0; Thu, 18 Apr 2019 11:37:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F16671E4A6; Thu, 18 Apr 2019 11:37:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IBbiJU072233; Thu, 18 Apr 2019 11:37:44 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IBbivn072232; Thu, 18 Apr 2019 11:37:44 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201904181137.x3IBbivn072232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 18 Apr 2019 11:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346349 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 346349 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 21A3589CF0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 11:37:45 -0000 Author: kp Date: Thu Apr 18 11:37:44 2019 New Revision: 346349 URL: https://svnweb.freebsd.org/changeset/base/346349 Log: pf: No need to M_NOWAIT in DIOCRSETTFLAGS Now that we don't hold a lock during DIOCRSETTFLAGS memory allocation we can use M_WAITOK. MFC after: 1 week Event: Aberdeen hackathon 2019 Pointed out by: glebius@ Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Thu Apr 18 11:06:45 2019 (r346348) +++ head/sys/netpfil/pf/pf_ioctl.c Thu Apr 18 11:37:44 2019 (r346349) @@ -3110,11 +3110,7 @@ DIOCCHANGEADDR_error: totlen = io->pfrio_size * sizeof(struct pfr_table); pfrts = mallocarray(io->pfrio_size, sizeof(struct pfr_table), - M_TEMP, M_NOWAIT); - if (pfrts == NULL) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->pfrio_buffer, pfrts, totlen); if (error) { free(pfrts, M_TEMP); From owner-svn-src-all@freebsd.org Thu Apr 18 13:07:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB6CE1570CC1; Thu, 18 Apr 2019 13:07:58 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com [209.85.166.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CB848CF08; Thu, 18 Apr 2019 13:07:58 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f176.google.com with SMTP id y204so3171352itf.3; Thu, 18 Apr 2019 06:07:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SyMuGg79qm8H5QiT13I+99o53mHHCjGtBjyojkCL9OU=; b=iMZlWEJA5bGFSXj84+zRzXHIBCBpvLRA075V/jMyzry117jGJp/pUKczLAYXlFskse ia4QVNdf3YVTLTFuIsMtN/0XPVS+KW0CS/Z/41vEtPoOzu+/2wPMZIzNL3xfWwtgxs7S cJWi9Ctl/6XzDq3RdreYI281R8lWvYeEkfmW0lhCUKdDa9xd6aQtv4K2AdNKQeo6OLDX /o4+fT4Z9Yp8MeNUtyPAS0ZX2jQ71Yd+oJsCemDg04QjeWwpxdfJLJ0PnOeIGPFmO4WU eu5CWIDq2vKMalh6xbj66Qz/K8lFXfV4oSn+DhywVDHwWUuhxS3HImFaTynTGWc9IF0O 7gTA== X-Gm-Message-State: APjAAAWe5ky3mzVEBoPMhdnfoxMjMf6CQfvnyKMxXj1RbKYDu2BmaRTV 83PoSAyN6cfctmSTO+STCuWKm7cEJpkS+yU/ksykEQ== X-Google-Smtp-Source: APXvYqy1Xxidf/9oJX1vMRHRSvutfhig1DqrZZRoeI1yFH7YCpH6rXFlWVo1Y+KlBj+4QZZMa1l0LL+WcvN5MPiExlc= X-Received: by 2002:a24:7354:: with SMTP id y81mr3114767itb.87.1555592871742; Thu, 18 Apr 2019 06:07:51 -0700 (PDT) MIME-Version: 1.0 References: <201904180102.x3I120ms040287@repo.freebsd.org> <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net> In-Reply-To: <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net> From: Ed Maste Date: Thu, 18 Apr 2019 09:07:39 -0400 Message-ID: Subject: Re: svn commit: r346341 - head/tools/build To: "Rodney W. Grimes" Cc: Cy Schubert , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6CB848CF08 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.89 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.89)[-0.891,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 13:07:59 -0000 On Wed, 17 Apr 2019 at 21:07, Rodney W. Grimes wrote: > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake. It's not in fact; strings is being built for the host here, and the headers in /usr/include are the appropriate ones. In this specific case the Capsicum change needs to be made fully portable for upstreaming to the ELF Tool Chain project and when that happens it will build on FreeBSD build hosts older than r346314 the same way it will build on Linux or other hosts without an up-to-date cap_fileargs, by using a local portability wrappers. From owner-svn-src-all@freebsd.org Thu Apr 18 13:45:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E10F11571A50; Thu, 18 Apr 2019 13:45:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EAB88E5A2; Thu, 18 Apr 2019 13:45:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3IDjgxw005765; Thu, 18 Apr 2019 06:45:42 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3IDjgr4005764; Thu, 18 Apr 2019 06:45:42 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904181345.x3IDjgr4005764@gndrsh.dnsmgr.net> Subject: Re: svn commit: r346341 - head/tools/build In-Reply-To: <201904180332.x3I3WJTt096491@slippy.cwsent.com> To: Cy Schubert Date: Thu, 18 Apr 2019 06:45:42 -0700 (PDT) CC: rgrimes@freebsd.org, Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4EAB88E5A2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.928,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 13:45:48 -0000 > In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, "Rodney W. > Grimes" > writes: > > > Author: cy > > > Date: Thu Apr 18 01:02:00 2019 > > > New Revision: 346341 > > > URL: https://svnweb.freebsd.org/changeset/base/346341 > > > > > > Log: > > > As an interim measure until a more permanent solution is implemented > > > workaround the following error: > > > > > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of > > > undeclared identifier > > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > > > > > Reported by: O. Hartmann > > > Reported by: Michael Butler > > > Reported by: gjb@ & cy@ (implicit) > > > Reviewed by: emaste@ > > > Noted by: rgrimes@ > > > > > > Modified: > > > head/tools/build/Makefile > > > > > > Modified: head/tools/build/Makefile > > > =========================================================================== > > === > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 (r34634 > > 0) > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 (r34634 > > 1) > > > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h > > > INCS+= libcasper.h > > > .endif > > > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea > > rgs.h > > > -.endif > > > > As a further note, we should probably hunt for any thing > > that is explicity looking at /usr/include/... in a Makefile, > > as that is minimally missing a ${DESTDIR} argument. > > > > The above may of actually worked if it had been written: > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) > > someone may wish to test that. > > > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake. > > This is a better solution. I tested this in a tree with a duplicated > environment: Problem solved. Before this is committed it should be > tested on one of the universe machines. >From what Ed just said this would also be wrong, as well as CASPERINC+= above being wrong, if this is being built for the host we should not be using any headers from ${SRCTOP} at all. if capfileargs.h does not exist on the host that functionality must not be compiled into the buildtool as the host does not have this feature and attempting to use it from SRCTOP is wrong. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Apr 18 14:02:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF8FD1572018; Thu, 18 Apr 2019 14:02:34 +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 5DE7E8EFF6; Thu, 18 Apr 2019 14:02:34 +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 309AA1FF15; Thu, 18 Apr 2019 14:02:34 +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 x3IE2XxS052367; Thu, 18 Apr 2019 14:02:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IE2X5O052366; Thu, 18 Apr 2019 14:02:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904181402.x3IE2X5O052366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 18 Apr 2019 14:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346350 - head/sys/x86/iommu X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/iommu X-SVN-Commit-Revision: 346350 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DE7E8EFF6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 14:02:34 -0000 Author: kib Date: Thu Apr 18 14:02:33 2019 New Revision: 346350 URL: https://svnweb.freebsd.org/changeset/base/346350 Log: Reduce verbosity, do not announce details of irte programming by default. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/x86/iommu/intel_intrmap.c Modified: head/sys/x86/iommu/intel_intrmap.c ============================================================================== --- head/sys/x86/iommu/intel_intrmap.c Thu Apr 18 11:37:44 2019 (r346349) +++ head/sys/x86/iommu/intel_intrmap.c Thu Apr 18 14:02:33 2019 (r346350) @@ -270,9 +270,11 @@ dmar_ir_program_irte(struct dmar_unit *unit, u_int idx irte = &(unit->irt[idx]); high = DMAR_IRTE2_SVT_RID | DMAR_IRTE2_SQ_RID | DMAR_IRTE2_SID_RID(rid); - device_printf(unit->dev, - "programming irte[%d] rid %#x high %#jx low %#jx\n", - idx, rid, (uintmax_t)high, (uintmax_t)low); + if (bootverbose) { + device_printf(unit->dev, + "programming irte[%d] rid %#x high %#jx low %#jx\n", + idx, rid, (uintmax_t)high, (uintmax_t)low); + } DMAR_LOCK(unit); if ((irte->irte1 & DMAR_IRTE1_P) != 0) { /* From owner-svn-src-all@freebsd.org Thu Apr 18 14:02:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44A19157204B; Thu, 18 Apr 2019 14:02:57 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCE198F128; Thu, 18 Apr 2019 14:02:56 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 8207F7D69; Thu, 18 Apr 2019 14:02:56 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f47.google.com with SMTP id h5so1741013lfm.1; Thu, 18 Apr 2019 07:02:56 -0700 (PDT) X-Gm-Message-State: APjAAAWXUHSB862ZfLA2xA4wFSU7BjpgAovcDZr7Rd0d2Je24tkms5tb 3bgP0CUnJ1jEkrqdlgmuj5+rrbFMwq38fZJPTAU= X-Google-Smtp-Source: APXvYqzN62Da37ZCQ7QaMElYLnMau/oz8UOZx6Y1So0gGfZw+zj1RGV2rwwqwZseftqMDoBEDiW8x+OS/flz2V7Wud8= X-Received: by 2002:a19:7005:: with SMTP id h5mr26965406lfc.143.1555596175019; Thu, 18 Apr 2019 07:02:55 -0700 (PDT) MIME-Version: 1.0 References: <201904180332.x3I3WJTt096491@slippy.cwsent.com> <201904181345.x3IDjgr4005764@gndrsh.dnsmgr.net> In-Reply-To: <201904181345.x3IDjgr4005764@gndrsh.dnsmgr.net> From: Kyle Evans Date: Thu, 18 Apr 2019 09:02:42 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r346341 - head/tools/build To: "Rodney W. Grimes" Cc: Cy Schubert , Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: DCE198F128 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 14:02:57 -0000 On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes wrote: > > > In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, "Rodney W. > > Grimes" > > writes: > > > > Author: cy > > > > Date: Thu Apr 18 01:02:00 2019 > > > > New Revision: 346341 > > > > URL: https://svnweb.freebsd.org/changeset/base/346341 > > > > > > > > Log: > > > > As an interim measure until a more permanent solution is implemented > > > > workaround the following error: > > > > > > > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of > > > > undeclared identifier > > > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > > > > > > > Reported by: O. Hartmann > > > > Reported by: Michael Butler > > > > Reported by: gjb@ & cy@ (implicit) > > > > Reviewed by: emaste@ > > > > Noted by: rgrimes@ > > > > > > > > Modified: > > > > head/tools/build/Makefile > > > > > > > > Modified: head/tools/build/Makefile > > > > =========================================================================== > > > === > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 (r34634 > > > 0) > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 (r34634 > > > 1) > > > > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h > > > > INCS+= libcasper.h > > > > .endif > > > > > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea > > > rgs.h > > > > -.endif > > > > > > As a further note, we should probably hunt for any thing > > > that is explicity looking at /usr/include/... in a Makefile, > > > as that is minimally missing a ${DESTDIR} argument. > > > > > > The above may of actually worked if it had been written: > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) > > > someone may wish to test that. > > > > > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake. > > > > This is a better solution. I tested this in a tree with a duplicated > > environment: Problem solved. Before this is committed it should be > > tested on one of the universe machines. > > From what Ed just said this would also be wrong, > as well as CASPERINC+= above being wrong, if this > is being built for the host we should not be using > any headers from ${SRCTOP} at all. > > if capfileargs.h does not exist on the host that functionality > must not be compiled into the buildtool as the host does not > have this feature and attempting to use it from SRCTOP is wrong. > Keep in mind that this is bootstrap; it's being built for the host system, but it will link against a version of libcasper that's been built in an earlier stage with the proper featureset. From owner-svn-src-all@freebsd.org Thu Apr 18 14:04:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EA531572111; Thu, 18 Apr 2019 14:04:00 +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 256C58F29F; Thu, 18 Apr 2019 14:04:00 +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 015F51FF23; Thu, 18 Apr 2019 14:04:00 +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 x3IE3xtp052478; Thu, 18 Apr 2019 14:03:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IE3xJ3052477; Thu, 18 Apr 2019 14:03:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904181403.x3IE3xJ3052477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 18 Apr 2019 14:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346351 - head/sys/x86/iommu X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/iommu X-SVN-Commit-Revision: 346351 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 256C58F29F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 14:04:00 -0000 Author: kib Date: Thu Apr 18 14:03:59 2019 New Revision: 346351 URL: https://svnweb.freebsd.org/changeset/base/346351 Log: Remove witness warning. dmar_bus_dmamap_create() does not sleep. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/x86/iommu/busdma_dmar.c Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Thu Apr 18 14:02:33 2019 (r346350) +++ head/sys/x86/iommu/busdma_dmar.c Thu Apr 18 14:03:59 2019 (r346351) @@ -371,8 +371,6 @@ dmar_bus_dmamap_create(bus_dma_tag_t dmat, int flags, struct bus_dma_tag_dmar *tag; struct bus_dmamap_dmar *map; - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s", __func__); - tag = (struct bus_dma_tag_dmar *)dmat; map = malloc_domainset(sizeof(*map), M_DMAR_DMAMAP, DOMAINSET_PREF(tag->common.domain), M_NOWAIT | M_ZERO); From owner-svn-src-all@freebsd.org Thu Apr 18 14:18:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96825157282B; Thu, 18 Apr 2019 14:18:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 462538FBEE; Thu, 18 Apr 2019 14:18:08 +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 21E87200FD; Thu, 18 Apr 2019 14:18:08 +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 x3IEI8oh057969; Thu, 18 Apr 2019 14:18:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IEI7E5057963; Thu, 18 Apr 2019 14:18:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904181418.x3IEI7E5057963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 18 Apr 2019 14:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346352 - head/sys/x86/iommu X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/iommu X-SVN-Commit-Revision: 346352 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 462538FBEE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 14:18:09 -0000 Author: kib Date: Thu Apr 18 14:18:06 2019 New Revision: 346352 URL: https://svnweb.freebsd.org/changeset/base/346352 Log: Correct handling of RMRR during early enumeration stages. On some machines, DMAR contexts must be created before all devices under the scope of the corresponding DMAR unit are enumerated. Current code has two problems with that: - scope lookup returns NULL device_t, which causes to skip creating a context with RMRR, which is fatal for the affected device. - calculation of the final pci dbsf address fails if any bridge in the scope is not yet enumerated, because code relies on pcib_get_bus(). Make creation of contexts work either with device_t, or with DMAR PCI scope paths. Scope provides enough information to infer context address, and it is directly matched against DMAR tables scopes. When calculating bus addresses for the scope or device, use direct pci_cfgregread(PCIR_SECBUS_1) to get the secondary bus number, instead of pcib_get_bus(). The issue was observed on HP Gen servers, where iLO PCI devices are located behind south bridge switch. Turning on translation without satisfying RMRR requests caused iLO to mostly hang, up to the level of being unusable to control the server. While there, remove hw.dmar.dmar_match_verbose tunable, and make the normal logging under bootverbose useful and sufficient to diagnose DRHD and RMRR parsing and matching. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/x86/iommu/busdma_dmar.c head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_drv.c head/sys/x86/iommu/intel_intrmap.c head/sys/x86/iommu/intel_utils.c Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Thu Apr 18 14:03:59 2019 (r346351) +++ head/sys/x86/iommu/busdma_dmar.c Thu Apr 18 14:18:06 2019 (r346352) @@ -275,7 +275,7 @@ dmar_get_dma_tag(device_t dev, device_t child) struct dmar_ctx *ctx; bus_dma_tag_t res; - dmar = dmar_find(child); + dmar = dmar_find(child, bootverbose); /* Not in scope of any DMAR ? */ if (dmar == NULL) return (NULL); Modified: head/sys/x86/iommu/intel_ctx.c ============================================================================== --- head/sys/x86/iommu/intel_ctx.c Thu Apr 18 14:03:59 2019 (r346351) +++ head/sys/x86/iommu/intel_ctx.c Thu Apr 18 14:18:06 2019 (r346352) @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -203,7 +205,9 @@ dmar_flush_for_ctx_entry(struct dmar_unit *dmar, bool } static int -domain_init_rmrr(struct dmar_domain *domain, device_t dev) +domain_init_rmrr(struct dmar_domain *domain, device_t dev, int bus, + int slot, int func, int dev_domain, int dev_busno, + const void *dev_path, int dev_path_len) { struct dmar_map_entries_tailq rmrr_entries; struct dmar_map_entry *entry, *entry1; @@ -214,7 +218,8 @@ domain_init_rmrr(struct dmar_domain *domain, device_t error = 0; TAILQ_INIT(&rmrr_entries); - dmar_dev_parse_rmrr(domain, dev, &rmrr_entries); + dmar_dev_parse_rmrr(domain, dev_domain, dev_busno, dev_path, + dev_path_len, &rmrr_entries); TAILQ_FOREACH_SAFE(entry, &rmrr_entries, unroll_link, entry1) { /* * VT-d specification requires that the start of an @@ -227,12 +232,19 @@ domain_init_rmrr(struct dmar_domain *domain, device_t */ start = entry->start; end = entry->end; + if (bootverbose) + printf("dmar%d ctx pci%d:%d:%d RMRR [%#jx, %#jx]\n", + domain->dmar->unit, bus, slot, func, + (uintmax_t)start, (uintmax_t)end); entry->start = trunc_page(start); entry->end = round_page(end); if (entry->start == entry->end) { /* Workaround for some AMI (?) BIOSes */ if (bootverbose) { - device_printf(dev, "BIOS bug: dmar%d RMRR " + if (dev != NULL) + device_printf(dev, ""); + printf("pci%d:%d:%d ", bus, slot, func); + printf("BIOS bug: dmar%d RMRR " "region (%jx, %jx) corrected\n", domain->dmar->unit, start, end); } @@ -260,9 +272,13 @@ domain_init_rmrr(struct dmar_domain *domain, device_t DMAR_UNLOCK(domain->dmar); } else { if (error1 != 0) { - device_printf(dev, + if (dev != NULL) + device_printf(dev, ""); + printf("pci%d:%d:%d ", bus, slot, func); + printf( "dmar%d failed to map RMRR region (%jx, %jx) %d\n", - domain->dmar->unit, start, end, error1); + domain->dmar->unit, start, end, + error1); error = error1; } TAILQ_REMOVE(&rmrr_entries, entry, unroll_link); @@ -404,8 +420,9 @@ dmar_domain_destroy(struct dmar_domain *domain) free(domain, M_DMAR_DOMAIN); } -struct dmar_ctx * -dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t dev, uint16_t rid, +static struct dmar_ctx * +dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t dev, uint16_t rid, + int dev_domain, int dev_busno, const void *dev_path, int dev_path_len, bool id_mapped, bool rmrr_init) { struct dmar_domain *domain, *domain1; @@ -415,9 +432,15 @@ dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t int bus, slot, func, error; bool enable; - bus = pci_get_bus(dev); - slot = pci_get_slot(dev); - func = pci_get_function(dev); + if (dev != NULL) { + bus = pci_get_bus(dev); + slot = pci_get_slot(dev); + func = pci_get_function(dev); + } else { + bus = PCI_RID2BUS(rid); + slot = PCI_RID2SLOT(rid); + func = PCI_RID2FUNC(rid); + } enable = false; TD_PREP_PINNED_ASSERT; DMAR_LOCK(dmar); @@ -436,7 +459,9 @@ dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t return (NULL); } if (!id_mapped) { - error = domain_init_rmrr(domain1, dev); + error = domain_init_rmrr(domain1, dev, bus, + slot, func, dev_domain, dev_busno, dev_path, + dev_path_len); if (error != 0) { dmar_domain_destroy(domain1); TD_PINNED_ASSERT; @@ -468,12 +493,14 @@ dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t enable = true; LIST_INSERT_HEAD(&dmar->domains, domain, link); ctx_id_entry_init(ctx, ctxp, false); - device_printf(dev, + if (dev != NULL) { + device_printf(dev, "dmar%d pci%d:%d:%d:%d rid %x domain %d mgaw %d " - "agaw %d %s-mapped\n", - dmar->unit, dmar->segment, bus, slot, - func, rid, domain->domain, domain->mgaw, - domain->agaw, id_mapped ? "id" : "re"); + "agaw %d %s-mapped\n", + dmar->unit, dmar->segment, bus, slot, + func, rid, domain->domain, domain->mgaw, + domain->agaw, id_mapped ? "id" : "re"); + } dmar_unmap_pgtbl(sf); } else { dmar_unmap_pgtbl(sf); @@ -485,6 +512,8 @@ dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t } } else { domain = ctx->domain; + if (ctx->ctx_tag.owner == NULL) + ctx->ctx_tag.owner = dev; ctx->refs++; /* tag referenced us */ } @@ -502,7 +531,14 @@ dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t */ if (enable && !rmrr_init && (dmar->hw_gcmd & DMAR_GCMD_TE) == 0) { error = dmar_enable_translation(dmar); - if (error != 0) { + if (error == 0) { + if (bootverbose) { + printf("dmar%d: enabled translation\n", + dmar->unit); + } + } else { + printf("dmar%d: enabling translation failed, " + "error %d\n", dmar->unit, error); dmar_free_ctx_locked(dmar, ctx); TD_PINNED_ASSERT; return (NULL); @@ -511,6 +547,31 @@ dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t DMAR_UNLOCK(dmar); TD_PINNED_ASSERT; return (ctx); +} + +struct dmar_ctx * +dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t dev, uint16_t rid, + bool id_mapped, bool rmrr_init) +{ + int dev_domain, dev_path_len, dev_busno; + + dev_domain = pci_get_domain(dev); + dev_path_len = dmar_dev_depth(dev); + ACPI_DMAR_PCI_PATH dev_path[dev_path_len]; + dmar_dev_path(dev, &dev_busno, dev_path, dev_path_len); + return (dmar_get_ctx_for_dev1(dmar, dev, rid, dev_domain, dev_busno, + dev_path, dev_path_len, id_mapped, rmrr_init)); +} + +struct dmar_ctx * +dmar_get_ctx_for_devpath(struct dmar_unit *dmar, uint16_t rid, + int dev_domain, int dev_busno, + const void *dev_path, int dev_path_len, + bool id_mapped, bool rmrr_init) +{ + + return (dmar_get_ctx_for_dev1(dmar, NULL, rid, dev_domain, dev_busno, + dev_path, dev_path_len, id_mapped, rmrr_init)); } int Modified: head/sys/x86/iommu/intel_dmar.h ============================================================================== --- head/sys/x86/iommu/intel_dmar.h Thu Apr 18 14:03:59 2019 (r346351) +++ head/sys/x86/iommu/intel_dmar.h Thu Apr 18 14:18:06 2019 (r346352) @@ -258,7 +258,7 @@ struct dmar_unit { #define DMAR_BARRIER_RMRR 0 #define DMAR_BARRIER_USEQ 1 -struct dmar_unit *dmar_find(device_t dev); +struct dmar_unit *dmar_find(device_t dev, bool verbose); struct dmar_unit *dmar_find_hpet(device_t dev, uint16_t *rid); struct dmar_unit *dmar_find_ioapic(u_int apic_id, uint16_t *rid); @@ -325,10 +325,16 @@ void domain_flush_iotlb_sync(struct dmar_domain *domai int domain_alloc_pgtbl(struct dmar_domain *domain); void domain_free_pgtbl(struct dmar_domain *domain); +int dmar_dev_depth(device_t child); +void dmar_dev_path(device_t child, int *busno, void *path1, int depth); + struct dmar_ctx *dmar_instantiate_ctx(struct dmar_unit *dmar, device_t dev, bool rmrr); struct dmar_ctx *dmar_get_ctx_for_dev(struct dmar_unit *dmar, device_t dev, uint16_t rid, bool id_mapped, bool rmrr_init); +struct dmar_ctx *dmar_get_ctx_for_devpath(struct dmar_unit *dmar, uint16_t rid, + int dev_domain, int dev_busno, const void *dev_path, int dev_path_len, + bool id_mapped, bool rmrr_init); int dmar_move_ctx_to_domain(struct dmar_domain *domain, struct dmar_ctx *ctx); void dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx); void dmar_free_ctx(struct dmar_ctx *ctx); @@ -360,7 +366,8 @@ int dmar_gas_map_region(struct dmar_domain *domain, int dmar_gas_reserve_region(struct dmar_domain *domain, dmar_gaddr_t start, dmar_gaddr_t end); -void dmar_dev_parse_rmrr(struct dmar_domain *domain, device_t dev, +void dmar_dev_parse_rmrr(struct dmar_domain *domain, int dev_domain, + int dev_busno, const void *dev_path, int dev_path_len, struct dmar_map_entries_tailq *rmrr_entries); int dmar_instantiate_rmrr_ctxs(struct dmar_unit *dmar); @@ -382,7 +389,6 @@ void dmar_fini_irt(struct dmar_unit *unit); extern dmar_haddr_t dmar_high; extern int haw; extern int dmar_tbl_pagecnt; -extern int dmar_match_verbose; extern int dmar_batch_coalesce; extern int dmar_check_free; Modified: head/sys/x86/iommu/intel_drv.c ============================================================================== --- head/sys/x86/iommu/intel_drv.c Thu Apr 18 14:03:59 2019 (r346351) +++ head/sys/x86/iommu/intel_drv.c Thu Apr 18 14:18:06 2019 (r346352) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -176,7 +177,6 @@ dmar_identify(driver_t *driver, device_t parent) #ifdef INVARIANTS TUNABLE_INT_FETCH("hw.dmar.check_free", &dmar_check_free); #endif - TUNABLE_INT_FETCH("hw.dmar.match_verbose", &dmar_match_verbose); status = AcpiGetTable(ACPI_SIG_DMAR, 1, (ACPI_TABLE_HEADER **)&dmartbl); if (ACPI_FAILURE(status)) return; @@ -595,21 +595,20 @@ DRIVER_MODULE(dmar, acpi, dmar_driver, dmar_devclass, MODULE_DEPEND(dmar, acpi, 1, 1, 1); static void -dmar_print_path(device_t dev, const char *banner, int busno, int depth, - const ACPI_DMAR_PCI_PATH *path) +dmar_print_path(int busno, int depth, const ACPI_DMAR_PCI_PATH *path) { int i; - device_printf(dev, "%s [%d, ", banner, busno); + printf("[%d, ", busno); for (i = 0; i < depth; i++) { if (i != 0) printf(", "); printf("(%d, %d)", path[i].Device, path[i].Function); } - printf("]\n"); + printf("]"); } -static int +int dmar_dev_depth(device_t child) { devclass_t pci_class; @@ -627,13 +626,15 @@ dmar_dev_depth(device_t child) } } -static void -dmar_dev_path(device_t child, int *busno, ACPI_DMAR_PCI_PATH *path, int depth) +void +dmar_dev_path(device_t child, int *busno, void *path1, int depth) { devclass_t pci_class; device_t bus, pcib; + ACPI_DMAR_PCI_PATH *path; pci_class = devclass_find("pci"); + path = path1; for (depth--; depth != -1; depth--) { path[depth].Device = pci_get_slot(child); path[depth].Function = pci_get_function(child); @@ -673,14 +674,14 @@ dmar_match_pathes(int busno1, const ACPI_DMAR_PCI_PATH } static int -dmar_match_devscope(ACPI_DMAR_DEVICE_SCOPE *devscope, device_t dev, - int dev_busno, const ACPI_DMAR_PCI_PATH *dev_path, int dev_path_len) +dmar_match_devscope(ACPI_DMAR_DEVICE_SCOPE *devscope, int dev_busno, + const ACPI_DMAR_PCI_PATH *dev_path, int dev_path_len) { ACPI_DMAR_PCI_PATH *path; int path_len; if (devscope->Length < sizeof(*devscope)) { - printf("dmar_find: corrupted DMAR table, dl %d\n", + printf("dmar_match_devscope: corrupted DMAR table, dl %d\n", devscope->Length); return (-1); } @@ -689,99 +690,112 @@ dmar_match_devscope(ACPI_DMAR_DEVICE_SCOPE *devscope, return (0); path_len = devscope->Length - sizeof(*devscope); if (path_len % 2 != 0) { - printf("dmar_find_bsf: corrupted DMAR table, dl %d\n", + printf("dmar_match_devscope: corrupted DMAR table, dl %d\n", devscope->Length); return (-1); } path_len /= 2; path = (ACPI_DMAR_PCI_PATH *)(devscope + 1); if (path_len == 0) { - printf("dmar_find: corrupted DMAR table, dl %d\n", + printf("dmar_match_devscope: corrupted DMAR table, dl %d\n", devscope->Length); return (-1); } - if (dmar_match_verbose) - dmar_print_path(dev, "DMAR", devscope->Bus, path_len, path); return (dmar_match_pathes(devscope->Bus, path, path_len, dev_busno, dev_path, dev_path_len, devscope->EntryType)); } -struct dmar_unit * -dmar_find(device_t dev) +static bool +dmar_match_by_path(struct dmar_unit *unit, int dev_domain, int dev_busno, + const ACPI_DMAR_PCI_PATH *dev_path, int dev_path_len, const char **banner) { - device_t dmar_dev; ACPI_DMAR_HARDWARE_UNIT *dmarh; ACPI_DMAR_DEVICE_SCOPE *devscope; char *ptr, *ptrend; - int i, match, dev_domain, dev_busno, dev_path_len; + int match; + dmarh = dmar_find_by_index(unit->unit); + if (dmarh == NULL) + return (false); + if (dmarh->Segment != dev_domain) + return (false); + if ((dmarh->Flags & ACPI_DMAR_INCLUDE_ALL) != 0) { + if (banner != NULL) + *banner = "INCLUDE_ALL"; + return (true); + } + ptr = (char *)dmarh + sizeof(*dmarh); + ptrend = (char *)dmarh + dmarh->Header.Length; + while (ptr < ptrend) { + devscope = (ACPI_DMAR_DEVICE_SCOPE *)ptr; + ptr += devscope->Length; + match = dmar_match_devscope(devscope, dev_busno, dev_path, + dev_path_len); + if (match == -1) + return (false); + if (match == 1) { + if (banner != NULL) + *banner = "specific match"; + return (true); + } + } + return (false); +} + +static struct dmar_unit * +dmar_find_by_scope(int dev_domain, int dev_busno, + const ACPI_DMAR_PCI_PATH *dev_path, int dev_path_len) +{ + struct dmar_unit *unit; + int i; + + for (i = 0; i < dmar_devcnt; i++) { + if (dmar_devs[i] == NULL) + continue; + unit = device_get_softc(dmar_devs[i]); + if (dmar_match_by_path(unit, dev_domain, dev_busno, dev_path, + dev_path_len, NULL)) + return (unit); + } + return (NULL); +} + +struct dmar_unit * +dmar_find(device_t dev, bool verbose) +{ + device_t dmar_dev; + struct dmar_unit *unit; + const char *banner; + int i, dev_domain, dev_busno, dev_path_len; + dmar_dev = NULL; dev_domain = pci_get_domain(dev); dev_path_len = dmar_dev_depth(dev); ACPI_DMAR_PCI_PATH dev_path[dev_path_len]; dmar_dev_path(dev, &dev_busno, dev_path, dev_path_len); - if (dmar_match_verbose) - dmar_print_path(dev, "PCI", dev_busno, dev_path_len, dev_path); + banner = ""; for (i = 0; i < dmar_devcnt; i++) { if (dmar_devs[i] == NULL) continue; - dmarh = dmar_find_by_index(i); - if (dmarh == NULL) - continue; - if (dmarh->Segment != dev_domain) - continue; - if ((dmarh->Flags & ACPI_DMAR_INCLUDE_ALL) != 0) { - dmar_dev = dmar_devs[i]; - if (dmar_match_verbose) { - device_printf(dev, - "pci%d:%d:%d:%d matched dmar%d INCLUDE_ALL\n", - dev_domain, pci_get_bus(dev), - pci_get_slot(dev), - pci_get_function(dev), - ((struct dmar_unit *)device_get_softc( - dmar_dev))->unit); - } - goto found; - } - ptr = (char *)dmarh + sizeof(*dmarh); - ptrend = (char *)dmarh + dmarh->Header.Length; - for (;;) { - if (ptr >= ptrend) - break; - devscope = (ACPI_DMAR_DEVICE_SCOPE *)ptr; - ptr += devscope->Length; - if (dmar_match_verbose) { - device_printf(dev, - "pci%d:%d:%d:%d matching dmar%d\n", - dev_domain, pci_get_bus(dev), - pci_get_slot(dev), - pci_get_function(dev), - ((struct dmar_unit *)device_get_softc( - dmar_devs[i]))->unit); - } - match = dmar_match_devscope(devscope, dev, dev_busno, - dev_path, dev_path_len); - if (dmar_match_verbose) { - if (match == -1) - printf("table error\n"); - else if (match == 0) - printf("not matched\n"); - else - printf("matched\n"); - } - if (match == -1) - return (NULL); - else if (match == 1) { - dmar_dev = dmar_devs[i]; - goto found; - } - } + unit = device_get_softc(dmar_devs[i]); + if (dmar_match_by_path(unit, dev_domain, dev_busno, + dev_path, dev_path_len, &banner)) + break; } - return (NULL); -found: - return (device_get_softc(dmar_dev)); + if (i == dmar_devcnt) + return (NULL); + + if (verbose) { + device_printf(dev, "pci%d:%d:%d:%d matched dmar%d by %s", + dev_domain, pci_get_bus(dev), pci_get_slot(dev), + pci_get_function(dev), unit->unit, banner); + printf(" scope path "); + dmar_print_path(dev_busno, dev_path_len, dev_path); + printf("\n"); + } + return (unit); } static struct dmar_unit * @@ -865,10 +879,9 @@ dmar_find_ioapic(u_int apic_id, uint16_t *rid) struct rmrr_iter_args { struct dmar_domain *domain; - device_t dev; int dev_domain; int dev_busno; - ACPI_DMAR_PCI_PATH *dev_path; + const ACPI_DMAR_PCI_PATH *dev_path; int dev_path_len; struct dmar_map_entries_tailq *rmrr_entries; }; @@ -888,12 +901,6 @@ dmar_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) ria = arg; resmem = (ACPI_DMAR_RESERVED_MEMORY *)dmarh; - if (dmar_match_verbose) { - printf("RMRR [%jx,%jx] segment %d\n", - (uintmax_t)resmem->BaseAddress, - (uintmax_t)resmem->EndAddress, - resmem->Segment); - } if (resmem->Segment != ria->dev_domain) return (1); @@ -904,11 +911,9 @@ dmar_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) break; devscope = (ACPI_DMAR_DEVICE_SCOPE *)ptr; ptr += devscope->Length; - match = dmar_match_devscope(devscope, ria->dev, ria->dev_busno, + match = dmar_match_devscope(devscope, ria->dev_busno, ria->dev_path, ria->dev_path_len); if (match == 1) { - if (dmar_match_verbose) - printf("matched\n"); entry = dmar_gas_alloc_entry(ria->domain, DMAR_PGF_WAITOK); entry->start = resmem->BaseAddress; @@ -916,8 +921,6 @@ dmar_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) entry->end = resmem->EndAddress; TAILQ_INSERT_TAIL(ria->rmrr_entries, entry, unroll_link); - } else if (dmar_match_verbose) { - printf("not matched, err %d\n", match); } } @@ -925,25 +928,17 @@ dmar_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) } void -dmar_dev_parse_rmrr(struct dmar_domain *domain, device_t dev, +dmar_dev_parse_rmrr(struct dmar_domain *domain, int dev_domain, int dev_busno, + const void *dev_path, int dev_path_len, struct dmar_map_entries_tailq *rmrr_entries) { struct rmrr_iter_args ria; - ria.dev_domain = pci_get_domain(dev); - ria.dev_path_len = dmar_dev_depth(dev); - ACPI_DMAR_PCI_PATH dev_path[ria.dev_path_len]; - dmar_dev_path(dev, &ria.dev_busno, dev_path, ria.dev_path_len); - - if (dmar_match_verbose) { - device_printf(dev, "parsing RMRR entries for "); - dmar_print_path(dev, "PCI", ria.dev_busno, ria.dev_path_len, - dev_path); - } - ria.domain = domain; - ria.dev = dev; - ria.dev_path = dev_path; + ria.dev_domain = dev_domain; + ria.dev_busno = dev_busno; + ria.dev_path = (const ACPI_DMAR_PCI_PATH *)dev_path; + ria.dev_path_len = dev_path_len; ria.rmrr_entries = rmrr_entries; dmar_iterate_tbl(dmar_rmrr_iter, &ria); } @@ -954,28 +949,22 @@ struct inst_rmrr_iter_args { static device_t dmar_path_dev(int segment, int path_len, int busno, - const ACPI_DMAR_PCI_PATH *path) + const ACPI_DMAR_PCI_PATH *path, uint16_t *rid) { - devclass_t pci_class; - device_t bus, pcib, dev; + device_t dev; int i; - pci_class = devclass_find("pci"); dev = NULL; - for (i = 0; i < path_len; i++, path++) { + for (i = 0; i < path_len; i++) { dev = pci_find_dbsf(segment, busno, path->Device, path->Function); - if (dev == NULL) - break; if (i != path_len - 1) { - bus = device_get_parent(dev); - pcib = device_get_parent(bus); - if (device_get_devclass(device_get_parent(pcib)) != - pci_class) - return (NULL); + busno = pci_cfgregread(busno, path->Device, + path->Function, PCIR_SECBUS_1, 1); + path++; } - busno = pcib_get_bus(dev); } + *rid = PCI_RID(busno, path->Device, path->Function); return (dev); } @@ -986,21 +975,19 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg const ACPI_DMAR_DEVICE_SCOPE *devscope; struct inst_rmrr_iter_args *iria; const char *ptr, *ptrend; - struct dmar_unit *dev_dmar; device_t dev; + struct dmar_unit *unit; + int dev_path_len; + uint16_t rid; + iria = arg; + if (dmarh->Type != ACPI_DMAR_TYPE_RESERVED_MEMORY) return (1); - iria = arg; resmem = (ACPI_DMAR_RESERVED_MEMORY *)dmarh; if (resmem->Segment != iria->dmar->segment) return (1); - if (dmar_match_verbose) { - printf("dmar%d: RMRR [%jx,%jx]\n", iria->dmar->unit, - (uintmax_t)resmem->BaseAddress, - (uintmax_t)resmem->EndAddress); - } ptr = (const char *)resmem + sizeof(*resmem); ptrend = (const char *)resmem + resmem->Header.Length; @@ -1012,31 +999,40 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg /* XXXKIB bridge */ if (devscope->EntryType != ACPI_DMAR_SCOPE_TYPE_ENDPOINT) continue; - if (dmar_match_verbose) { - dmar_print_path(iria->dmar->dev, "RMRR scope", - devscope->Bus, (devscope->Length - - sizeof(ACPI_DMAR_DEVICE_SCOPE)) / 2, - (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); - } - dev = dmar_path_dev(resmem->Segment, (devscope->Length - - sizeof(ACPI_DMAR_DEVICE_SCOPE)) / 2, devscope->Bus, - (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); + rid = 0; + dev_path_len = (devscope->Length - + sizeof(ACPI_DMAR_DEVICE_SCOPE)) / 2; + dev = dmar_path_dev(resmem->Segment, dev_path_len, + devscope->Bus, + (const ACPI_DMAR_PCI_PATH *)(devscope + 1), &rid); if (dev == NULL) { - if (dmar_match_verbose) - printf("null dev\n"); - continue; - } - dev_dmar = dmar_find(dev); - if (dev_dmar != iria->dmar) { - if (dmar_match_verbose) { - printf("dmar%d matched, skipping\n", - dev_dmar->unit); + if (bootverbose) { + printf("dmar%d no dev found for RMRR " + "[%#jx, %#jx] rid %#x scope path ", + iria->dmar->unit, + (uintptr_t)resmem->BaseAddress, + (uintptr_t)resmem->EndAddress, + rid); + dmar_print_path(devscope->Bus, dev_path_len, + (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); + printf("\n"); } - continue; + unit = dmar_find_by_scope(resmem->Segment, + devscope->Bus, + (const ACPI_DMAR_PCI_PATH *)(devscope + 1), + dev_path_len); + if (iria->dmar != unit) + continue; + dmar_get_ctx_for_devpath(iria->dmar, rid, + resmem->Segment, devscope->Bus, + (const ACPI_DMAR_PCI_PATH *)(devscope + 1), + dev_path_len, false, true); + } else { + unit = dmar_find(dev, false); + if (iria->dmar != unit) + continue; + dmar_instantiate_ctx(iria->dmar, dev, true); } - if (dmar_match_verbose) - printf("matched, instantiating RMRR context\n"); - dmar_instantiate_ctx(iria->dmar, dev, true); } return (1); @@ -1057,8 +1053,6 @@ dmar_instantiate_rmrr_ctxs(struct dmar_unit *dmar) error = 0; iria.dmar = dmar; - if (dmar_match_verbose) - printf("dmar%d: instantiating RMRR contexts\n", dmar->unit); dmar_iterate_tbl(dmar_inst_rmrr_iter, &iria); DMAR_LOCK(dmar); if (!LIST_EMPTY(&dmar->domains)) { @@ -1066,6 +1060,15 @@ dmar_instantiate_rmrr_ctxs(struct dmar_unit *dmar) ("dmar%d: RMRR not handled but translation is already enabled", dmar->unit)); error = dmar_enable_translation(dmar); + if (bootverbose) { + if (error == 0) { + printf("dmar%d: enabled translation\n", + dmar->unit); + } else { + printf("dmar%d: enabling translation failed, " + "error %d\n", dmar->unit, error); + } + } } dmar_barrier_exit(dmar, DMAR_BARRIER_RMRR); return (error); Modified: head/sys/x86/iommu/intel_intrmap.c ============================================================================== --- head/sys/x86/iommu/intel_intrmap.c Thu Apr 18 14:03:59 2019 (r346351) +++ head/sys/x86/iommu/intel_intrmap.c Thu Apr 18 14:18:06 2019 (r346352) @@ -251,7 +251,7 @@ dmar_ir_find(device_t src, uint16_t *rid, int *is_dmar } else if (src_class == devclass_find("hpet")) { unit = dmar_find_hpet(src, rid); } else { - unit = dmar_find(src); + unit = dmar_find(src, bootverbose); if (unit != NULL && rid != NULL) dmar_get_requester(src, rid); } Modified: head/sys/x86/iommu/intel_utils.c ============================================================================== --- head/sys/x86/iommu/intel_utils.c Thu Apr 18 14:03:59 2019 (r346351) +++ head/sys/x86/iommu/intel_utils.c Thu Apr 18 14:18:06 2019 (r346352) @@ -614,7 +614,6 @@ dmar_barrier_exit(struct dmar_unit *dmar, u_int barrie DMAR_UNLOCK(dmar); } -int dmar_match_verbose; int dmar_batch_coalesce = 100; struct timespec dmar_hw_timeout = { .tv_sec = 0, @@ -658,9 +657,6 @@ static SYSCTL_NODE(_hw, OID_AUTO, dmar, CTLFLAG_RD, NU SYSCTL_INT(_hw_dmar, OID_AUTO, tbl_pagecnt, CTLFLAG_RD, &dmar_tbl_pagecnt, 0, "Count of pages used for DMAR pagetables"); -SYSCTL_INT(_hw_dmar, OID_AUTO, match_verbose, CTLFLAG_RWTUN, - &dmar_match_verbose, 0, - "Verbose matching of the PCI devices to DMAR paths"); SYSCTL_INT(_hw_dmar, OID_AUTO, batch_coalesce, CTLFLAG_RWTUN, &dmar_batch_coalesce, 0, "Number of qi batches between interrupt"); From owner-svn-src-all@freebsd.org Thu Apr 18 14:22:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D99451572BB1; Thu, 18 Apr 2019 14:22:55 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 623D5680F6; Thu, 18 Apr 2019 14:22:55 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3IEMrIi005931; Thu, 18 Apr 2019 07:22:53 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3IEMrux005930; Thu, 18 Apr 2019 07:22:53 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904181422.x3IEMrux005930@gndrsh.dnsmgr.net> Subject: Re: svn commit: r346341 - head/tools/build In-Reply-To: To: Kyle Evans Date: Thu, 18 Apr 2019 07:22:53 -0700 (PDT) CC: "Rodney W. Grimes" , Cy Schubert , Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 623D5680F6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 14:22:56 -0000 > On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes > wrote: > > > > > In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, "Rodney W. > > > Grimes" > > > writes: > > > > > Author: cy > > > > > Date: Thu Apr 18 01:02:00 2019 > > > > > New Revision: 346341 > > > > > URL: https://svnweb.freebsd.org/changeset/base/346341 > > > > > > > > > > Log: > > > > > As an interim measure until a more permanent solution is implemented > > > > > workaround the following error: > > > > > > > > > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of > > > > > undeclared identifier > > > > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > > > > > > > > > Reported by: O. Hartmann > > > > > Reported by: Michael Butler > > > > > Reported by: gjb@ & cy@ (implicit) > > > > > Reviewed by: emaste@ > > > > > Noted by: rgrimes@ > > > > > > > > > > Modified: > > > > > head/tools/build/Makefile > > > > > > > > > > Modified: head/tools/build/Makefile > > > > > =========================================================================== > > > > === > > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 (r34634 > > > > 0) > > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 (r34634 > > > > 1) > > > > > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h > > > > > INCS+= libcasper.h > > > > > .endif > > > > > > > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > > > > > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea > > > > rgs.h > > > > > -.endif > > > > > > > > As a further note, we should probably hunt for any thing > > > > that is explicity looking at /usr/include/... in a Makefile, > > > > as that is minimally missing a ${DESTDIR} argument. > > > > > > > > The above may of actually worked if it had been written: > > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) > > > > someone may wish to test that. > > > > > > > > Also a pathname rooted at / without ${DESTDIR} is almost certainly a mistake. > > > > > > This is a better solution. I tested this in a tree with a duplicated > > > environment: Problem solved. Before this is committed it should be > > > tested on one of the universe machines. > > > > From what Ed just said this would also be wrong, > > as well as CASPERINC+= above being wrong, if this > > is being built for the host we should not be using > > any headers from ${SRCTOP} at all. > > > > if capfileargs.h does not exist on the host that functionality > > must not be compiled into the buildtool as the host does not > > have this feature and attempting to use it from SRCTOP is wrong. > > > > Keep in mind that this is bootstrap; it's being built for the host > system, but it will link against a version of libcasper that's been > built in an earlier stage with the proper featureset. Ok, flip flop again, if infact this is linked against a library that implements the stuff from cap_fileargs.h then infact the ${DESTDIR} addition so that the build peaks into the cross build tree is correct, or what ever the equivelent to DESTDIR is for that ? BUILDDIR? The point is it should be picking this header up from the object tree, NOT from the running system. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Apr 18 14:43:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A621F15735EC; Thu, 18 Apr 2019 14:43:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AE5916A319; Thu, 18 Apr 2019 14:43:55 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id H8GPhd7x0ldkPH8GQhAm7m; Thu, 18 Apr 2019 08:43:47 -0600 X-Authority-Analysis: v=2.3 cv=Ko4zJleN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=oexKYjalfGEA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=iaTFZB6CAAAA:8 a=zxA2vyXaAAAA:8 a=YxBL1-UpAAAA:8 a=Z0HR4rKzYdLA8CT5LLUA:9 a=QEXdDO2ut3YA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=QWXrQ9iV8q7LKaLQ9lfw:22 a=nK2txNHJmq7TfjpuLlwI:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from [192.168.0.103] (S0106002401cb186f.gv.shawcable.net [70.67.125.17]) by spqr.komquats.com (Postfix) with ESMTPSA id 33A921142; Thu, 18 Apr 2019 07:43:44 -0700 (PDT) Date: Thu, 18 Apr 2019 07:43:43 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <201904181422.x3IEMrux005930@gndrsh.dnsmgr.net> References: <201904181422.x3IEMrux005930@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r346341 - head/tools/build To: rgrimes@freebsd.org, "Rodney W. Grimes" , Kyle Evans CC: "Rodney W. Grimes" , Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: <3095E422-7865-4EA5-BF13-6A48CB542AEE@cschubert.com> X-CMAE-Envelope: MS4wfCQHwB/x0RpW3Tdiut7Dyy+VXL72xUQRWCOmJiapH7DOABzMTA2j9hBMIS9JQGAtBtczVz2sAgNeogEex65/3VIgn6JL1NdYYbnk/HZUN+9FFWMTypQk SQaNsYK+494WXIZ/haz705XxtaEz1NcKwpvfcCUSm+069CMWQexssVfLVB/0uK2IgcjypJ124Qhr2tvE5FWq9lQlKTdoGBMH2Fni9OjSFIkt4Hw2FCyv4i6v bv1oCUazn91ycME7B8+rMZvV5rr1eEadNbNLnwVRk8Mdka9mr1eQSyT6CXv90XZ5c7fFKjHcW+O6eAKsHVYw7NdQrlIwILGFsYpTzfC7UTJrvNnsQCuP1EA6 +EQ4ZHSPsbXvAAgBhTeSMQs09DF1ag== X-Rspamd-Queue-Id: AE5916A319 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.977,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 14:43:56 -0000 On April 18, 2019 7:22:53 AM PDT, "Rodney W=2E Grimes" wrote: >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W=2E Grimes >> wrote: >> > >> > > In message <201904180107=2Ex3I17QDc002945@gndrsh=2Ednsmgr=2Enet>, >"Rodney W=2E >> > > Grimes" >> > > writes: >> > > > > Author: cy >> > > > > Date: Thu Apr 18 01:02:00 2019 >> > > > > New Revision: 346341 >> > > > > URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/346341 >> > > > > >> > > > > Log: >> > > > > As an interim measure until a more permanent solution is >implemented >> > > > > workaround the following error: >> > > > > >> > > > > /usr/src/contrib/elftoolchain/strings/strings=2Ec:198:55: >error: use of >> > > > > undeclared identifier >> > > > > 'FA_OPEN' fa =3D fileargs_init(argc, argv, O_RDONLY, 0, >&rights, FA_OPEN); >> > > > > >> > > > > Reported by: O=2E Hartmann >> > > > > Reported by: Michael Butler >> > > > > Reported by: gjb@ & cy@ (implicit) >> > > > > Reviewed by: emaste@ >> > > > > Noted by: rgrimes@ >> > > > > >> > > > > Modified: >> > > > > head/tools/build/Makefile >> > > > > >> > > > > Modified: head/tools/build/Makefile >> > > > > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >> > > > =3D=3D=3D >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 =20 > (r34634 >> > > > 0) >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 =20 > (r34634 >> > > > 1) >> > > > > @@ -59,9 +59,7 @@ INCS+=3D capsicum_helpers=2Eh >> > > > > INCS+=3D libcasper=2Eh >> > > > > =2Eendif >> > > > > >> > > > > -=2Eif !exists(/usr/include/casper/cap_fileargs=2Eh) >> > > > > CASPERINC+=3D =20 >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea >> > > > rgs=2Eh >> > > > > -=2Eendif >> > > > >> > > > As a further note, we should probably hunt for any thing >> > > > that is explicity looking at /usr/include/=2E=2E=2E in a Makefile= , >> > > > as that is minimally missing a ${DESTDIR} argument=2E >> > > > >> > > > The above may of actually worked if it had been written: >> > > > =2Eif !exists(${DESTDIR}/usr/include/casper/cap_fileargs=2Eh) >> > > > someone may wish to test that=2E >> > > > >> > > > Also a pathname rooted at / without ${DESTDIR} is almost >certainly a mistake=2E >> > > >> > > This is a better solution=2E I tested this in a tree with a >duplicated >> > > environment: Problem solved=2E Before this is committed it should >be >> > > tested on one of the universe machines=2E >> > >> > From what Ed just said this would also be wrong, >> > as well as CASPERINC+=3D above being wrong, if this >> > is being built for the host we should not be using >> > any headers from ${SRCTOP} at all=2E >> > >> > if capfileargs=2Eh does not exist on the host that functionality >> > must not be compiled into the buildtool as the host does not >> > have this feature and attempting to use it from SRCTOP is wrong=2E >> > >>=20 >> Keep in mind that this is bootstrap; it's being built for the host >> system, but it will link against a version of libcasper that's been >> built in an earlier stage with the proper featureset=2E > >Ok, flip flop again, if infact this is linked against a >library that implements the stuff from cap_fileargs=2Eh then >infact the ${DESTDIR} addition so that the build peaks into >the cross build tree is correct, or what ever the equivelent >to DESTDIR is for that ? BUILDDIR? The point is it should >be picking this header up from the object tree, NOT from >the running system=2E Yes, this was my conclusion when working on kerberos and ntp=2E This is al= so true of libraries, else one would need to installworld and buildworld a= gain to get a properly built library/binary=2E=20 IIRC ngie@ fixed a number of these across the tree a couple of years ago= =2E=20 --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-all@freebsd.org Thu Apr 18 15:12:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC2B915740BD for ; Thu, 18 Apr 2019 15:12:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B8B06B52D for ; Thu, 18 Apr 2019 15:12:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x841.google.com with SMTP id x12so2524486qts.7 for ; Thu, 18 Apr 2019 08:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TRSN82XmM4JARmlpawANEUATfqbhfYnuAVuWT0801dI=; b=vdjqhlNNzluCGvTQfZO2ZUlsa1WxQv5mOXg2kN1LJ1/fA+8xigZW0kKeLiL8iWNGpk IPyc9Dv9Avx7reGF/P+VQhg2oB02EbAjlmC2yhkCH1YC88ovDLXLk1yMdeB1MoGB/+IT RfTsGDWDEZseTAu2f2KAk6D0d6y9Te78O58G14l1IzknLAnySDR4SUE9eakL6u+FONC6 Nuife8blpW0eznqrEX8qjdUzryQCFK4N9aI53GMu7o2dDlLc6317lQR8ODMicXNWRiGu LgbBcYm8QIrhRZY5w99CqIqVSJDszeGKOKSv/eARxICFcC2WwWHZlvwJIHspcRZjJcYs xD8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TRSN82XmM4JARmlpawANEUATfqbhfYnuAVuWT0801dI=; b=LGCFOOdSKNZaMEIfKmeHwj6pFO7HvriPbLQpQAU3uJtViZieXOXVQfrTZDE3MUF7gb GWbExGEZf+9Ta5qKy1vKW7leam6RJZL1hvZIeSusZTAN/4bZzWKh3uYpRYUwucRQRE1o QZK3F+PqcbzbUAjKQnOEUTqPbMY4vcxg931euC8w2icAYkT8Y+D52bPw6y1brpxx3BIH GlbZlxFKDAXmyYRCBJQFJzJQmCb+ENkie8BF+/TLYldLGRAATm4onGdx/rRC/MXx2/+p x9fLjPGXgehgok8aNR/9rssyyszCk3zjpzp4DPejyV78TVI3dWh7LWOHtDJrF+6Eq9hY Q/5A== X-Gm-Message-State: APjAAAU+Ujxqeh8hOfyRQbaovz4bnzSKm9WlQS6dSRYNDtkAzqwryhZ6 rkoZTEJcjQW5zKyRWJkEtAwAyffYN4eY/nJJnOuy3A== X-Google-Smtp-Source: APXvYqyZH25ZVhd9VjMTPr2uI3vD4vXH7wPhlfqwT4QxY8KcOSrIOeSxNNGZzTBIjZiNFt0Cjd6GuqNMi3MSH+U0bA0= X-Received: by 2002:ac8:38b6:: with SMTP id f51mr77932163qtc.33.1555600320760; Thu, 18 Apr 2019 08:12:00 -0700 (PDT) MIME-Version: 1.0 References: <201904181422.x3IEMrux005930@gndrsh.dnsmgr.net> <3095E422-7865-4EA5-BF13-6A48CB542AEE@cschubert.com> In-Reply-To: <3095E422-7865-4EA5-BF13-6A48CB542AEE@cschubert.com> From: Warner Losh Date: Thu, 18 Apr 2019 09:11:49 -0600 Message-ID: Subject: Re: svn commit: r346341 - head/tools/build To: Cy Schubert Cc: "Rodney W. Grimes" , "Rodney W. Grimes" , Kyle Evans , Cy Schubert , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 6B8B06B52D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 15:12:02 -0000 On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert wrote: > On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" < > freebsd@gndrsh.dnsmgr.net> wrote: > >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes > >> wrote: > >> > > >> > > In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, > >"Rodney W. > >> > > Grimes" > >> > > writes: > >> > > > > Author: cy > >> > > > > Date: Thu Apr 18 01:02:00 2019 > >> > > > > New Revision: 346341 > >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341 > >> > > > > > >> > > > > Log: > >> > > > > As an interim measure until a more permanent solution is > >implemented > >> > > > > workaround the following error: > >> > > > > > >> > > > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: > >error: use of > >> > > > > undeclared identifier > >> > > > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, > >&rights, FA_OPEN); > >> > > > > > >> > > > > Reported by: O. Hartmann > >> > > > > Reported by: Michael Butler > >> > > > > Reported by: gjb@ & cy@ (implicit) > >> > > > > Reviewed by: emaste@ > >> > > > > Noted by: rgrimes@ > >> > > > > > >> > > > > Modified: > >> > > > > head/tools/build/Makefile > >> > > > > > >> > > > > Modified: head/tools/build/Makefile > >> > > > > > > >=========================================================================== > >> > > > === > >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 > > (r34634 > >> > > > 0) > >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 > > (r34634 > >> > > > 1) > >> > > > > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h > >> > > > > INCS+= libcasper.h > >> > > > > .endif > >> > > > > > >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) > >> > > > > CASPERINC+= > >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea > >> > > > rgs.h > >> > > > > -.endif > >> > > > > >> > > > As a further note, we should probably hunt for any thing > >> > > > that is explicity looking at /usr/include/... in a Makefile, > >> > > > as that is minimally missing a ${DESTDIR} argument. > >> > > > > >> > > > The above may of actually worked if it had been written: > >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) > >> > > > someone may wish to test that. > >> > > > > >> > > > Also a pathname rooted at / without ${DESTDIR} is almost > >certainly a mistake. > >> > > > >> > > This is a better solution. I tested this in a tree with a > >duplicated > >> > > environment: Problem solved. Before this is committed it should > >be > >> > > tested on one of the universe machines. > >> > > >> > From what Ed just said this would also be wrong, > >> > as well as CASPERINC+= above being wrong, if this > >> > is being built for the host we should not be using > >> > any headers from ${SRCTOP} at all. > >> > > >> > if capfileargs.h does not exist on the host that functionality > >> > must not be compiled into the buildtool as the host does not > >> > have this feature and attempting to use it from SRCTOP is wrong. > >> > > >> > >> Keep in mind that this is bootstrap; it's being built for the host > >> system, but it will link against a version of libcasper that's been > >> built in an earlier stage with the proper featureset. > > > >Ok, flip flop again, if infact this is linked against a > >library that implements the stuff from cap_fileargs.h then > >infact the ${DESTDIR} addition so that the build peaks into > >the cross build tree is correct, or what ever the equivelent > >to DESTDIR is for that ? BUILDDIR? The point is it should > >be picking this header up from the object tree, NOT from > >the running system. > > Yes, this was my conclusion when working on kerberos and ntp. This is also > true of libraries, else one would need to installworld and buildworld > again to get a properly built library/binary. > > IIRC ngie@ fixed a number of these across the tree a couple of years ago. OK. There's a number of different issues going on. As the original author of libegacy (which is what we're seeing fail), let me address the design generically and comment on different things that have come up in this thread. Since this is going into the libegacy that we're using to build the system, the check for file is bogus, for reasons I'll discuss below. When we add new includes to the system, it is appropriate to do it this way. And when this file was added to the system, the check was correct. First off, DESTDIR is absolutely not correct since this is to build the legacy library and legacy includes which augment the host's sources on legacay system, hence the name. It's never the correct thing to use. The problem that we have here is not that the file is missing (which is why it was added the way it was a long time ago), but rather missing functionality in a file that's been around for a long time. So, since it is that class of problem, the canonical way we've dealt with it in the past is to do something like create a file foo.h that looks something like #include_next #ifndev SOMETHING_NEW #define SOMETHING_NEW 0 /* Or other values that are fail-safe on the old system */ #endif and that's the change that needs to be made here. Sometimes, more extensive things need to be done when the old library can't work at all with the new code. In those cases, the pattern is for foo.h to include #define problem_fn my_problem_fn and then write a my_problem_fn that wraps problem_fn in a way that works on the old system. Kinda a poor man's symbol versioning, in a way (note: we can't use symbol version for this since we're building new binaries). The "stop gap" gets things compiling, and maybe OK for the moment, unless the SOMETHING_NEW variable that's used (in this case FA_OPEN) causes the old library to do the wrong thing. I've not done the deep dive to see if this is the case or not. So, does that make sense? Warner From owner-svn-src-all@freebsd.org Thu Apr 18 15:19:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17C31157473D; Thu, 18 Apr 2019 15:19:20 +0000 (UTC) (envelope-from imp@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 AE00B6B9F7; Thu, 18 Apr 2019 15:19:19 +0000 (UTC) (envelope-from imp@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 88FDB20BB0; Thu, 18 Apr 2019 15:19:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IFJJt4090236; Thu, 18 Apr 2019 15:19:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IFJJp6090235; Thu, 18 Apr 2019 15:19:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201904181519.x3IFJJp6090235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 18 Apr 2019 15:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346353 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 346353 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE00B6B9F7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 15:19:20 -0000 Author: imp Date: Thu Apr 18 15:19:19 2019 New Revision: 346353 URL: https://svnweb.freebsd.org/changeset/base/346353 Log: Minor tweak to the debug Make it clear we're loading from UFS. Modified: head/stand/efi/boot1/ufs_module.c Modified: head/stand/efi/boot1/ufs_module.c ============================================================================== --- head/stand/efi/boot1/ufs_module.c Thu Apr 18 14:18:06 2019 (r346352) +++ head/stand/efi/boot1/ufs_module.c Thu Apr 18 15:19:19 2019 (r346353) @@ -148,7 +148,7 @@ load(const char *filepath, dev_info_t *dev, void **buf #ifdef EFI_DEBUG { CHAR16 *text = efi_devpath_name(dev->devpath); - DPRINTF("Loading '%s' from %S\n", filepath, text); + DPRINTF("UFS Loading '%s' from %S\n", filepath, text); efi_free_devpath_name(text); } #endif From owner-svn-src-all@freebsd.org Thu Apr 18 15:19:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60A03157476C; Thu, 18 Apr 2019 15:19:30 +0000 (UTC) (envelope-from imp@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 040CF6BAD9; Thu, 18 Apr 2019 15:19:30 +0000 (UTC) (envelope-from imp@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 47CAE20BB1; Thu, 18 Apr 2019 15:19:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IFJTtv090293; Thu, 18 Apr 2019 15:19:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IFJTrI090292; Thu, 18 Apr 2019 15:19:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201904181519.x3IFJTrI090292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 18 Apr 2019 15:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346354 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 346354 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 040CF6BAD9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 15:19:30 -0000 Author: imp Date: Thu Apr 18 15:19:28 2019 New Revision: 346354 URL: https://svnweb.freebsd.org/changeset/base/346354 Log: Add note that I'm the defacto maintainer of libegacy, our compat shims for building bootstrap tools that use new features on systems too old to have those new features. The world view for this part of the build is unique to the whole build process and continuty of design for new compat shims help this library remain viable. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Apr 18 15:19:19 2019 (r346353) +++ head/MAINTAINERS Thu Apr 18 15:19:28 2019 (r346354) @@ -102,6 +102,7 @@ sys/netpfil/pf kp,glebius Pre-commit review recommende sys/x86/xen royger Pre-commit review recommended. sys/xen royger Pre-commit review recommended. tests freebsd-testing,ngie Pre-commit review requested. +tools/build imp Pre-commit review requested, especially to fix bootstrap issues. top(1) eadler Pre-commit review requested. usr.sbin/bsdconfig dteske Pre-commit phabricator review requested. usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. From owner-svn-src-all@freebsd.org Thu Apr 18 15:31:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 168571574CF9; Thu, 18 Apr 2019 15:31:04 +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 B29096C362; Thu, 18 Apr 2019 15:31:03 +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 8D62B20EB9; Thu, 18 Apr 2019 15:31:03 +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 x3IFV31Z095921; Thu, 18 Apr 2019 15:31:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IFV3k1095920; Thu, 18 Apr 2019 15:31:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201904181531.x3IFV3k1095920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 18 Apr 2019 15:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346355 - head/sys/x86/iommu X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/iommu X-SVN-Commit-Revision: 346355 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B29096C362 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 15:31:04 -0000 Author: kib Date: Thu Apr 18 15:31:03 2019 New Revision: 346355 URL: https://svnweb.freebsd.org/changeset/base/346355 Log: Use correct type name. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/x86/iommu/intel_drv.c Modified: head/sys/x86/iommu/intel_drv.c ============================================================================== --- head/sys/x86/iommu/intel_drv.c Thu Apr 18 15:19:28 2019 (r346354) +++ head/sys/x86/iommu/intel_drv.c Thu Apr 18 15:31:03 2019 (r346355) @@ -1010,8 +1010,8 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg printf("dmar%d no dev found for RMRR " "[%#jx, %#jx] rid %#x scope path ", iria->dmar->unit, - (uintptr_t)resmem->BaseAddress, - (uintptr_t)resmem->EndAddress, + (uintmax_t)resmem->BaseAddress, + (uintmax_t)resmem->EndAddress, rid); dmar_print_path(devscope->Bus, dev_path_len, (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); From owner-svn-src-all@freebsd.org Thu Apr 18 16:26:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96F371575B8D; Thu, 18 Apr 2019 16:26:54 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7089B6DC05; Thu, 18 Apr 2019 16:26:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id H9s8heEuwldkPH9sAhB9gm; Thu, 18 Apr 2019 10:26:51 -0600 X-Authority-Analysis: v=2.3 cv=Ko4zJleN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=oexKYjalfGEA:10 a=7Qk2ozbKAAAA:8 a=YxBL1-UpAAAA:8 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=iaTFZB6CAAAA:8 a=zxA2vyXaAAAA:8 a=aP34avg-Yz-OcyL_pBEA:9 a=c1rMMgh-lkFXqSQV:21 a=TKYzfgdWNDVoTtQd:21 a=QEXdDO2ut3YA:10 a=6k3w9U7lyHsA6R22:21 a=ZS4ouRq1pXnG1s_F:21 a=4C7WCNzWSuQtXfqz:21 a=_W_S_7VecoQA:10 a=1lyxoWkJIXJV6VJUPhuM:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=QWXrQ9iV8q7LKaLQ9lfw:22 a=nK2txNHJmq7TfjpuLlwI:22 Received: from [192.168.0.103] (S0106002401cb186f.gv.shawcable.net [70.67.125.17]) by spqr.komquats.com (Postfix) with ESMTPSA id 98DDE1292; Thu, 18 Apr 2019 09:26:47 -0700 (PDT) Date: Thu, 18 Apr 2019 09:26:47 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <201904181422.x3IEMrux005930@gndrsh.dnsmgr.net> <3095E422-7865-4EA5-BF13-6A48CB542AEE@cschubert.com> MIME-Version: 1.0 Subject: Re: svn commit: r346341 - head/tools/build To: Warner Losh CC: "Rodney W. Grimes" , "Rodney W. Grimes" , Kyle Evans , Cy Schubert , src-committers , svn-src-all , svn-src-head From: Cy Schubert Message-ID: X-CMAE-Envelope: MS4wfPc7JPq8qOodCLXTWqksVc+tO7WI7AJcelxR+AgZqW1IYLkBbv9NjlP31M/BQZls0j3tWr6qTS3ClF+DSowuAF8/peL+xzQAtFldw8YzuHRGv8frAR7G hoMqEZJyOFe62JMitGpe00PahsLZLE7XzZblUu1iuHXmFt9DrNstpKk3G6onYkksl8fsmJFTHcAHnFuyjDNYwxtp92zaiMYOe9S73NZ7JSfIR1fKp7G/1kGJ vMVNOFUNQITMBKKjOdwxUB98xs1mQA25vpB0yPtCS52OqDVXMRRhPym3sHxxU4QuYvEwQAyeSdl7rW1XjEQ41EP6PVDwSSA+DwAd3NOb6o93w6tg0AvjkCYY LPvYaIvUrEzdAL+dbVZeEgvp6ABROzaTosAgHyl5H2Gi5U7eAKlv8sDxW/A/Wc3AEkorZ1DC X-Rspamd-Queue-Id: 7089B6DC05 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 16:26:55 -0000 On April 18, 2019 8:11:49 AM PDT, Warner Losh wrote: >On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert >wrote: > >> On April 18, 2019 7:22:53 AM PDT, "Rodney W=2E Grimes" < >> freebsd@gndrsh=2Ednsmgr=2Enet> wrote: >> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W=2E Grimes >> >> wrote: >> >> > >> >> > > In message <201904180107=2Ex3I17QDc002945@gndrsh=2Ednsmgr=2Enet>= , >> >"Rodney W=2E >> >> > > Grimes" >> >> > > writes: >> >> > > > > Author: cy >> >> > > > > Date: Thu Apr 18 01:02:00 2019 >> >> > > > > New Revision: 346341 >> >> > > > > URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/346341 >> >> > > > > >> >> > > > > Log: >> >> > > > > As an interim measure until a more permanent solution is >> >implemented >> >> > > > > workaround the following error: >> >> > > > > >> >> > > > > /usr/src/contrib/elftoolchain/strings/strings=2Ec:198:55: >> >error: use of >> >> > > > > undeclared identifier >> >> > > > > 'FA_OPEN' fa =3D fileargs_init(argc, argv, O_RDONLY, 0, >> >&rights, FA_OPEN); >> >> > > > > >> >> > > > > Reported by: O=2E Hartmann >> >> > > > > Reported by: Michael Butler > >> >> > > > > Reported by: gjb@ & cy@ (implicit) >> >> > > > > Reviewed by: emaste@ >> >> > > > > Noted by: rgrimes@ >> >> > > > > >> >> > > > > Modified: >> >> > > > > head/tools/build/Makefile >> >> > > > > >> >> > > > > Modified: head/tools/build/Makefile >> >> > > > > >> >> >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >> >> > > > =3D=3D=3D >> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 >> > (r34634 >> >> > > > 0) >> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 >> > (r34634 >> >> > > > 1) >> >> > > > > @@ -59,9 +59,7 @@ INCS+=3D capsicum_helpers=2Eh >> >> > > > > INCS+=3D libcasper=2Eh >> >> > > > > =2Eendif >> >> > > > > >> >> > > > > -=2Eif !exists(/usr/include/casper/cap_fileargs=2Eh) >> >> > > > > CASPERINC+=3D >> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea >> >> > > > rgs=2Eh >> >> > > > > -=2Eendif >> >> > > > >> >> > > > As a further note, we should probably hunt for any thing >> >> > > > that is explicity looking at /usr/include/=2E=2E=2E in a Makef= ile, >> >> > > > as that is minimally missing a ${DESTDIR} argument=2E >> >> > > > >> >> > > > The above may of actually worked if it had been written: >> >> > > > =2Eif !exists(${DESTDIR}/usr/include/casper/cap_fileargs=2Eh) >> >> > > > someone may wish to test that=2E >> >> > > > >> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost >> >certainly a mistake=2E >> >> > > >> >> > > This is a better solution=2E I tested this in a tree with a >> >duplicated >> >> > > environment: Problem solved=2E Before this is committed it >should >> >be >> >> > > tested on one of the universe machines=2E >> >> > >> >> > From what Ed just said this would also be wrong, >> >> > as well as CASPERINC+=3D above being wrong, if this >> >> > is being built for the host we should not be using >> >> > any headers from ${SRCTOP} at all=2E >> >> > >> >> > if capfileargs=2Eh does not exist on the host that functionality >> >> > must not be compiled into the buildtool as the host does not >> >> > have this feature and attempting to use it from SRCTOP is wrong=2E >> >> > >> >> >> >> Keep in mind that this is bootstrap; it's being built for the host >> >> system, but it will link against a version of libcasper that's >been >> >> built in an earlier stage with the proper featureset=2E >> > >> >Ok, flip flop again, if infact this is linked against a >> >library that implements the stuff from cap_fileargs=2Eh then >> >infact the ${DESTDIR} addition so that the build peaks into >> >the cross build tree is correct, or what ever the equivelent >> >to DESTDIR is for that ? BUILDDIR? The point is it should >> >be picking this header up from the object tree, NOT from >> >the running system=2E >> >> Yes, this was my conclusion when working on kerberos and ntp=2E This is >also >> true of libraries, else one would need to installworld and >buildworld >> again to get a properly built library/binary=2E >> >> IIRC ngie@ fixed a number of these across the tree a couple of years >ago=2E > > >OK=2E There's a number of different issues going on=2E As the original >author >of libegacy (which is what we're seeing fail), let me address the >design >generically and comment on different things that have come up in this >thread=2E > >Since this is going into the libegacy that we're using to build the >system, >the check for file is bogus, for reasons I'll discuss below=2E When we >add >new includes to the system, it is appropriate to do it this way=2E And >when >this file was added to the system, the check was correct=2E > >First off, DESTDIR is absolutely not correct since this is to build the >legacy library and legacy includes which augment the host's sources on >legacay system, hence the name=2E It's never the correct thing to use=2E > >The problem that we have here is not that the file is missing (which is >why >it was added the way it was a long time ago), but rather missing >functionality in a file that's been around for a long time=2E > >So, since it is that class of problem, the canonical way we've dealt >with >it in the past is to do something like create a file foo=2Eh that looks >something like > >#include_next > >#ifndev SOMETHING_NEW >#define SOMETHING_NEW 0 /* Or other values that are fail-safe on the >old >system */ >#endif > >and that's the change that needs to be made here=2E Sometimes, more >extensive >things need to be done when the old library can't work at all with the >new >code=2E In those cases, the pattern is for foo=2Eh to include #define >problem_fn my_problem_fn and then write a my_problem_fn that wraps >problem_fn in a way that works on the old system=2E Kinda a poor man's >symbol >versioning, in a way (note: we can't use symbol version for this since >we're building new binaries)=2E > >The "stop gap" gets things compiling, and maybe OK for the moment, >unless >the SOMETHING_NEW variable that's used (in this case FA_OPEN) causes >the >old library to do the wrong thing=2E I've not done the deep dive to see >if >this is the case or not=2E > >So, does that make sense? > >Warner This solves one problem but what about the cases when a new krb5, ntp, or = amd is imported but fails to build because it is using the old headers in /= usr/include and linking against old libraries on the running system? These examples BTW have been fixed=2E My concern is there could be other e= xamples in contrib, yet to be discovered, that might also have the same iss= ues=2E=20 --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-all@freebsd.org Thu Apr 18 16:59:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1A3815766A6; Thu, 18 Apr 2019 16:59:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92DB26EDC2; Thu, 18 Apr 2019 16:59:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 692359074; Thu, 18 Apr 2019 16:59:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r346341 - head/tools/build To: Cy Schubert , Warner Losh Cc: "Rodney W. Grimes" , "Rodney W. Grimes" , Kyle Evans , Cy Schubert , src-committers , svn-src-all , svn-src-head References: <201904181422.x3IEMrux005930@gndrsh.dnsmgr.net> <3095E422-7865-4EA5-BF13-6A48CB542AEE@cschubert.com> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <5ba297cb-e97b-2ac7-58ee-971545581f08@FreeBSD.org> Date: Thu, 18 Apr 2019 09:59:02 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 92DB26EDC2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.980,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 16:59:06 -0000 On 4/18/19 9:26 AM, Cy Schubert wrote: > On April 18, 2019 8:11:49 AM PDT, Warner Losh wrote: >> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert >> wrote: >> >>> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" < >>> freebsd@gndrsh.dnsmgr.net> wrote: >>>>> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes >>>>> wrote: >>>>>> >>>>>>> In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, >>>> "Rodney W. >>>>>>> Grimes" >>>>>>> writes: >>>>>>>>> Author: cy >>>>>>>>> Date: Thu Apr 18 01:02:00 2019 >>>>>>>>> New Revision: 346341 >>>>>>>>> URL: https://svnweb.freebsd.org/changeset/base/346341 >>>>>>>>> >>>>>>>>> Log: >>>>>>>>> As an interim measure until a more permanent solution is >>>> implemented >>>>>>>>> workaround the following error: >>>>>>>>> >>>>>>>>> /usr/src/contrib/elftoolchain/strings/strings.c:198:55: >>>> error: use of >>>>>>>>> undeclared identifier >>>>>>>>> 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, >>>> &rights, FA_OPEN); >>>>>>>>> >>>>>>>>> Reported by: O. Hartmann >>>>>>>>> Reported by: Michael Butler >> >>>>>>>>> Reported by: gjb@ & cy@ (implicit) >>>>>>>>> Reviewed by: emaste@ >>>>>>>>> Noted by: rgrimes@ >>>>>>>>> >>>>>>>>> Modified: >>>>>>>>> head/tools/build/Makefile >>>>>>>>> >>>>>>>>> Modified: head/tools/build/Makefile >>>>>>>>> >>> >>> >>> =========================================================================== >>>>>>>> === >>>>>>>>> --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 >>>> (r34634 >>>>>>>> 0) >>>>>>>>> +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 >>>> (r34634 >>>>>>>> 1) >>>>>>>>> @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h >>>>>>>>> INCS+= libcasper.h >>>>>>>>> .endif >>>>>>>>> >>>>>>>>> -.if !exists(/usr/include/casper/cap_fileargs.h) >>>>>>>>> CASPERINC+= >>>> ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea >>>>>>>> rgs.h >>>>>>>>> -.endif >>>>>>>> >>>>>>>> As a further note, we should probably hunt for any thing >>>>>>>> that is explicity looking at /usr/include/... in a Makefile, >>>>>>>> as that is minimally missing a ${DESTDIR} argument. >>>>>>>> >>>>>>>> The above may of actually worked if it had been written: >>>>>>>> .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) >>>>>>>> someone may wish to test that. >>>>>>>> >>>>>>>> Also a pathname rooted at / without ${DESTDIR} is almost >>>> certainly a mistake. >>>>>>> >>>>>>> This is a better solution. I tested this in a tree with a >>>> duplicated >>>>>>> environment: Problem solved. Before this is committed it >> should >>>> be >>>>>>> tested on one of the universe machines. >>>>>> >>>>>> From what Ed just said this would also be wrong, >>>>>> as well as CASPERINC+= above being wrong, if this >>>>>> is being built for the host we should not be using >>>>>> any headers from ${SRCTOP} at all. >>>>>> >>>>>> if capfileargs.h does not exist on the host that functionality >>>>>> must not be compiled into the buildtool as the host does not >>>>>> have this feature and attempting to use it from SRCTOP is wrong. >>>>>> >>>>> >>>>> Keep in mind that this is bootstrap; it's being built for the host >>>>> system, but it will link against a version of libcasper that's >> been >>>>> built in an earlier stage with the proper featureset. >>>> >>>> Ok, flip flop again, if infact this is linked against a >>>> library that implements the stuff from cap_fileargs.h then >>>> infact the ${DESTDIR} addition so that the build peaks into >>>> the cross build tree is correct, or what ever the equivelent >>>> to DESTDIR is for that ? BUILDDIR? The point is it should >>>> be picking this header up from the object tree, NOT from >>>> the running system. >>> >>> Yes, this was my conclusion when working on kerberos and ntp. This is >> also >>> true of libraries, else one would need to installworld and >> buildworld >>> again to get a properly built library/binary. >>> >>> IIRC ngie@ fixed a number of these across the tree a couple of years >> ago. >> >> >> OK. There's a number of different issues going on. As the original >> author >> of libegacy (which is what we're seeing fail), let me address the >> design >> generically and comment on different things that have come up in this >> thread. >> >> Since this is going into the libegacy that we're using to build the >> system, >> the check for file is bogus, for reasons I'll discuss below. When we >> add >> new includes to the system, it is appropriate to do it this way. And >> when >> this file was added to the system, the check was correct. >> >> First off, DESTDIR is absolutely not correct since this is to build the >> legacy library and legacy includes which augment the host's sources on >> legacay system, hence the name. It's never the correct thing to use. >> >> The problem that we have here is not that the file is missing (which is >> why >> it was added the way it was a long time ago), but rather missing >> functionality in a file that's been around for a long time. >> >> So, since it is that class of problem, the canonical way we've dealt >> with >> it in the past is to do something like create a file foo.h that looks >> something like >> >> #include_next >> >> #ifndev SOMETHING_NEW >> #define SOMETHING_NEW 0 /* Or other values that are fail-safe on the >> old >> system */ >> #endif >> >> and that's the change that needs to be made here. Sometimes, more >> extensive >> things need to be done when the old library can't work at all with the >> new >> code. In those cases, the pattern is for foo.h to include #define >> problem_fn my_problem_fn and then write a my_problem_fn that wraps >> problem_fn in a way that works on the old system. Kinda a poor man's >> symbol >> versioning, in a way (note: we can't use symbol version for this since >> we're building new binaries). >> >> The "stop gap" gets things compiling, and maybe OK for the moment, >> unless >> the SOMETHING_NEW variable that's used (in this case FA_OPEN) causes >> the >> old library to do the wrong thing. I've not done the deep dive to see >> if >> this is the case or not. >> >> So, does that make sense? >> >> Warner > > This solves one problem but what about the cases when a new krb5, ntp, or amd is imported but fails to build because it is using the old headers in /usr/include and linking against old libraries on the running system? > > These examples BTW have been fixed. My concern is there could be other examples in contrib, yet to be discovered, that might also have the same issues. We don't build those as bootstrap tools. This step is a special thing only needed to build tools that run on the _host_ that are used when compiling the world. All of the rest of world, etc. is compiled against the SYSROOT. This step is how you build the tools you need to generate the SYSROOT. strings is one of these special tools, so it requires extra care. -- John Baldwin From owner-svn-src-all@freebsd.org Thu Apr 18 17:00:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64BC91576724 for ; Thu, 18 Apr 2019 17:00:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 009866EF15 for ; Thu, 18 Apr 2019 17:00:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x733.google.com with SMTP id s83so1559670qke.3 for ; Thu, 18 Apr 2019 10:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DQV4bb7NwbFZ1QubfQTqh0TYWQr2iSr4H9I8BVBIfKE=; b=1NHIVnE1wUKk1o1gHdZiRjJZ3u30N0ZdIJPsSxsvMJ7lyuevJ0xeGYcBm8DdO1JVqU TugaOidE7Zgv4tQbp4jPsTJWm/QsXg0b+IaO6M2dg4+33gE9CLdGGJgwW08QOs5cky3l qH2Y/fto1jVkgPvmSFn1X0wER3LSz79e1FmnpDD/zwUZHvYo4YJP4xY9cc+iK0BIVhb6 CpkgU1KzlQhZXWW/g44tIJ7/U93NgX8F/UBw/n9usQtPfhqkkJ6MbdzJQdiepTpwvAnZ 9arXp6uYm7iC56vfS2ftMRfO6xPM5eOska/x06CBO4e6roHRCHKHRuDMILEdFBE/cXKQ o/UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DQV4bb7NwbFZ1QubfQTqh0TYWQr2iSr4H9I8BVBIfKE=; b=AcT6tcCXXlNHabVVfJhtkXMFDzB0Sp4NeidzmwkEw7NOxV6TNHLdCaD6odtl9iDdS4 m8Fhy6F6GO92jMZP4C44CKeasWv5Uzb9TEeXmknO8M9WAiyyGHF4DVaV5Vd73OOtvSjO UJUFacbyRjnTmXCiV8jowqrWe4XYRsyO7E2qHyrPDwHKGSlNWQV6Xpd/u8MZBnb0pPhD tZbi1u+ZDPOIhr2WIt3KQcbOQzw2sVsaaI+8NQAgZjJYz6Nk+TOr8PrUXQusuFyL7kPs TAvkF9/LAuI9WL1xTh7LIXrx9T8vaG9wp06/2jyGOoZDlcFGSsiNAaQHYgYzzdcYY+/z p0Tw== X-Gm-Message-State: APjAAAWg3i00k/MHlY8DuDR8cKvXD1JqQtdD4fpbH/56zEFkYQMMq4bI iPenqhi2LYj/UrWxyso1gWELhVaKsf9/ludVWRNbhw== X-Google-Smtp-Source: APXvYqzf2sTTeWKfNbzGtsoTBgp9s2Inshh3qIKEFmIrjVPxo/E74BfIrvu36h7IllKbzvx0P7WWk6EcmXMLW/k9owY= X-Received: by 2002:a05:620a:11a6:: with SMTP id c6mr10663183qkk.46.1555606802302; Thu, 18 Apr 2019 10:00:02 -0700 (PDT) MIME-Version: 1.0 References: <201904181422.x3IEMrux005930@gndrsh.dnsmgr.net> <3095E422-7865-4EA5-BF13-6A48CB542AEE@cschubert.com> In-Reply-To: From: Warner Losh Date: Thu, 18 Apr 2019 10:59:50 -0600 Message-ID: Subject: Re: svn commit: r346341 - head/tools/build To: Cy Schubert Cc: "Rodney W. Grimes" , "Rodney W. Grimes" , Kyle Evans , Cy Schubert , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 009866EF15 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 17:00:03 -0000 On Thu, Apr 18, 2019 at 10:26 AM Cy Schubert wrote: > On April 18, 2019 8:11:49 AM PDT, Warner Losh wrote: >> >> >> >> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert >> wrote: >> >>> On April 18, 2019 7:22:53 AM PDT, "Rodney W. Grimes" < >>> freebsd@gndrsh.dnsmgr.net> wrote: >>> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W. Grimes >>> >> wrote: >>> >> > >>> >> > > In message <201904180107.x3I17QDc002945@gndrsh.dnsmgr.net>, >>> >"Rodney W. >>> >> > > Grimes" >>> >> > > writes: >>> >> > > > > Author: cy >>> >> > > > > Date: Thu Apr 18 01:02:00 2019 >>> >> > > > > New Revision: 346341 >>> >> > > > > URL: https://svnweb.freebsd.org/changeset/base/346341 >>> >> > > > > >>> >> > > > > Log: >>> >> > > > > As an interim measure until a more permanent solution is >>> >implemented >>> >> > > > > workaround the following error: >>> >> > > > > >>> >> > > > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: >>> >error: use of >>> >> > > > > undeclared identifier >>> >> > > > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, >>> >&rights, FA_OPEN); >>> >> > > > > >>> >> > > > > Reported by: O. Hartmann >>> >> > > > > Reported by: Michael Butler >>> >> > > > > Reported by: gjb@ & cy@ (implicit) >>> >> > > > > Reviewed by: emaste@ >>> >> > > > > Noted by: rgrimes@ >>> >> > > > > >>> >> > > > > Modified: >>> >> > > > > head/tools/build/Makefile >>> >> > > > > >>> >> > > > > Modified: head/tools/build/Makefile >>> >> > > > > >>> >>> >=========================================================================== >>> >> > > > === >>> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 2019 >>> > (r34634 >>> >> > > > 0) >>> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 2019 >>> > (r34634 >>> >> > > > 1) >>> >> > > > > @@ -59,9 +59,7 @@ INCS+= capsicum_helpers.h >>> >> > > > > INCS+= libcasper.h >>> >> > > > > .endif >>> >> > > > > >>> >> > > > > -.if !exists(/usr/include/casper/cap_fileargs.h) >>> >> > > > > CASPERINC+= >>> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea >>> >> > > > rgs.h >>> >> > > > > -.endif >>> >> > > > >>> >> > > > As a further note, we should probably hunt for any thing >>> >> > > > that is explicity looking at /usr/include/... in a Makefile, >>> >> > > > as that is minimally missing a ${DESTDIR} argument. >>> >> > > > >>> >> > > > The above may of actually worked if it had been written: >>> >> > > > .if !exists(${DESTDIR}/usr/include/casper/cap_fileargs.h) >>> >> > > > someone may wish to test that. >>> >> > > > >>> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost >>> >certainly a mistake. >>> >> > > >>> >> > > This is a better solution. I tested this in a tree with a >>> >duplicated >>> >> > > environment: Problem solved. Before this is committed it should >>> >be >>> >> > > tested on one of the universe machines. >>> >> > >>> >> > From what Ed just said this would also be wrong, >>> >> > as well as CASPERINC+= above being wrong, if this >>> >> > is being built for the host we should not be using >>> >> > any headers from ${SRCTOP} at all. >>> >> > >>> >> > if capfileargs.h does not exist on the host that functionality >>> >> > must not be compiled into the buildtool as the host does not >>> >> > have this feature and attempting to use it from SRCTOP is wrong. >>> >> > >>> >> >>> >> Keep in mind that this is bootstrap; it's being built for the host >>> >> system, but it will link against a version of libcasper that's been >>> >> built in an earlier stage with the proper featureset. >>> > >>> >Ok, flip flop again, if infact this is linked against a >>> >library that implements the stuff from cap_fileargs.h then >>> >infact the ${DESTDIR} addition so that the build peaks into >>> >the cross build tree is correct, or what ever the equivelent >>> >to DESTDIR is for that ? BUILDDIR? The point is it should >>> >be picking this header up from the object tree, NOT from >>> >the running system. >>> >>> Yes, this was my conclusion when working on kerberos and ntp. This is >>> also true of libraries, else one would need to installworld and buildworld >>> again to get a properly built library/binary. >>> >>> IIRC ngie@ fixed a number of these across the tree a couple of years >>> ago. >> >> >> OK. There's a number of different issues going on. As the original author >> of libegacy (which is what we're seeing fail), let me address the design >> generically and comment on different things that have come up in this >> thread. >> >> Since this is going into the libegacy that we're using to build the >> system, the check for file is bogus, for reasons I'll discuss below. When >> we add new includes to the system, it is appropriate to do it this way. And >> when this file was added to the system, the check was correct. >> >> First off, DESTDIR is absolutely not correct since this is to build the >> legacy library and legacy includes which augment the host's sources on >> legacay system, hence the name. It's never the correct thing to use. >> >> The problem that we have here is not that the file is missing (which is >> why it was added the way it was a long time ago), but rather missing >> functionality in a file that's been around for a long time. >> >> So, since it is that class of problem, the canonical way we've dealt with >> it in the past is to do something like create a file foo.h that looks >> something like >> >> #include_next >> >> #ifndev SOMETHING_NEW >> #define SOMETHING_NEW 0 /* Or other values that are fail-safe on the old >> system */ >> #endif >> >> and that's the change that needs to be made here. Sometimes, more >> extensive things need to be done when the old library can't work at all >> with the new code. In those cases, the pattern is for foo.h to include >> #define problem_fn my_problem_fn and then write a my_problem_fn that wraps >> problem_fn in a way that works on the old system. Kinda a poor man's symbol >> versioning, in a way (note: we can't use symbol version for this since >> we're building new binaries). >> >> The "stop gap" gets things compiling, and maybe OK for the moment, unless >> the SOMETHING_NEW variable that's used (in this case FA_OPEN) causes the >> old library to do the wrong thing. I've not done the deep dive to see if >> this is the case or not. >> >> So, does that make sense? >> >> Warner >> > > This solves one problem but what about the cases when a new krb5, ntp, or > amd is imported but fails to build because it is using the old headers in > /usr/include and linking against old libraries on the running system? > > These examples BTW have been fixed. My concern is there could be other > examples in contrib, yet to be discovered, that might also have the same > issues. > That's the whole point if libegacy: to provide the glue that's needed for the bootstrap process. I'm surprised that ntp or amd are involved with libegacy at all since they aren't bootstrap tools. Are you sure you aren't confusing two different problem domains? I know kerberos is, but it kinda needs to be. Warner From owner-svn-src-all@freebsd.org Thu Apr 18 17:37:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 432C215775FE; Thu, 18 Apr 2019 17:37:46 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 04C257067C; Thu, 18 Apr 2019 17:37:44 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id HAyhhxYtqsAGkHAyjhLtfn; Thu, 18 Apr 2019 11:37:42 -0600 X-Authority-Analysis: v=2.3 cv=WeVylHpX c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=oexKYjalfGEA:10 a=7Qk2ozbKAAAA:8 a=YxBL1-UpAAAA:8 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=iaTFZB6CAAAA:8 a=zxA2vyXaAAAA:8 a=PEp_QB5gzuGBnP-JFm0A:9 a=7FaDiMKna2wrQ8zq:21 a=zHhFJdDF3MAfcgv_:21 a=QEXdDO2ut3YA:10 a=K0OccMdgBH2YJbIUUJkA:9 a=E0xnkuw_hmWRA0Fy:21 a=L5zBaabDEDj39vuA:21 a=Vjm11AqRlWPGOZTs:21 a=_W_S_7VecoQA:10 a=1lyxoWkJIXJV6VJUPhuM:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=QWXrQ9iV8q7LKaLQ9lfw:22 a=nK2txNHJmq7TfjpuLlwI:22 Received: from [192.168.0.103] (S0106002401cb186f.gv.shawcable.net [70.67.125.17]) by spqr.komquats.com (Postfix) with ESMTPSA id 28A8813AF; Thu, 18 Apr 2019 10:37:39 -0700 (PDT) Date: Thu, 18 Apr 2019 10:37:38 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <201904181422.x3IEMrux005930@gndrsh.dnsmgr.net> <3095E422-7865-4EA5-BF13-6A48CB542AEE@cschubert.com> MIME-Version: 1.0 Subject: Re: svn commit: r346341 - head/tools/build To: Warner Losh CC: "Rodney W. Grimes" , "Rodney W. Grimes" , Kyle Evans , Cy Schubert , src-committers , svn-src-all , svn-src-head From: Cy Schubert Message-ID: <3E54A972-27CE-498F-B0B9-B65A6E87F213@cschubert.com> X-CMAE-Envelope: MS4wfEmillLAy8HivkgIF8cTyGi5emn60y0OAGShBwcF0QIiRmAcw+7+EjCZto7n2UWEO26TMVewDM1kbS5atDBvnpEfPRUI3sQgYNGrMVDlkIHlFqFR6gzT J/V1mOO2nI1QyFDbgg7JW3KdBZRONtMRoB74gh5WD8JDefd5VTpMDCKXhusqSRGxCVAfSAOuweZUlEVZKI7yafVTQntYmfpe5HqtJeGEFG1mRiIrxcv8WMns q5FO3bV2zwd5vmLV1YqpNFHWk3AXejTfnU2ZWPGuceaq5sUeqoLSxHi5BycxJYIxbQaGIUIGR+M+5ST5XZnKO/XffIamWQS5AVY+91RgUN1zcsngHZz9+3gA SYCRp95rR5KtQ7neMu+LzDxf9E4FpbA3wRiBcdls+GpUpBCgJcHmlrtBBqKfK7szHpfKWD+J X-Rspamd-Queue-Id: 04C257067C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.992,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 17:37:46 -0000 On April 18, 2019 9:59:50 AM PDT, Warner Losh wrote: >On Thu, Apr 18, 2019 at 10:26 AM Cy Schubert > >wrote: > >> On April 18, 2019 8:11:49 AM PDT, Warner Losh wrote: >>> >>> >>> >>> On Thu, Apr 18, 2019 at 8:44 AM Cy Schubert > >>> wrote: >>> >>>> On April 18, 2019 7:22:53 AM PDT, "Rodney W=2E Grimes" < >>>> freebsd@gndrsh=2Ednsmgr=2Enet> wrote: >>>> >> On Thu, Apr 18, 2019 at 8:46 AM Rodney W=2E Grimes >>>> >> wrote: >>>> >> > >>>> >> > > In message <201904180107=2Ex3I17QDc002945@gndrsh=2Ednsmgr=2Ene= t>, >>>> >"Rodney W=2E >>>> >> > > Grimes" >>>> >> > > writes: >>>> >> > > > > Author: cy >>>> >> > > > > Date: Thu Apr 18 01:02:00 2019 >>>> >> > > > > New Revision: 346341 >>>> >> > > > > URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/346341 >>>> >> > > > > >>>> >> > > > > Log: >>>> >> > > > > As an interim measure until a more permanent solution >is >>>> >implemented >>>> >> > > > > workaround the following error: >>>> >> > > > > >>>> >> > > > > =20 >/usr/src/contrib/elftoolchain/strings/strings=2Ec:198:55: >>>> >error: use of >>>> >> > > > > undeclared identifier >>>> >> > > > > 'FA_OPEN' fa =3D fileargs_init(argc, argv, O_RDONLY, 0, >>>> >&rights, FA_OPEN); >>>> >> > > > > >>>> >> > > > > Reported by: O=2E Hartmann >>>> >> > > > > Reported by: Michael Butler > >>>> >> > > > > Reported by: gjb@ & cy@ (implicit) >>>> >> > > > > Reviewed by: emaste@ >>>> >> > > > > Noted by: rgrimes@ >>>> >> > > > > >>>> >> > > > > Modified: >>>> >> > > > > head/tools/build/Makefile >>>> >> > > > > >>>> >> > > > > Modified: head/tools/build/Makefile >>>> >> > > > > >>>> >>>> >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >>>> >> > > > =3D=3D=3D >>>> >> > > > > --- head/tools/build/Makefile Thu Apr 18 00:38:54 >2019 >>>> > (r34634 >>>> >> > > > 0) >>>> >> > > > > +++ head/tools/build/Makefile Thu Apr 18 01:02:00 >2019 >>>> > (r34634 >>>> >> > > > 1) >>>> >> > > > > @@ -59,9 +59,7 @@ INCS+=3D capsicum_helpers=2Eh >>>> >> > > > > INCS+=3D libcasper=2Eh >>>> >> > > > > =2Eendif >>>> >> > > > > >>>> >> > > > > -=2Eif !exists(/usr/include/casper/cap_fileargs=2Eh) >>>> >> > > > > CASPERINC+=3D >>>> >${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_filea >>>> >> > > > rgs=2Eh >>>> >> > > > > -=2Eendif >>>> >> > > > >>>> >> > > > As a further note, we should probably hunt for any thing >>>> >> > > > that is explicity looking at /usr/include/=2E=2E=2E in a >Makefile, >>>> >> > > > as that is minimally missing a ${DESTDIR} argument=2E >>>> >> > > > >>>> >> > > > The above may of actually worked if it had been written: >>>> >> > > > =2Eif !exists(${DESTDIR}/usr/include/casper/cap_fileargs=2Eh= ) >>>> >> > > > someone may wish to test that=2E >>>> >> > > > >>>> >> > > > Also a pathname rooted at / without ${DESTDIR} is almost >>>> >certainly a mistake=2E >>>> >> > > >>>> >> > > This is a better solution=2E I tested this in a tree with a >>>> >duplicated >>>> >> > > environment: Problem solved=2E Before this is committed it >should >>>> >be >>>> >> > > tested on one of the universe machines=2E >>>> >> > >>>> >> > From what Ed just said this would also be wrong, >>>> >> > as well as CASPERINC+=3D above being wrong, if this >>>> >> > is being built for the host we should not be using >>>> >> > any headers from ${SRCTOP} at all=2E >>>> >> > >>>> >> > if capfileargs=2Eh does not exist on the host that functionality >>>> >> > must not be compiled into the buildtool as the host does not >>>> >> > have this feature and attempting to use it from SRCTOP is >wrong=2E >>>> >> > >>>> >> >>>> >> Keep in mind that this is bootstrap; it's being built for the >host >>>> >> system, but it will link against a version of libcasper that's >been >>>> >> built in an earlier stage with the proper featureset=2E >>>> > >>>> >Ok, flip flop again, if infact this is linked against a >>>> >library that implements the stuff from cap_fileargs=2Eh then >>>> >infact the ${DESTDIR} addition so that the build peaks into >>>> >the cross build tree is correct, or what ever the equivelent >>>> >to DESTDIR is for that ? BUILDDIR? The point is it should >>>> >be picking this header up from the object tree, NOT from >>>> >the running system=2E >>>> >>>> Yes, this was my conclusion when working on kerberos and ntp=2E This >is >>>> also true of libraries, else one would need to installworld and >buildworld >>>> again to get a properly built library/binary=2E >>>> >>>> IIRC ngie@ fixed a number of these across the tree a couple of >years >>>> ago=2E >>> >>> >>> OK=2E There's a number of different issues going on=2E As the original >author >>> of libegacy (which is what we're seeing fail), let me address the >design >>> generically and comment on different things that have come up in >this >>> thread=2E >>> >>> Since this is going into the libegacy that we're using to build the >>> system, the check for file is bogus, for reasons I'll discuss below=2E > When >>> we add new includes to the system, it is appropriate to do it this >way=2E And >>> when this file was added to the system, the check was correct=2E >>> >>> First off, DESTDIR is absolutely not correct since this is to build >the >>> legacy library and legacy includes which augment the host's sources >on >>> legacay system, hence the name=2E It's never the correct thing to use= =2E >>> >>> The problem that we have here is not that the file is missing (which >is >>> why it was added the way it was a long time ago), but rather missing >>> functionality in a file that's been around for a long time=2E >>> >>> So, since it is that class of problem, the canonical way we've dealt >with >>> it in the past is to do something like create a file foo=2Eh that >looks >>> something like >>> >>> #include_next >>> >>> #ifndev SOMETHING_NEW >>> #define SOMETHING_NEW 0 /* Or other values that are fail-safe on the >old >>> system */ >>> #endif >>> >>> and that's the change that needs to be made here=2E Sometimes, more >>> extensive things need to be done when the old library can't work at >all >>> with the new code=2E In those cases, the pattern is for foo=2Eh to >include >>> #define problem_fn my_problem_fn and then write a my_problem_fn that >wraps >>> problem_fn in a way that works on the old system=2E Kinda a poor man's >symbol >>> versioning, in a way (note: we can't use symbol version for this >since >>> we're building new binaries)=2E >>> >>> The "stop gap" gets things compiling, and maybe OK for the moment, >unless >>> the SOMETHING_NEW variable that's used (in this case FA_OPEN) causes >the >>> old library to do the wrong thing=2E I've not done the deep dive to >see if >>> this is the case or not=2E >>> >>> So, does that make sense? >>> >>> Warner >>> >> >> This solves one problem but what about the cases when a new krb5, >ntp, or >> amd is imported but fails to build because it is using the old >headers in >> /usr/include and linking against old libraries on the running system? >> >> These examples BTW have been fixed=2E My concern is there could be >other >> examples in contrib, yet to be discovered, that might also have the >same >> issues=2E >> > >That's the whole point if libegacy: to provide the glue that's needed >for >the bootstrap process=2E I'm surprised that ntp or amd are involved with >libegacy at all since they aren't bootstrap tools=2E Are you sure you >aren't >confusing two different problem domains? I know kerberos is, but it >kinda >needs to be=2E > >Warner Maybe I am conflating the two issues=2E I'll look again the next time I ge= t to a keyboard=2E --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-all@freebsd.org Thu Apr 18 18:02:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21748157823D; Thu, 18 Apr 2019 18:02:05 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3E537222E; Thu, 18 Apr 2019 18:02:04 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f52.google.com with SMTP id m188so1506825ioa.9; Thu, 18 Apr 2019 11:02:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zj4LNXjz/2GuSOEUMX8Pe7F0GsmvqvcIkzsXk5yOrrQ=; b=m2T6sXN/O+7KKCEOt3zponhzubBjCqBB5Cih6fRmFCzPOENDoNQyd3Oq842NdsfkMq nskrJRiDp8Td/0U7VZpnyG0p8m2K4Oh2COnzYUchLays62bfNjKMxhWy5RbPWPzYac+o wrHMc9N2X5W6IiyHq59C+En6ru+08WHEyMn8AJaZH361uRqYutnUm696FmMMO1AO4q5U LS5szqde0jEnyEbWpUIQj9cYX9bGqkY2m2lVHE7QIj4T36zXRikalFdfrU/d5gqriVVU gRRPGh++/qdOLSZgYdxwK84zFgiEBsKrXWdOtd0pm7kLU7lWMUFiHnGr1RiMIWpOcstY qZHQ== X-Gm-Message-State: APjAAAVIDvCpsWO8s2wAkenmUSsOgLMrMmbKN/yPAJDfP8SNHRwp1xq7 YL3Xg1I3/ePLQ82QEcmyoVnj2Yo3yhEbHE2GQC9g5Q== X-Google-Smtp-Source: APXvYqxCIQ9atq0FLSFQUBoSo04LYTZdPdo8cG0uMhEjLt/L4l2VKgGZY5RZpcSsxvKw9V92ZR9WzQwt3rf33STQID8= X-Received: by 2002:a5d:8184:: with SMTP id u4mr10630269ion.239.1555610512079; Thu, 18 Apr 2019 11:01:52 -0700 (PDT) MIME-Version: 1.0 References: <201904180332.x3I3WJTt096491@slippy.cwsent.com> <201904181345.x3IDjgr4005764@gndrsh.dnsmgr.net> In-Reply-To: From: Ed Maste Date: Thu, 18 Apr 2019 14:01:39 -0400 Message-ID: Subject: Re: svn commit: r346341 - head/tools/build To: Kyle Evans Cc: "Rodney W. Grimes" , Cy Schubert , Cy Schubert , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A3E537222E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 18:02:05 -0000 On Thu, 18 Apr 2019 at 10:03, Kyle Evans wrote: > > Keep in mind that this is bootstrap; it's being built for the host > system, but it will link against a version of libcasper that's been > built in an earlier stage with the proper featureset. Not exactly the case here: if building on a system with too-old Casper then strings just builds without Capsicum/Casper support. Macros / static inline stub implementations in the header takes care of this, it does not actually link against any libcasper. From owner-svn-src-all@freebsd.org Thu Apr 18 18:04:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B9041578564 for ; Thu, 18 Apr 2019 18:04:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD76072B08 for ; Thu, 18 Apr 2019 18:04:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72d.google.com with SMTP id y5so1653127qkc.11 for ; Thu, 18 Apr 2019 11:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EmeCNmitZD0w6BybPlHKXGFCEUhrW6A8tp9Me1vqIPk=; b=AkmVOIYmYL+PNEc/1nRbL84EKD6sQSjqtkAYKLFHrVKKg4Yqlbj/AeOeJSChlV9bL0 Sbl/zOCsYZ0Oh8cUFGozcXV1oIZwsuGZ9aCUBFRiQk7ZfxgCwhZuIKFzPhYfKXMZhNcT yil0gf4EA21iO+HoP/styywSzoNs7yyzq8nG2VGHQnR3hqyEJcr8k3mxza9xr/SaI87U 7Qwou2p76Z59m/03F2BfMsdrQPmFsB+osprRIm4OIHvsaTk5JG9Ry07jNcQ0rVu8rWAc 924ZBzyNPMwa/56ID2qIPcojNfb81fyjMhTziZb3by956mnWhORp/0IdTEH9WW9hK3KO FMMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EmeCNmitZD0w6BybPlHKXGFCEUhrW6A8tp9Me1vqIPk=; b=rBYB8zJp+ZKL8w0sbwNJCB3AIH7b50qLler5YIZrkuPHinBUuFL5BVyOVSEwJIEb3A g9UWORkStmGY8V6SpSA6lgYXmYWKJ/0/UdfzsDMewvcMVlKEyw0V3eRPj1qdOjuNKmW0 5pO0NsTRLH4XSS5O1RbBZ4wu8YyX709hpayXxCcfi+RgcjqmYY3KnRqFabF6qhaYbZUa qm3pqLjLozmFB6C28bjUVfOHkFzjRYd7okfbDtCCwraaClcJYZea3awoU8LaHmM+GrgS rrGZEnZzcFkt4EaPttmTdUY1CwVXGpSZoJt9KkHtEHSs1lLb/NSAMU+3z8OgjlaxDV6F MRfA== X-Gm-Message-State: APjAAAW37NuxJyzT6OQ+Cmwk/hbFVQGMrSA0KS7a9o4mZxqJtXjJ8HC5 4a5DEenjnV1lka1sayzZRmj8I8D8dzr/4TqHw5YgHA== X-Google-Smtp-Source: APXvYqzEvYRl4JdN04/kzcJ2uF5OScJG5S3wPCBhvXOqW2r+dGq3Dogmu9u+CBV5mDp2ITVnET0Tes79njE3ovLLooQ= X-Received: by 2002:a05:620a:15c4:: with SMTP id o4mr71362902qkm.175.1555610645304; Thu, 18 Apr 2019 11:04:05 -0700 (PDT) MIME-Version: 1.0 References: <201904180332.x3I3WJTt096491@slippy.cwsent.com> <201904181345.x3IDjgr4005764@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Thu, 18 Apr 2019 12:03:53 -0600 Message-ID: Subject: Re: svn commit: r346341 - head/tools/build To: Ed Maste Cc: Kyle Evans , "Rodney W. Grimes" , Cy Schubert , Cy Schubert , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: DD76072B08 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 18:04:06 -0000 On Thu, Apr 18, 2019 at 12:03 PM Ed Maste wrote: > On Thu, 18 Apr 2019 at 10:03, Kyle Evans wrote: > > > > Keep in mind that this is bootstrap; it's being built for the host > > system, but it will link against a version of libcasper that's been > > built in an earlier stage with the proper featureset. > > Not exactly the case here: if building on a system with too-old Casper > then strings just builds without Capsicum/Casper support. Macros / > static inline stub implementations in the header takes care of this, > it does not actually link against any libcasper. > Yea, we need to do one or the other. Warner From owner-svn-src-all@freebsd.org Thu Apr 18 19:04:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 645571579E77; Thu, 18 Apr 2019 19:04:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 09DAA75155; Thu, 18 Apr 2019 19:04:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAC8423376; Thu, 18 Apr 2019 19:04:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IJ47Gp019686; Thu, 18 Apr 2019 19:04:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IJ47Qh019683; Thu, 18 Apr 2019 19:04:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201904181904.x3IJ47Qh019683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Apr 2019 19:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346356 - in head: lib/libcuse sys/fs/cuse X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head: lib/libcuse sys/fs/cuse X-SVN-Commit-Revision: 346356 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 09DAA75155 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 19:04:08 -0000 Author: hselasky Date: Thu Apr 18 19:04:07 2019 New Revision: 346356 URL: https://svnweb.freebsd.org/changeset/base/346356 Log: Implement flag for telling cuse(3) clients if the peer is running in 32-bit compat mode or not. This is useful when implementing compatibility ioctl(2) handlers in userspace. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/lib/libcuse/cuse.3 head/sys/fs/cuse/cuse.c head/sys/fs/cuse/cuse_defs.h Modified: head/lib/libcuse/cuse.3 ============================================================================== --- head/lib/libcuse/cuse.3 Thu Apr 18 15:31:03 2019 (r346355) +++ head/lib/libcuse/cuse.3 Thu Apr 18 19:04:07 2019 (r346356) @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 5, 2017 +.Dd April 17, 2019 .Dt CUSE 3 .Os .Sh NAME @@ -303,6 +303,7 @@ enum { CUSE_FFLAG_READ CUSE_FFLAG_WRITE CUSE_FFLAG_NONBLOCK + CUSE_FFLAG_COMPAT32 CUSE_CMD_NONE CUSE_CMD_OPEN Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Thu Apr 18 15:31:03 2019 (r346355) +++ head/sys/fs/cuse/cuse.c Thu Apr 18 19:04:07 2019 (r346356) @@ -51,6 +51,7 @@ #include #include #include +#include #include @@ -536,7 +537,10 @@ cuse_client_send_command_locked(struct cuse_client_com if (ioflag & IO_NDELAY) cuse_fflags |= CUSE_FFLAG_NONBLOCK; - +#if defined(__LP64__) + if (SV_CURPROC_FLAG(SV_ILP32)) + cuse_fflags |= CUSE_FFLAG_COMPAT32; +#endif pccmd->sub.fflags = cuse_fflags; pccmd->sub.data_pointer = data_ptr; pccmd->sub.argument = arg; Modified: head/sys/fs/cuse/cuse_defs.h ============================================================================== --- head/sys/fs/cuse/cuse_defs.h Thu Apr 18 15:31:03 2019 (r346355) +++ head/sys/fs/cuse/cuse_defs.h Thu Apr 18 19:04:07 2019 (r346356) @@ -27,7 +27,7 @@ #ifndef _CUSE_DEFS_H_ #define _CUSE_DEFS_H_ -#define CUSE_VERSION 0x000123 +#define CUSE_VERSION 0x000124 #define CUSE_ERR_NONE 0 #define CUSE_ERR_BUSY -1 @@ -49,6 +49,7 @@ #define CUSE_FFLAG_READ 1 #define CUSE_FFLAG_WRITE 2 #define CUSE_FFLAG_NONBLOCK 4 +#define CUSE_FFLAG_COMPAT32 8 /* peer is running in 32-bit compat mode */ #define CUSE_DBG_NONE 0 #define CUSE_DBG_FULL 1 From owner-svn-src-all@freebsd.org Thu Apr 18 20:48:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D920157C22B; Thu, 18 Apr 2019 20:48:57 +0000 (UTC) (envelope-from cem@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 D4C1D80766; Thu, 18 Apr 2019 20:48:56 +0000 (UTC) (envelope-from cem@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 915B7244CC; Thu, 18 Apr 2019 20:48:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IKmutO073309; Thu, 18 Apr 2019 20:48:56 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IKmtG2073301; Thu, 18 Apr 2019 20:48:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201904182048.x3IKmtG2073301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 18 Apr 2019 20:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346358 - in head: . sys/dev/random sys/libkern sys/mips/conf sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: . sys/dev/random sys/libkern sys/mips/conf sys/sys X-SVN-Commit-Revision: 346358 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D4C1D80766 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 20:48:57 -0000 Author: cem Date: Thu Apr 18 20:48:54 2019 New Revision: 346358 URL: https://svnweb.freebsd.org/changeset/base/346358 Log: random(4): Restore availability tradeoff prior to r346250 As discussed in that commit message, it is a dangerous default. But the safe default causes enough pain on a variety of platforms that for now, restore the prior default. Some of this is self-induced pain we should/could do better about; for example, programmatic CI systems and VM managers should introduce entropy from the host for individual VM instances. This is considered a future work item. On modern x86 and Power9 systems, this may be wholly unnecessary after D19928 lands (even in the non-ideal case where early /boot/entropy is unavailable), because they have fast hardware random sources available early in boot. But D19928 is not yet landed and we have a host of architectures which do not provide fast random sources. This change adds several tunables and diagnostic sysctls, documented thoroughly in UPDATING and sys/dev/random/random_infra.c. PR: 230875 (reopens) Reported by: adrian, jhb, imp, and probably others Reviewed by: delphij, imp (earlier version), markm (earlier version) Discussed with: adrian Approved by: secteam(delphij) Relnotes: yeah Security: related Differential Revision: https://reviews.freebsd.org/D19944 Modified: head/UPDATING head/sys/dev/random/random_infra.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/libkern/arc4random.c head/sys/mips/conf/PB92 head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Apr 18 19:16:34 2019 (r346357) +++ head/UPDATING Thu Apr 18 20:48:54 2019 (r346358) @@ -31,6 +31,30 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20190418: + The following knobs have been added related to tradeoffs between + safe use of the random device and availability in the absence of + entropy: + + kern.random.initial_seeding.bypass_before_seeding: tunable; set + non-zero to bypass the random device prior to seeding, or zero to + block random requests until the random device is initially seeded. + For now, set to 1 (unsafe) by default to restore pre-r346250 boot + availability properties. + + kern.random.initial_seeding.read_random_bypassed_before_seeding: + read-only diagnostic sysctl that is set when bypass is enabled and + read_random(9) is bypassed, to enable programmatic handling of this + initial condition, if desired. + + kern.random.initial_seeding.arc4random_bypassed_before_seeding: + Similar to the above, but for for arc4random(9) initial seeding. + + kern.random.initial_seeding.disable_bypass_warnings: tunable; set + non-zero to disable warnings in dmesg when the same conditions are + met as for the diagnostic sysctls above. Defaults to zero, i.e., + produce warnings in dmesg when the conditions are met. + 20190416: The tunable "security.stack_protect.permit_nonrandom_cookies" may be set to a non-zero value to boot systems that do not provide early Modified: head/sys/dev/random/random_infra.c ============================================================================== --- head/sys/dev/random/random_infra.c Thu Apr 18 19:16:34 2019 (r346357) +++ head/sys/dev/random/random_infra.c Thu Apr 18 20:48:54 2019 (r346358) @@ -43,7 +43,61 @@ __FBSDID("$FreeBSD$"); #include /* Set up the sysctl root node for the entropy device */ -SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW, 0, "Cryptographically Secure Random Number Generator"); +SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW, 0, + "Cryptographically Secure Random Number Generator"); +SYSCTL_NODE(_kern_random, OID_AUTO, initial_seeding, CTLFLAG_RW, 0, + "Initial seeding control and information"); + +/* + * N.B., this is a dangerous default, but it matches the behavior prior to + * r346250 (and, say, OpenBSD -- although they get some guaranteed saved + * entropy from the prior boot because of their KARL system, on RW media). + */ +bool random_bypass_before_seeding = true; +SYSCTL_BOOL(_kern_random_initial_seeding, OID_AUTO, + bypass_before_seeding, CTLFLAG_RDTUN, &random_bypass_before_seeding, + 0, "If set non-zero, bypass the random device in requests for random " + "data when the random device is not yet seeded. This is considered " + "dangerous. Ordinarily, the random device will block requests until " + "it is seeded by sufficient entropy."); + +/* + * This is a read-only diagnostic that reports the combination of the former + * tunable and actual bypass. It is intended for programmatic inspection by + * userspace administrative utilities after boot. + */ +bool read_random_bypassed_before_seeding = false; +SYSCTL_BOOL(_kern_random_initial_seeding, OID_AUTO, + read_random_bypassed_before_seeding, CTLFLAG_RD, + &read_random_bypassed_before_seeding, 0, "If non-zero, the random device " + "was bypassed because the 'bypass_before_seeding' knob was enabled and a " + "request was submitted prior to initial seeding."); + +/* + * This is a read-only diagnostic that reports the combination of the former + * tunable and actual bypass for arc4random initial seeding. It is intended + * for programmatic inspection by userspace administrative utilities after + * boot. + */ +bool arc4random_bypassed_before_seeding = false; +SYSCTL_BOOL(_kern_random_initial_seeding, OID_AUTO, + arc4random_bypassed_before_seeding, CTLFLAG_RD, + &arc4random_bypassed_before_seeding, 0, "If non-zero, the random device " + "was bypassed when initially seeding the kernel arc4random(9), because " + "the 'bypass_before_seeding' knob was enabled and a request was submitted " + "prior to initial seeding."); + +/* + * This knob is for users who do not want additional warnings in their logs + * because they intend to handle bypass by inspecting the status of the + * diagnostic sysctls. + */ +bool random_bypass_disable_warnings = false; +SYSCTL_BOOL(_kern_random_initial_seeding, OID_AUTO, + disable_bypass_warnings, CTLFLAG_RDTUN, + &random_bypass_disable_warnings, 0, "If non-zero, do not log a warning " + "if the 'bypass_before_seeding' knob is enabled and a request is " + "submitted prior to initial seeding."); MALLOC_DEFINE(M_ENTROPY, "entropy", "Entropy harvesting buffers and data structures"); Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Thu Apr 18 19:16:34 2019 (r346357) +++ head/sys/dev/random/randomdev.c Thu Apr 18 20:48:54 2019 (r346358) @@ -236,11 +236,15 @@ READ_RANDOM_UIO(struct uio *uio, bool nonblock) } /*- - * Kernel API version of read_random(). - * This is similar to random_alg_read(), - * except it doesn't interface with uio(9). - * It cannot assumed that random_buf is a multiple of - * RANDOM_BLOCKSIZE bytes. + * Kernel API version of read_random(). This is similar to read_random_uio(), + * except it doesn't interface with uio(9). It cannot assumed that random_buf + * is a multiple of RANDOM_BLOCKSIZE bytes. + * + * If the tunable 'kern.random.initial_seeding.bypass_before_seeding' is set + * non-zero, silently fail to emit random data (matching the pre-r346250 + * behavior). If read_random is called prior to seeding and bypassed because + * of this tunable, the condition is reported in the read-only sysctl + * 'kern.random.initial_seeding.read_random_bypassed_before_seeding'. */ void READ_RANDOM(void *random_buf, u_int len) @@ -249,12 +253,31 @@ READ_RANDOM(void *random_buf, u_int len) KASSERT(random_buf != NULL, ("No suitable random buffer in %s", __func__)); p_random_alg_context->ra_pre_read(); + + if (len == 0) + return; + /* (Un)Blocking logic */ - if (!p_random_alg_context->ra_seeded()) + if (__predict_false(!p_random_alg_context->ra_seeded())) { + if (random_bypass_before_seeding) { + if (!read_random_bypassed_before_seeding) { + if (!random_bypass_disable_warnings) + printf("read_random: WARNING: bypassing" + " request for random data because " + "the random device is not yet " + "seeded and the knob " + "'bypass_before_seeding' was " + "enabled.\n"); + read_random_bypassed_before_seeding = true; + } + /* Avoid potentially leaking stack garbage */ + memset(random_buf, 0, len); + return; + } + (void)randomdev_wait_until_seeded(SEEDWAIT_UNINTERRUPTIBLE); + } read_rate_increment(roundup2(len, sizeof(uint32_t))); - if (len == 0) - return; /* * The underlying generator expects multiples of * RANDOM_BLOCKSIZE. Modified: head/sys/dev/random/randomdev.h ============================================================================== --- head/sys/dev/random/randomdev.h Thu Apr 18 19:16:34 2019 (r346357) +++ head/sys/dev/random/randomdev.h Thu Apr 18 20:48:54 2019 (r346358) @@ -37,6 +37,7 @@ #ifdef SYSCTL_DECL /* from sysctl.h */ SYSCTL_DECL(_kern_random); +SYSCTL_DECL(_kern_random_initial_seeding); #define RANDOM_CHECK_UINT(name, min, max) \ static int \ @@ -54,6 +55,11 @@ random_check_uint_##name(SYSCTL_HANDLER_ARGS) \ #endif /* SYSCTL_DECL */ MALLOC_DECLARE(M_ENTROPY); + +extern bool random_bypass_before_seeding; +extern bool read_random_bypassed_before_seeding; +extern bool arc4random_bypassed_before_seeding; +extern bool random_bypass_disable_warnings; #endif /* _KERNEL */ Modified: head/sys/libkern/arc4random.c ============================================================================== --- head/sys/libkern/arc4random.c Thu Apr 18 19:16:34 2019 (r346357) +++ head/sys/libkern/arc4random.c Thu Apr 18 20:48:54 2019 (r346358) @@ -41,6 +41,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #define CHACHA20_RESEED_BYTES 65536 #define CHACHA20_RESEED_SECONDS 300 @@ -77,12 +80,43 @@ chacha20_randomstir(struct chacha20_s *chacha20) struct timeval tv_now; u_int8_t key[CHACHA20_KEYBYTES]; - /* - * If the loader(8) did not have an entropy stash from the previous - * shutdown to load, then we will block. The answer is to make sure - * there is an entropy stash at shutdown time. - */ - read_random(key, CHACHA20_KEYBYTES); + if (__predict_false(random_bypass_before_seeding && !is_random_seeded())) { + SHA256_CTX ctx; + uint64_t cc; + uint32_t fver; + + if (!arc4random_bypassed_before_seeding) { + arc4random_bypassed_before_seeding = true; + if (!random_bypass_disable_warnings) + printf("arc4random: WARNING: initial seeding " + "bypassed the cryptographic random device " + "because it was not yet seeded and the " + "knob 'bypass_before_seeding' was " + "enabled.\n"); + } + + /* Last ditch effort to inject something in a bad condition. */ + cc = get_cyclecount(); + SHA256_Init(&ctx); + SHA256_Update(&ctx, key, sizeof(key)); + SHA256_Update(&ctx, &cc, sizeof(cc)); + fver = __FreeBSD_version; + SHA256_Update(&ctx, &fver, sizeof(fver)); + _Static_assert(sizeof(key) == SHA256_DIGEST_LENGTH, + "make sure 256 bits is still 256 bits"); + SHA256_Final(key, &ctx); + } else { + /* + * If the loader(8) did not have an entropy stash from the + * previous shutdown to load, then we will block. The answer is + * to make sure there is an entropy stash at shutdown time. + * + * On the other hand, if the random_bypass_before_seeding knob + * was set and we landed in this branch, we know this won't + * block because we know the random device is seeded. + */ + read_random(key, CHACHA20_KEYBYTES); + } getmicrouptime(&tv_now); mtx_lock(&chacha20->mtx); chacha_keysetup(&chacha20->ctx, key, CHACHA20_KEYBYTES*8); Modified: head/sys/mips/conf/PB92 ============================================================================== --- head/sys/mips/conf/PB92 Thu Apr 18 19:16:34 2019 (r346357) +++ head/sys/mips/conf/PB92 Thu Apr 18 20:48:54 2019 (r346358) @@ -133,5 +133,5 @@ device loop device ether #device md #device bpf -#device random +device random #device if_bridge Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Apr 18 19:16:34 2019 (r346357) +++ head/sys/sys/param.h Thu Apr 18 20:48:54 2019 (r346358) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300019 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300020 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Thu Apr 18 22:03:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CE2C157D914 for ; Thu, 18 Apr 2019 22:03:01 +0000 (UTC) (envelope-from 0100016a32795509-76b9c94b-0bd6-4c2a-8856-8fe032a4e138-000000@amazonses.com) Received: from a8-13.smtp-out.amazonses.com (a8-13.smtp-out.amazonses.com [54.240.8.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7504082B35 for ; Thu, 18 Apr 2019 22:03:00 +0000 (UTC) (envelope-from 0100016a32795509-76b9c94b-0bd6-4c2a-8856-8fe032a4e138-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1555624973; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=u2l5jTYm5nT/IYx5GgLqDRD7fMoMbSuv+W/CL0djdaY=; b=BbJ8J/xOOMIa3SO2BFUNQyRoyWLj7DhLctDlH6gXjxkjf9Ob6YrbiOY0N84lCttZ SmbAPgk9yyj1d5iohwAaLwIYPrz8L5dcxuJg8azbMVQdQ1m0de8sYC9IXkWqCO9NsEh hQrWDcjqkYjG+cc8fw7M/Nr3RGoLncc2eJ582pdk= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1555624973; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=u2l5jTYm5nT/IYx5GgLqDRD7fMoMbSuv+W/CL0djdaY=; b=cP3XgOKHh1uc5emliiLmyWpvi4VYEW8u3LQcoiSPn8fzz5cwrHqxNfTrr4f4Bd0i t5prvUh/gk2XT3ybJOV/f+PLQXXzro4P4pgB6i6Y/EU5S7NLinPmO5hDy5LTEP2DgpF c1trKvaYd0ud0F4otHvPYu4sOZp74ukAGOJN4Yqo= Subject: Re: svn commit: r340905 - in stable/12: release/pkg_repos usr.sbin/pkg To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org, portmgr@freebsd.org References: <201811241747.wAOHlr6W029937@repo.freebsd.org> From: Colin Percival Openpgp: preference=signencrypt Autocrypt: addr=cperciva@tarsnap.com; prefer-encrypt=mutual; keydata= mQGhBElrAAcRBACDfDys4ZtK+ErCJ1HAzYeteKpm3OEsvT/49AjUTLihkF79HhIKrCQU+1KC zv7BwHCMLb6hq30As9L7iFKG7n5QFLFC4Te/VcITUnWHMG/c3ViLOfJGvi+9/nOEHaM1dVJY D6tEp5yM1nHmVQpo9932j4KGuGFR0LhOK5IHXOSfGwCgxSFDPdgxe2OEjWxjGgY+oV3EafcD +JROXCTjlcQiG/OguQH4Vks3mhHfFnEppLxTkDuYgHZQiUtpcT9ssH5khgqoTyMar05OUdAj ZIhNbWDh4LgTj+7ZmvLhXT5Zxw8LX9d7T36aTB8XDQSenDqEtinMWOb0TCBBLbsB8EFG1WTT ESbZci9jJS5yhtktuZoY/eM8uXMD/3k4FWFO80VRRkELSp+XSy/VlSQjyi/rhl2nQq/oOA9F oJbDaB0yq9VNhxP+uFBzBWSqeIX0t1ZWLtNfVFr4TRP5hihI5ICrg/0OpqgisKsU2NFe9xyO hyJLYmfD8ebpDJ/9k30C7Iju9pVrwLm1QgS4S2fqJRcR+U4WbjvP7CgStCVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+iGEEExECACEFAklrALYCGwMHCwkIBwMCAQQV AggDBBYCAwECHgECF4AACgkQOM7KaQxqam6/igCgn+z2k3V5ggNppmWrZstt1U2lugsAoL7L wS9V9yLtil3oWmHtwpUqYruEuQINBElrAAcQCAD3ZLMIsP4CIDoJORg+YY0lqLVBgcnF7pFb 4Uy2+KvdWofN+DKH61rZLjgXXkNE9M4EQC1B4lGttBP8IY2gs41y3AUogGdyFbidq99rCBz7 LTsgARHwFxZoaHmXyiZLEU1QZuMqwPZV1mCviRhN5E3rRqYNXVcrnXAAuhBpvNyj/ntHvcDN 2/m+ochiuBYueU4kX3lHya7sOj+mTsndcWmQ9soOUyr8O0r/BG088bMn4qqtUw4dl5/pglXk jbl7uOOPinKf0WVd2r6M0wLPJCD4NPHrCWRLLLAjwfjrtoSRvXxDbXhCdgGBa72+K8eYLzVs hgq7tJOoBWzjVK6XRxR7AAMGB/9Mo3iJ2DxqDecd02KCB5BsFDICbJGhPltU7FwrtbC7djSb XUrwsEVLHi4st4cbdGNCWCrp0BRezXZKohKnNAPFOTK++ZfgeKxrV2sJod+Q9RILF86tQ4XF 7A7Yme5hy92t/WgiU4vc/fWbgP8gV/19f8nunaT2E9NSa70mZFjZNu4iuwThoUUO5CV3Wo0Y UISsnRK8XD1+LR3A2qVyLiFRwh/miC1hgLFCTGCQ3GLxZeZzIpYSlGdQJ0L5lixW5ZQD9r1I 8i/8zhE6qRFAM0upUMI3Gt1Oq2w03DiXrZU0Fu/R8Rm8rlnkQKA+95mRTUq1xL5P5NZIi4gJ Z569OPMFiEkEGBECAAkFAklrAAcCGwwACgkQOM7KaQxqam41igCfbaldnFTu5uAdrnrghESv EI3CAo8AoLkNMks1pThl2BJNRm4CtTK9xZeH Message-ID: <0100016a32795509-76b9c94b-0bd6-4c2a-8856-8fe032a4e138-000000@email.amazonses.com> Date: Thu, 18 Apr 2019 22:02:53 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <201811241747.wAOHlr6W029937@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2019.04.18-54.240.8.13 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-Rspamd-Queue-Id: 7504082B35 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tarsnap.com header.s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57 header.b=BbJ8J/xO; dkim=pass header.d=amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=cP3XgOKH; spf=pass (mx1.freebsd.org: domain of 0100016a32795509-76b9c94b-0bd6-4c2a-8856-8fe032a4e138-000000@amazonses.com designates 54.240.8.13 as permitted sender) smtp.mailfrom=0100016a32795509-76b9c94b-0bd6-4c2a-8856-8fe032a4e138-000000@amazonses.com X-Spamd-Result: default: False [-2.42 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[tarsnap.com:s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57,amazonses.com:s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:54.240.0.0/18]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[tarsnap.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[tarsnap.com:+,amazonses.com:+]; MX_GOOD(-0.01)[cached: feedback-smtp.us-east-1.amazonses.com]; RCVD_IN_DNSWL_NONE(0.00)[13.8.240.54.list.dnswl.org : 127.0.15.0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; FORGED_SENDER(0.30)[cperciva@tarsnap.com,0100016a32795509-76b9c94b-0bd6-4c2a-8856-8fe032a4e138-000000@amazonses.com]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-1.75)[ip: (-1.04), ipnet: 54.240.8.0/21(-4.59), asn: 14618(-3.07), country: US(-0.06)]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[cperciva@tarsnap.com,0100016a32795509-76b9c94b-0bd6-4c2a-8856-8fe032a4e138-000000@amazonses.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 22:03:01 -0000 On 11/24/18 9:47 AM, Glen Barber wrote: > Author: gjb > Date: Sat Nov 24 17:47:53 2018 > New Revision: 340905 > URL: https://svnweb.freebsd.org/changeset/base/340905 > > Log: > Revert r340161 in stable/12, setting the default pkg(8) repository back > to 'latest' from 'quarterly' prior to branching releng/12.0. It looks like this is incorrect for non-x86 architectures. Portmgr may correct me here, but it looks like "latest" builds are only done on non-x86 architectures on HEAD. (The same problem also applies on stable/11.) I'm guessing that the answer here is to have different package configurations installed depending on the architecture; I knew how to do this with the old style of src/etc but I'm not sure how to do it now that pkgbase has spread configuration files all over the tree. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@freebsd.org Thu Apr 18 22:52:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49A0C157E9C1; Thu, 18 Apr 2019 22:52:13 +0000 (UTC) (envelope-from imp@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 DECBA84285; Thu, 18 Apr 2019 22:52:12 +0000 (UTC) (envelope-from imp@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 BA94C25AC4; Thu, 18 Apr 2019 22:52:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IMqCMI040414; Thu, 18 Apr 2019 22:52:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IMqC53040413; Thu, 18 Apr 2019 22:52:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201904182252.x3IMqC53040413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 18 Apr 2019 22:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346359 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 346359 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DECBA84285 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 22:52:13 -0000 Author: imp Date: Thu Apr 18 22:52:12 2019 New Revision: 346359 URL: https://svnweb.freebsd.org/changeset/base/346359 Log: When parsing command line stuff, treat tabs and spaces the same. When creating complex config files, people like to use tabs to offset sections. Treat them the same as spaces for delimiters. Modified: head/sys/kern/subr_boot.c Modified: head/sys/kern/subr_boot.c ============================================================================== --- head/sys/kern/subr_boot.c Thu Apr 18 20:48:54 2019 (r346358) +++ head/sys/kern/subr_boot.c Thu Apr 18 22:52:12 2019 (r346359) @@ -199,13 +199,13 @@ boot_parse_cmdline_delim(char *cmdline, const char *de } /** - * @brief Simplified interface for common 'space separated' args + * @brief Simplified interface for common 'space or tab separated' args */ int boot_parse_cmdline(char *cmdline) { - return (boot_parse_cmdline_delim(cmdline, " \n")); + return (boot_parse_cmdline_delim(cmdline, " \t\n")); } /** From owner-svn-src-all@freebsd.org Thu Apr 18 23:21:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C592157F205; Thu, 18 Apr 2019 23:21:27 +0000 (UTC) (envelope-from jhb@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 9FACD84FEF; Thu, 18 Apr 2019 23:21:26 +0000 (UTC) (envelope-from jhb@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 8615F25FA4; Thu, 18 Apr 2019 23:21:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3INLQK0054164; Thu, 18 Apr 2019 23:21:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3INLQYs054163; Thu, 18 Apr 2019 23:21:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201904182321.x3INLQYs054163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 18 Apr 2019 23:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346360 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 346360 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9FACD84FEF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 23:21:27 -0000 Author: jhb Date: Thu Apr 18 23:21:26 2019 New Revision: 346360 URL: https://svnweb.freebsd.org/changeset/base/346360 Log: Push down INP_WLOCK slightly in tcp_ctloutput. The inp lock is not needed for testing the V6 flag as that flag is set once when the inp is created and never changes. For non-TCP socket options the lock is immediately dropped after checking that flag. This just pushes the lock down to only be acquired for TCP socket options. This isn't a hot-path, more a cosmetic cleanup I noticed while reading the code. Reviewed by: bz MFC after: 1 month Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19740 Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Thu Apr 18 22:52:12 2019 (r346359) +++ head/sys/netinet/tcp_usrreq.c Thu Apr 18 23:21:26 2019 (r346360) @@ -1578,11 +1578,9 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt) error = 0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_ctloutput: inp == NULL")); - INP_WLOCK(inp); if (sopt->sopt_level != IPPROTO_TCP) { #ifdef INET6 if (inp->inp_vflag & INP_IPV6PROTO) { - INP_WUNLOCK(inp); error = ip6_ctloutput(so, sopt); /* * In case of the IPV6_USE_MIN_MTU socket option, @@ -1627,12 +1625,12 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt) #endif #ifdef INET { - INP_WUNLOCK(inp); error = ip_ctloutput(so, sopt); } #endif return (error); } + INP_WLOCK(inp); if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { INP_WUNLOCK(inp); return (ECONNRESET); From owner-svn-src-all@freebsd.org Fri Apr 19 00:31:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21A5D158050B; Fri, 19 Apr 2019 00:31:07 +0000 (UTC) (envelope-from cem@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 BDBA286B7D; Fri, 19 Apr 2019 00:31:06 +0000 (UTC) (envelope-from cem@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 988AA26A2A; Fri, 19 Apr 2019 00:31:06 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3J0V6jt089908; Fri, 19 Apr 2019 00:31:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J0V5em089899; Fri, 19 Apr 2019 00:31:05 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201904190031.x3J0V5em089899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 19 Apr 2019 00:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r346361 - in vendor/zstd/dist: . contrib/adaptive-compression contrib/docker contrib/experimental_dict_builders contrib/experimental_dict_builders/benchmarkDictBuilder contrib/experimen... X-SVN-Group: vendor X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in vendor/zstd/dist: . contrib/adaptive-compression contrib/docker contrib/experimental_dict_builders contrib/experimental_dict_builders/benchmarkDictBuilder contrib/experimental_dict_builders/fastCov... X-SVN-Commit-Revision: 346361 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BDBA286B7D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2019 00:31:07 -0000 Author: cem Date: Fri Apr 19 00:31:04 2019 New Revision: 346361 URL: https://svnweb.freebsd.org/changeset/base/346361 Log: import zstd 1.4.0 Added: vendor/zstd/dist/CHANGELOG vendor/zstd/dist/contrib/docker/ vendor/zstd/dist/contrib/docker/Dockerfile vendor/zstd/dist/contrib/docker/README.md vendor/zstd/dist/contrib/experimental_dict_builders/ vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/ vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/Makefile (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/README.md vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/benchmark.c (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/dictBuilder.h (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/test.sh (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/fastCover/ vendor/zstd/dist/contrib/experimental_dict_builders/fastCover/Makefile (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/fastCover/README.md vendor/zstd/dist/contrib/experimental_dict_builders/fastCover/fastCover.c (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/fastCover/fastCover.h (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/fastCover/main.c (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/fastCover/test.sh (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/ vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/Makefile (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/README.md vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/io.c (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/io.h (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/main.c (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/random.c (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/random.h (contents, props changed) vendor/zstd/dist/contrib/experimental_dict_builders/randomDictBuilder/test.sh (contents, props changed) vendor/zstd/dist/contrib/largeNbDicts/ vendor/zstd/dist/contrib/largeNbDicts/Makefile (contents, props changed) vendor/zstd/dist/contrib/largeNbDicts/README.md vendor/zstd/dist/contrib/largeNbDicts/largeNbDicts.c (contents, props changed) vendor/zstd/dist/contrib/premake/ vendor/zstd/dist/contrib/premake/premake4.lua (contents, props changed) vendor/zstd/dist/contrib/premake/zstd.lua (contents, props changed) vendor/zstd/dist/contrib/snap/ vendor/zstd/dist/contrib/snap/snapcraft.yaml vendor/zstd/dist/examples/ vendor/zstd/dist/examples/.gitignore vendor/zstd/dist/examples/Makefile (contents, props changed) vendor/zstd/dist/examples/README.md vendor/zstd/dist/examples/common.h (contents, props changed) vendor/zstd/dist/examples/dictionary_compression.c (contents, props changed) vendor/zstd/dist/examples/dictionary_decompression.c (contents, props changed) vendor/zstd/dist/examples/multiple_simple_compression.c (contents, props changed) vendor/zstd/dist/examples/multiple_streaming_compression.c (contents, props changed) vendor/zstd/dist/examples/simple_compression.c (contents, props changed) vendor/zstd/dist/examples/simple_decompression.c (contents, props changed) vendor/zstd/dist/examples/streaming_compression.c (contents, props changed) vendor/zstd/dist/examples/streaming_decompression.c (contents, props changed) vendor/zstd/dist/examples/streaming_memory_usage.c (contents, props changed) vendor/zstd/dist/programs/timefn.c (contents, props changed) vendor/zstd/dist/programs/timefn.h (contents, props changed) vendor/zstd/dist/tests/fuzz/dictionary_decompress.c (contents, props changed) vendor/zstd/dist/tests/fuzz/dictionary_round_trip.c (contents, props changed) Modified: vendor/zstd/dist/Makefile vendor/zstd/dist/README.md vendor/zstd/dist/contrib/adaptive-compression/Makefile vendor/zstd/dist/contrib/adaptive-compression/adapt.c vendor/zstd/dist/contrib/pzstd/Makefile vendor/zstd/dist/contrib/pzstd/Pzstd.cpp vendor/zstd/dist/contrib/pzstd/utils/Range.h vendor/zstd/dist/contrib/pzstd/utils/ResourcePool.h vendor/zstd/dist/doc/README.md vendor/zstd/dist/doc/educational_decoder/Makefile vendor/zstd/dist/doc/educational_decoder/zstd_decompress.c vendor/zstd/dist/doc/zstd_manual.html vendor/zstd/dist/lib/Makefile vendor/zstd/dist/lib/README.md vendor/zstd/dist/lib/common/compiler.h vendor/zstd/dist/lib/common/fse.h vendor/zstd/dist/lib/common/threading.c vendor/zstd/dist/lib/common/xxhash.c vendor/zstd/dist/lib/common/zstd_internal.h vendor/zstd/dist/lib/compress/fse_compress.c vendor/zstd/dist/lib/compress/zstd_compress.c vendor/zstd/dist/lib/compress/zstd_compress_internal.h vendor/zstd/dist/lib/compress/zstd_fast.c vendor/zstd/dist/lib/compress/zstd_lazy.h vendor/zstd/dist/lib/compress/zstd_ldm.c vendor/zstd/dist/lib/compress/zstd_opt.c vendor/zstd/dist/lib/compress/zstdmt_compress.c vendor/zstd/dist/lib/compress/zstdmt_compress.h vendor/zstd/dist/lib/decompress/zstd_ddict.c vendor/zstd/dist/lib/decompress/zstd_decompress.c vendor/zstd/dist/lib/decompress/zstd_decompress_block.c vendor/zstd/dist/lib/decompress/zstd_decompress_internal.h vendor/zstd/dist/lib/dictBuilder/cover.c vendor/zstd/dist/lib/dictBuilder/cover.h vendor/zstd/dist/lib/dictBuilder/fastcover.c vendor/zstd/dist/lib/dictBuilder/zdict.h vendor/zstd/dist/lib/legacy/zstd_legacy.h vendor/zstd/dist/lib/legacy/zstd_v01.c vendor/zstd/dist/lib/legacy/zstd_v01.h vendor/zstd/dist/lib/legacy/zstd_v02.c vendor/zstd/dist/lib/legacy/zstd_v02.h vendor/zstd/dist/lib/legacy/zstd_v03.c vendor/zstd/dist/lib/legacy/zstd_v03.h vendor/zstd/dist/lib/legacy/zstd_v04.c vendor/zstd/dist/lib/legacy/zstd_v04.h vendor/zstd/dist/lib/legacy/zstd_v05.c vendor/zstd/dist/lib/legacy/zstd_v05.h vendor/zstd/dist/lib/legacy/zstd_v06.c vendor/zstd/dist/lib/legacy/zstd_v06.h vendor/zstd/dist/lib/legacy/zstd_v07.c vendor/zstd/dist/lib/legacy/zstd_v07.h vendor/zstd/dist/lib/zstd.h vendor/zstd/dist/programs/Makefile vendor/zstd/dist/programs/benchfn.c vendor/zstd/dist/programs/benchfn.h vendor/zstd/dist/programs/benchzstd.c vendor/zstd/dist/programs/benchzstd.h vendor/zstd/dist/programs/dibio.c vendor/zstd/dist/programs/fileio.c vendor/zstd/dist/programs/fileio.h vendor/zstd/dist/programs/platform.h vendor/zstd/dist/programs/util.c vendor/zstd/dist/programs/util.h vendor/zstd/dist/programs/zstd.1 vendor/zstd/dist/programs/zstd.1.md vendor/zstd/dist/programs/zstdcli.c vendor/zstd/dist/programs/zstdgrep vendor/zstd/dist/tests/Makefile vendor/zstd/dist/tests/README.md vendor/zstd/dist/tests/decodecorpus.c vendor/zstd/dist/tests/fullbench.c vendor/zstd/dist/tests/fuzz/Makefile vendor/zstd/dist/tests/fuzz/README.md vendor/zstd/dist/tests/fuzz/fuzz.py vendor/zstd/dist/tests/fuzz/fuzz_helpers.h vendor/zstd/dist/tests/fuzz/regression_driver.c vendor/zstd/dist/tests/fuzz/simple_round_trip.c vendor/zstd/dist/tests/fuzz/stream_decompress.c vendor/zstd/dist/tests/fuzz/stream_round_trip.c vendor/zstd/dist/tests/fuzz/zstd_helpers.c vendor/zstd/dist/tests/fuzz/zstd_helpers.h vendor/zstd/dist/tests/fuzzer.c vendor/zstd/dist/tests/legacy.c vendor/zstd/dist/tests/paramgrill.c vendor/zstd/dist/tests/playTests.sh vendor/zstd/dist/tests/poolTests.c vendor/zstd/dist/tests/regression/config.c vendor/zstd/dist/tests/regression/method.c vendor/zstd/dist/tests/regression/results.csv vendor/zstd/dist/tests/regression/test.c vendor/zstd/dist/tests/roundTripCrash.c vendor/zstd/dist/tests/symbols.c vendor/zstd/dist/tests/zbufftest.c vendor/zstd/dist/tests/zstreamtest.c vendor/zstd/dist/zlibWrapper/Makefile vendor/zstd/dist/zlibWrapper/README.md vendor/zstd/dist/zlibWrapper/examples/fitblk.c vendor/zstd/dist/zlibWrapper/examples/fitblk_original.c vendor/zstd/dist/zlibWrapper/examples/zwrapbench.c vendor/zstd/dist/zlibWrapper/gzguts.h Added: vendor/zstd/dist/CHANGELOG ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/zstd/dist/CHANGELOG Fri Apr 19 00:31:04 2019 (r346361) @@ -0,0 +1,461 @@ +v1.4.0 +perf: Improve level 1 compression speed in most scenarios by 6% by @gbtucker and @terrelln +api: Move the advanced API, including all functions in the staging section, to the stable section +api: Make ZSTD_e_flush and ZSTD_e_end block for maximum forward progress +api: Rename ZSTD_CCtxParam_getParameter to ZSTD_CCtxParams_getParameter +api: Rename ZSTD_CCtxParam_setParameter to ZSTD_CCtxParams_setParameter +api: Don't export ZSTDMT functions from the shared library by default +api: Require ZSTD_MULTITHREAD to be defined to use ZSTDMT +api: Add ZSTD_decompressBound() to provide an upper bound on decompressed size by @shakeelrao +api: Fix ZSTD_decompressDCtx() corner cases with a dictionary +api: Move ZSTD_getDictID_*() functions to the stable section +api: Add ZSTD_c_literalCompressionMode flag to enable or disable literal compression by @terrelln +api: Allow compression parameters to be set when a dictionary is used +api: Allow setting parameters before or after ZSTD_CCtx_loadDictionary() is called +api: Fix ZSTD_estimateCStreamSize_usingCCtxParams() +api: Setting ZSTD_d_maxWindowLog to 0 means use the default +cli: Ensure that a dictionary is not used to compress itself by @shakeelrao +cli: Add --[no-]compress-literals flag to enable or disable literal compression +doc: Update the examples to use the advanced API +doc: Explain how to transition from old streaming functions to the advanced API in the header +build: Improve the Windows release packages +build: Improve CMake build by @hjmjohnson +build: Build fixes for FreeBSD by @lwhsu +build: Remove redundant warnings by @thatsafunnyname +build: Fix tests on OpenBSD by @bket +build: Extend fuzzer build system to work with the new clang engine +build: CMake now creates the libzstd.so.1 symlink +build: Improve Menson build by @lzutao +misc: Fix symbolic link detection on FreeBSD +misc: Use physical core count for -T0 on FreeBSD by @cemeyer +misc: Fix zstd --list on truncated files by @kostmo +misc: Improve logging in debug mode by @felixhandte +misc: Add CirrusCI tests by @lwhsu +misc: Optimize dictionary memory usage in corner cases +misc: Improve the dictionary builder on small or homogeneous data +misc: Fix spelling across the repo by @jsoref + +v1.3.8 +perf: better decompression speed on large files (+7%) and cold dictionaries (+15%) +perf: slightly better compression ratio at high compression modes +api : finalized advanced API, last stage before "stable" status +api : new --rsyncable mode, by @terrelln +api : support decompression of empty frames into NULL (used to be an error) (#1385) +build: new set of macros to build a minimal size decoder, by @felixhandte +build: fix compilation on MIPS32, reported by @clbr (#1441) +build: fix compilation with multiple -arch flags, by @ryandesign +build: highly upgraded meson build, by @lzutao +build: improved buck support, by @obelisk +build: fix cmake script : can create debug build, by @pitrou +build: Makefile : grep works on both colored consoles and systems without color support +build: fixed zstd-pgo, by @bmwiedemann +cli : support ZSTD_CLEVEL environment variable, by @yijinfb (#1423) +cli : --no-progress flag, preserving final summary (#1371), by @terrelln +cli : ensure destination file is not source file (#1422) +cli : clearer error messages, especially when input file not present +doc : clarified zstd_compression_format.md, by @ulikunitz +misc: fixed zstdgrep, returns 1 on failure, by @lzutao +misc: NEWS renamed as CHANGELOG, in accordance with fboss + +v1.3.7 +perf: slightly better decompression speed on clang (depending on hardware target) +fix : performance of dictionary compression for small input < 4 KB at levels 9 and 10 +build: no longer build backtrace by default in release mode; restrict further automatic mode +build: control backtrace support through build macro BACKTRACE +misc: added man pages for zstdless and zstdgrep, by @samrussell + +v1.3.6 +perf: much faster dictionary builder, by @jenniferliu +perf: faster dictionary compression on small data when using multiple contexts, by @felixhandte +perf: faster dictionary decompression when using a very large number of dictionaries simultaneously +cli : fix : does no longer overwrite destination when source does not exist (#1082) +cli : new command --adapt, for automatic compression level adaptation +api : fix : block api can be streamed with > 4 GB, reported by @catid +api : reduced ZSTD_DDict size by 2 KB +api : minimum negative compression level is defined, and can be queried using ZSTD_minCLevel(). +build: support Haiku target, by @korli +build: Read Legacy format is limited to v0.5+ by default. Can be changed at compile time with macro ZSTD_LEGACY_SUPPORT. +doc : zstd_compression_format.md updated to match wording in IETF RFC 8478 +misc: tests/paramgrill, a parameter optimizer, by @GeorgeLu97 + +v1.3.5 +perf: much faster dictionary compression, by @felixhandte +perf: small quality improvement for dictionary generation, by @terrelln +perf: slightly improved high compression levels (notably level 19) +mem : automatic memory release for long duration contexts +cli : fix : overlapLog can be manually set +cli : fix : decoding invalid lz4 frames +api : fix : performance degradation for dictionary compression when using advanced API, by @terrelln +api : change : clarify ZSTD_CCtx_reset() vs ZSTD_CCtx_resetParameters(), by @terrelln +build: select custom libzstd scope through control macros, by @GeorgeLu97 +build: OpenBSD patch, by @bket +build: make and make all are compatible with -j +doc : clarify zstd_compression_format.md, updated for IETF RFC process +misc: pzstd compatible with reproducible compilation, by @lamby + +v1.3.4 +perf: faster speed (especially decoding speed) on recent cpus (haswell+) +perf: much better performance associating --long with multi-threading, by @terrelln +perf: better compression at levels 13-15 +cli : asynchronous compression by default, for faster experience (use --single-thread for former behavior) +cli : smoother status report in multi-threading mode +cli : added command --fast=#, for faster compression modes +cli : fix crash when not overwriting existing files, by Pádraig Brady (@pixelb) +api : `nbThreads` becomes `nbWorkers` : 1 triggers asynchronous mode +api : compression levels can be negative, for even more speed +api : ZSTD_getFrameProgression() : get precise progress status of ZSTDMT anytime +api : ZSTDMT can accept new compression parameters during compression +api : implemented all advanced dictionary decompression prototypes +build: improved meson recipe, by Shawn Landden (@shawnl) +build: VS2017 scripts, by @HaydnTrigg +misc: all /contrib projects fixed +misc: added /contrib/docker script by @gyscos + +v1.3.3 +perf: faster zstd_opt strategy (levels 16-19) +fix : bug #944 : multithreading with shared ditionary and large data, reported by @gsliepen +cli : fix : content size written in header by default +cli : fix : improved LZ4 format support, by @felixhandte +cli : new : hidden command `-S`, to benchmark multiple files while generating one result per file +api : fix : support large skippable frames, by @terrelln +api : fix : streaming interface was adding a useless 3-bytes null block to small frames +api : change : when setting `pledgedSrcSize`, use `ZSTD_CONTENTSIZE_UNKNOWN` macro value to mean "unknown" +build: fix : compilation under rhel6 and centos6, reported by @pixelb +build: added `check` target + +v1.3.2 +new : long range mode, using --long command, by Stella Lau (@stellamplau) +new : ability to generate and decode magicless frames (#591) +changed : maximum nb of threads reduced to 200, to avoid address space exhaustion in 32-bits mode +fix : multi-threading compression works with custom allocators +fix : ZSTD_sizeof_CStream() was over-evaluating memory usage +fix : a rare compression bug when compression generates very large distances and bunch of other conditions (only possible at --ultra -22) +fix : 32-bits build can now decode large offsets (levels 21+) +cli : added LZ4 frame support by default, by Felix Handte (@felixhandte) +cli : improved --list output +cli : new : can split input file for dictionary training, using command -B# +cli : new : clean operation artefact on Ctrl-C interruption +cli : fix : do not change /dev/null permissions when using command -t with root access, reported by @mike155 (#851) +cli : fix : write file size in header in multiple-files mode +api : added macro ZSTD_COMPRESSBOUND() for static allocation +api : experimental : new advanced decompression API +api : fix : sizeof_CCtx() used to over-estimate +build: fix : no-multithread variant compiles without pool.c dependency, reported by Mitchell Blank Jr (@mitchblank) (#819) +build: better compatibility with reproducible builds, by Bernhard M. Wiedemann (@bmwiedemann) (#818) +example : added streaming_memory_usage +license : changed /examples license to BSD + GPLv2 +license : fix a few header files to reflect new license (#825) + +v1.3.1 +New license : BSD + GPLv2 +perf: substantially decreased memory usage in Multi-threading mode, thanks to reports by Tino Reichardt (@mcmilk) +perf: Multi-threading supports up to 256 threads. Cap at 256 when more are requested (#760) +cli : improved and fixed --list command, by @ib (#772) +cli : command -vV to list supported formats, by @ib (#771) +build : fixed binary variants, reported by @svenha (#788) +build : fix Visual compilation for non x86/x64 targets, reported by Greg Slazinski (@GregSlazinski) (#718) +API exp : breaking change : ZSTD_getframeHeader() provides more information +API exp : breaking change : pinned down values of error codes +doc : fixed huffman example, by Ulrich Kunitz (@ulikunitz) +new : contrib/adaptive-compression, I/O driven compression strength, by Paul Cruz (@paulcruz74) +new : contrib/long_distance_matching, statistics by Stella Lau (@stellamplau) +updated : contrib/linux-kernel, by Nick Terrell (@terrelln) + +v1.3.0 +cli : new : `--list` command, by Paul Cruz +cli : changed : xz/lzma support enabled by default +cli : changed : `-t *` continue processing list after a decompression error +API : added : ZSTD_versionString() +API : promoted to stable status : ZSTD_getFrameContentSize(), by Sean Purcell +API exp : new advanced API : ZSTD_compress_generic(), ZSTD_CCtx_setParameter() +API exp : new : API for static or external allocation : ZSTD_initStatic?Ctx() +API exp : added : ZSTD_decompressBegin_usingDDict(), requested by Guy Riddle (#700) +API exp : clarified memory estimation / measurement functions. +API exp : changed : strongest strategy renamed ZSTD_btultra, fastest strategy ZSTD_fast set to 1 +tools : decodecorpus can generate random dictionary-compressed samples, by Paul Cruz +new : contrib/seekable_format, demo and API, by Sean Purcell +changed : contrib/linux-kernel, updated version and license, by Nick Terrell + +v1.2.0 +cli : changed : Multithreading enabled by default (use target zstd-nomt or HAVE_THREAD=0 to disable) +cli : new : command -T0 means "detect and use nb of cores", by Sean Purcell +cli : new : zstdmt symlink hardwired to `zstd -T0` +cli : new : command --threads=# (#671) +cli : changed : cover dictionary builder by default, for improved quality, by Nick Terrell +cli : new : commands --train-cover and --train-legacy, to select dictionary algorithm and parameters +cli : experimental targets `zstd4` and `xzstd4`, with support for lz4 format, by Sean Purcell +cli : fix : does not output compressed data on console +cli : fix : ignore symbolic links unless --force specified, +API : breaking change : ZSTD_createCDict_advanced(), only use compressionParameters as argument +API : added : prototypes ZSTD_*_usingCDict_advanced(), for direct control over frameParameters. +API : improved: ZSTDMT_compressCCtx() reduced memory usage +API : fix : ZSTDMT_compressCCtx() now provides srcSize in header (#634) +API : fix : src size stored in frame header is controlled at end of frame +API : fix : enforced consistent rules for pledgedSrcSize==0 (#641) +API : fix : error code "GENERIC" replaced by "dstSizeTooSmall" when appropriate +build: improved cmake script, by @Majlen +build: enabled Multi-threading support for *BSD, by Baptiste Daroussin +tools: updated Paramgrill. Command -O# provides best parameters for sample and speed target. +new : contrib/linux-kernel version, by Nick Terrell + +v1.1.4 +cli : new : can compress in *.gz format, using --format=gzip command, by Przemyslaw Skibinski +cli : new : advanced benchmark command --priority=rt +cli : fix : write on sparse-enabled file systems in 32-bits mode, by @ds77 +cli : fix : --rm remains silent when input is stdin +cli : experimental : xzstd, with support for xz/lzma decoding, by Przemyslaw Skibinski +speed : improved decompression speed in streaming mode for single shot scenarios (+5%) +memory: DDict (decompression dictionary) memory usage down from 150 KB to 20 KB +arch: 32-bits variant able to generate and decode very long matches (>32 MB), by Sean Purcell +API : new : ZSTD_findFrameCompressedSize(), ZSTD_getFrameContentSize(), ZSTD_findDecompressedSize() +API : changed : dropped support of legacy versions <= v0.3 (can be changed by modifying ZSTD_LEGACY_SUPPORT value) +build : new: meson build system in contrib/meson, by Dima Krasner +build : improved cmake script, by @Majlen +build : added -Wformat-security flag, as recommended by Padraig Brady +doc : new : educational decoder, by Sean Purcell + +v1.1.3 +cli : zstd can decompress .gz files (can be disabled with `make zstd-nogz` or `make HAVE_ZLIB=0`) +cli : new : experimental target `make zstdmt`, with multi-threading support +cli : new : improved dictionary builder "cover" (experimental), by Nick Terrell, based on prior work by Giuseppe Ottaviano. +cli : new : advanced commands for detailed parameters, by Przemyslaw Skibinski +cli : fix zstdless on Mac OS-X, by Andrew Janke +cli : fix #232 "compress non-files" +dictBuilder : improved dictionary generation quality, thanks to Nick Terrell +API : new : lib/compress/ZSTDMT_compress.h multithreading API (experimental) +API : new : ZSTD_create?Dict_byReference(), requested by Bartosz Taudul +API : new : ZDICT_finalizeDictionary() +API : fix : ZSTD_initCStream_usingCDict() properly writes dictID into frame header, by Gregory Szorc (#511) +API : fix : all symbols properly exposed in libzstd, by Nick Terrell +build : support for Solaris target, by Przemyslaw Skibinski +doc : clarified specification, by Sean Purcell + +v1.1.2 +API : streaming : decompression : changed : automatic implicit reset when chain-decoding new frames without init +API : experimental : added : dictID retrieval functions, and ZSTD_initCStream_srcSize() +API : zbuff : changed : prototypes now generate deprecation warnings +lib : improved : faster decompression speed at ultra compression settings and 32-bits mode +lib : changed : only public ZSTD_ symbols are now exposed +lib : changed : reduced usage of stack memory +lib : fixed : several corner case bugs, by Nick Terrell +cli : new : gzstd, experimental version able to decode .gz files, by Przemyslaw Skibinski +cli : new : preserve file attributes +cli : new : added zstdless and zstdgrep tools +cli : fixed : status displays total amount decoded, even for file consisting of multiple frames (like pzstd) +cli : fixed : zstdcat +zlib_wrapper : added support for gz* functions, by Przemyslaw Skibinski +install : better compatibility with FreeBSD, by Dimitry Andric +source tree : changed : zbuff source files moved to lib/deprecated + +v1.1.1 +New : command -M#, --memory=, --memlimit=, --memlimit-decompress= to limit allowed memory consumption +New : doc/zstd_manual.html, by Przemyslaw Skibinski +Improved : slightly better compression ratio at --ultra levels (>= 20) +Improved : better memory usage when using streaming compression API, thanks to @Rogier-5 report +Added : API : ZSTD_initCStream_usingCDict(), ZSTD_initDStream_usingDDict() (experimental section) +Added : example/multiple_streaming_compression.c +Changed : zstd_errors.h is now installed within /include (and replaces errors_public.h) +Updated man page +Fixed : zstd-small, zstd-compress and zstd-decompress compilation targets + +v1.1.0 +New : contrib/pzstd, parallel version of zstd, by Nick Terrell +added : NetBSD install target (#338) +Improved : speed for batches of small files +Improved : speed of zlib wrapper, by Przemyslaw Skibinski +Changed : libzstd on Windows supports legacy formats, by Christophe Chevalier +Fixed : CLI -d output to stdout by default when input is stdin (#322) +Fixed : CLI correctly detects console on Mac OS-X +Fixed : CLI supports recursive mode `-r` on Mac OS-X +Fixed : Legacy decoders use unified error codes, reported by benrg (#341), fixed by Przemyslaw Skibinski +Fixed : compatibility with OpenBSD, reported by Juan Francisco Cantero Hurtado (#319) +Fixed : compatibility with Hurd, by Przemyslaw Skibinski (#365) +Fixed : zstd-pgo, reported by octoploid (#329) + +v1.0.0 +Change Licensing, all project is now BSD, Copyright Facebook +Small decompression speed improvement +API : Streaming API supports legacy format +API : ZDICT_getDictID(), ZSTD_sizeof_{CCtx, DCtx, CStream, DStream}(), ZSTD_setDStreamParameter() +CLI supports legacy formats v0.4+ +Fixed : compression fails on certain huge files, reported by Jesse McGrew +Enhanced documentation, by Przemyslaw Skibinski + +v0.8.1 +New streaming API +Changed : --ultra now enables levels beyond 19 +Changed : -i# now selects benchmark time in second +Fixed : ZSTD_compress* can now compress > 4 GB in a single pass, reported by Nick Terrell +Fixed : speed regression on specific patterns (#272) +Fixed : support for Z_SYNC_FLUSH, by Dmitry Krot (#291) +Fixed : ICC compilation, by Przemyslaw Skibinski + +v0.8.0 +Improved : better speed on clang and gcc -O2, thanks to Eric Biggers +New : Build on FreeBSD and DragonFly, thanks to JrMarino +Changed : modified API : ZSTD_compressEnd() +Fixed : legacy mode with ZSTD_HEAPMODE=0, by Christopher Bergqvist +Fixed : premature end of frame when zero-sized raw block, reported by Eric Biggers +Fixed : large dictionaries (> 384 KB), reported by Ilona Papava +Fixed : checksum correctly checked in single-pass mode +Fixed : combined --test amd --rm, reported by Andreas M. Nilsson +Modified : minor compression level adaptations +Updated : compression format specification to v0.2.0 +changed : zstd.h moved to /lib directory + +v0.7.5 +Transition version, supporting decoding of v0.8.x + +v0.7.4 +Added : homebrew for Mac, by Daniel Cade +Added : more examples +Fixed : segfault when using small dictionaries, reported by Felix Handte +Modified : default compression level for CLI is now 3 +Updated : specification, to v0.1.1 + +v0.7.3 +New : compression format specification +New : `--` separator, stating that all following arguments are file names. Suggested by Chip Turner. +New : `ZSTD_getDecompressedSize()` +New : OpenBSD target, by Juan Francisco Cantero Hurtado +New : `examples` directory +fixed : dictBuilder using HC levels, reported by Bartosz Taudul +fixed : legacy support from ZSTD_decompress_usingDDict(), reported by Felix Handte +fixed : multi-blocks decoding with intermediate uncompressed blocks, reported by Greg Slazinski +modified : removed "mem.h" and "error_public.h" dependencies from "zstd.h" (experimental section) +modified : legacy functions no longer need magic number + +v0.7.2 +fixed : ZSTD_decompressBlock() using multiple consecutive blocks. Reported by Greg Slazinski. +fixed : potential segfault on very large files (many gigabytes). Reported by Chip Turner. +fixed : CLI displays system error message when destination file cannot be created (#231). Reported by Chip Turner. + +v0.7.1 +fixed : ZBUFF_compressEnd() called multiple times with too small `dst` buffer, reported by Christophe Chevalier +fixed : dictBuilder fails if first sample is too small, reported by Руслан Ковалёв +fixed : corruption issue, reported by cj +modified : checksum enabled by default in command line mode + +v0.7.0 +New : Support for directory compression, using `-r`, thanks to Przemyslaw Skibinski +New : Command `--rm`, to remove source file after successful de/compression +New : Visual build scripts, by Christophe Chevalier +New : Support for Sparse File-systems (do not use space for zero-filled sectors) +New : Frame checksum support +New : Support pass-through mode (when using `-df`) +API : more efficient Dictionary API : `ZSTD_compress_usingCDict()`, `ZSTD_decompress_usingDDict()` +API : create dictionary files from custom content, by Giuseppe Ottaviano +API : support for custom malloc/free functions +New : controllable Dictionary ID +New : Support for skippable frames + +v0.6.1 +New : zlib wrapper API, thanks to Przemyslaw Skibinski +New : Ability to compile compressor / decompressor separately +Changed : new lib directory structure +Fixed : Legacy codec v0.5 compatible with dictionary decompression +Fixed : Decoder corruption error (#173) +Fixed : null-string roundtrip (#176) +New : benchmark mode can select directory as input +Experimental : midipix support, VMS support + +v0.6.0 +Stronger high compression modes, thanks to Przemyslaw Skibinski +API : ZSTD_getFrameParams() provides size of decompressed content +New : highest compression modes require `--ultra` command to fully unleash their capacity +Fixed : zstd cli return error code > 0 and removes dst file artifact when decompression fails, thanks to Chip Turner + +v0.5.1 +New : Optimal parsing => Very high compression modes, thanks to Przemyslaw Skibinski +Changed : Dictionary builder integrated into libzstd and zstd cli +Changed (!) : zstd cli now uses "multiple input files" as default mode. See `zstd -h`. +Fix : high compression modes for big-endian platforms +New : zstd cli : `-t` | `--test` command + +v0.5.0 +New : dictionary builder utility +Changed : streaming & dictionary API +Improved : better compression of small data + +v0.4.7 +Improved : small compression speed improvement in HC mode +Changed : `zstd_decompress.c` has ZSTD_LEGACY_SUPPORT to 0 by default +fix : bt search bug + +v0.4.6 +fix : fast compression mode on Windows +New : cmake configuration file, thanks to Artyom Dymchenko +Improved : high compression mode on repetitive data +New : block-level API +New : ZSTD_duplicateCCtx() + +v0.4.5 +new : -m/--multiple : compress/decompress multiple files + +v0.4.4 +Fixed : high compression modes for Windows 32 bits +new : external dictionary API extended to buffered mode and accessible through command line +new : windows DLL project, thanks to Christophe Chevalier + +v0.4.3 : +new : external dictionary API +new : zstd-frugal + +v0.4.2 : +Generic minor improvements for small blocks +Fixed : big-endian compatibility, by Peter Harris (#85) + +v0.4.1 +Fixed : ZSTD_LEGACY_SUPPORT=0 build mode (reported by Luben) +removed `zstd.c` + +v0.4.0 +Command line utility compatible with high compression levels +Removed zstdhc => merged into zstd +Added : ZBUFF API (see zstd_buffered.h) +Rolling buffer support + +v0.3.6 +small blocks params + +v0.3.5 +minor generic compression improvements + +v0.3.4 +Faster fast cLevels + +v0.3.3 +Small compression ratio improvement + +v0.3.2 +Fixed Visual Studio + +v0.3.1 : +Small compression ratio improvement + +v0.3 +HC mode : compression levels 2-26 + +v0.2.2 +Fix : Visual Studio 2013 & 2015 release compilation, by Christophe Chevalier + +v0.2.1 +Fix : Read errors, advanced fuzzer tests, by Hanno Böck + +v0.2.0 +**Breaking format change** +Faster decompression speed +Can still decode v0.1 format + +v0.1.3 +fix uninitialization warning, reported by Evan Nemerson + +v0.1.2 +frame concatenation support + +v0.1.1 +fix compression bug +detects write-flush errors + +v0.1.0 +first release Modified: vendor/zstd/dist/Makefile ============================================================================== --- vendor/zstd/dist/Makefile Thu Apr 18 23:21:26 2019 (r346360) +++ vendor/zstd/dist/Makefile Fri Apr 19 00:31:04 2019 (r346361) @@ -156,7 +156,7 @@ list: done \ } | column -t -s $$'\t' -.PHONY: install clangtest armtest usan asan uasan +.PHONY: install armtest usan asan uasan install: @$(MAKE) -C $(ZSTDDIR) $@ @$(MAKE) -C $(PRGDIR) $@ @@ -188,7 +188,7 @@ gcc7build: clean .PHONY: clangbuild clangbuild: clean clang -v - CXX=clang++ CC=clang $(MAKE) all MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" + CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" $(MAKE) all m32build: clean gcc -v @@ -231,10 +231,6 @@ gcc5test: clean gcc6test: clean gcc-6 -v $(MAKE) all CC=gcc-6 MOREFLAGS="-Werror" - -clangtest: clean - clang -v - $(MAKE) all CXX=clang++ CC=clang MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" armtest: clean $(MAKE) -C $(TESTDIR) datagen # use native, faster Modified: vendor/zstd/dist/README.md ============================================================================== --- vendor/zstd/dist/README.md Thu Apr 18 23:21:26 2019 (r346360) +++ vendor/zstd/dist/README.md Fri Apr 19 00:31:04 2019 (r346361) @@ -14,6 +14,7 @@ a list of known ports and bindings is provided on [Zst [![Build Status][travisDevBadge]][travisLink] [![Build status][AppveyorDevBadge]][AppveyorLink] [![Build status][CircleDevBadge]][CircleLink] +[![Build status][CirrusDevBadge]][CirrusLink] [travisDevBadge]: https://travis-ci.org/facebook/zstd.svg?branch=dev "Continuous Integration test suite" [travisLink]: https://travis-ci.org/facebook/zstd @@ -21,14 +22,16 @@ a list of known ports and bindings is provided on [Zst [AppveyorLink]: https://ci.appveyor.com/project/YannCollet/zstd-p0yf0 [CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite" [CircleLink]: https://circleci.com/gh/facebook/zstd +[CirrusDevBadge]: https://api.cirrus-ci.com/github/facebook/zstd.svg?branch=dev +[CirrusLink]: https://cirrus-ci.com/github/facebook/zstd ## Benchmarks For reference, several fast compression algorithms were tested and compared -on a server running Linux Debian (`Linux version 4.14.0-3-amd64`), -with a Core i7-6700K CPU @ 4.0GHz, +on a server running Arch Linux (`Linux version 5.0.5-arch1-1`), +with a Core i9-9900K CPU @ 5.0GHz, using [lzbench], an open-source in-memory benchmark by @inikep -compiled with [gcc] 7.3.0, +compiled with [gcc] 8.2.1, on the [Silesia compression corpus]. [lzbench]: https://github.com/inikep/lzbench @@ -37,14 +40,14 @@ on the [Silesia compression corpus]. | Compressor name | Ratio | Compression| Decompress.| | --------------- | ------| -----------| ---------- | -| **zstd 1.3.4 -1** | 2.877 | 470 MB/s | 1380 MB/s | -| zlib 1.2.11 -1 | 2.743 | 110 MB/s | 400 MB/s | -| brotli 1.0.2 -0 | 2.701 | 410 MB/s | 430 MB/s | -| quicklz 1.5.0 -1 | 2.238 | 550 MB/s | 710 MB/s | -| lzo1x 2.09 -1 | 2.108 | 650 MB/s | 830 MB/s | -| lz4 1.8.1 | 2.101 | 750 MB/s | 3700 MB/s | -| snappy 1.1.4 | 2.091 | 530 MB/s | 1800 MB/s | -| lzf 3.6 -1 | 2.077 | 400 MB/s | 860 MB/s | +| **zstd 1.4.0 -1** | 2.884 | 530 MB/s | 1360 MB/s | +| zlib 1.2.11 -1 | 2.743 | 110 MB/s | 440 MB/s | +| brotli 1.0.7 -0 | 2.701 | 430 MB/s | 470 MB/s | +| quicklz 1.5.0 -1 | 2.238 | 600 MB/s | 800 MB/s | +| lzo1x 2.09 -1 | 2.106 | 680 MB/s | 950 MB/s | +| lz4 1.8.3 | 2.101 | 800 MB/s | 4220 MB/s | +| snappy 1.1.4 | 2.073 | 580 MB/s | 2020 MB/s | +| lzf 3.6 -1 | 2.077 | 440 MB/s | 930 MB/s | [zlib]: http://www.zlib.net/ [LZ4]: http://www.lz4.org/ Modified: vendor/zstd/dist/contrib/adaptive-compression/Makefile ============================================================================== --- vendor/zstd/dist/contrib/adaptive-compression/Makefile Thu Apr 18 23:21:26 2019 (r346360) +++ vendor/zstd/dist/contrib/adaptive-compression/Makefile Fri Apr 19 00:31:04 2019 (r346361) @@ -13,7 +13,7 @@ CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDD CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wformat-security \ + -Wstrict-prototypes -Wundef \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls CFLAGS += $(DEBUGFLAGS) @@ -22,10 +22,10 @@ FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MULTITH all: adapt datagen -adapt: $(ZSTD_FILES) $(PRGDIR)/util.c adapt.c +adapt: $(ZSTD_FILES) $(PRGDIR)/util.c $(PRGDIR)/timefn.c adapt.c $(CC) $(FLAGS) $^ -o $@ -adapt-debug: $(ZSTD_FILES) $(PRGDIR)/util.c adapt.c +adapt-debug: $(ZSTD_FILES) $(PRGDIR)/util.c $(PRGDIR)/timefn.c adapt.c $(CC) $(FLAGS) -DDEBUG_MODE=2 $^ -o adapt datagen : $(PRGDIR)/datagen.c datagencli.c Modified: vendor/zstd/dist/contrib/adaptive-compression/adapt.c ============================================================================== --- vendor/zstd/dist/contrib/adaptive-compression/adapt.c Thu Apr 18 23:21:26 2019 (r346360) +++ vendor/zstd/dist/contrib/adaptive-compression/adapt.c Fri Apr 19 00:31:04 2019 (r346361) @@ -13,6 +13,7 @@ #include /* memset */ #include "zstd_internal.h" #include "util.h" +#include "timefn.h" /* UTIL_time_t, UTIL_getTime, UTIL_getSpanTimeMicro */ #define DISPLAY(...) fprintf(stderr, __VA_ARGS__) #define PRINT(...) fprintf(stdout, __VA_ARGS__) Added: vendor/zstd/dist/contrib/docker/Dockerfile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/zstd/dist/contrib/docker/Dockerfile Fri Apr 19 00:31:04 2019 (r346361) @@ -0,0 +1,20 @@ +# Dockerfile +# First image to build the binary +FROM alpine as builder + +RUN apk --no-cache add make gcc libc-dev +COPY . /src +RUN mkdir /pkg && cd /src && make && make DESTDIR=/pkg install + +# Second minimal image to only keep the built binary +FROM alpine + +# Copy the built files +COPY --from=builder /pkg / + +# Copy the license as well +RUN mkdir -p /usr/local/share/licenses/zstd +COPY --from=builder /src/LICENSE /usr/local/share/licences/zstd/ + +# Just run `zstd` if no other command is given +CMD ["/usr/local/bin/zstd"] Added: vendor/zstd/dist/contrib/docker/README.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/zstd/dist/contrib/docker/README.md Fri Apr 19 00:31:04 2019 (r346361) @@ -0,0 +1,20 @@ + +## Requirement + +The `Dockerfile` script requires a version of `docker` >= 17.05 + +## Installing docker + +The official docker install docs use a ppa with a modern version available: +https://docs.docker.com/install/linux/docker-ce/ubuntu/ + +## How to run + +`docker build -t zstd .` + +## test + +``` +echo foo | docker run -i --rm zstd | docker run -i --rm zstd zstdcat +foo +``` Added: vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/Makefile Fri Apr 19 00:31:04 2019 (r346361) @@ -0,0 +1,44 @@ +ARG := + +CC ?= gcc +CFLAGS ?= -O3 +INCLUDES := -I ../randomDictBuilder -I ../../../programs -I ../../../lib/common -I ../../../lib -I ../../../lib/dictBuilder + +RANDOM_FILE := ../randomDictBuilder/random.c +IO_FILE := ../randomDictBuilder/io.c + +all: run clean + +.PHONY: run +run: benchmark + echo "Benchmarking with $(ARG)" + ./benchmark $(ARG) + +.PHONY: test +test: benchmarkTest clean + +.PHONY: benchmarkTest +benchmarkTest: benchmark test.sh + sh test.sh + +benchmark: benchmark.o io.o random.o libzstd.a + $(CC) $(CFLAGS) benchmark.o io.o random.o libzstd.a -o benchmark + +benchmark.o: benchmark.c + $(CC) $(CFLAGS) $(INCLUDES) -c benchmark.c + +random.o: $(RANDOM_FILE) + $(CC) $(CFLAGS) $(INCLUDES) -c $(RANDOM_FILE) + +io.o: $(IO_FILE) + $(CC) $(CFLAGS) $(INCLUDES) -c $(IO_FILE) + +libzstd.a: + $(MAKE) -C ../../../lib libzstd.a + mv ../../../lib/libzstd.a . + +.PHONY: clean +clean: + rm -f *.o benchmark libzstd.a + $(MAKE) -C ../../../lib clean + echo "Cleaning is completed" Added: vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/README.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/zstd/dist/contrib/experimental_dict_builders/benchmarkDictBuilder/README.md Fri Apr 19 00:31:04 2019 (r346361) @@ -0,0 +1,849 @@ +Benchmarking Dictionary Builder + +### Permitted Argument: +Input File/Directory (in=fileName): required; file/directory used to build dictionary; if directory, will operate recursively for files inside directory; can include multiple files/directories, each following "in=" + +###Running Test: +make test + +###Usage: +Benchmark given input files: make ARG= followed by permitted arguments + +### Examples: +make ARG="in=../../../lib/dictBuilder in=../../../lib/compress" + +###Benchmarking Result: +- First Cover is optimize cover, second Cover uses optimized d and k from first one. +- For every f value of fastCover, the first one is optimize fastCover and the second one uses optimized d and k from first one. This is run for accel values from 1 to 10. +- Fourth column is chosen d and fifth column is chosen k + +github: +NODICT 0.000004 2.999642 +RANDOM 0.024560 8.791189 +LEGACY 0.727109 8.173529 +COVER 40.565676 10.652243 8 1298 +COVER 3.608284 10.652243 8 1298 +FAST f=15 a=1 4.181024 10.570882 8 1154 +FAST f=15 a=1 0.040788 10.570882 8 1154 +FAST f=15 a=2 3.548352 10.574287 6 1970 +FAST f=15 a=2 0.035535 10.574287 6 1970 +FAST f=15 a=3 3.287364 10.613950 6 1010 +FAST f=15 a=3 0.032182 10.613950 6 1010 +FAST f=15 a=4 3.184976 10.573883 6 1058 +FAST f=15 a=4 0.029878 10.573883 6 1058 +FAST f=15 a=5 3.045513 10.580640 8 1154 +FAST f=15 a=5 0.022162 10.580640 8 1154 +FAST f=15 a=6 3.003296 10.583677 6 1010 +FAST f=15 a=6 0.028091 10.583677 6 1010 +FAST f=15 a=7 2.952655 10.622551 6 1106 +FAST f=15 a=7 0.02724 10.622551 6 1106 +FAST f=15 a=8 2.945674 10.614657 6 1010 +FAST f=15 a=8 0.027264 10.614657 6 1010 +FAST f=15 a=9 3.153439 10.564018 8 1154 +FAST f=15 a=9 0.020635 10.564018 8 1154 +FAST f=15 a=10 2.950416 10.511454 6 1010 +FAST f=15 a=10 0.026606 10.511454 6 1010 +FAST f=16 a=1 3.970029 10.681035 8 1154 +FAST f=16 a=1 0.038188 10.681035 8 1154 +FAST f=16 a=2 3.422892 10.484978 6 1874 +FAST f=16 a=2 0.034702 10.484978 6 1874 +FAST f=16 a=3 3.215836 10.632631 8 1154 +FAST f=16 a=3 0.026084 10.632631 8 1154 +FAST f=16 a=4 3.081353 10.626533 6 1106 +FAST f=16 a=4 0.030032 10.626533 6 1106 +FAST f=16 a=5 3.041241 10.545027 8 1922 +FAST f=16 a=5 0.022882 10.545027 8 1922 +FAST f=16 a=6 2.989390 10.638284 6 1874 +FAST f=16 a=6 0.028308 10.638284 6 1874 +FAST f=16 a=7 3.001581 10.797136 6 1106 +FAST f=16 a=7 0.027479 10.797136 6 1106 +FAST f=16 a=8 2.984107 10.658356 8 1058 +FAST f=16 a=8 0.021099 10.658356 8 1058 +FAST f=16 a=9 2.925788 10.523869 6 1010 +FAST f=16 a=9 0.026905 10.523869 6 1010 +FAST f=16 a=10 2.889605 10.745841 6 1874 +FAST f=16 a=10 0.026846 10.745841 6 1874 +FAST f=17 a=1 4.031953 10.672080 8 1202 +FAST f=17 a=1 0.040658 10.672080 8 1202 +FAST f=17 a=2 3.458107 10.589352 8 1106 +FAST f=17 a=2 0.02926 10.589352 8 1106 +FAST f=17 a=3 3.291189 10.662714 8 1154 +FAST f=17 a=3 0.026531 10.662714 8 1154 +FAST f=17 a=4 3.154950 10.549456 8 1346 +FAST f=17 a=4 0.024991 10.549456 8 1346 +FAST f=17 a=5 3.092271 10.541670 6 1202 +FAST f=17 a=5 0.038285 10.541670 6 1202 +FAST f=17 a=6 3.166146 10.729112 6 1874 +FAST f=17 a=6 0.038217 10.729112 6 1874 +FAST f=17 a=7 3.035467 10.810485 6 1106 +FAST f=17 a=7 0.036655 10.810485 6 1106 +FAST f=17 a=8 3.035668 10.530532 6 1058 +FAST f=17 a=8 0.037715 10.530532 6 1058 +FAST f=17 a=9 2.987917 10.589802 8 1922 +FAST f=17 a=9 0.02217 10.589802 8 1922 +FAST f=17 a=10 2.981647 10.722579 8 1106 +FAST f=17 a=10 0.021948 10.722579 8 1106 +FAST f=18 a=1 4.067144 10.634943 8 1154 +FAST f=18 a=1 0.041386 10.634943 8 1154 +FAST f=18 a=2 3.507377 10.546230 6 1970 +FAST f=18 a=2 0.037572 10.546230 6 1970 +FAST f=18 a=3 3.323015 10.648061 8 1154 +FAST f=18 a=3 0.028306 10.648061 8 1154 +FAST f=18 a=4 3.216735 10.705402 6 1010 +FAST f=18 a=4 0.030755 10.705402 6 1010 +FAST f=18 a=5 3.175794 10.588154 8 1874 +FAST f=18 a=5 0.025315 10.588154 8 1874 +FAST f=18 a=6 3.127459 10.751104 8 1106 +FAST f=18 a=6 0.023897 10.751104 8 1106 +FAST f=18 a=7 3.083017 10.780402 6 1106 +FAST f=18 a=7 0.029158 10.780402 6 1106 +FAST f=18 a=8 3.069700 10.547226 8 1346 +FAST f=18 a=8 0.024046 10.547226 8 1346 +FAST f=18 a=9 3.056591 10.674759 6 1010 +FAST f=18 a=9 0.028496 10.674759 6 1010 +FAST f=18 a=10 3.063588 10.737578 8 1106 +FAST f=18 a=10 0.023033 10.737578 8 1106 +FAST f=19 a=1 4.164041 10.650333 8 1154 +FAST f=19 a=1 0.042906 10.650333 8 1154 +FAST f=19 a=2 3.585409 10.577066 6 1058 +FAST f=19 a=2 0.038994 10.577066 6 1058 +FAST f=19 a=3 3.439643 10.639403 8 1154 +FAST f=19 a=3 0.028427 10.639403 8 1154 +FAST f=19 a=4 3.268869 10.554410 8 1298 +FAST f=19 a=4 0.026866 10.554410 8 1298 +FAST f=19 a=5 3.238225 10.615109 6 1010 +FAST f=19 a=5 0.03078 10.615109 6 1010 +FAST f=19 a=6 3.199558 10.609782 6 1874 +FAST f=19 a=6 0.030099 10.609782 6 1874 +FAST f=19 a=7 3.132395 10.794753 6 1106 +FAST f=19 a=7 0.028964 10.794753 6 1106 +FAST f=19 a=8 3.148446 10.554842 8 1298 +FAST f=19 a=8 0.024277 10.554842 8 1298 +FAST f=19 a=9 3.108324 10.668763 6 1010 +FAST f=19 a=9 0.02896 10.668763 6 1010 +FAST f=19 a=10 3.159863 10.757347 8 1106 +FAST f=19 a=10 0.023351 10.757347 8 1106 +FAST f=20 a=1 4.462698 10.661788 8 1154 +FAST f=20 a=1 0.047174 10.661788 8 1154 +FAST f=20 a=2 3.820269 10.678612 6 1106 +FAST f=20 a=2 0.040807 10.678612 6 1106 +FAST f=20 a=3 3.644955 10.648424 8 1154 +FAST f=20 a=3 0.031398 10.648424 8 1154 +FAST f=20 a=4 3.546257 10.559756 8 1298 +FAST f=20 a=4 0.029856 10.559756 8 1298 +FAST f=20 a=5 3.485248 10.646637 6 1010 +FAST f=20 a=5 0.033756 10.646637 6 1010 +FAST f=20 a=6 3.490438 10.775824 8 1106 +FAST f=20 a=6 0.028338 10.775824 8 1106 +FAST f=20 a=7 3.631289 10.801795 6 1106 +FAST f=20 a=7 0.035228 10.801795 6 1106 +FAST f=20 a=8 3.758936 10.545116 8 1346 +FAST f=20 a=8 0.027495 10.545116 8 1346 +FAST f=20 a=9 3.707024 10.677454 6 1010 +FAST f=20 a=9 0.031326 10.677454 6 1010 +FAST f=20 a=10 3.586593 10.756017 8 1106 +FAST f=20 a=10 0.027122 10.756017 8 1106 +FAST f=21 a=1 5.701396 10.655398 8 1154 +FAST f=21 a=1 0.067744 10.655398 8 1154 +FAST f=21 a=2 5.270542 10.650743 6 1106 +FAST f=21 a=2 0.052999 10.650743 6 1106 +FAST f=21 a=3 4.945294 10.652380 8 1154 +FAST f=21 a=3 0.052678 10.652380 8 1154 +FAST f=21 a=4 4.894079 10.543185 8 1298 +FAST f=21 a=4 0.04997 10.543185 8 1298 +FAST f=21 a=5 4.785417 10.630321 6 1010 +FAST f=21 a=5 0.045294 10.630321 6 1010 +FAST f=21 a=6 4.789381 10.664477 6 1874 +FAST f=21 a=6 0.046578 10.664477 6 1874 +FAST f=21 a=7 4.302955 10.805179 6 1106 +FAST f=21 a=7 0.041205 10.805179 6 1106 +FAST f=21 a=8 4.034630 10.551211 8 1298 +FAST f=21 a=8 0.040121 10.551211 8 1298 +FAST f=21 a=9 4.523868 10.799114 6 1010 +FAST f=21 a=9 0.043592 10.799114 6 1010 +FAST f=21 a=10 4.760736 10.750255 8 1106 +FAST f=21 a=10 0.043483 10.750255 8 1106 +FAST f=22 a=1 6.743064 10.640537 8 1154 +FAST f=22 a=1 0.086967 10.640537 8 1154 +FAST f=22 a=2 6.121739 10.626638 6 1970 +FAST f=22 a=2 0.066337 10.626638 6 1970 +FAST f=22 a=3 5.248851 10.640688 8 1154 +FAST f=22 a=3 0.054935 10.640688 8 1154 +FAST f=22 a=4 5.436579 10.588333 8 1298 +FAST f=22 a=4 0.064113 10.588333 8 1298 +FAST f=22 a=5 5.812815 10.652653 6 1010 +FAST f=22 a=5 0.058189 10.652653 6 1010 +FAST f=22 a=6 5.745472 10.666437 6 1874 +FAST f=22 a=6 0.057188 10.666437 6 1874 +FAST f=22 a=7 5.716393 10.806911 6 1106 +FAST f=22 a=7 0.056 10.806911 6 1106 +FAST f=22 a=8 5.698799 10.530784 8 1298 +FAST f=22 a=8 0.0583 10.530784 8 1298 +FAST f=22 a=9 5.710533 10.777391 6 1010 +FAST f=22 a=9 0.054945 10.777391 6 1010 +FAST f=22 a=10 5.685395 10.745023 8 1106 +FAST f=22 a=10 0.056526 10.745023 8 1106 +FAST f=23 a=1 7.836923 10.638828 8 1154 +FAST f=23 a=1 0.099522 10.638828 8 1154 +FAST f=23 a=2 6.627834 10.631061 6 1970 +FAST f=23 a=2 0.066769 10.631061 6 1970 +FAST f=23 a=3 5.602533 10.647288 8 1154 +FAST f=23 a=3 0.064513 10.647288 8 1154 +FAST f=23 a=4 6.005580 10.568747 8 1298 +FAST f=23 a=4 0.062022 10.568747 8 1298 +FAST f=23 a=5 5.481816 10.676921 6 1010 +FAST f=23 a=5 0.058959 10.676921 6 1010 +FAST f=23 a=6 5.460444 10.666194 6 1874 +FAST f=23 a=6 0.057687 10.666194 6 1874 +FAST f=23 a=7 5.659822 10.800377 6 1106 +FAST f=23 a=7 0.06783 10.800377 6 1106 +FAST f=23 a=8 6.826940 10.522167 8 1298 +FAST f=23 a=8 0.070533 10.522167 8 1298 +FAST f=23 a=9 6.804757 10.577799 8 1682 +FAST f=23 a=9 0.069949 10.577799 8 1682 +FAST f=23 a=10 6.774933 10.742093 8 1106 +FAST f=23 a=10 0.068395 10.742093 8 1106 +FAST f=24 a=1 8.444110 10.632783 8 1154 +FAST f=24 a=1 0.094357 10.632783 8 1154 +FAST f=24 a=2 7.289578 10.631061 6 1970 +FAST f=24 a=2 0.098515 10.631061 6 1970 +FAST f=24 a=3 8.619780 10.646289 8 1154 +FAST f=24 a=3 0.098041 10.646289 8 1154 +FAST f=24 a=4 8.508455 10.555199 8 1298 +FAST f=24 a=4 0.093885 10.555199 8 1298 +FAST f=24 a=5 8.471145 10.674363 6 1010 +FAST f=24 a=5 0.088676 10.674363 6 1010 +FAST f=24 a=6 8.426727 10.667228 6 1874 +FAST f=24 a=6 0.087247 10.667228 6 1874 +FAST f=24 a=7 8.356826 10.803027 6 1106 +FAST f=24 a=7 0.085835 10.803027 6 1106 +FAST f=24 a=8 6.756811 10.522049 8 1298 +FAST f=24 a=8 0.07107 10.522049 8 1298 +FAST f=24 a=9 6.548169 10.571882 8 1682 +FAST f=24 a=9 0.0713 10.571882 8 1682 +FAST f=24 a=10 8.238079 10.736453 8 1106 +FAST f=24 a=10 0.07004 10.736453 8 1106 + + +hg-commands: +NODICT 0.000005 2.425276 +RANDOM 0.046332 3.490331 +LEGACY 0.720351 3.911682 +COVER 45.507731 4.132653 8 386 +COVER 1.868810 4.132653 8 386 +FAST f=15 a=1 4.561427 3.866894 8 1202 +FAST f=15 a=1 0.048946 3.866894 8 1202 +FAST f=15 a=2 3.574462 3.892119 8 1538 +FAST f=15 a=2 0.033677 3.892119 8 1538 +FAST f=15 a=3 3.230227 3.888791 6 1346 +FAST f=15 a=3 0.034312 3.888791 6 1346 +FAST f=15 a=4 3.042388 3.899739 8 1010 +FAST f=15 a=4 0.024307 3.899739 8 1010 +FAST f=15 a=5 2.800148 3.896220 8 818 +FAST f=15 a=5 0.022331 3.896220 8 818 +FAST f=15 a=6 2.706518 3.882039 8 578 +FAST f=15 a=6 0.020955 3.882039 8 578 +FAST f=15 a=7 2.701820 3.885430 6 866 +FAST f=15 a=7 0.026074 3.885430 6 866 +FAST f=15 a=8 2.604445 3.906932 8 1826 +FAST f=15 a=8 0.021789 3.906932 8 1826 +FAST f=15 a=9 2.598568 3.870324 6 1682 +FAST f=15 a=9 0.026004 3.870324 6 1682 +FAST f=15 a=10 2.575920 3.920783 8 1442 +FAST f=15 a=10 0.020228 3.920783 8 1442 +FAST f=16 a=1 4.630623 4.001430 8 770 +FAST f=16 a=1 0.047497 4.001430 8 770 +FAST f=16 a=2 3.674721 3.974431 8 1874 +FAST f=16 a=2 0.035761 3.974431 8 1874 +FAST f=16 a=3 3.338384 3.978703 8 1010 +FAST f=16 a=3 0.029436 3.978703 8 1010 +FAST f=16 a=4 3.004412 3.983035 8 1010 +FAST f=16 a=4 0.025744 3.983035 8 1010 +FAST f=16 a=5 2.881892 3.987710 8 770 +FAST f=16 a=5 0.023211 3.987710 8 770 +FAST f=16 a=6 2.807410 3.952717 8 1298 +FAST f=16 a=6 0.023199 3.952717 8 1298 +FAST f=16 a=7 2.819623 3.994627 8 770 +FAST f=16 a=7 0.021806 3.994627 8 770 +FAST f=16 a=8 2.740092 3.954032 8 1826 +FAST f=16 a=8 0.0226 3.954032 8 1826 +FAST f=16 a=9 2.682564 3.969879 6 1442 +FAST f=16 a=9 0.026324 3.969879 6 1442 +FAST f=16 a=10 2.657959 3.969755 8 674 +FAST f=16 a=10 0.020413 3.969755 8 674 +FAST f=17 a=1 4.729228 4.046000 8 530 +FAST f=17 a=1 0.049703 4.046000 8 530 +FAST f=17 a=2 3.764510 3.991519 8 1970 +FAST f=17 a=2 0.038195 3.991519 8 1970 +FAST f=17 a=3 3.416992 4.006296 6 914 +FAST f=17 a=3 0.036244 4.006296 6 914 +FAST f=17 a=4 3.145626 3.979182 8 1970 +FAST f=17 a=4 0.028676 3.979182 8 1970 +FAST f=17 a=5 2.995070 4.050070 8 770 +FAST f=17 a=5 0.025707 4.050070 8 770 +FAST f=17 a=6 2.911833 4.040024 8 770 +FAST f=17 a=6 0.02453 4.040024 8 770 +FAST f=17 a=7 2.894796 4.015884 8 818 +FAST f=17 a=7 0.023956 4.015884 8 818 +FAST f=17 a=8 2.789962 4.039303 8 530 +FAST f=17 a=8 0.023219 4.039303 8 530 +FAST f=17 a=9 2.787625 3.996762 8 1634 +FAST f=17 a=9 0.023651 3.996762 8 1634 +FAST f=17 a=10 2.754796 4.005059 8 1058 +FAST f=17 a=10 0.022537 4.005059 8 1058 +FAST f=18 a=1 4.779117 4.038214 8 242 +FAST f=18 a=1 0.048814 4.038214 8 242 +FAST f=18 a=2 3.829753 4.045768 8 722 +FAST f=18 a=2 0.036541 4.045768 8 722 +FAST f=18 a=3 3.495053 4.021497 8 770 +FAST f=18 a=3 0.032648 4.021497 8 770 +FAST f=18 a=4 3.221395 4.039623 8 770 +FAST f=18 a=4 0.027818 4.039623 8 770 +FAST f=18 a=5 3.059369 4.050414 8 530 +FAST f=18 a=5 0.026296 4.050414 8 530 +FAST f=18 a=6 3.019292 4.010714 6 962 +FAST f=18 a=6 0.031104 4.010714 6 962 +FAST f=18 a=7 2.949322 4.031439 6 770 +FAST f=18 a=7 0.030745 4.031439 6 770 +FAST f=18 a=8 2.876425 4.032088 6 386 +FAST f=18 a=8 0.027407 4.032088 6 386 +FAST f=18 a=9 2.850958 4.053372 8 674 +FAST f=18 a=9 0.023799 4.053372 8 674 +FAST f=18 a=10 2.884352 4.020148 8 1730 +FAST f=18 a=10 0.024401 4.020148 8 1730 +FAST f=19 a=1 4.815669 4.061203 8 674 +FAST f=19 a=1 0.051425 4.061203 8 674 +FAST f=19 a=2 3.951356 4.013822 8 1442 +FAST f=19 a=2 0.039968 4.013822 8 1442 +FAST f=19 a=3 3.554682 4.050425 8 722 +FAST f=19 a=3 0.032725 4.050425 8 722 +FAST f=19 a=4 3.242585 4.054677 8 722 +FAST f=19 a=4 0.028194 4.054677 8 722 +FAST f=19 a=5 3.105909 4.064524 8 818 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 19 00:32:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90FAB15806E4; Fri, 19 Apr 2019 00:32:14 +0000 (UTC) (envelope-from cem@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 3AF3986E7C; Fri, 19 Apr 2019 00:32:14 +0000 (UTC) (envelope-from cem@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 1625026BA7; Fri, 19 Apr 2019 00:32:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3J0WDDT090722; Fri, 19 Apr 2019 00:32:13 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J0WDUx090718; Fri, 19 Apr 2019 00:32:13 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201904190032.x3J0WDUx090718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 19 Apr 2019 00:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r346362 - in vendor/zstd/1.4.0: . contrib/adaptive-compression contrib/docker contrib/experimental_dict_builders contrib/largeNbDicts contrib/premake contrib/pzstd contrib/pzstd/utils c... X-SVN-Group: vendor X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in vendor/zstd/1.4.0: . contrib/adaptive-compression contrib/docker contrib/experimental_dict_builders contrib/largeNbDicts contrib/premake contrib/pzstd contrib/pzstd/utils contrib/snap doc doc/educa... X-SVN-Commit-Revision: 346362 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3AF3986E7C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2019 00:32:15 -0000 Author: cem Date: Fri Apr 19 00:32:13 2019 New Revision: 346362 URL: https://svnweb.freebsd.org/changeset/base/346362 Log: tag zstd 1.4.0 Added: vendor/zstd/1.4.0/ - copied from r346360, vendor/zstd/dist/ vendor/zstd/1.4.0/CHANGELOG - copied unchanged from r346361, vendor/zstd/dist/CHANGELOG vendor/zstd/1.4.0/contrib/docker/ - copied from r346361, vendor/zstd/dist/contrib/docker/ vendor/zstd/1.4.0/contrib/experimental_dict_builders/ - copied from r346361, vendor/zstd/dist/contrib/experimental_dict_builders/ vendor/zstd/1.4.0/contrib/largeNbDicts/ - copied from r346361, vendor/zstd/dist/contrib/largeNbDicts/ vendor/zstd/1.4.0/contrib/premake/ - copied from r346361, vendor/zstd/dist/contrib/premake/ vendor/zstd/1.4.0/contrib/snap/ - copied from r346361, vendor/zstd/dist/contrib/snap/ vendor/zstd/1.4.0/examples/ - copied from r346361, vendor/zstd/dist/examples/ vendor/zstd/1.4.0/programs/timefn.c - copied unchanged from r346361, vendor/zstd/dist/programs/timefn.c vendor/zstd/1.4.0/programs/timefn.h - copied unchanged from r346361, vendor/zstd/dist/programs/timefn.h vendor/zstd/1.4.0/tests/fuzz/dictionary_decompress.c - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/dictionary_decompress.c vendor/zstd/1.4.0/tests/fuzz/dictionary_round_trip.c - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/dictionary_round_trip.c Replaced: vendor/zstd/1.4.0/Makefile - copied unchanged from r346361, vendor/zstd/dist/Makefile vendor/zstd/1.4.0/README.md - copied unchanged from r346361, vendor/zstd/dist/README.md vendor/zstd/1.4.0/contrib/adaptive-compression/Makefile - copied unchanged from r346361, vendor/zstd/dist/contrib/adaptive-compression/Makefile vendor/zstd/1.4.0/contrib/adaptive-compression/adapt.c - copied unchanged from r346361, vendor/zstd/dist/contrib/adaptive-compression/adapt.c vendor/zstd/1.4.0/contrib/pzstd/Makefile - copied unchanged from r346361, vendor/zstd/dist/contrib/pzstd/Makefile vendor/zstd/1.4.0/contrib/pzstd/Pzstd.cpp - copied unchanged from r346361, vendor/zstd/dist/contrib/pzstd/Pzstd.cpp vendor/zstd/1.4.0/contrib/pzstd/utils/Range.h - copied unchanged from r346361, vendor/zstd/dist/contrib/pzstd/utils/Range.h vendor/zstd/1.4.0/contrib/pzstd/utils/ResourcePool.h - copied unchanged from r346361, vendor/zstd/dist/contrib/pzstd/utils/ResourcePool.h vendor/zstd/1.4.0/doc/README.md - copied unchanged from r346361, vendor/zstd/dist/doc/README.md vendor/zstd/1.4.0/doc/educational_decoder/Makefile - copied unchanged from r346361, vendor/zstd/dist/doc/educational_decoder/Makefile vendor/zstd/1.4.0/doc/educational_decoder/zstd_decompress.c - copied unchanged from r346361, vendor/zstd/dist/doc/educational_decoder/zstd_decompress.c vendor/zstd/1.4.0/doc/zstd_manual.html - copied unchanged from r346361, vendor/zstd/dist/doc/zstd_manual.html vendor/zstd/1.4.0/lib/Makefile - copied unchanged from r346361, vendor/zstd/dist/lib/Makefile vendor/zstd/1.4.0/lib/README.md - copied unchanged from r346361, vendor/zstd/dist/lib/README.md vendor/zstd/1.4.0/lib/common/compiler.h - copied unchanged from r346361, vendor/zstd/dist/lib/common/compiler.h vendor/zstd/1.4.0/lib/common/fse.h - copied unchanged from r346361, vendor/zstd/dist/lib/common/fse.h vendor/zstd/1.4.0/lib/common/threading.c - copied unchanged from r346361, vendor/zstd/dist/lib/common/threading.c vendor/zstd/1.4.0/lib/common/xxhash.c - copied unchanged from r346361, vendor/zstd/dist/lib/common/xxhash.c vendor/zstd/1.4.0/lib/common/zstd_internal.h - copied unchanged from r346361, vendor/zstd/dist/lib/common/zstd_internal.h vendor/zstd/1.4.0/lib/compress/fse_compress.c - copied unchanged from r346361, vendor/zstd/dist/lib/compress/fse_compress.c vendor/zstd/1.4.0/lib/compress/zstd_compress.c - copied unchanged from r346361, vendor/zstd/dist/lib/compress/zstd_compress.c vendor/zstd/1.4.0/lib/compress/zstd_compress_internal.h - copied unchanged from r346361, vendor/zstd/dist/lib/compress/zstd_compress_internal.h vendor/zstd/1.4.0/lib/compress/zstd_fast.c - copied unchanged from r346361, vendor/zstd/dist/lib/compress/zstd_fast.c vendor/zstd/1.4.0/lib/compress/zstd_lazy.h - copied unchanged from r346361, vendor/zstd/dist/lib/compress/zstd_lazy.h vendor/zstd/1.4.0/lib/compress/zstd_ldm.c - copied unchanged from r346361, vendor/zstd/dist/lib/compress/zstd_ldm.c vendor/zstd/1.4.0/lib/compress/zstd_opt.c - copied unchanged from r346361, vendor/zstd/dist/lib/compress/zstd_opt.c vendor/zstd/1.4.0/lib/compress/zstdmt_compress.c - copied unchanged from r346361, vendor/zstd/dist/lib/compress/zstdmt_compress.c vendor/zstd/1.4.0/lib/compress/zstdmt_compress.h - copied unchanged from r346361, vendor/zstd/dist/lib/compress/zstdmt_compress.h vendor/zstd/1.4.0/lib/decompress/zstd_ddict.c - copied unchanged from r346361, vendor/zstd/dist/lib/decompress/zstd_ddict.c vendor/zstd/1.4.0/lib/decompress/zstd_decompress.c - copied unchanged from r346361, vendor/zstd/dist/lib/decompress/zstd_decompress.c vendor/zstd/1.4.0/lib/decompress/zstd_decompress_block.c - copied unchanged from r346361, vendor/zstd/dist/lib/decompress/zstd_decompress_block.c vendor/zstd/1.4.0/lib/decompress/zstd_decompress_internal.h - copied unchanged from r346361, vendor/zstd/dist/lib/decompress/zstd_decompress_internal.h vendor/zstd/1.4.0/lib/dictBuilder/cover.c - copied unchanged from r346361, vendor/zstd/dist/lib/dictBuilder/cover.c vendor/zstd/1.4.0/lib/dictBuilder/cover.h - copied unchanged from r346361, vendor/zstd/dist/lib/dictBuilder/cover.h vendor/zstd/1.4.0/lib/dictBuilder/fastcover.c - copied unchanged from r346361, vendor/zstd/dist/lib/dictBuilder/fastcover.c vendor/zstd/1.4.0/lib/dictBuilder/zdict.h - copied unchanged from r346361, vendor/zstd/dist/lib/dictBuilder/zdict.h vendor/zstd/1.4.0/lib/legacy/zstd_legacy.h - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_legacy.h vendor/zstd/1.4.0/lib/legacy/zstd_v01.c - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v01.c vendor/zstd/1.4.0/lib/legacy/zstd_v01.h - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v01.h vendor/zstd/1.4.0/lib/legacy/zstd_v02.c - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v02.c vendor/zstd/1.4.0/lib/legacy/zstd_v02.h - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v02.h vendor/zstd/1.4.0/lib/legacy/zstd_v03.c - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v03.c vendor/zstd/1.4.0/lib/legacy/zstd_v03.h - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v03.h vendor/zstd/1.4.0/lib/legacy/zstd_v04.c - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v04.c vendor/zstd/1.4.0/lib/legacy/zstd_v04.h - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v04.h vendor/zstd/1.4.0/lib/legacy/zstd_v05.c - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v05.c vendor/zstd/1.4.0/lib/legacy/zstd_v05.h - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v05.h vendor/zstd/1.4.0/lib/legacy/zstd_v06.c - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v06.c vendor/zstd/1.4.0/lib/legacy/zstd_v06.h - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v06.h vendor/zstd/1.4.0/lib/legacy/zstd_v07.c - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v07.c vendor/zstd/1.4.0/lib/legacy/zstd_v07.h - copied unchanged from r346361, vendor/zstd/dist/lib/legacy/zstd_v07.h vendor/zstd/1.4.0/lib/zstd.h - copied unchanged from r346361, vendor/zstd/dist/lib/zstd.h vendor/zstd/1.4.0/programs/Makefile - copied unchanged from r346361, vendor/zstd/dist/programs/Makefile vendor/zstd/1.4.0/programs/benchfn.c - copied unchanged from r346361, vendor/zstd/dist/programs/benchfn.c vendor/zstd/1.4.0/programs/benchfn.h - copied unchanged from r346361, vendor/zstd/dist/programs/benchfn.h vendor/zstd/1.4.0/programs/benchzstd.c - copied unchanged from r346361, vendor/zstd/dist/programs/benchzstd.c vendor/zstd/1.4.0/programs/benchzstd.h - copied unchanged from r346361, vendor/zstd/dist/programs/benchzstd.h vendor/zstd/1.4.0/programs/dibio.c - copied unchanged from r346361, vendor/zstd/dist/programs/dibio.c vendor/zstd/1.4.0/programs/fileio.c - copied unchanged from r346361, vendor/zstd/dist/programs/fileio.c vendor/zstd/1.4.0/programs/fileio.h - copied unchanged from r346361, vendor/zstd/dist/programs/fileio.h vendor/zstd/1.4.0/programs/platform.h - copied unchanged from r346361, vendor/zstd/dist/programs/platform.h vendor/zstd/1.4.0/programs/util.c - copied unchanged from r346361, vendor/zstd/dist/programs/util.c vendor/zstd/1.4.0/programs/util.h - copied unchanged from r346361, vendor/zstd/dist/programs/util.h vendor/zstd/1.4.0/programs/zstd.1 - copied unchanged from r346361, vendor/zstd/dist/programs/zstd.1 vendor/zstd/1.4.0/programs/zstd.1.md - copied unchanged from r346361, vendor/zstd/dist/programs/zstd.1.md vendor/zstd/1.4.0/programs/zstdcli.c - copied unchanged from r346361, vendor/zstd/dist/programs/zstdcli.c vendor/zstd/1.4.0/programs/zstdgrep - copied unchanged from r346361, vendor/zstd/dist/programs/zstdgrep vendor/zstd/1.4.0/tests/Makefile - copied unchanged from r346361, vendor/zstd/dist/tests/Makefile vendor/zstd/1.4.0/tests/README.md - copied unchanged from r346361, vendor/zstd/dist/tests/README.md vendor/zstd/1.4.0/tests/decodecorpus.c - copied unchanged from r346361, vendor/zstd/dist/tests/decodecorpus.c vendor/zstd/1.4.0/tests/fullbench.c - copied unchanged from r346361, vendor/zstd/dist/tests/fullbench.c vendor/zstd/1.4.0/tests/fuzz/Makefile - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/Makefile vendor/zstd/1.4.0/tests/fuzz/README.md - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/README.md vendor/zstd/1.4.0/tests/fuzz/fuzz.py - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/fuzz.py vendor/zstd/1.4.0/tests/fuzz/fuzz_helpers.h - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/fuzz_helpers.h vendor/zstd/1.4.0/tests/fuzz/regression_driver.c - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/regression_driver.c vendor/zstd/1.4.0/tests/fuzz/simple_round_trip.c - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/simple_round_trip.c vendor/zstd/1.4.0/tests/fuzz/stream_decompress.c - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/stream_decompress.c vendor/zstd/1.4.0/tests/fuzz/stream_round_trip.c - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/stream_round_trip.c vendor/zstd/1.4.0/tests/fuzz/zstd_helpers.c - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/zstd_helpers.c vendor/zstd/1.4.0/tests/fuzz/zstd_helpers.h - copied unchanged from r346361, vendor/zstd/dist/tests/fuzz/zstd_helpers.h vendor/zstd/1.4.0/tests/fuzzer.c - copied unchanged from r346361, vendor/zstd/dist/tests/fuzzer.c vendor/zstd/1.4.0/tests/legacy.c - copied unchanged from r346361, vendor/zstd/dist/tests/legacy.c vendor/zstd/1.4.0/tests/paramgrill.c - copied unchanged from r346361, vendor/zstd/dist/tests/paramgrill.c vendor/zstd/1.4.0/tests/playTests.sh - copied unchanged from r346361, vendor/zstd/dist/tests/playTests.sh vendor/zstd/1.4.0/tests/poolTests.c - copied unchanged from r346361, vendor/zstd/dist/tests/poolTests.c vendor/zstd/1.4.0/tests/regression/config.c - copied unchanged from r346361, vendor/zstd/dist/tests/regression/config.c vendor/zstd/1.4.0/tests/regression/method.c - copied unchanged from r346361, vendor/zstd/dist/tests/regression/method.c vendor/zstd/1.4.0/tests/regression/results.csv - copied unchanged from r346361, vendor/zstd/dist/tests/regression/results.csv vendor/zstd/1.4.0/tests/regression/test.c - copied unchanged from r346361, vendor/zstd/dist/tests/regression/test.c vendor/zstd/1.4.0/tests/roundTripCrash.c - copied unchanged from r346361, vendor/zstd/dist/tests/roundTripCrash.c vendor/zstd/1.4.0/tests/symbols.c - copied unchanged from r346361, vendor/zstd/dist/tests/symbols.c vendor/zstd/1.4.0/tests/zbufftest.c - copied unchanged from r346361, vendor/zstd/dist/tests/zbufftest.c vendor/zstd/1.4.0/tests/zstreamtest.c - copied unchanged from r346361, vendor/zstd/dist/tests/zstreamtest.c vendor/zstd/1.4.0/zlibWrapper/Makefile - copied unchanged from r346361, vendor/zstd/dist/zlibWrapper/Makefile vendor/zstd/1.4.0/zlibWrapper/README.md - copied unchanged from r346361, vendor/zstd/dist/zlibWrapper/README.md vendor/zstd/1.4.0/zlibWrapper/examples/fitblk.c - copied unchanged from r346361, vendor/zstd/dist/zlibWrapper/examples/fitblk.c vendor/zstd/1.4.0/zlibWrapper/examples/fitblk_original.c - copied unchanged from r346361, vendor/zstd/dist/zlibWrapper/examples/fitblk_original.c vendor/zstd/1.4.0/zlibWrapper/examples/zwrapbench.c - copied unchanged from r346361, vendor/zstd/dist/zlibWrapper/examples/zwrapbench.c vendor/zstd/1.4.0/zlibWrapper/gzguts.h - copied unchanged from r346361, vendor/zstd/dist/zlibWrapper/gzguts.h Copied: vendor/zstd/1.4.0/CHANGELOG (from r346361, vendor/zstd/dist/CHANGELOG) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/zstd/1.4.0/CHANGELOG Fri Apr 19 00:32:13 2019 (r346362, copy of r346361, vendor/zstd/dist/CHANGELOG) @@ -0,0 +1,461 @@ +v1.4.0 +perf: Improve level 1 compression speed in most scenarios by 6% by @gbtucker and @terrelln +api: Move the advanced API, including all functions in the staging section, to the stable section +api: Make ZSTD_e_flush and ZSTD_e_end block for maximum forward progress +api: Rename ZSTD_CCtxParam_getParameter to ZSTD_CCtxParams_getParameter +api: Rename ZSTD_CCtxParam_setParameter to ZSTD_CCtxParams_setParameter +api: Don't export ZSTDMT functions from the shared library by default +api: Require ZSTD_MULTITHREAD to be defined to use ZSTDMT +api: Add ZSTD_decompressBound() to provide an upper bound on decompressed size by @shakeelrao +api: Fix ZSTD_decompressDCtx() corner cases with a dictionary +api: Move ZSTD_getDictID_*() functions to the stable section +api: Add ZSTD_c_literalCompressionMode flag to enable or disable literal compression by @terrelln +api: Allow compression parameters to be set when a dictionary is used +api: Allow setting parameters before or after ZSTD_CCtx_loadDictionary() is called +api: Fix ZSTD_estimateCStreamSize_usingCCtxParams() +api: Setting ZSTD_d_maxWindowLog to 0 means use the default +cli: Ensure that a dictionary is not used to compress itself by @shakeelrao +cli: Add --[no-]compress-literals flag to enable or disable literal compression +doc: Update the examples to use the advanced API +doc: Explain how to transition from old streaming functions to the advanced API in the header +build: Improve the Windows release packages +build: Improve CMake build by @hjmjohnson +build: Build fixes for FreeBSD by @lwhsu +build: Remove redundant warnings by @thatsafunnyname +build: Fix tests on OpenBSD by @bket +build: Extend fuzzer build system to work with the new clang engine +build: CMake now creates the libzstd.so.1 symlink +build: Improve Menson build by @lzutao +misc: Fix symbolic link detection on FreeBSD +misc: Use physical core count for -T0 on FreeBSD by @cemeyer +misc: Fix zstd --list on truncated files by @kostmo +misc: Improve logging in debug mode by @felixhandte +misc: Add CirrusCI tests by @lwhsu +misc: Optimize dictionary memory usage in corner cases +misc: Improve the dictionary builder on small or homogeneous data +misc: Fix spelling across the repo by @jsoref + +v1.3.8 +perf: better decompression speed on large files (+7%) and cold dictionaries (+15%) +perf: slightly better compression ratio at high compression modes +api : finalized advanced API, last stage before "stable" status +api : new --rsyncable mode, by @terrelln +api : support decompression of empty frames into NULL (used to be an error) (#1385) +build: new set of macros to build a minimal size decoder, by @felixhandte +build: fix compilation on MIPS32, reported by @clbr (#1441) +build: fix compilation with multiple -arch flags, by @ryandesign +build: highly upgraded meson build, by @lzutao +build: improved buck support, by @obelisk +build: fix cmake script : can create debug build, by @pitrou +build: Makefile : grep works on both colored consoles and systems without color support +build: fixed zstd-pgo, by @bmwiedemann +cli : support ZSTD_CLEVEL environment variable, by @yijinfb (#1423) +cli : --no-progress flag, preserving final summary (#1371), by @terrelln +cli : ensure destination file is not source file (#1422) +cli : clearer error messages, especially when input file not present +doc : clarified zstd_compression_format.md, by @ulikunitz +misc: fixed zstdgrep, returns 1 on failure, by @lzutao +misc: NEWS renamed as CHANGELOG, in accordance with fboss + +v1.3.7 +perf: slightly better decompression speed on clang (depending on hardware target) +fix : performance of dictionary compression for small input < 4 KB at levels 9 and 10 +build: no longer build backtrace by default in release mode; restrict further automatic mode +build: control backtrace support through build macro BACKTRACE +misc: added man pages for zstdless and zstdgrep, by @samrussell + +v1.3.6 +perf: much faster dictionary builder, by @jenniferliu +perf: faster dictionary compression on small data when using multiple contexts, by @felixhandte +perf: faster dictionary decompression when using a very large number of dictionaries simultaneously +cli : fix : does no longer overwrite destination when source does not exist (#1082) +cli : new command --adapt, for automatic compression level adaptation +api : fix : block api can be streamed with > 4 GB, reported by @catid +api : reduced ZSTD_DDict size by 2 KB +api : minimum negative compression level is defined, and can be queried using ZSTD_minCLevel(). +build: support Haiku target, by @korli +build: Read Legacy format is limited to v0.5+ by default. Can be changed at compile time with macro ZSTD_LEGACY_SUPPORT. +doc : zstd_compression_format.md updated to match wording in IETF RFC 8478 +misc: tests/paramgrill, a parameter optimizer, by @GeorgeLu97 + +v1.3.5 +perf: much faster dictionary compression, by @felixhandte +perf: small quality improvement for dictionary generation, by @terrelln +perf: slightly improved high compression levels (notably level 19) +mem : automatic memory release for long duration contexts +cli : fix : overlapLog can be manually set +cli : fix : decoding invalid lz4 frames +api : fix : performance degradation for dictionary compression when using advanced API, by @terrelln +api : change : clarify ZSTD_CCtx_reset() vs ZSTD_CCtx_resetParameters(), by @terrelln +build: select custom libzstd scope through control macros, by @GeorgeLu97 +build: OpenBSD patch, by @bket +build: make and make all are compatible with -j +doc : clarify zstd_compression_format.md, updated for IETF RFC process +misc: pzstd compatible with reproducible compilation, by @lamby + +v1.3.4 +perf: faster speed (especially decoding speed) on recent cpus (haswell+) +perf: much better performance associating --long with multi-threading, by @terrelln +perf: better compression at levels 13-15 +cli : asynchronous compression by default, for faster experience (use --single-thread for former behavior) +cli : smoother status report in multi-threading mode +cli : added command --fast=#, for faster compression modes +cli : fix crash when not overwriting existing files, by Pádraig Brady (@pixelb) +api : `nbThreads` becomes `nbWorkers` : 1 triggers asynchronous mode +api : compression levels can be negative, for even more speed +api : ZSTD_getFrameProgression() : get precise progress status of ZSTDMT anytime +api : ZSTDMT can accept new compression parameters during compression +api : implemented all advanced dictionary decompression prototypes +build: improved meson recipe, by Shawn Landden (@shawnl) +build: VS2017 scripts, by @HaydnTrigg +misc: all /contrib projects fixed +misc: added /contrib/docker script by @gyscos + +v1.3.3 +perf: faster zstd_opt strategy (levels 16-19) +fix : bug #944 : multithreading with shared ditionary and large data, reported by @gsliepen +cli : fix : content size written in header by default +cli : fix : improved LZ4 format support, by @felixhandte +cli : new : hidden command `-S`, to benchmark multiple files while generating one result per file +api : fix : support large skippable frames, by @terrelln +api : fix : streaming interface was adding a useless 3-bytes null block to small frames +api : change : when setting `pledgedSrcSize`, use `ZSTD_CONTENTSIZE_UNKNOWN` macro value to mean "unknown" +build: fix : compilation under rhel6 and centos6, reported by @pixelb +build: added `check` target + +v1.3.2 +new : long range mode, using --long command, by Stella Lau (@stellamplau) +new : ability to generate and decode magicless frames (#591) +changed : maximum nb of threads reduced to 200, to avoid address space exhaustion in 32-bits mode +fix : multi-threading compression works with custom allocators +fix : ZSTD_sizeof_CStream() was over-evaluating memory usage +fix : a rare compression bug when compression generates very large distances and bunch of other conditions (only possible at --ultra -22) +fix : 32-bits build can now decode large offsets (levels 21+) +cli : added LZ4 frame support by default, by Felix Handte (@felixhandte) +cli : improved --list output +cli : new : can split input file for dictionary training, using command -B# +cli : new : clean operation artefact on Ctrl-C interruption +cli : fix : do not change /dev/null permissions when using command -t with root access, reported by @mike155 (#851) +cli : fix : write file size in header in multiple-files mode +api : added macro ZSTD_COMPRESSBOUND() for static allocation +api : experimental : new advanced decompression API +api : fix : sizeof_CCtx() used to over-estimate +build: fix : no-multithread variant compiles without pool.c dependency, reported by Mitchell Blank Jr (@mitchblank) (#819) +build: better compatibility with reproducible builds, by Bernhard M. Wiedemann (@bmwiedemann) (#818) +example : added streaming_memory_usage +license : changed /examples license to BSD + GPLv2 +license : fix a few header files to reflect new license (#825) + +v1.3.1 +New license : BSD + GPLv2 +perf: substantially decreased memory usage in Multi-threading mode, thanks to reports by Tino Reichardt (@mcmilk) +perf: Multi-threading supports up to 256 threads. Cap at 256 when more are requested (#760) +cli : improved and fixed --list command, by @ib (#772) +cli : command -vV to list supported formats, by @ib (#771) +build : fixed binary variants, reported by @svenha (#788) +build : fix Visual compilation for non x86/x64 targets, reported by Greg Slazinski (@GregSlazinski) (#718) +API exp : breaking change : ZSTD_getframeHeader() provides more information +API exp : breaking change : pinned down values of error codes +doc : fixed huffman example, by Ulrich Kunitz (@ulikunitz) +new : contrib/adaptive-compression, I/O driven compression strength, by Paul Cruz (@paulcruz74) +new : contrib/long_distance_matching, statistics by Stella Lau (@stellamplau) +updated : contrib/linux-kernel, by Nick Terrell (@terrelln) + +v1.3.0 +cli : new : `--list` command, by Paul Cruz +cli : changed : xz/lzma support enabled by default +cli : changed : `-t *` continue processing list after a decompression error +API : added : ZSTD_versionString() +API : promoted to stable status : ZSTD_getFrameContentSize(), by Sean Purcell +API exp : new advanced API : ZSTD_compress_generic(), ZSTD_CCtx_setParameter() +API exp : new : API for static or external allocation : ZSTD_initStatic?Ctx() +API exp : added : ZSTD_decompressBegin_usingDDict(), requested by Guy Riddle (#700) +API exp : clarified memory estimation / measurement functions. +API exp : changed : strongest strategy renamed ZSTD_btultra, fastest strategy ZSTD_fast set to 1 +tools : decodecorpus can generate random dictionary-compressed samples, by Paul Cruz +new : contrib/seekable_format, demo and API, by Sean Purcell +changed : contrib/linux-kernel, updated version and license, by Nick Terrell + +v1.2.0 +cli : changed : Multithreading enabled by default (use target zstd-nomt or HAVE_THREAD=0 to disable) +cli : new : command -T0 means "detect and use nb of cores", by Sean Purcell +cli : new : zstdmt symlink hardwired to `zstd -T0` +cli : new : command --threads=# (#671) +cli : changed : cover dictionary builder by default, for improved quality, by Nick Terrell +cli : new : commands --train-cover and --train-legacy, to select dictionary algorithm and parameters +cli : experimental targets `zstd4` and `xzstd4`, with support for lz4 format, by Sean Purcell +cli : fix : does not output compressed data on console +cli : fix : ignore symbolic links unless --force specified, +API : breaking change : ZSTD_createCDict_advanced(), only use compressionParameters as argument +API : added : prototypes ZSTD_*_usingCDict_advanced(), for direct control over frameParameters. +API : improved: ZSTDMT_compressCCtx() reduced memory usage +API : fix : ZSTDMT_compressCCtx() now provides srcSize in header (#634) +API : fix : src size stored in frame header is controlled at end of frame +API : fix : enforced consistent rules for pledgedSrcSize==0 (#641) +API : fix : error code "GENERIC" replaced by "dstSizeTooSmall" when appropriate +build: improved cmake script, by @Majlen +build: enabled Multi-threading support for *BSD, by Baptiste Daroussin +tools: updated Paramgrill. Command -O# provides best parameters for sample and speed target. +new : contrib/linux-kernel version, by Nick Terrell + +v1.1.4 +cli : new : can compress in *.gz format, using --format=gzip command, by Przemyslaw Skibinski +cli : new : advanced benchmark command --priority=rt +cli : fix : write on sparse-enabled file systems in 32-bits mode, by @ds77 +cli : fix : --rm remains silent when input is stdin +cli : experimental : xzstd, with support for xz/lzma decoding, by Przemyslaw Skibinski +speed : improved decompression speed in streaming mode for single shot scenarios (+5%) +memory: DDict (decompression dictionary) memory usage down from 150 KB to 20 KB +arch: 32-bits variant able to generate and decode very long matches (>32 MB), by Sean Purcell +API : new : ZSTD_findFrameCompressedSize(), ZSTD_getFrameContentSize(), ZSTD_findDecompressedSize() +API : changed : dropped support of legacy versions <= v0.3 (can be changed by modifying ZSTD_LEGACY_SUPPORT value) +build : new: meson build system in contrib/meson, by Dima Krasner +build : improved cmake script, by @Majlen +build : added -Wformat-security flag, as recommended by Padraig Brady +doc : new : educational decoder, by Sean Purcell + +v1.1.3 +cli : zstd can decompress .gz files (can be disabled with `make zstd-nogz` or `make HAVE_ZLIB=0`) +cli : new : experimental target `make zstdmt`, with multi-threading support +cli : new : improved dictionary builder "cover" (experimental), by Nick Terrell, based on prior work by Giuseppe Ottaviano. +cli : new : advanced commands for detailed parameters, by Przemyslaw Skibinski +cli : fix zstdless on Mac OS-X, by Andrew Janke +cli : fix #232 "compress non-files" +dictBuilder : improved dictionary generation quality, thanks to Nick Terrell +API : new : lib/compress/ZSTDMT_compress.h multithreading API (experimental) +API : new : ZSTD_create?Dict_byReference(), requested by Bartosz Taudul +API : new : ZDICT_finalizeDictionary() +API : fix : ZSTD_initCStream_usingCDict() properly writes dictID into frame header, by Gregory Szorc (#511) +API : fix : all symbols properly exposed in libzstd, by Nick Terrell +build : support for Solaris target, by Przemyslaw Skibinski +doc : clarified specification, by Sean Purcell + +v1.1.2 +API : streaming : decompression : changed : automatic implicit reset when chain-decoding new frames without init +API : experimental : added : dictID retrieval functions, and ZSTD_initCStream_srcSize() +API : zbuff : changed : prototypes now generate deprecation warnings +lib : improved : faster decompression speed at ultra compression settings and 32-bits mode +lib : changed : only public ZSTD_ symbols are now exposed +lib : changed : reduced usage of stack memory +lib : fixed : several corner case bugs, by Nick Terrell +cli : new : gzstd, experimental version able to decode .gz files, by Przemyslaw Skibinski +cli : new : preserve file attributes +cli : new : added zstdless and zstdgrep tools +cli : fixed : status displays total amount decoded, even for file consisting of multiple frames (like pzstd) +cli : fixed : zstdcat +zlib_wrapper : added support for gz* functions, by Przemyslaw Skibinski +install : better compatibility with FreeBSD, by Dimitry Andric +source tree : changed : zbuff source files moved to lib/deprecated + +v1.1.1 +New : command -M#, --memory=, --memlimit=, --memlimit-decompress= to limit allowed memory consumption +New : doc/zstd_manual.html, by Przemyslaw Skibinski +Improved : slightly better compression ratio at --ultra levels (>= 20) +Improved : better memory usage when using streaming compression API, thanks to @Rogier-5 report +Added : API : ZSTD_initCStream_usingCDict(), ZSTD_initDStream_usingDDict() (experimental section) +Added : example/multiple_streaming_compression.c +Changed : zstd_errors.h is now installed within /include (and replaces errors_public.h) +Updated man page +Fixed : zstd-small, zstd-compress and zstd-decompress compilation targets + +v1.1.0 +New : contrib/pzstd, parallel version of zstd, by Nick Terrell +added : NetBSD install target (#338) +Improved : speed for batches of small files +Improved : speed of zlib wrapper, by Przemyslaw Skibinski +Changed : libzstd on Windows supports legacy formats, by Christophe Chevalier +Fixed : CLI -d output to stdout by default when input is stdin (#322) +Fixed : CLI correctly detects console on Mac OS-X +Fixed : CLI supports recursive mode `-r` on Mac OS-X +Fixed : Legacy decoders use unified error codes, reported by benrg (#341), fixed by Przemyslaw Skibinski +Fixed : compatibility with OpenBSD, reported by Juan Francisco Cantero Hurtado (#319) +Fixed : compatibility with Hurd, by Przemyslaw Skibinski (#365) +Fixed : zstd-pgo, reported by octoploid (#329) + +v1.0.0 +Change Licensing, all project is now BSD, Copyright Facebook +Small decompression speed improvement +API : Streaming API supports legacy format +API : ZDICT_getDictID(), ZSTD_sizeof_{CCtx, DCtx, CStream, DStream}(), ZSTD_setDStreamParameter() +CLI supports legacy formats v0.4+ +Fixed : compression fails on certain huge files, reported by Jesse McGrew +Enhanced documentation, by Przemyslaw Skibinski + +v0.8.1 +New streaming API +Changed : --ultra now enables levels beyond 19 +Changed : -i# now selects benchmark time in second +Fixed : ZSTD_compress* can now compress > 4 GB in a single pass, reported by Nick Terrell +Fixed : speed regression on specific patterns (#272) +Fixed : support for Z_SYNC_FLUSH, by Dmitry Krot (#291) +Fixed : ICC compilation, by Przemyslaw Skibinski + +v0.8.0 +Improved : better speed on clang and gcc -O2, thanks to Eric Biggers +New : Build on FreeBSD and DragonFly, thanks to JrMarino +Changed : modified API : ZSTD_compressEnd() +Fixed : legacy mode with ZSTD_HEAPMODE=0, by Christopher Bergqvist +Fixed : premature end of frame when zero-sized raw block, reported by Eric Biggers +Fixed : large dictionaries (> 384 KB), reported by Ilona Papava +Fixed : checksum correctly checked in single-pass mode +Fixed : combined --test amd --rm, reported by Andreas M. Nilsson +Modified : minor compression level adaptations +Updated : compression format specification to v0.2.0 +changed : zstd.h moved to /lib directory + +v0.7.5 +Transition version, supporting decoding of v0.8.x + +v0.7.4 +Added : homebrew for Mac, by Daniel Cade +Added : more examples +Fixed : segfault when using small dictionaries, reported by Felix Handte +Modified : default compression level for CLI is now 3 +Updated : specification, to v0.1.1 + +v0.7.3 +New : compression format specification +New : `--` separator, stating that all following arguments are file names. Suggested by Chip Turner. +New : `ZSTD_getDecompressedSize()` +New : OpenBSD target, by Juan Francisco Cantero Hurtado +New : `examples` directory +fixed : dictBuilder using HC levels, reported by Bartosz Taudul +fixed : legacy support from ZSTD_decompress_usingDDict(), reported by Felix Handte +fixed : multi-blocks decoding with intermediate uncompressed blocks, reported by Greg Slazinski +modified : removed "mem.h" and "error_public.h" dependencies from "zstd.h" (experimental section) +modified : legacy functions no longer need magic number + +v0.7.2 +fixed : ZSTD_decompressBlock() using multiple consecutive blocks. Reported by Greg Slazinski. +fixed : potential segfault on very large files (many gigabytes). Reported by Chip Turner. +fixed : CLI displays system error message when destination file cannot be created (#231). Reported by Chip Turner. + +v0.7.1 +fixed : ZBUFF_compressEnd() called multiple times with too small `dst` buffer, reported by Christophe Chevalier +fixed : dictBuilder fails if first sample is too small, reported by Руслан Ковалёв +fixed : corruption issue, reported by cj +modified : checksum enabled by default in command line mode + +v0.7.0 +New : Support for directory compression, using `-r`, thanks to Przemyslaw Skibinski +New : Command `--rm`, to remove source file after successful de/compression +New : Visual build scripts, by Christophe Chevalier +New : Support for Sparse File-systems (do not use space for zero-filled sectors) +New : Frame checksum support +New : Support pass-through mode (when using `-df`) +API : more efficient Dictionary API : `ZSTD_compress_usingCDict()`, `ZSTD_decompress_usingDDict()` +API : create dictionary files from custom content, by Giuseppe Ottaviano +API : support for custom malloc/free functions +New : controllable Dictionary ID +New : Support for skippable frames + +v0.6.1 +New : zlib wrapper API, thanks to Przemyslaw Skibinski +New : Ability to compile compressor / decompressor separately +Changed : new lib directory structure +Fixed : Legacy codec v0.5 compatible with dictionary decompression +Fixed : Decoder corruption error (#173) +Fixed : null-string roundtrip (#176) +New : benchmark mode can select directory as input +Experimental : midipix support, VMS support + +v0.6.0 +Stronger high compression modes, thanks to Przemyslaw Skibinski +API : ZSTD_getFrameParams() provides size of decompressed content +New : highest compression modes require `--ultra` command to fully unleash their capacity +Fixed : zstd cli return error code > 0 and removes dst file artifact when decompression fails, thanks to Chip Turner + +v0.5.1 +New : Optimal parsing => Very high compression modes, thanks to Przemyslaw Skibinski +Changed : Dictionary builder integrated into libzstd and zstd cli +Changed (!) : zstd cli now uses "multiple input files" as default mode. See `zstd -h`. +Fix : high compression modes for big-endian platforms +New : zstd cli : `-t` | `--test` command + +v0.5.0 +New : dictionary builder utility +Changed : streaming & dictionary API +Improved : better compression of small data + +v0.4.7 +Improved : small compression speed improvement in HC mode +Changed : `zstd_decompress.c` has ZSTD_LEGACY_SUPPORT to 0 by default +fix : bt search bug + +v0.4.6 +fix : fast compression mode on Windows +New : cmake configuration file, thanks to Artyom Dymchenko +Improved : high compression mode on repetitive data +New : block-level API +New : ZSTD_duplicateCCtx() + +v0.4.5 +new : -m/--multiple : compress/decompress multiple files + +v0.4.4 +Fixed : high compression modes for Windows 32 bits +new : external dictionary API extended to buffered mode and accessible through command line +new : windows DLL project, thanks to Christophe Chevalier + +v0.4.3 : +new : external dictionary API +new : zstd-frugal + +v0.4.2 : +Generic minor improvements for small blocks +Fixed : big-endian compatibility, by Peter Harris (#85) + +v0.4.1 +Fixed : ZSTD_LEGACY_SUPPORT=0 build mode (reported by Luben) +removed `zstd.c` + +v0.4.0 +Command line utility compatible with high compression levels +Removed zstdhc => merged into zstd +Added : ZBUFF API (see zstd_buffered.h) +Rolling buffer support + +v0.3.6 +small blocks params + +v0.3.5 +minor generic compression improvements + +v0.3.4 +Faster fast cLevels + +v0.3.3 +Small compression ratio improvement + +v0.3.2 +Fixed Visual Studio + +v0.3.1 : +Small compression ratio improvement + +v0.3 +HC mode : compression levels 2-26 + +v0.2.2 +Fix : Visual Studio 2013 & 2015 release compilation, by Christophe Chevalier + +v0.2.1 +Fix : Read errors, advanced fuzzer tests, by Hanno Böck + +v0.2.0 +**Breaking format change** +Faster decompression speed +Can still decode v0.1 format + +v0.1.3 +fix uninitialization warning, reported by Evan Nemerson + +v0.1.2 +frame concatenation support + +v0.1.1 +fix compression bug +detects write-flush errors + +v0.1.0 +first release Copied: vendor/zstd/1.4.0/Makefile (from r346361, vendor/zstd/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/zstd/1.4.0/Makefile Fri Apr 19 00:32:13 2019 (r346362, copy of r346361, vendor/zstd/dist/Makefile) @@ -0,0 +1,392 @@ +# ################################################################ +# Copyright (c) 2015-present, Yann Collet, Facebook, Inc. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +PRGDIR = programs +ZSTDDIR = lib +BUILDIR = build +ZWRAPDIR = zlibWrapper +TESTDIR = tests +FUZZDIR = $(TESTDIR)/fuzz + +# Define nul output +VOID = /dev/null + +ifneq (,$(filter Windows%,$(OS))) +EXT =.exe +else +EXT = +endif + +## default: Build lib-release and zstd-release +.PHONY: default +default: lib-release zstd-release + +.PHONY: all +all: allmost examples manual contrib + +.PHONY: allmost +allmost: allzstd zlibwrapper + +# skip zwrapper, can't build that on alternate architectures without the proper zlib installed +.PHONY: allzstd +allzstd: lib + $(MAKE) -C $(PRGDIR) all + $(MAKE) -C $(TESTDIR) all + +.PHONY: all32 +all32: + $(MAKE) -C $(PRGDIR) zstd32 + $(MAKE) -C $(TESTDIR) all32 + +.PHONY: lib lib-release libzstd.a +lib lib-release : + @$(MAKE) -C $(ZSTDDIR) $@ + +.PHONY: zstd zstd-release +zstd zstd-release: + @$(MAKE) -C $(PRGDIR) $@ + cp $(PRGDIR)/zstd$(EXT) . + +.PHONY: zstdmt +zstdmt: + @$(MAKE) -C $(PRGDIR) $@ + cp $(PRGDIR)/zstd$(EXT) ./zstdmt$(EXT) + +.PHONY: zlibwrapper +zlibwrapper: lib + $(MAKE) -C $(ZWRAPDIR) all + +## test: run long-duration tests +.PHONY: test +DEBUGLEVEL ?= 1 +test: MOREFLAGS += -g -DDEBUGLEVEL=$(DEBUGLEVEL) -Werror +test: + MOREFLAGS="$(MOREFLAGS)" $(MAKE) -j -C $(PRGDIR) allVariants + $(MAKE) -C $(TESTDIR) $@ + +## shortest: same as `make check` +.PHONY: shortest +shortest: + $(MAKE) -C $(TESTDIR) $@ + +## check: run basic tests for `zstd` cli +.PHONY: check +check: shortest + +## examples: build all examples in `/examples` directory +.PHONY: examples +examples: lib + CPPFLAGS=-I../lib LDFLAGS=-L../lib $(MAKE) -C examples/ all + +## manual: generate API documentation in html format +.PHONY: manual +manual: + $(MAKE) -C contrib/gen_html $@ + +## man: generate man page +.PHONY: man +man: + $(MAKE) -C programs $@ + +## contrib: build all supported projects in `/contrib` directory +.PHONY: contrib +contrib: lib + $(MAKE) -C contrib/pzstd all + $(MAKE) -C contrib/seekable_format/examples all + $(MAKE) -C contrib/adaptive-compression all + $(MAKE) -C contrib/largeNbDicts all + +.PHONY: cleanTabs +cleanTabs: + cd contrib; ./cleanTabs + +.PHONY: clean +clean: + @$(MAKE) -C $(ZSTDDIR) $@ > $(VOID) + @$(MAKE) -C $(PRGDIR) $@ > $(VOID) + @$(MAKE) -C $(TESTDIR) $@ > $(VOID) + @$(MAKE) -C $(ZWRAPDIR) $@ > $(VOID) + @$(MAKE) -C examples/ $@ > $(VOID) + @$(MAKE) -C contrib/gen_html $@ > $(VOID) + @$(MAKE) -C contrib/pzstd $@ > $(VOID) + @$(MAKE) -C contrib/seekable_format/examples $@ > $(VOID) + @$(MAKE) -C contrib/adaptive-compression $@ > $(VOID) + @$(MAKE) -C contrib/largeNbDicts $@ > $(VOID) + @$(RM) zstd$(EXT) zstdmt$(EXT) tmp* + @$(RM) -r lz4 + @echo Cleaning completed + +#------------------------------------------------------------------------------ +# make install is validated only for Linux, macOS, Hurd and some BSD targets +#------------------------------------------------------------------------------ +ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD MSYS_NT Haiku)) + +HOST_OS = POSIX +CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON -DCMAKE_BUILD_TYPE=Release + +HAVE_COLORNEVER = $(shell echo a | egrep --color=never a > /dev/null 2> /dev/null && echo 1 || echo 0) +EGREP_OPTIONS ?= +ifeq ($HAVE_COLORNEVER, 1) +EGREP_OPTIONS += --color=never +endif +EGREP = egrep $(EGREP_OPTIONS) + +# Print a two column output of targets and their description. To add a target description, put a +# comment in the Makefile with the format "## : ". For example: +# +## list: Print all targets and their descriptions (if provided) +.PHONY: list +list: + @TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \ + | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \ + | $(EGREP) -v -e '^[^[:alnum:]]' | sort); \ + { \ + printf "Target Name\tDescription\n"; \ + printf "%0.s-" {1..16}; printf "\t"; printf "%0.s-" {1..40}; printf "\n"; \ + for target in $$TARGETS; do \ + line=$$($(EGREP) "^##[[:space:]]+$$target:" $(lastword $(MAKEFILE_LIST))); \ + description=$$(echo $$line | awk '{i=index($$0,":"); print substr($$0,i+1)}' | xargs); \ + printf "$$target\t$$description\n"; \ + done \ + } | column -t -s $$'\t' + +.PHONY: install armtest usan asan uasan +install: + @$(MAKE) -C $(ZSTDDIR) $@ + @$(MAKE) -C $(PRGDIR) $@ + +.PHONY: uninstall +uninstall: + @$(MAKE) -C $(ZSTDDIR) $@ + @$(MAKE) -C $(PRGDIR) $@ + +.PHONY: travis-install +travis-install: + $(MAKE) install PREFIX=~/install_test_dir + +.PHONY: gcc5build +gcc5build: clean + gcc-5 -v + CC=gcc-5 $(MAKE) all MOREFLAGS="-Werror" + +.PHONY: gcc6build +gcc6build: clean + gcc-6 -v + CC=gcc-6 $(MAKE) all MOREFLAGS="-Werror" + +.PHONY: gcc7build +gcc7build: clean + gcc-7 -v + CC=gcc-7 $(MAKE) all MOREFLAGS="-Werror" + +.PHONY: clangbuild +clangbuild: clean + clang -v + CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" $(MAKE) all + +m32build: clean + gcc -v + $(MAKE) all32 + +armbuild: clean + CC=arm-linux-gnueabi-gcc CFLAGS="-Werror" $(MAKE) allzstd + +aarch64build: clean + CC=aarch64-linux-gnu-gcc CFLAGS="-Werror" $(MAKE) allzstd + +ppcbuild: clean + CC=powerpc-linux-gnu-gcc CFLAGS="-m32 -Wno-attributes -Werror" $(MAKE) allzstd + +ppc64build: clean + CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) allzstd + +armfuzz: clean + CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest + +aarch64fuzz: clean + ld -v + CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest + +ppcfuzz: clean + CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest + +ppc64fuzz: clean + CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS="-m64 -static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest + +.PHONY: cxxtest +cxxtest: CXXFLAGS += -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror +cxxtest: clean + $(MAKE) -C $(PRGDIR) all CC="$(CXX) -Wno-deprecated" CFLAGS="$(CXXFLAGS)" # adding -Wno-deprecated to avoid clang++ warning on dealing with C files directly + +gcc5test: clean + gcc-5 -v + $(MAKE) all CC=gcc-5 MOREFLAGS="-Werror" + +gcc6test: clean + gcc-6 -v + $(MAKE) all CC=gcc-6 MOREFLAGS="-Werror" + +armtest: clean + $(MAKE) -C $(TESTDIR) datagen # use native, faster + $(MAKE) -C $(TESTDIR) test CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static" FUZZER_FLAGS=--no-big-tests + +aarch64test: + $(MAKE) -C $(TESTDIR) datagen # use native, faster + $(MAKE) -C $(TESTDIR) test CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static" FUZZER_FLAGS=--no-big-tests + +ppctest: clean + $(MAKE) -C $(TESTDIR) datagen # use native, faster + $(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static" FUZZER_FLAGS=--no-big-tests + +ppc64test: clean + $(MAKE) -C $(TESTDIR) datagen # use native, faster + $(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static" FUZZER_FLAGS=--no-big-tests + +arm-ppc-compilation: + $(MAKE) -C $(PRGDIR) clean zstd CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static" + $(MAKE) -C $(PRGDIR) clean zstd CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static" + $(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static" + $(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static" + +regressiontest: + $(MAKE) -C $(FUZZDIR) regressiontest + +uasanregressiontest: + $(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=address,undefined" CXXFLAGS="-O3 -fsanitize=address,undefined" + +msanregressiontest: + $(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=memory" CXXFLAGS="-O3 -fsanitize=memory" + +# run UBsan with -fsanitize-recover=signed-integer-overflow +# due to a bug in UBsan when doing pointer subtraction +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303 + +usan: clean + $(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=undefined -Werror" + +asan: clean + $(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=address -Werror" + +asan-%: clean + LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address -Werror" $(MAKE) -C $(TESTDIR) $* + +msan: clean + $(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=memory -fno-omit-frame-pointer -Werror" HAVE_LZMA=0 # datagen.c fails this test for no obvious reason + +msan-%: clean + LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=memory -fno-omit-frame-pointer -Werror" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) HAVE_LZMA=0 $* + +asan32: clean + $(MAKE) -C $(TESTDIR) test32 CC=clang MOREFLAGS="-g -fsanitize=address" + +uasan: clean + $(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=address,undefined -Werror" + +uasan-%: clean + LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=address,undefined -Werror" $(MAKE) -C $(TESTDIR) $* + +tsan-%: clean + LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=thread -Werror" $(MAKE) -C $(TESTDIR) $* FUZZER_FLAGS=--no-big-tests + +apt-install: + sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install $(APT_PACKAGES) + +apt-add-repo: + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo apt-get update -y -qq + +ppcinstall: + APT_PACKAGES="qemu-system-ppc qemu-user-static gcc-powerpc-linux-gnu" $(MAKE) apt-install + +arminstall: + APT_PACKAGES="qemu-system-arm qemu-user-static gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross" $(MAKE) apt-install + +valgrindinstall: + APT_PACKAGES="valgrind" $(MAKE) apt-install + +libc6install: + APT_PACKAGES="libc6-dev-i386 gcc-multilib" $(MAKE) apt-install + +gcc6install: apt-add-repo + APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-6 gcc-6-multilib" $(MAKE) apt-install + +gcc7install: apt-add-repo + APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-7 gcc-7-multilib" $(MAKE) apt-install + +gcc8install: apt-add-repo + APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-8 gcc-8-multilib" $(MAKE) apt-install + +gpp6install: apt-add-repo + APT_PACKAGES="libc6-dev-i386 g++-multilib gcc-6 g++-6 g++-6-multilib" $(MAKE) apt-install + +clang38install: + APT_PACKAGES="clang-3.8" $(MAKE) apt-install + +# Ubuntu 14.04 ships a too-old lz4 +lz4install: + [ -e lz4 ] || git clone https://github.com/lz4/lz4 && sudo $(MAKE) -C lz4 install + +endif + + +ifneq (,$(filter MSYS%,$(shell uname))) +HOST_OS = MSYS +CMAKE_PARAMS = -G"MSYS Makefiles" -DZSTD_MULTITHREAD_SUPPORT:BOOL=OFF -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON +endif + + +#------------------------------------------------------------------------ +# target specific tests +#------------------------------------------------------------------------ +ifneq (,$(filter $(HOST_OS),MSYS POSIX)) +cmakebuild: + cmake --version + $(RM) -r $(BUILDIR)/cmake/build + mkdir $(BUILDIR)/cmake/build + cd $(BUILDIR)/cmake/build ; cmake -DCMAKE_INSTALL_PREFIX:PATH=~/install_test_dir $(CMAKE_PARAMS) .. ; $(MAKE) install ; $(MAKE) uninstall + +c90build: clean + $(CC) -v + CFLAGS="-std=c90 -Werror" $(MAKE) allmost # will fail, due to missing support for `long long` + +gnu90build: clean + $(CC) -v + CFLAGS="-std=gnu90 -Werror" $(MAKE) allmost + +c99build: clean + $(CC) -v + CFLAGS="-std=c99 -Werror" $(MAKE) allmost + +gnu99build: clean + $(CC) -v + CFLAGS="-std=gnu99 -Werror" $(MAKE) allmost + +c11build: clean + $(CC) -v + CFLAGS="-std=c11 -Werror" $(MAKE) allmost + +bmix64build: clean + $(CC) -v + CFLAGS="-O3 -mbmi -Werror" $(MAKE) -C $(TESTDIR) test + +bmix32build: clean + $(CC) -v + CFLAGS="-O3 -mbmi -mx32 -Werror" $(MAKE) -C $(TESTDIR) test + +bmi32build: clean + $(CC) -v + CFLAGS="-O3 -mbmi -m32 -Werror" $(MAKE) -C $(TESTDIR) test + +# static analyzer test uses clang's scan-build +# does not analyze zlibWrapper, due to detected issues in zlib source code +staticAnalyze: SCANBUILD ?= scan-build +staticAnalyze: + $(CC) -v + CC=$(CC) CPPFLAGS=-g $(SCANBUILD) --status-bugs -v $(MAKE) allzstd examples contrib +endif Copied: vendor/zstd/1.4.0/README.md (from r346361, vendor/zstd/dist/README.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/zstd/1.4.0/README.md Fri Apr 19 00:32:13 2019 (r346362, copy of r346361, vendor/zstd/dist/README.md) @@ -0,0 +1,170 @@ +

Zstandard

+ +__Zstandard__, or `zstd` as short version, is a fast lossless compression algorithm, +targeting real-time compression scenarios at zlib-level and better compression ratios. +It's backed by a very fast entropy stage, provided by [Huff0 and FSE library](https://github.com/Cyan4973/FiniteStateEntropy). + +The project is provided as an open-source dual [BSD](LICENSE) and [GPLv2](COPYING) licensed **C** library, +and a command line utility producing and decoding `.zst`, `.gz`, `.xz` and `.lz4` files. +Should your project require another programming language, +a list of known ports and bindings is provided on [Zstandard homepage](http://www.zstd.net/#other-languages). + +**Development branch status:** + +[![Build Status][travisDevBadge]][travisLink] +[![Build status][AppveyorDevBadge]][AppveyorLink] +[![Build status][CircleDevBadge]][CircleLink] +[![Build status][CirrusDevBadge]][CirrusLink] + +[travisDevBadge]: https://travis-ci.org/facebook/zstd.svg?branch=dev "Continuous Integration test suite" +[travisLink]: https://travis-ci.org/facebook/zstd +[AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/xt38wbdxjk5mrbem/branch/dev?svg=true "Windows test suite" +[AppveyorLink]: https://ci.appveyor.com/project/YannCollet/zstd-p0yf0 +[CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite" +[CircleLink]: https://circleci.com/gh/facebook/zstd +[CirrusDevBadge]: https://api.cirrus-ci.com/github/facebook/zstd.svg?branch=dev +[CirrusLink]: https://cirrus-ci.com/github/facebook/zstd + +## Benchmarks + +For reference, several fast compression algorithms were tested and compared +on a server running Arch Linux (`Linux version 5.0.5-arch1-1`), +with a Core i9-9900K CPU @ 5.0GHz, +using [lzbench], an open-source in-memory benchmark by @inikep +compiled with [gcc] 8.2.1, +on the [Silesia compression corpus]. + +[lzbench]: https://github.com/inikep/lzbench +[Silesia compression corpus]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia +[gcc]: https://gcc.gnu.org/ + +| Compressor name | Ratio | Compression| Decompress.| +| --------------- | ------| -----------| ---------- | +| **zstd 1.4.0 -1** | 2.884 | 530 MB/s | 1360 MB/s | +| zlib 1.2.11 -1 | 2.743 | 110 MB/s | 440 MB/s | +| brotli 1.0.7 -0 | 2.701 | 430 MB/s | 470 MB/s | +| quicklz 1.5.0 -1 | 2.238 | 600 MB/s | 800 MB/s | +| lzo1x 2.09 -1 | 2.106 | 680 MB/s | 950 MB/s | +| lz4 1.8.3 | 2.101 | 800 MB/s | 4220 MB/s | +| snappy 1.1.4 | 2.073 | 580 MB/s | 2020 MB/s | +| lzf 3.6 -1 | 2.077 | 440 MB/s | 930 MB/s | + +[zlib]: http://www.zlib.net/ +[LZ4]: http://www.lz4.org/ + +Zstd can also offer stronger compression ratios at the cost of compression speed. +Speed vs Compression trade-off is configurable by small increments. +Decompression speed is preserved and remains roughly the same at all settings, +a property shared by most LZ compression algorithms, such as [zlib] or lzma. + +The following tests were run +on a server running Linux Debian (`Linux version 4.14.0-3-amd64`) +with a Core i7-6700K CPU @ 4.0GHz, +using [lzbench], an open-source in-memory benchmark by @inikep +compiled with [gcc] 7.3.0, +on the [Silesia compression corpus]. + +Compression Speed vs Ratio | Decompression Speed +---------------------------|-------------------- +![Compression Speed vs Ratio](doc/images/CSpeed2.png "Compression Speed vs Ratio") | ![Decompression Speed](doc/images/DSpeed3.png "Decompression Speed") + +A few other algorithms can produce higher compression ratios at slower speeds, falling outside of the graph. +For a larger picture including slow modes, [click on this link](doc/images/DCspeed5.png). + + +## The case for Small Data compression + +Previous charts provide results applicable to typical file and stream scenarios (several MB). Small data comes with different perspectives. + +The smaller the amount of data to compress, the more difficult it is to compress. This problem is common to all compression algorithms, and reason is, compression algorithms learn from past data how to compress future data. But at the beginning of a new data set, there is no "past" to build upon. + +To solve this situation, Zstd offers a __training mode__, which can be used to tune the algorithm for a selected type of data. +Training Zstandard is achieved by providing it with a few samples (one file per sample). The result of this training is stored in a file called "dictionary", which must be loaded before compression and decompression. +Using this dictionary, the compression ratio achievable on small data improves dramatically. + +The following example uses the `github-users` [sample set](https://github.com/facebook/zstd/releases/tag/v1.1.3), created from [github public API](https://developer.github.com/v3/users/#get-all-users). +It consists of roughly 10K records weighing about 1KB each. + +Compression Ratio | Compression Speed | Decompression Speed +------------------|-------------------|-------------------- +![Compression Ratio](doc/images/dict-cr.png "Compression Ratio") | ![Compression Speed](doc/images/dict-cs.png "Compression Speed") | ![Decompression Speed](doc/images/dict-ds.png "Decompression Speed") + + +These compression gains are achieved while simultaneously providing _faster_ compression and decompression speeds. + +Training works if there is some correlation in a family of small data samples. The more data-specific a dictionary is, the more efficient it is (there is no _universal dictionary_). +Hence, deploying one dictionary per type of data will provide the greatest benefits. +Dictionary gains are mostly effective in the first few KB. Then, the compression algorithm will gradually use previously decoded content to better compress the rest of the file. + +### Dictionary compression How To: + +1. Create the dictionary + + `zstd --train FullPathToTrainingSet/* -o dictionaryName` + +2. Compress with dictionary + + `zstd -D dictionaryName FILE` + +3. Decompress with dictionary + + `zstd -D dictionaryName --decompress FILE.zst` + + +## Build instructions + +### Makefile + +If your system is compatible with standard `make` (or `gmake`), +invoking `make` in root directory will generate `zstd` cli in root directory. + +Other available options include: +- `make install` : create and install zstd cli, library and man pages +- `make check` : create and run `zstd`, tests its behavior on local platform + +### cmake + +A `cmake` project generator is provided within `build/cmake`. +It can generate Makefiles or other build scripts +to create `zstd` binary, and `libzstd` dynamic and static libraries. + +By default, `CMAKE_BUILD_TYPE` is set to `Release`. + +### Meson + +A Meson project is provided within [`build/meson`](build/meson). Follow +build instructions in that directory. + +You can also take a look at [`.travis.yml`](.travis.yml) file for an *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 19 02:28:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B85C1582898; Fri, 19 Apr 2019 02:28:05 +0000 (UTC) (envelope-from jhibbits@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 3950D897A8; Fri, 19 Apr 2019 02:28:05 +0000 (UTC) (envelope-from jhibbits@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 1138727E4E; Fri, 19 Apr 2019 02:28:05 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3J2S4bL050208; Fri, 19 Apr 2019 02:28:04 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J2S4LV050207; Fri, 19 Apr 2019 02:28:04 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201904190228.x3J2S4LV050207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 19 Apr 2019 02:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346363 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 346363 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3950D897A8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2019 02:28:05 -0000 Author: jhibbits Date: Fri Apr 19 02:28:04 2019 New Revision: 346363 URL: https://svnweb.freebsd.org/changeset/base/346363 Log: powerpc/powernv: Make erasing before writes optional If the OPAL flash driver supports writing without erase, it adds a 'no-erase' property to the flash device node. Honor that property and don't bother erasing if it exists. Modified: head/sys/powerpc/powernv/opal_flash.c Modified: head/sys/powerpc/powernv/opal_flash.c ============================================================================== --- head/sys/powerpc/powernv/opal_flash.c Fri Apr 19 00:32:13 2019 (r346362) +++ head/sys/powerpc/powernv/opal_flash.c Fri Apr 19 02:28:04 2019 (r346363) @@ -69,6 +69,7 @@ struct opalflash_softc { struct proc *sc_p; struct bio_queue_head sc_bio_queue; int sc_opal_id; + bool sc_erase; /* Erase is needed before write. */ }; #define OPALFLASH_LOCK(sc) mtx_lock(&(sc)->sc_mtx) @@ -242,10 +243,12 @@ opalflash_write(struct opalflash_softc *sc, off_t off, count % sc->sc_disk->d_stripesize != 0) return (EIO); - /* Erase the full block first, then write in page chunks. */ - rv = opalflash_erase(sc, off, count); - if (rv != 0) - return (rv); + if (sc->sc_erase) { + /* Erase the full block first, then write in page chunks. */ + rv = opalflash_erase(sc, off, count); + if (rv != 0) + return (rv); + } token = opal_alloc_async_token(); @@ -354,6 +357,9 @@ opalflash_attach(device_t dev) device_printf(dev, "Cannot determine flash block size.\n"); return (ENXIO); } + + if (!OF_hasprop(node, "no-erase")) + sc->sc_erase = true; OPALFLASH_LOCK_INIT(sc); From owner-svn-src-all@freebsd.org Fri Apr 19 02:54:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD311582F88; Fri, 19 Apr 2019 02:54:16 +0000 (UTC) (envelope-from cem@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 57EF78A294; Fri, 19 Apr 2019 02:54:16 +0000 (UTC) (envelope-from cem@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 304732835E; Fri, 19 Apr 2019 02:54:16 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3J2sFem065810; Fri, 19 Apr 2019 02:54:15 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J2sDUh065797; Fri, 19 Apr 2019 02:54:13 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201904190254.x3J2sDUh065797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 19 Apr 2019 02:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346364 - in head: sys/contrib/zstd sys/contrib/zstd/contrib/docker sys/contrib/zstd/contrib/experimental_dict_builders sys/contrib/zstd/contrib/largeNbDicts sys/contrib/zstd/contrib/pr... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: sys/contrib/zstd sys/contrib/zstd/contrib/docker sys/contrib/zstd/contrib/experimental_dict_builders sys/contrib/zstd/contrib/largeNbDicts sys/contrib/zstd/contrib/premake sys/contrib/zstd/co... X-SVN-Commit-Revision: 346364 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 57EF78A294 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2019 02:54:17 -0000 Author: cem Date: Fri Apr 19 02:54:13 2019 New Revision: 346364 URL: https://svnweb.freebsd.org/changeset/base/346364 Log: Update to Zstandard 1.4.0 The full release notes can be found on Github: https://github.com/facebook/zstd/releases/tag/v1.4.0 Relnotes: yes Added: head/sys/contrib/zstd/CHANGELOG - copied unchanged from r346362, vendor/zstd/dist/CHANGELOG head/sys/contrib/zstd/contrib/docker/ - copied from r346362, vendor/zstd/dist/contrib/docker/ head/sys/contrib/zstd/contrib/experimental_dict_builders/ - copied from r346362, vendor/zstd/dist/contrib/experimental_dict_builders/ head/sys/contrib/zstd/contrib/largeNbDicts/ - copied from r346362, vendor/zstd/dist/contrib/largeNbDicts/ head/sys/contrib/zstd/contrib/premake/ - copied from r346362, vendor/zstd/dist/contrib/premake/ head/sys/contrib/zstd/contrib/snap/ - copied from r346362, vendor/zstd/dist/contrib/snap/ head/sys/contrib/zstd/examples/ - copied from r346362, vendor/zstd/dist/examples/ head/sys/contrib/zstd/programs/timefn.c - copied unchanged from r346362, vendor/zstd/dist/programs/timefn.c head/sys/contrib/zstd/programs/timefn.h - copied unchanged from r346362, vendor/zstd/dist/programs/timefn.h head/sys/contrib/zstd/tests/fuzz/dictionary_decompress.c - copied unchanged from r346362, vendor/zstd/dist/tests/fuzz/dictionary_decompress.c head/sys/contrib/zstd/tests/fuzz/dictionary_round_trip.c - copied unchanged from r346362, vendor/zstd/dist/tests/fuzz/dictionary_round_trip.c Modified: head/sys/contrib/zstd/Makefile head/sys/contrib/zstd/README.md head/sys/contrib/zstd/contrib/pzstd/Makefile head/sys/contrib/zstd/contrib/pzstd/Pzstd.cpp head/sys/contrib/zstd/contrib/pzstd/utils/Range.h head/sys/contrib/zstd/contrib/pzstd/utils/ResourcePool.h head/sys/contrib/zstd/doc/README.md head/sys/contrib/zstd/doc/educational_decoder/Makefile head/sys/contrib/zstd/doc/educational_decoder/zstd_decompress.c head/sys/contrib/zstd/doc/zstd_manual.html head/sys/contrib/zstd/lib/Makefile head/sys/contrib/zstd/lib/README.md head/sys/contrib/zstd/lib/common/compiler.h head/sys/contrib/zstd/lib/common/fse.h head/sys/contrib/zstd/lib/common/threading.c head/sys/contrib/zstd/lib/common/xxhash.c head/sys/contrib/zstd/lib/common/zstd_internal.h head/sys/contrib/zstd/lib/compress/fse_compress.c head/sys/contrib/zstd/lib/compress/zstd_compress.c head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h head/sys/contrib/zstd/lib/compress/zstd_fast.c head/sys/contrib/zstd/lib/compress/zstd_lazy.h head/sys/contrib/zstd/lib/compress/zstd_ldm.c head/sys/contrib/zstd/lib/compress/zstd_opt.c head/sys/contrib/zstd/lib/compress/zstdmt_compress.c head/sys/contrib/zstd/lib/compress/zstdmt_compress.h head/sys/contrib/zstd/lib/decompress/zstd_ddict.c head/sys/contrib/zstd/lib/decompress/zstd_decompress.c head/sys/contrib/zstd/lib/decompress/zstd_decompress_block.c head/sys/contrib/zstd/lib/decompress/zstd_decompress_internal.h head/sys/contrib/zstd/lib/dictBuilder/cover.c head/sys/contrib/zstd/lib/dictBuilder/cover.h head/sys/contrib/zstd/lib/dictBuilder/fastcover.c head/sys/contrib/zstd/lib/dictBuilder/zdict.h head/sys/contrib/zstd/lib/legacy/zstd_legacy.h head/sys/contrib/zstd/lib/legacy/zstd_v01.c head/sys/contrib/zstd/lib/legacy/zstd_v01.h head/sys/contrib/zstd/lib/legacy/zstd_v02.c head/sys/contrib/zstd/lib/legacy/zstd_v02.h head/sys/contrib/zstd/lib/legacy/zstd_v03.c head/sys/contrib/zstd/lib/legacy/zstd_v03.h head/sys/contrib/zstd/lib/legacy/zstd_v04.c head/sys/contrib/zstd/lib/legacy/zstd_v04.h head/sys/contrib/zstd/lib/legacy/zstd_v05.c head/sys/contrib/zstd/lib/legacy/zstd_v05.h head/sys/contrib/zstd/lib/legacy/zstd_v06.c head/sys/contrib/zstd/lib/legacy/zstd_v06.h head/sys/contrib/zstd/lib/legacy/zstd_v07.c head/sys/contrib/zstd/lib/legacy/zstd_v07.h head/sys/contrib/zstd/lib/zstd.h head/sys/contrib/zstd/programs/Makefile head/sys/contrib/zstd/programs/benchfn.c head/sys/contrib/zstd/programs/benchfn.h head/sys/contrib/zstd/programs/benchzstd.c head/sys/contrib/zstd/programs/benchzstd.h head/sys/contrib/zstd/programs/dibio.c head/sys/contrib/zstd/programs/fileio.c head/sys/contrib/zstd/programs/fileio.h head/sys/contrib/zstd/programs/platform.h head/sys/contrib/zstd/programs/util.c head/sys/contrib/zstd/programs/util.h head/sys/contrib/zstd/programs/zstd.1 head/sys/contrib/zstd/programs/zstd.1.md head/sys/contrib/zstd/programs/zstdcli.c head/sys/contrib/zstd/programs/zstdgrep head/sys/contrib/zstd/tests/Makefile head/sys/contrib/zstd/tests/README.md head/sys/contrib/zstd/tests/decodecorpus.c head/sys/contrib/zstd/tests/fullbench.c head/sys/contrib/zstd/tests/fuzz/Makefile head/sys/contrib/zstd/tests/fuzz/README.md head/sys/contrib/zstd/tests/fuzz/fuzz.py head/sys/contrib/zstd/tests/fuzz/fuzz_helpers.h head/sys/contrib/zstd/tests/fuzz/regression_driver.c head/sys/contrib/zstd/tests/fuzz/simple_round_trip.c head/sys/contrib/zstd/tests/fuzz/stream_decompress.c head/sys/contrib/zstd/tests/fuzz/stream_round_trip.c head/sys/contrib/zstd/tests/fuzz/zstd_helpers.c head/sys/contrib/zstd/tests/fuzz/zstd_helpers.h head/sys/contrib/zstd/tests/fuzzer.c head/sys/contrib/zstd/tests/legacy.c head/sys/contrib/zstd/tests/paramgrill.c head/sys/contrib/zstd/tests/playTests.sh head/sys/contrib/zstd/tests/poolTests.c head/sys/contrib/zstd/tests/regression/config.c head/sys/contrib/zstd/tests/regression/method.c head/sys/contrib/zstd/tests/regression/results.csv head/sys/contrib/zstd/tests/regression/test.c head/sys/contrib/zstd/tests/roundTripCrash.c head/sys/contrib/zstd/tests/symbols.c head/sys/contrib/zstd/tests/zbufftest.c head/sys/contrib/zstd/tests/zstreamtest.c head/sys/contrib/zstd/zlibWrapper/Makefile head/sys/contrib/zstd/zlibWrapper/README.md head/sys/contrib/zstd/zlibWrapper/examples/fitblk.c head/sys/contrib/zstd/zlibWrapper/examples/fitblk_original.c head/sys/contrib/zstd/zlibWrapper/examples/zwrapbench.c head/sys/contrib/zstd/zlibWrapper/gzguts.h head/usr.bin/zstd/Makefile Directory Properties: head/sys/contrib/zstd/ (props changed) Copied: head/sys/contrib/zstd/CHANGELOG (from r346362, vendor/zstd/dist/CHANGELOG) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/zstd/CHANGELOG Fri Apr 19 02:54:13 2019 (r346364, copy of r346362, vendor/zstd/dist/CHANGELOG) @@ -0,0 +1,461 @@ +v1.4.0 +perf: Improve level 1 compression speed in most scenarios by 6% by @gbtucker and @terrelln +api: Move the advanced API, including all functions in the staging section, to the stable section +api: Make ZSTD_e_flush and ZSTD_e_end block for maximum forward progress +api: Rename ZSTD_CCtxParam_getParameter to ZSTD_CCtxParams_getParameter +api: Rename ZSTD_CCtxParam_setParameter to ZSTD_CCtxParams_setParameter +api: Don't export ZSTDMT functions from the shared library by default +api: Require ZSTD_MULTITHREAD to be defined to use ZSTDMT +api: Add ZSTD_decompressBound() to provide an upper bound on decompressed size by @shakeelrao +api: Fix ZSTD_decompressDCtx() corner cases with a dictionary +api: Move ZSTD_getDictID_*() functions to the stable section +api: Add ZSTD_c_literalCompressionMode flag to enable or disable literal compression by @terrelln +api: Allow compression parameters to be set when a dictionary is used +api: Allow setting parameters before or after ZSTD_CCtx_loadDictionary() is called +api: Fix ZSTD_estimateCStreamSize_usingCCtxParams() +api: Setting ZSTD_d_maxWindowLog to 0 means use the default +cli: Ensure that a dictionary is not used to compress itself by @shakeelrao +cli: Add --[no-]compress-literals flag to enable or disable literal compression +doc: Update the examples to use the advanced API +doc: Explain how to transition from old streaming functions to the advanced API in the header +build: Improve the Windows release packages +build: Improve CMake build by @hjmjohnson +build: Build fixes for FreeBSD by @lwhsu +build: Remove redundant warnings by @thatsafunnyname +build: Fix tests on OpenBSD by @bket +build: Extend fuzzer build system to work with the new clang engine +build: CMake now creates the libzstd.so.1 symlink +build: Improve Menson build by @lzutao +misc: Fix symbolic link detection on FreeBSD +misc: Use physical core count for -T0 on FreeBSD by @cemeyer +misc: Fix zstd --list on truncated files by @kostmo +misc: Improve logging in debug mode by @felixhandte +misc: Add CirrusCI tests by @lwhsu +misc: Optimize dictionary memory usage in corner cases +misc: Improve the dictionary builder on small or homogeneous data +misc: Fix spelling across the repo by @jsoref + +v1.3.8 +perf: better decompression speed on large files (+7%) and cold dictionaries (+15%) +perf: slightly better compression ratio at high compression modes +api : finalized advanced API, last stage before "stable" status +api : new --rsyncable mode, by @terrelln +api : support decompression of empty frames into NULL (used to be an error) (#1385) +build: new set of macros to build a minimal size decoder, by @felixhandte +build: fix compilation on MIPS32, reported by @clbr (#1441) +build: fix compilation with multiple -arch flags, by @ryandesign +build: highly upgraded meson build, by @lzutao +build: improved buck support, by @obelisk +build: fix cmake script : can create debug build, by @pitrou +build: Makefile : grep works on both colored consoles and systems without color support +build: fixed zstd-pgo, by @bmwiedemann +cli : support ZSTD_CLEVEL environment variable, by @yijinfb (#1423) +cli : --no-progress flag, preserving final summary (#1371), by @terrelln +cli : ensure destination file is not source file (#1422) +cli : clearer error messages, especially when input file not present +doc : clarified zstd_compression_format.md, by @ulikunitz +misc: fixed zstdgrep, returns 1 on failure, by @lzutao +misc: NEWS renamed as CHANGELOG, in accordance with fboss + +v1.3.7 +perf: slightly better decompression speed on clang (depending on hardware target) +fix : performance of dictionary compression for small input < 4 KB at levels 9 and 10 +build: no longer build backtrace by default in release mode; restrict further automatic mode +build: control backtrace support through build macro BACKTRACE +misc: added man pages for zstdless and zstdgrep, by @samrussell + +v1.3.6 +perf: much faster dictionary builder, by @jenniferliu +perf: faster dictionary compression on small data when using multiple contexts, by @felixhandte +perf: faster dictionary decompression when using a very large number of dictionaries simultaneously +cli : fix : does no longer overwrite destination when source does not exist (#1082) +cli : new command --adapt, for automatic compression level adaptation +api : fix : block api can be streamed with > 4 GB, reported by @catid +api : reduced ZSTD_DDict size by 2 KB +api : minimum negative compression level is defined, and can be queried using ZSTD_minCLevel(). +build: support Haiku target, by @korli +build: Read Legacy format is limited to v0.5+ by default. Can be changed at compile time with macro ZSTD_LEGACY_SUPPORT. +doc : zstd_compression_format.md updated to match wording in IETF RFC 8478 +misc: tests/paramgrill, a parameter optimizer, by @GeorgeLu97 + +v1.3.5 +perf: much faster dictionary compression, by @felixhandte +perf: small quality improvement for dictionary generation, by @terrelln +perf: slightly improved high compression levels (notably level 19) +mem : automatic memory release for long duration contexts +cli : fix : overlapLog can be manually set +cli : fix : decoding invalid lz4 frames +api : fix : performance degradation for dictionary compression when using advanced API, by @terrelln +api : change : clarify ZSTD_CCtx_reset() vs ZSTD_CCtx_resetParameters(), by @terrelln +build: select custom libzstd scope through control macros, by @GeorgeLu97 +build: OpenBSD patch, by @bket +build: make and make all are compatible with -j +doc : clarify zstd_compression_format.md, updated for IETF RFC process +misc: pzstd compatible with reproducible compilation, by @lamby + +v1.3.4 +perf: faster speed (especially decoding speed) on recent cpus (haswell+) +perf: much better performance associating --long with multi-threading, by @terrelln +perf: better compression at levels 13-15 +cli : asynchronous compression by default, for faster experience (use --single-thread for former behavior) +cli : smoother status report in multi-threading mode +cli : added command --fast=#, for faster compression modes +cli : fix crash when not overwriting existing files, by Pádraig Brady (@pixelb) +api : `nbThreads` becomes `nbWorkers` : 1 triggers asynchronous mode +api : compression levels can be negative, for even more speed +api : ZSTD_getFrameProgression() : get precise progress status of ZSTDMT anytime +api : ZSTDMT can accept new compression parameters during compression +api : implemented all advanced dictionary decompression prototypes +build: improved meson recipe, by Shawn Landden (@shawnl) +build: VS2017 scripts, by @HaydnTrigg +misc: all /contrib projects fixed +misc: added /contrib/docker script by @gyscos + +v1.3.3 +perf: faster zstd_opt strategy (levels 16-19) +fix : bug #944 : multithreading with shared ditionary and large data, reported by @gsliepen +cli : fix : content size written in header by default +cli : fix : improved LZ4 format support, by @felixhandte +cli : new : hidden command `-S`, to benchmark multiple files while generating one result per file +api : fix : support large skippable frames, by @terrelln +api : fix : streaming interface was adding a useless 3-bytes null block to small frames +api : change : when setting `pledgedSrcSize`, use `ZSTD_CONTENTSIZE_UNKNOWN` macro value to mean "unknown" +build: fix : compilation under rhel6 and centos6, reported by @pixelb +build: added `check` target + +v1.3.2 +new : long range mode, using --long command, by Stella Lau (@stellamplau) +new : ability to generate and decode magicless frames (#591) +changed : maximum nb of threads reduced to 200, to avoid address space exhaustion in 32-bits mode +fix : multi-threading compression works with custom allocators +fix : ZSTD_sizeof_CStream() was over-evaluating memory usage +fix : a rare compression bug when compression generates very large distances and bunch of other conditions (only possible at --ultra -22) +fix : 32-bits build can now decode large offsets (levels 21+) +cli : added LZ4 frame support by default, by Felix Handte (@felixhandte) +cli : improved --list output +cli : new : can split input file for dictionary training, using command -B# +cli : new : clean operation artefact on Ctrl-C interruption +cli : fix : do not change /dev/null permissions when using command -t with root access, reported by @mike155 (#851) +cli : fix : write file size in header in multiple-files mode +api : added macro ZSTD_COMPRESSBOUND() for static allocation +api : experimental : new advanced decompression API +api : fix : sizeof_CCtx() used to over-estimate +build: fix : no-multithread variant compiles without pool.c dependency, reported by Mitchell Blank Jr (@mitchblank) (#819) +build: better compatibility with reproducible builds, by Bernhard M. Wiedemann (@bmwiedemann) (#818) +example : added streaming_memory_usage +license : changed /examples license to BSD + GPLv2 +license : fix a few header files to reflect new license (#825) + +v1.3.1 +New license : BSD + GPLv2 +perf: substantially decreased memory usage in Multi-threading mode, thanks to reports by Tino Reichardt (@mcmilk) +perf: Multi-threading supports up to 256 threads. Cap at 256 when more are requested (#760) +cli : improved and fixed --list command, by @ib (#772) +cli : command -vV to list supported formats, by @ib (#771) +build : fixed binary variants, reported by @svenha (#788) +build : fix Visual compilation for non x86/x64 targets, reported by Greg Slazinski (@GregSlazinski) (#718) +API exp : breaking change : ZSTD_getframeHeader() provides more information +API exp : breaking change : pinned down values of error codes +doc : fixed huffman example, by Ulrich Kunitz (@ulikunitz) +new : contrib/adaptive-compression, I/O driven compression strength, by Paul Cruz (@paulcruz74) +new : contrib/long_distance_matching, statistics by Stella Lau (@stellamplau) +updated : contrib/linux-kernel, by Nick Terrell (@terrelln) + +v1.3.0 +cli : new : `--list` command, by Paul Cruz +cli : changed : xz/lzma support enabled by default +cli : changed : `-t *` continue processing list after a decompression error +API : added : ZSTD_versionString() +API : promoted to stable status : ZSTD_getFrameContentSize(), by Sean Purcell +API exp : new advanced API : ZSTD_compress_generic(), ZSTD_CCtx_setParameter() +API exp : new : API for static or external allocation : ZSTD_initStatic?Ctx() +API exp : added : ZSTD_decompressBegin_usingDDict(), requested by Guy Riddle (#700) +API exp : clarified memory estimation / measurement functions. +API exp : changed : strongest strategy renamed ZSTD_btultra, fastest strategy ZSTD_fast set to 1 +tools : decodecorpus can generate random dictionary-compressed samples, by Paul Cruz +new : contrib/seekable_format, demo and API, by Sean Purcell +changed : contrib/linux-kernel, updated version and license, by Nick Terrell + +v1.2.0 +cli : changed : Multithreading enabled by default (use target zstd-nomt or HAVE_THREAD=0 to disable) +cli : new : command -T0 means "detect and use nb of cores", by Sean Purcell +cli : new : zstdmt symlink hardwired to `zstd -T0` +cli : new : command --threads=# (#671) +cli : changed : cover dictionary builder by default, for improved quality, by Nick Terrell +cli : new : commands --train-cover and --train-legacy, to select dictionary algorithm and parameters +cli : experimental targets `zstd4` and `xzstd4`, with support for lz4 format, by Sean Purcell +cli : fix : does not output compressed data on console +cli : fix : ignore symbolic links unless --force specified, +API : breaking change : ZSTD_createCDict_advanced(), only use compressionParameters as argument +API : added : prototypes ZSTD_*_usingCDict_advanced(), for direct control over frameParameters. +API : improved: ZSTDMT_compressCCtx() reduced memory usage +API : fix : ZSTDMT_compressCCtx() now provides srcSize in header (#634) +API : fix : src size stored in frame header is controlled at end of frame +API : fix : enforced consistent rules for pledgedSrcSize==0 (#641) +API : fix : error code "GENERIC" replaced by "dstSizeTooSmall" when appropriate +build: improved cmake script, by @Majlen +build: enabled Multi-threading support for *BSD, by Baptiste Daroussin +tools: updated Paramgrill. Command -O# provides best parameters for sample and speed target. +new : contrib/linux-kernel version, by Nick Terrell + +v1.1.4 +cli : new : can compress in *.gz format, using --format=gzip command, by Przemyslaw Skibinski +cli : new : advanced benchmark command --priority=rt +cli : fix : write on sparse-enabled file systems in 32-bits mode, by @ds77 +cli : fix : --rm remains silent when input is stdin +cli : experimental : xzstd, with support for xz/lzma decoding, by Przemyslaw Skibinski +speed : improved decompression speed in streaming mode for single shot scenarios (+5%) +memory: DDict (decompression dictionary) memory usage down from 150 KB to 20 KB +arch: 32-bits variant able to generate and decode very long matches (>32 MB), by Sean Purcell +API : new : ZSTD_findFrameCompressedSize(), ZSTD_getFrameContentSize(), ZSTD_findDecompressedSize() +API : changed : dropped support of legacy versions <= v0.3 (can be changed by modifying ZSTD_LEGACY_SUPPORT value) +build : new: meson build system in contrib/meson, by Dima Krasner +build : improved cmake script, by @Majlen +build : added -Wformat-security flag, as recommended by Padraig Brady +doc : new : educational decoder, by Sean Purcell + +v1.1.3 +cli : zstd can decompress .gz files (can be disabled with `make zstd-nogz` or `make HAVE_ZLIB=0`) +cli : new : experimental target `make zstdmt`, with multi-threading support +cli : new : improved dictionary builder "cover" (experimental), by Nick Terrell, based on prior work by Giuseppe Ottaviano. +cli : new : advanced commands for detailed parameters, by Przemyslaw Skibinski +cli : fix zstdless on Mac OS-X, by Andrew Janke +cli : fix #232 "compress non-files" +dictBuilder : improved dictionary generation quality, thanks to Nick Terrell +API : new : lib/compress/ZSTDMT_compress.h multithreading API (experimental) +API : new : ZSTD_create?Dict_byReference(), requested by Bartosz Taudul +API : new : ZDICT_finalizeDictionary() +API : fix : ZSTD_initCStream_usingCDict() properly writes dictID into frame header, by Gregory Szorc (#511) +API : fix : all symbols properly exposed in libzstd, by Nick Terrell +build : support for Solaris target, by Przemyslaw Skibinski +doc : clarified specification, by Sean Purcell + +v1.1.2 +API : streaming : decompression : changed : automatic implicit reset when chain-decoding new frames without init +API : experimental : added : dictID retrieval functions, and ZSTD_initCStream_srcSize() +API : zbuff : changed : prototypes now generate deprecation warnings +lib : improved : faster decompression speed at ultra compression settings and 32-bits mode +lib : changed : only public ZSTD_ symbols are now exposed +lib : changed : reduced usage of stack memory +lib : fixed : several corner case bugs, by Nick Terrell +cli : new : gzstd, experimental version able to decode .gz files, by Przemyslaw Skibinski +cli : new : preserve file attributes +cli : new : added zstdless and zstdgrep tools +cli : fixed : status displays total amount decoded, even for file consisting of multiple frames (like pzstd) +cli : fixed : zstdcat +zlib_wrapper : added support for gz* functions, by Przemyslaw Skibinski +install : better compatibility with FreeBSD, by Dimitry Andric +source tree : changed : zbuff source files moved to lib/deprecated + +v1.1.1 +New : command -M#, --memory=, --memlimit=, --memlimit-decompress= to limit allowed memory consumption +New : doc/zstd_manual.html, by Przemyslaw Skibinski +Improved : slightly better compression ratio at --ultra levels (>= 20) +Improved : better memory usage when using streaming compression API, thanks to @Rogier-5 report +Added : API : ZSTD_initCStream_usingCDict(), ZSTD_initDStream_usingDDict() (experimental section) +Added : example/multiple_streaming_compression.c +Changed : zstd_errors.h is now installed within /include (and replaces errors_public.h) +Updated man page +Fixed : zstd-small, zstd-compress and zstd-decompress compilation targets + +v1.1.0 +New : contrib/pzstd, parallel version of zstd, by Nick Terrell +added : NetBSD install target (#338) +Improved : speed for batches of small files +Improved : speed of zlib wrapper, by Przemyslaw Skibinski +Changed : libzstd on Windows supports legacy formats, by Christophe Chevalier +Fixed : CLI -d output to stdout by default when input is stdin (#322) +Fixed : CLI correctly detects console on Mac OS-X +Fixed : CLI supports recursive mode `-r` on Mac OS-X +Fixed : Legacy decoders use unified error codes, reported by benrg (#341), fixed by Przemyslaw Skibinski +Fixed : compatibility with OpenBSD, reported by Juan Francisco Cantero Hurtado (#319) +Fixed : compatibility with Hurd, by Przemyslaw Skibinski (#365) +Fixed : zstd-pgo, reported by octoploid (#329) + +v1.0.0 +Change Licensing, all project is now BSD, Copyright Facebook +Small decompression speed improvement +API : Streaming API supports legacy format +API : ZDICT_getDictID(), ZSTD_sizeof_{CCtx, DCtx, CStream, DStream}(), ZSTD_setDStreamParameter() +CLI supports legacy formats v0.4+ +Fixed : compression fails on certain huge files, reported by Jesse McGrew +Enhanced documentation, by Przemyslaw Skibinski + +v0.8.1 +New streaming API +Changed : --ultra now enables levels beyond 19 +Changed : -i# now selects benchmark time in second +Fixed : ZSTD_compress* can now compress > 4 GB in a single pass, reported by Nick Terrell +Fixed : speed regression on specific patterns (#272) +Fixed : support for Z_SYNC_FLUSH, by Dmitry Krot (#291) +Fixed : ICC compilation, by Przemyslaw Skibinski + +v0.8.0 +Improved : better speed on clang and gcc -O2, thanks to Eric Biggers +New : Build on FreeBSD and DragonFly, thanks to JrMarino +Changed : modified API : ZSTD_compressEnd() +Fixed : legacy mode with ZSTD_HEAPMODE=0, by Christopher Bergqvist +Fixed : premature end of frame when zero-sized raw block, reported by Eric Biggers +Fixed : large dictionaries (> 384 KB), reported by Ilona Papava +Fixed : checksum correctly checked in single-pass mode +Fixed : combined --test amd --rm, reported by Andreas M. Nilsson +Modified : minor compression level adaptations +Updated : compression format specification to v0.2.0 +changed : zstd.h moved to /lib directory + +v0.7.5 +Transition version, supporting decoding of v0.8.x + +v0.7.4 +Added : homebrew for Mac, by Daniel Cade +Added : more examples +Fixed : segfault when using small dictionaries, reported by Felix Handte +Modified : default compression level for CLI is now 3 +Updated : specification, to v0.1.1 + +v0.7.3 +New : compression format specification +New : `--` separator, stating that all following arguments are file names. Suggested by Chip Turner. +New : `ZSTD_getDecompressedSize()` +New : OpenBSD target, by Juan Francisco Cantero Hurtado +New : `examples` directory +fixed : dictBuilder using HC levels, reported by Bartosz Taudul +fixed : legacy support from ZSTD_decompress_usingDDict(), reported by Felix Handte +fixed : multi-blocks decoding with intermediate uncompressed blocks, reported by Greg Slazinski +modified : removed "mem.h" and "error_public.h" dependencies from "zstd.h" (experimental section) +modified : legacy functions no longer need magic number + +v0.7.2 +fixed : ZSTD_decompressBlock() using multiple consecutive blocks. Reported by Greg Slazinski. +fixed : potential segfault on very large files (many gigabytes). Reported by Chip Turner. +fixed : CLI displays system error message when destination file cannot be created (#231). Reported by Chip Turner. + +v0.7.1 +fixed : ZBUFF_compressEnd() called multiple times with too small `dst` buffer, reported by Christophe Chevalier +fixed : dictBuilder fails if first sample is too small, reported by Руслан Ковалёв +fixed : corruption issue, reported by cj +modified : checksum enabled by default in command line mode + +v0.7.0 +New : Support for directory compression, using `-r`, thanks to Przemyslaw Skibinski +New : Command `--rm`, to remove source file after successful de/compression +New : Visual build scripts, by Christophe Chevalier +New : Support for Sparse File-systems (do not use space for zero-filled sectors) +New : Frame checksum support +New : Support pass-through mode (when using `-df`) +API : more efficient Dictionary API : `ZSTD_compress_usingCDict()`, `ZSTD_decompress_usingDDict()` +API : create dictionary files from custom content, by Giuseppe Ottaviano +API : support for custom malloc/free functions +New : controllable Dictionary ID +New : Support for skippable frames + +v0.6.1 +New : zlib wrapper API, thanks to Przemyslaw Skibinski +New : Ability to compile compressor / decompressor separately +Changed : new lib directory structure +Fixed : Legacy codec v0.5 compatible with dictionary decompression +Fixed : Decoder corruption error (#173) +Fixed : null-string roundtrip (#176) +New : benchmark mode can select directory as input +Experimental : midipix support, VMS support + +v0.6.0 +Stronger high compression modes, thanks to Przemyslaw Skibinski +API : ZSTD_getFrameParams() provides size of decompressed content +New : highest compression modes require `--ultra` command to fully unleash their capacity +Fixed : zstd cli return error code > 0 and removes dst file artifact when decompression fails, thanks to Chip Turner + +v0.5.1 +New : Optimal parsing => Very high compression modes, thanks to Przemyslaw Skibinski +Changed : Dictionary builder integrated into libzstd and zstd cli +Changed (!) : zstd cli now uses "multiple input files" as default mode. See `zstd -h`. +Fix : high compression modes for big-endian platforms +New : zstd cli : `-t` | `--test` command + +v0.5.0 +New : dictionary builder utility +Changed : streaming & dictionary API +Improved : better compression of small data + +v0.4.7 +Improved : small compression speed improvement in HC mode +Changed : `zstd_decompress.c` has ZSTD_LEGACY_SUPPORT to 0 by default +fix : bt search bug + +v0.4.6 +fix : fast compression mode on Windows +New : cmake configuration file, thanks to Artyom Dymchenko +Improved : high compression mode on repetitive data +New : block-level API +New : ZSTD_duplicateCCtx() + +v0.4.5 +new : -m/--multiple : compress/decompress multiple files + +v0.4.4 +Fixed : high compression modes for Windows 32 bits +new : external dictionary API extended to buffered mode and accessible through command line +new : windows DLL project, thanks to Christophe Chevalier + +v0.4.3 : +new : external dictionary API +new : zstd-frugal + +v0.4.2 : +Generic minor improvements for small blocks +Fixed : big-endian compatibility, by Peter Harris (#85) + +v0.4.1 +Fixed : ZSTD_LEGACY_SUPPORT=0 build mode (reported by Luben) +removed `zstd.c` + +v0.4.0 +Command line utility compatible with high compression levels +Removed zstdhc => merged into zstd +Added : ZBUFF API (see zstd_buffered.h) +Rolling buffer support + +v0.3.6 +small blocks params + +v0.3.5 +minor generic compression improvements + +v0.3.4 +Faster fast cLevels + +v0.3.3 +Small compression ratio improvement + +v0.3.2 +Fixed Visual Studio + +v0.3.1 : +Small compression ratio improvement + +v0.3 +HC mode : compression levels 2-26 + +v0.2.2 +Fix : Visual Studio 2013 & 2015 release compilation, by Christophe Chevalier + +v0.2.1 +Fix : Read errors, advanced fuzzer tests, by Hanno Böck + +v0.2.0 +**Breaking format change** +Faster decompression speed +Can still decode v0.1 format + +v0.1.3 +fix uninitialization warning, reported by Evan Nemerson + +v0.1.2 +frame concatenation support + +v0.1.1 +fix compression bug +detects write-flush errors + +v0.1.0 +first release Modified: head/sys/contrib/zstd/Makefile ============================================================================== --- head/sys/contrib/zstd/Makefile Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/Makefile Fri Apr 19 02:54:13 2019 (r346364) @@ -156,7 +156,7 @@ list: done \ } | column -t -s $$'\t' -.PHONY: install clangtest armtest usan asan uasan +.PHONY: install armtest usan asan uasan install: @$(MAKE) -C $(ZSTDDIR) $@ @$(MAKE) -C $(PRGDIR) $@ @@ -188,7 +188,7 @@ gcc7build: clean .PHONY: clangbuild clangbuild: clean clang -v - CXX=clang++ CC=clang $(MAKE) all MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" + CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" $(MAKE) all m32build: clean gcc -v @@ -231,10 +231,6 @@ gcc5test: clean gcc6test: clean gcc-6 -v $(MAKE) all CC=gcc-6 MOREFLAGS="-Werror" - -clangtest: clean - clang -v - $(MAKE) all CXX=clang++ CC=clang MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" armtest: clean $(MAKE) -C $(TESTDIR) datagen # use native, faster Modified: head/sys/contrib/zstd/README.md ============================================================================== --- head/sys/contrib/zstd/README.md Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/README.md Fri Apr 19 02:54:13 2019 (r346364) @@ -14,6 +14,7 @@ a list of known ports and bindings is provided on [Zst [![Build Status][travisDevBadge]][travisLink] [![Build status][AppveyorDevBadge]][AppveyorLink] [![Build status][CircleDevBadge]][CircleLink] +[![Build status][CirrusDevBadge]][CirrusLink] [travisDevBadge]: https://travis-ci.org/facebook/zstd.svg?branch=dev "Continuous Integration test suite" [travisLink]: https://travis-ci.org/facebook/zstd @@ -21,14 +22,16 @@ a list of known ports and bindings is provided on [Zst [AppveyorLink]: https://ci.appveyor.com/project/YannCollet/zstd-p0yf0 [CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite" [CircleLink]: https://circleci.com/gh/facebook/zstd +[CirrusDevBadge]: https://api.cirrus-ci.com/github/facebook/zstd.svg?branch=dev +[CirrusLink]: https://cirrus-ci.com/github/facebook/zstd ## Benchmarks For reference, several fast compression algorithms were tested and compared -on a server running Linux Debian (`Linux version 4.14.0-3-amd64`), -with a Core i7-6700K CPU @ 4.0GHz, +on a server running Arch Linux (`Linux version 5.0.5-arch1-1`), +with a Core i9-9900K CPU @ 5.0GHz, using [lzbench], an open-source in-memory benchmark by @inikep -compiled with [gcc] 7.3.0, +compiled with [gcc] 8.2.1, on the [Silesia compression corpus]. [lzbench]: https://github.com/inikep/lzbench @@ -37,14 +40,14 @@ on the [Silesia compression corpus]. | Compressor name | Ratio | Compression| Decompress.| | --------------- | ------| -----------| ---------- | -| **zstd 1.3.4 -1** | 2.877 | 470 MB/s | 1380 MB/s | -| zlib 1.2.11 -1 | 2.743 | 110 MB/s | 400 MB/s | -| brotli 1.0.2 -0 | 2.701 | 410 MB/s | 430 MB/s | -| quicklz 1.5.0 -1 | 2.238 | 550 MB/s | 710 MB/s | -| lzo1x 2.09 -1 | 2.108 | 650 MB/s | 830 MB/s | -| lz4 1.8.1 | 2.101 | 750 MB/s | 3700 MB/s | -| snappy 1.1.4 | 2.091 | 530 MB/s | 1800 MB/s | -| lzf 3.6 -1 | 2.077 | 400 MB/s | 860 MB/s | +| **zstd 1.4.0 -1** | 2.884 | 530 MB/s | 1360 MB/s | +| zlib 1.2.11 -1 | 2.743 | 110 MB/s | 440 MB/s | +| brotli 1.0.7 -0 | 2.701 | 430 MB/s | 470 MB/s | +| quicklz 1.5.0 -1 | 2.238 | 600 MB/s | 800 MB/s | +| lzo1x 2.09 -1 | 2.106 | 680 MB/s | 950 MB/s | +| lz4 1.8.3 | 2.101 | 800 MB/s | 4220 MB/s | +| snappy 1.1.4 | 2.073 | 580 MB/s | 2020 MB/s | +| lzf 3.6 -1 | 2.077 | 440 MB/s | 930 MB/s | [zlib]: http://www.zlib.net/ [LZ4]: http://www.lz4.org/ Modified: head/sys/contrib/zstd/contrib/pzstd/Makefile ============================================================================== --- head/sys/contrib/zstd/contrib/pzstd/Makefile Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/contrib/pzstd/Makefile Fri Apr 19 02:54:13 2019 (r346364) @@ -190,13 +190,15 @@ $(ZSTDDIR)/libzstd.a: $(ZSTD_FILES) CFLAGS="$(ALL_CFLAGS)" LDFLAGS="$(ALL_LDFLAGS)" $(MAKE) -C $(ZSTDDIR) libzstd.a # Rules to build the tests -test/RoundTripTest$(EXT): test/RoundTripTest.o $(PROGDIR)/datagen.o Options.o \ +test/RoundTripTest$(EXT): test/RoundTripTest.o $(PROGDIR)/datagen.o \ + $(PROGDIR)/util.o Options.o \ Pzstd.o SkippableFrame.o $(ZSTDDIR)/libzstd.a $(LD_COMMAND) test/%Test$(EXT): PZSTD_LDFLAGS += $(GTEST_LIB) test/%Test$(EXT): LIBS += -lgtest -lgtest_main -test/%Test$(EXT): test/%Test.o $(PROGDIR)/datagen.o Options.o Pzstd.o \ +test/%Test$(EXT): test/%Test.o $(PROGDIR)/datagen.o \ + $(PROGDIR)/util.o Options.o Pzstd.o \ SkippableFrame.o $(ZSTDDIR)/libzstd.a $(LD_COMMAND) Modified: head/sys/contrib/zstd/contrib/pzstd/Pzstd.cpp ============================================================================== --- head/sys/contrib/zstd/contrib/pzstd/Pzstd.cpp Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/contrib/pzstd/Pzstd.cpp Fri Apr 19 02:54:13 2019 (r346364) @@ -55,7 +55,7 @@ static std::uint64_t handleOneInput(const Options &opt SharedState& state) { auto inputSize = fileSizeOrZero(inputFile); // WorkQueue outlives ThreadPool so in the case of error we are certain - // we don't accidently try to call push() on it after it is destroyed + // we don't accidentally try to call push() on it after it is destroyed WorkQueue> outs{options.numThreads + 1}; std::uint64_t bytesRead; std::uint64_t bytesWritten; Modified: head/sys/contrib/zstd/contrib/pzstd/utils/Range.h ============================================================================== --- head/sys/contrib/zstd/contrib/pzstd/utils/Range.h Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/contrib/pzstd/utils/Range.h Fri Apr 19 02:54:13 2019 (r346364) @@ -9,7 +9,7 @@ /** * A subset of `folly/Range.h`. - * All code copied verbatiam modulo formatting + * All code copied verbatim modulo formatting */ #pragma once Modified: head/sys/contrib/zstd/contrib/pzstd/utils/ResourcePool.h ============================================================================== --- head/sys/contrib/zstd/contrib/pzstd/utils/ResourcePool.h Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/contrib/pzstd/utils/ResourcePool.h Fri Apr 19 02:54:13 2019 (r346364) @@ -54,7 +54,7 @@ class ResourcePool { /** * @returns A unique pointer to a resource. The resource is null iff - * there are no avaiable resources and `factory()` returns null. + * there are no available resources and `factory()` returns null. */ UniquePtr get() { std::lock_guard lock(mutex_); Modified: head/sys/contrib/zstd/doc/README.md ============================================================================== --- head/sys/contrib/zstd/doc/README.md Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/doc/README.md Fri Apr 19 02:54:13 2019 (r346364) @@ -12,8 +12,8 @@ __`zstd_compression_format.md`__ : This document defin Compliant decoders must adhere to this document, and compliant encoders must generate data that follows it. -Should you look for ressources to develop your own port of Zstandard algorithm, -you may find the following ressources useful : +Should you look for resources to develop your own port of Zstandard algorithm, +you may find the following resources useful : __`educational_decoder`__ : This directory contains an implementation of a Zstandard decoder, compliant with the Zstandard compression format. Modified: head/sys/contrib/zstd/doc/educational_decoder/Makefile ============================================================================== --- head/sys/contrib/zstd/doc/educational_decoder/Makefile Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/doc/educational_decoder/Makefile Fri Apr 19 02:54:13 2019 (r346364) @@ -7,7 +7,7 @@ CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDD CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wformat-security \ + -Wstrict-prototypes -Wundef \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls CFLAGS += $(DEBUGFLAGS) Modified: head/sys/contrib/zstd/doc/educational_decoder/zstd_decompress.c ============================================================================== --- head/sys/contrib/zstd/doc/educational_decoder/zstd_decompress.c Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/doc/educational_decoder/zstd_decompress.c Fri Apr 19 02:54:13 2019 (r346364) @@ -358,7 +358,7 @@ static u32 copy_literals(const size_t seq, istream_t * ostream_t *const out); // Given an offset code from a sequence command (either an actual offset value -// or an index for previous offset), computes the correct offset and udpates +// or an index for previous offset), computes the correct offset and updates // the offset history static size_t compute_offset(sequence_command_t seq, u64 *const offset_hist); Modified: head/sys/contrib/zstd/doc/zstd_manual.html ============================================================================== --- head/sys/contrib/zstd/doc/zstd_manual.html Fri Apr 19 02:28:04 2019 (r346363) +++ head/sys/contrib/zstd/doc/zstd_manual.html Fri Apr 19 02:54:13 2019 (r346364) @@ -1,37 +1,46 @@ -zstd 1.3.8 Manual +zstd 1.4.0 Manual -

zstd 1.3.8 Manual

+

zstd 1.4.0 Manual


Contents

  1. Introduction
  2. Version
  3. Default constant
  4. -
  5. Simple API
  6. -
  7. Explicit context
  8. -
  9. Simple dictionary API
  10. -
  11. Bulk processing dictionary API
  12. -
  13. Streaming
  14. -
  15. Streaming compression - HowTo
  16. -
  17. Streaming decompression - HowTo
  18. -
  19. ADVANCED AND EXPERIMENTAL FUNCTIONS
  20. -
  21. Candidate API for promotion to stable status
  22. -
  23. Advanced compression API
  24. -
  25. experimental API (static linking only)
  26. -
  27. Frame size functions
  28. -
  29. Memory management
  30. -
  31. Advanced compression functions
  32. -
  33. Advanced decompression functions
  34. -
  35. Advanced streaming functions
  36. -
  37. Buffer-less and synchronous inner streaming functions
  38. -
  39. Buffer-less streaming compression (synchronous mode)
  40. -
  41. Buffer-less streaming decompression (synchronous mode)
  42. -
  43. ZSTD_getFrameHeader() :
  44. -
  45. Block level API
  46. +
  47. Constants
  48. +
  49. Simple API
  50. +
  51. Explicit context
  52. +
  53. Advanced compression API
  54. +
  55. Advanced decompression API
  56. +
  57. Streaming
  58. +
  59. Streaming compression - HowTo
  60. +
  61. This is a legacy streaming API, and can be replaced by ZSTD_CCtx_reset() and
  62. +
  63. Equivalent to:
  64. +
  65. Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue).
  66. +
  67. Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush).
  68. +
  69. Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end).
  70. +
  71. Streaming decompression - HowTo
  72. +
  73. Simple dictionary API
  74. +
  75. Bulk processing dictionary API
  76. +
  77. Dictionary helper functions
  78. +
  79. Advanced dictionary and prefix API
  80. +
  81. ADVANCED AND EXPERIMENTAL FUNCTIONS
  82. +
  83. experimental API (static linking only)
  84. +
  85. Frame size functions
  86. +
  87. ZSTD_decompressBound() :
  88. +
  89. Memory management
  90. +
  91. Advanced compression functions
  92. +
  93. Advanced decompression functions
  94. +
  95. Advanced streaming functions
  96. +
  97. Buffer-less and synchronous inner streaming functions
  98. +
  99. Buffer-less streaming compression (synchronous mode)
  100. +
  101. Buffer-less streaming decompression (synchronous mode)
  102. +
  103. ZSTD_getFrameHeader() :
  104. +
  105. Block level API

Introduction

@@ -71,8 +80,10 @@
 

Default constant


 
-

Simple API


+

Constants


 
+

Simple API


+
 
size_t ZSTD_compress( void* dst, size_t dstCapacity,
                 const void* src, size_t srcSize,
                       int compressionLevel);
@@ -126,13 +137,22 @@ unsigned long long ZSTD_getFrameContentSize(const void
  @return : decompressed size of `src` frame content _if known and not empty_, 0 otherwise. 
 


+
size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize);
+

`src` should point to the start of a ZSTD frame or skippable frame. + `srcSize` must be >= first frame size + @return : the compressed size of the first frame starting at `src`, + suitable to pass as `srcSize` to `ZSTD_decompress` or similar, + or an error code if input is invalid +


+

Helper functions

#define ZSTD_COMPRESSBOUND(srcSize)   ((srcSize) + ((srcSize)>>8) + (((srcSize) < (128<<10)) ? (((128<<10) - (srcSize)) >> 11) /* margin, from 64 to 0 */ : 0))  /* this formula ensures that bound(A) + bound(B) <= bound(A+B) as long as A and B >= 128 KB */
 size_t      ZSTD_compressBound(size_t srcSize); /*!< maximum compressed size in worst case single-pass scenario */
 unsigned    ZSTD_isError(size_t code);          /*!< tells if a `size_t` function result is an error code */
 const char* ZSTD_getErrorName(size_t code);     /*!< provides readable string from an error code */
+int         ZSTD_minCLevel(void);               /*!< minimum negative compression level allowed */
 int         ZSTD_maxCLevel(void);               /*!< maximum compression level available */
 

-

Explicit context


+

Explicit context


 
 

Compression context

  When compressing many times,
   it is recommended to allocate a context just once, and re-use it for each successive compression operation.
@@ -169,229 +189,8 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
  
 


-

Simple dictionary API


+

Advanced compression API


 
-
size_t ZSTD_compress_usingDict(ZSTD_CCtx* ctx,
-                               void* dst, size_t dstCapacity,
-                         const void* src, size_t srcSize,
-                         const void* dict,size_t dictSize,
-                               int compressionLevel);
-

Compression at an explicit compression level using a Dictionary. - A dictionary can be any arbitrary data segment (also called a prefix), - or a buffer with specified information (see dictBuilder/zdict.h). - Note : This function loads the dictionary, resulting in significant startup delay. - It's intended for a dictionary used only once. - Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used. -


- -
size_t ZSTD_decompress_usingDict(ZSTD_DCtx* dctx,
-                                 void* dst, size_t dstCapacity,
-                           const void* src, size_t srcSize,
-                           const void* dict,size_t dictSize);
-

Decompression using a known Dictionary. - Dictionary must be identical to the one used during compression. - Note : This function loads the dictionary, resulting in significant startup delay. - It's intended for a dictionary used only once. - Note : When `dict == NULL || dictSize < 8` no dictionary is used. -


- -

Bulk processing dictionary API


-
-
ZSTD_CDict* ZSTD_createCDict(const void* dictBuffer, size_t dictSize,
-                             int compressionLevel);
-

When compressing multiple messages / blocks using the same dictionary, it's recommended to load it only once. - ZSTD_createCDict() will create a digested dictionary, ready to start future compression operations without startup cost. - ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. - `dictBuffer` can be released after ZSTD_CDict creation, because its content is copied within CDict. - Consider experimental function `ZSTD_createCDict_byReference()` if you prefer to not duplicate `dictBuffer` content. - Note : A ZSTD_CDict can be created from an empty dictBuffer, but it is inefficient when used to compress small data. -


- -
size_t      ZSTD_freeCDict(ZSTD_CDict* CDict);
-

Function frees memory allocated by ZSTD_createCDict(). -


- -
size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx,
-                                void* dst, size_t dstCapacity,
-                          const void* src, size_t srcSize,
-                          const ZSTD_CDict* cdict);
-

Compression using a digested Dictionary. - Recommended when same dictionary is used multiple times. - Note : compression level is _decided at dictionary creation time_, - and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no) -


- -
ZSTD_DDict* ZSTD_createDDict(const void* dictBuffer, size_t dictSize);
-

Create a digested dictionary, ready to start decompression operation without startup delay. - dictBuffer can be released after DDict creation, as its content is copied inside DDict. -


- -
size_t      ZSTD_freeDDict(ZSTD_DDict* ddict);
-

Function frees memory allocated with ZSTD_createDDict() -


- -
size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx,
-                                  void* dst, size_t dstCapacity,
-                            const void* src, size_t srcSize,
-                            const ZSTD_DDict* ddict);
-

Decompression using a digested Dictionary. - Recommended when same dictionary is used multiple times. -


- -

Streaming


-
-
typedef struct ZSTD_inBuffer_s {
-  const void* src;    /**< start of input buffer */
-  size_t size;        /**< size of input buffer */
-  size_t pos;         /**< position where reading stopped. Will be updated. Necessarily 0 <= pos <= size */
-} ZSTD_inBuffer;
-

-
typedef struct ZSTD_outBuffer_s {
-  void*  dst;         /**< start of output buffer */
-  size_t size;        /**< size of output buffer */
-  size_t pos;         /**< position where writing stopped. Will be updated. Necessarily 0 <= pos <= size */
-} ZSTD_outBuffer;
-

-

Streaming compression - HowTo

-  A ZSTD_CStream object is required to track streaming operation.
-  Use ZSTD_createCStream() and ZSTD_freeCStream() to create/release resources.
-  ZSTD_CStream objects can be reused multiple times on consecutive compression operations.
-  It is recommended to re-use ZSTD_CStream since it will play nicer with system's memory, by re-using already allocated memory.
-
-  For parallel execution, use one separate ZSTD_CStream per thread.
-
-  note : since v1.3.0, ZSTD_CStream and ZSTD_CCtx are the same thing.
-
-  Parameters are sticky : when starting a new compression on the same context,
-  it will re-use the same sticky parameters as previous compression session.
-  When in doubt, it's recommended to fully initialize the context before usage.
-  Use ZSTD_initCStream() to set the parameter to a selected compression level.
-  Use advanced API (ZSTD_CCtx_setParameter(), etc.) to set more specific parameters.
-
-  Use ZSTD_compressStream() as many times as necessary to consume input stream.
-  The function will automatically update both `pos` fields within `input` and `output`.
-  Note that the function may not consume the entire input,
-  for example, because the output buffer is already full,
-  in which case `input.pos < input.size`.
-  The caller must check if input has been entirely consumed.
-  If not, the caller must make some room to receive more compressed data,
-  and then present again remaining input data.
- @return : a size hint, preferred nb of bytes to use as input for next function call
-           or an error code, which can be tested using ZSTD_isError().
-           Note 1 : it's just a hint, to help latency a little, any value will work fine.
-           Note 2 : size hint is guaranteed to be <= ZSTD_CStreamInSize()
-
-  At any moment, it's possible to flush whatever data might remain stuck within internal buffer,
-  using ZSTD_flushStream(). `output->pos` will be updated.
-  Note that, if `output->size` is too small, a single invocation of ZSTD_flushStream() might not be enough (return code > 0).
-  In which case, make some room to receive more compressed data, and call again ZSTD_flushStream().
-  @return : 0 if internal buffers are entirely flushed,
-            >0 if some data still present within internal buffer (the value is minimal estimation of remaining size),
-            or an error code, which can be tested using ZSTD_isError().
-
-  ZSTD_endStream() instructs to finish a frame.
-  It will perform a flush and write frame epilogue.
-  The epilogue is required for decoders to consider a frame completed.
-  flush() operation is the same, and follows same rules as ZSTD_flushStream().
-  @return : 0 if frame fully completed and fully flushed,
-            >0 if some data still present within internal buffer (the value is minimal estimation of remaining size),
-            or an error code, which can be tested using ZSTD_isError().
-
- 
-
- -
typedef ZSTD_CCtx ZSTD_CStream;  /**< CCtx and CStream are now effectively same object (>= v1.3.0) */
-

-

ZSTD_CStream management functions

ZSTD_CStream* ZSTD_createCStream(void);
-size_t ZSTD_freeCStream(ZSTD_CStream* zcs);
-

-

Streaming compression functions

size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel);
-size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input);
-size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output);
-size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output);
-

-
size_t ZSTD_CStreamInSize(void);    /**< recommended size for input buffer */
-

-
size_t ZSTD_CStreamOutSize(void);   /**< recommended size for output buffer. Guarantee to successfully flush at least one complete compressed block in all circumstances. */
-

-

Streaming decompression - HowTo

-  A ZSTD_DStream object is required to track streaming operations.
-  Use ZSTD_createDStream() and ZSTD_freeDStream() to create/release resources.
-  ZSTD_DStream objects can be re-used multiple times.
-
-  Use ZSTD_initDStream() to start a new decompression operation.
- @return : recommended first input size
-  Alternatively, use advanced API to set specific properties.
-
-  Use ZSTD_decompressStream() repetitively to consume your input.
-  The function will update both `pos` fields.
-  If `input.pos < input.size`, some input has not been consumed.
-  It's up to the caller to present again remaining data.
-  The function tries to flush all data decoded immediately, respecting output buffer size.
-  If `output.pos < output.size`, decoder has flushed everything it could.
-  But if `output.pos == output.size`, there might be some data left within internal buffers.,
-  In which case, call ZSTD_decompressStream() again to flush whatever remains in the buffer.
-  Note : with no additional input provided, amount of data flushed is necessarily <= ZSTD_BLOCKSIZE_MAX.
- @return : 0 when a frame is completely decoded and fully flushed,
-        or an error code, which can be tested using ZSTD_isError(),
-        or any other value > 0, which means there is still some decoding or flushing to do to complete current frame :
-                                the return value is a suggested next input size (just a hint for better latency)
-                                that will never request more than the remaining frame size.
- 
-
- -
typedef ZSTD_DCtx ZSTD_DStream;  /**< DCtx and DStream are now effectively same object (>= v1.3.0) */
-

-

ZSTD_DStream management functions

ZSTD_DStream* ZSTD_createDStream(void);
-size_t ZSTD_freeDStream(ZSTD_DStream* zds);
-

-

Streaming decompression functions

size_t ZSTD_initDStream(ZSTD_DStream* zds);
-size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input);
-

-
size_t ZSTD_DStreamInSize(void);    /*!< recommended size for input buffer */
-

-
size_t ZSTD_DStreamOutSize(void);   /*!< recommended size for output buffer. Guarantee to successfully flush at least one complete block in all circumstances. */
-

-

ADVANCED AND EXPERIMENTAL FUNCTIONS

- The definitions in the following section are considered experimental.
- They are provided for advanced scenarios.
- They should never be used with a dynamic library, as prototypes may change in the future.
- Use them only in association with static linking.
- 
-
- -

Candidate API for promotion to stable status

- The following symbols and constants form the "staging area" :
- they are considered to join "stable API" by v1.4.0.
- The proposal is written so that it can be made stable "as is",
- though it's still possible to suggest improvements.
- Staging is in fact last chance for changes,
- the API is locked once reaching "stable" status.
- 
-
- -
int ZSTD_minCLevel(void);  /*!< minimum negative compression level allowed */
-

-
size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize);
-

`src` should point to the start of a ZSTD frame or skippable frame. - `srcSize` must be >= first frame size - @return : the compressed size of the first frame starting at `src`, - suitable to pass as `srcSize` to `ZSTD_decompress` or similar, - or an error code if input is invalid -


- -
size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx);
-size_t ZSTD_sizeof_DCtx(const ZSTD_DCtx* dctx);
-size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs);
-size_t ZSTD_sizeof_DStream(const ZSTD_DStream* zds);
-size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict);
-size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
-

These functions give the _current_ memory usage of selected object. - Note that object memory usage can evolve (increase or decrease) over time. -


- -

Advanced compression API


-
 
typedef enum { ZSTD_fast=1,
                ZSTD_dfast=2,
                ZSTD_greedy=3,
@@ -407,7 +206,10 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
 

typedef enum {
 
-    /* compression parameters */
+    /* compression parameters
+     * Note: When compressing with a ZSTD_CDict these parameters are superseded
+     * by the parameters used to construct the ZSTD_CDict. See ZSTD_CCtx_refCDict()
+     * for more info (superseded-by-cdict). */
     ZSTD_c_compressionLevel=100, /* Update all compression parameters according to pre-defined cLevel table
                               * Default level is ZSTD_CLEVEL_DEFAULT==3.
                               * Special: value 0 means default, which is controlled by ZSTD_CLEVEL_DEFAULT.
@@ -529,6 +331,7 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
      * ZSTD_c_format
      * ZSTD_c_forceMaxWindow
      * ZSTD_c_forceAttachDict
+     * ZSTD_c_literalCompressionMode
      * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them.
      * note : never ever use experimentalParam? names directly;
      *        also, the enums values themselves are unstable and can still change.
@@ -536,7 +339,8 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
      ZSTD_c_experimentalParam1=500,
      ZSTD_c_experimentalParam2=10,
      ZSTD_c_experimentalParam3=1000,
-     ZSTD_c_experimentalParam4=1001

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Fri Apr 19 03:36:24 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EBE81583D94;
 Fri, 19 Apr 2019 03:36: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 C10B88B928;
 Fri, 19 Apr 2019 03:36:23 +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 8F6C228AB0;
 Fri, 19 Apr 2019 03:36:23 +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 x3J3aNLt087781;
 Fri, 19 Apr 2019 03:36:23 GMT (envelope-from rmacklem@FreeBSD.org)
Received: (from rmacklem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J3aMUg087776;
 Fri, 19 Apr 2019 03:36:22 GMT (envelope-from rmacklem@FreeBSD.org)
Message-Id: <201904190336.x3J3aMUg087776@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to
 rmacklem@FreeBSD.org using -f
From: Rick Macklem 
Date: Fri, 19 Apr 2019 03:36:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346365 - in head/sys/fs: nfs nfsserver
X-SVN-Group: head
X-SVN-Commit-Author: rmacklem
X-SVN-Commit-Paths: in head/sys/fs: nfs nfsserver
X-SVN-Commit-Revision: 346365
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: C10B88B928
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.970,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 03:36:24 -0000

Author: rmacklem
Date: Fri Apr 19 03:36:22 2019
New Revision: 346365
URL: https://svnweb.freebsd.org/changeset/base/346365

Log:
  Fix the NFSv4.0 server so that it does not support NFSv4.1 attributes.
  
  During inspection of a packet trace, I noticed that an NFSv4.0 mount
  reported that it supported attributes that are only defined for NFSv4.1.
  In practice, this bug appears to be benign, since NFSv4.0 clients will
  not use attributes that were added for NFSv4.1.
  However, this was not correct and this patch fixes the NFSv4.0 server
  so that it only supports attributes defined for NFSv4.0.
  It also adds a definition for NFSv4.1 attributes that can only be set,
  although it is only defined as 0 for now.
  This is anticipation of the addition of support for the NFSv4.1 mode+mask
  attribute soon.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfs/nfs.h
  head/sys/fs/nfs/nfs_commonsubs.c
  head/sys/fs/nfs/nfsproto.h
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfs/nfs.h
==============================================================================
--- head/sys/fs/nfs/nfs.h	Fri Apr 19 02:54:13 2019	(r346364)
+++ head/sys/fs/nfs/nfs.h	Fri Apr 19 03:36:22 2019	(r346365)
@@ -423,10 +423,14 @@ typedef struct {
 	(t)->bits[2] = (f)->bits[2];					\
 } while (0)
 
-#define	NFSSETSUPP_ATTRBIT(b) do { 					\
+#define	NFSSETSUPP_ATTRBIT(b, n) do { 					\
 	(b)->bits[0] = NFSATTRBIT_SUPP0; 				\
-	(b)->bits[1] = (NFSATTRBIT_SUPP1 | NFSATTRBIT_SUPPSETONLY);	\
-	(b)->bits[2] = NFSATTRBIT_SUPP2;				\
+	(b)->bits[1] = (NFSATTRBIT_SUPP1 | NFSATTRBIT_SUPPSETONLY1);	\
+	(b)->bits[2] = (NFSATTRBIT_SUPP2 | NFSATTRBIT_SUPPSETONLY2);	\
+	if (((n)->nd_flag & ND_NFSV41) == 0) {				\
+		(b)->bits[1] &= ~NFSATTRBIT_NFSV41_1;			\
+		(b)->bits[2] &= ~NFSATTRBIT_NFSV41_2;			\
+	}								\
 } while (0)
 
 #define	NFSISSET_ATTRBIT(b, p)	((b)->bits[(p) / 32] & (1 << ((p) % 32)))
@@ -445,16 +449,22 @@ typedef struct {
 	(b)->bits[2] &= ((a)->bits[2]);		 			\
 } while (0)
 
-#define	NFSCLRNOTFILLABLE_ATTRBIT(b) do { 				\
+#define	NFSCLRNOTFILLABLE_ATTRBIT(b, n) do { 				\
 	(b)->bits[0] &= NFSATTRBIT_SUPP0;	 			\
 	(b)->bits[1] &= NFSATTRBIT_SUPP1;				\
 	(b)->bits[2] &= NFSATTRBIT_SUPP2;				\
+	if (((n)->nd_flag & ND_NFSV41) == 0) {				\
+		(b)->bits[1] &= ~NFSATTRBIT_NFSV41_1;			\
+		(b)->bits[2] &= ~NFSATTRBIT_NFSV41_2;			\
+	}								\
 } while (0)
 
-#define	NFSCLRNOTSETABLE_ATTRBIT(b) do { 				\
+#define	NFSCLRNOTSETABLE_ATTRBIT(b, n) do { 				\
 	(b)->bits[0] &= NFSATTRBIT_SETABLE0;	 			\
 	(b)->bits[1] &= NFSATTRBIT_SETABLE1;				\
 	(b)->bits[2] &= NFSATTRBIT_SETABLE2;				\
+	if (((n)->nd_flag & ND_NFSV41) == 0)				\
+		(b)->bits[2] &= ~NFSATTRBIT_NFSV41_2;			\
 } while (0)
 
 #define	NFSNONZERO_ATTRBIT(b)	((b)->bits[0] || (b)->bits[1] || (b)->bits[2])

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 19 02:54:13 2019	(r346364)
+++ head/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 19 03:36:22 2019	(r346365)
@@ -1293,7 +1293,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
 			if (error)
 			    goto nfsmout;
 			if (compare && !(*retcmpp)) {
-			   NFSSETSUPP_ATTRBIT(&checkattrbits);
+			   NFSSETSUPP_ATTRBIT(&checkattrbits, nd);
 
 			   /* Some filesystem do not support NFSv4ACL   */
 			   if (nfsrv_useacl == 0 || nfs_supportsnfsv4acls(vp) == 0) {
@@ -2129,8 +2129,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
 			if (error)
 			    goto nfsmout;
 			if (compare && !(*retcmpp)) {
-			   NFSSETSUPP_ATTRBIT(&checkattrbits);
-			   NFSCLRNOTSETABLE_ATTRBIT(&checkattrbits);
+			   NFSSETSUPP_ATTRBIT(&checkattrbits, nd);
+			   NFSCLRNOTSETABLE_ATTRBIT(&checkattrbits, nd);
 			   NFSCLRBIT_ATTRBIT(&checkattrbits,
 				NFSATTRBIT_TIMEACCESSSET);
 			   if (!NFSEQUAL_ATTRBIT(&retattrbits, &checkattrbits)
@@ -2460,10 +2460,10 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount
 	 * reply call.
 	 */
 	if (p == NULL && cred == NULL) {
-		NFSCLRNOTSETABLE_ATTRBIT(retbitp);
+		NFSCLRNOTSETABLE_ATTRBIT(retbitp, nd);
 		aclp = saclp;
 	} else {
-		NFSCLRNOTFILLABLE_ATTRBIT(retbitp);
+		NFSCLRNOTFILLABLE_ATTRBIT(retbitp, nd);
 		naclp = acl_alloc(M_WAITOK);
 		aclp = naclp;
 	}
@@ -2533,7 +2533,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount
 	    if (NFSISSET_ATTRBIT(retbitp, bitpos)) {
 		switch (bitpos) {
 		case NFSATTRBIT_SUPPORTEDATTRS:
-			NFSSETSUPP_ATTRBIT(&attrbits);
+			NFSSETSUPP_ATTRBIT(&attrbits, nd);
 			if (nfsrv_useacl == 0 || ((cred != NULL || p != NULL)
 			    && supports_nfsv4acls == 0)) {
 			    NFSCLRBIT_ATTRBIT(&attrbits,NFSATTRBIT_ACLSUPPORT);
@@ -2935,8 +2935,8 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount
 			retnum += NFSX_HYPER;
 			break;
 		case NFSATTRBIT_SUPPATTREXCLCREAT:
-			NFSSETSUPP_ATTRBIT(&attrbits);
-			NFSCLRNOTSETABLE_ATTRBIT(&attrbits);
+			NFSSETSUPP_ATTRBIT(&attrbits, nd);
+			NFSCLRNOTSETABLE_ATTRBIT(&attrbits, nd);
 			NFSCLRBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEACCESSSET);
 			retnum += nfsrv_putattrbit(nd, &attrbits);
 			break;

Modified: head/sys/fs/nfs/nfsproto.h
==============================================================================
--- head/sys/fs/nfs/nfsproto.h	Fri Apr 19 02:54:13 2019	(r346364)
+++ head/sys/fs/nfs/nfsproto.h	Fri Apr 19 03:36:22 2019	(r346365)
@@ -1086,11 +1086,11 @@ struct nfsv3_sattr {
 	NFSATTRBM_SUPPATTREXCLCREAT)
 
 /*
- * NFSATTRBIT_SUPPSETONLY is the OR of NFSATTRBIT_TIMEACCESSSET and
- * NFSATTRBIT_TIMEMODIFYSET.
+ * These are the set only attributes.
  */
-#define	NFSATTRBIT_SUPPSETONLY	 (NFSATTRBM_TIMEACCESSSET |		\
+#define	NFSATTRBIT_SUPPSETONLY1	 (NFSATTRBM_TIMEACCESSSET |		\
 				 NFSATTRBM_TIMEMODIFYSET)
+#define	NFSATTRBIT_SUPPSETONLY2	0
 
 /*
  * NFSATTRBIT_SETABLE - SETABLE0 - bits 0<->31
@@ -1107,6 +1107,18 @@ struct nfsv3_sattr {
  	NFSATTRBM_TIMEACCESSSET |					\
  	NFSATTRBM_TIMEMODIFYSET)
 #define	NFSATTRBIT_SETABLE2		0
+
+/*
+ * NFSATTRBIT_NFSV41 - Attributes only supported by NFSv4.1.
+ */
+#define	NFSATTRBIT_NFSV41_1						\
+	(NFSATTRBM_FSLAYOUTTYPE)
+#define	NFSATTRBIT_NFSV41_2						\
+	(NFSATTRBM_LAYOUTTYPE |						\
+	NFSATTRBM_LAYOUTBLKSIZE |					\
+	NFSATTRBM_LAYOUTALIGNMENT |					\
+	NFSATTRBM_MODESETMASKED |					\
+	NFSATTRBM_SUPPATTREXCLCREAT)
 
 /*
  * Set of attributes that the getattr vnode op needs.

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c	Fri Apr 19 02:54:13 2019	(r346364)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	Fri Apr 19 03:36:22 2019	(r346365)
@@ -2126,7 +2126,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdg
 		if (error)
 			goto nfsmout;
 		NFSSET_ATTRBIT(&savbits, &attrbits);
-		NFSCLRNOTFILLABLE_ATTRBIT(&attrbits);
+		NFSCLRNOTFILLABLE_ATTRBIT(&attrbits, nd);
 		NFSZERO_ATTRBIT(&rderrbits);
 		NFSSETBIT_ATTRBIT(&rderrbits, NFSATTRBIT_RDATTRERROR);
 	} else {

From owner-svn-src-all@freebsd.org  Fri Apr 19 03:46:37 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E352815840D1;
 Fri, 19 Apr 2019 03:46:36 +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 8324A8BE99;
 Fri, 19 Apr 2019 03:46:36 +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 57B3428C5B;
 Fri, 19 Apr 2019 03:46:36 +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 x3J3kawg093145;
 Fri, 19 Apr 2019 03:46:36 GMT (envelope-from mav@FreeBSD.org)
Received: (from mav@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J3kaKW093144;
 Fri, 19 Apr 2019 03:46:36 GMT (envelope-from mav@FreeBSD.org)
Message-Id: <201904190346.x3J3kaKW093144@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org
 using -f
From: Alexander Motin 
Date: Fri, 19 Apr 2019 03:46:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346366 - stable/12/usr.sbin/bhyve
X-SVN-Group: stable-12
X-SVN-Commit-Author: mav
X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve
X-SVN-Commit-Revision: 346366
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 8324A8BE99
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.97)[-0.966,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 03:46:37 -0000

Author: mav
Date: Fri Apr 19 03:46:35 2019
New Revision: 346366
URL: https://svnweb.freebsd.org/changeset/base/346366

Log:
  MFC r346159: Fix thread name buffer overflow.

Modified:
  stable/12/usr.sbin/bhyve/pci_virtio_scsi.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c
==============================================================================
--- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c	Fri Apr 19 03:36:22 2019	(r346365)
+++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c	Fri Apr 19 03:46:35 2019	(r346366)
@@ -634,7 +634,7 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, 
     struct pci_vtscsi_queue *queue, int num)
 {
 	struct pci_vtscsi_worker *worker;
-	char threadname[16];
+	char tname[MAXCOMLEN + 1];
 	int i;
 
 	queue->vsq_sc = sc;
@@ -653,8 +653,8 @@ pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, 
 		pthread_create(&worker->vsw_thread, NULL, &pci_vtscsi_proc,
 		    (void *)worker);
 
-		sprintf(threadname, "virtio-scsi:%d-%d", num, i);
-		pthread_set_name_np(worker->vsw_thread, threadname);
+		snprintf(tname, sizeof(tname), "vtscsi:%d-%d", num, i);
+		pthread_set_name_np(worker->vsw_thread, tname);
 		LIST_INSERT_HEAD(&queue->vsq_workers, worker, vsw_link);
 	}
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 03:47:24 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D686E158412F;
 Fri, 19 Apr 2019 03:47:24 +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 79D4A8BFAB;
 Fri, 19 Apr 2019 03:47:24 +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 5589728C5C;
 Fri, 19 Apr 2019 03:47:24 +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 x3J3lOsY093232;
 Fri, 19 Apr 2019 03:47:24 GMT (envelope-from mav@FreeBSD.org)
Received: (from mav@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J3lOEq093231;
 Fri, 19 Apr 2019 03:47:24 GMT (envelope-from mav@FreeBSD.org)
Message-Id: <201904190347.x3J3lOEq093231@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org
 using -f
From: Alexander Motin 
Date: Fri, 19 Apr 2019 03:47:24 +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: r346367 - stable/12/sys/dev/virtio/scsi
X-SVN-Group: stable-12
X-SVN-Commit-Author: mav
X-SVN-Commit-Paths: stable/12/sys/dev/virtio/scsi
X-SVN-Commit-Revision: 346367
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 79D4A8BFAB
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.97)[-0.966,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 03:47:25 -0000

Author: mav
Date: Fri Apr 19 03:47:23 2019
New Revision: 346367
URL: https://svnweb.freebsd.org/changeset/base/346367

Log:
  MFC r346161: Fix SCSI sense data pass through.

Modified:
  stable/12/sys/dev/virtio/scsi/virtio_scsi.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/virtio/scsi/virtio_scsi.c
==============================================================================
--- stable/12/sys/dev/virtio/scsi/virtio_scsi.c	Fri Apr 19 03:46:35 2019	(r346366)
+++ stable/12/sys/dev/virtio/scsi/virtio_scsi.c	Fri Apr 19 03:47:23 2019	(r346367)
@@ -1310,8 +1310,7 @@ vtscsi_complete_scsi_cmd_response(struct vtscsi_softc 
 		else
 			csio->sense_resid = 0;
 
-		bzero(&csio->sense_data, sizeof(csio->sense_data));
-		memcpy(cmd_resp->sense, &csio->sense_data,
+		memcpy(&csio->sense_data, cmd_resp->sense,
 		    csio->sense_len - csio->sense_resid);
 	}
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 03:48:00 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 360CC1584184;
 Fri, 19 Apr 2019 03:48:00 +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 CFEF98C0D4;
 Fri, 19 Apr 2019 03:47:59 +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 AD30528C5D;
 Fri, 19 Apr 2019 03:47:59 +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 x3J3lxKR093309;
 Fri, 19 Apr 2019 03:47:59 GMT (envelope-from mav@FreeBSD.org)
Received: (from mav@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J3lxSX093308;
 Fri, 19 Apr 2019 03:47:59 GMT (envelope-from mav@FreeBSD.org)
Message-Id: <201904190347.x3J3lxSX093308@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org
 using -f
From: Alexander Motin 
Date: Fri, 19 Apr 2019 03:47:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346368 - stable/11/sys/dev/virtio/scsi
X-SVN-Group: stable-11
X-SVN-Commit-Author: mav
X-SVN-Commit-Paths: stable/11/sys/dev/virtio/scsi
X-SVN-Commit-Revision: 346368
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: CFEF98C0D4
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.97)[-0.966,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 03:48:00 -0000

Author: mav
Date: Fri Apr 19 03:47:59 2019
New Revision: 346368
URL: https://svnweb.freebsd.org/changeset/base/346368

Log:
  MFC r346161: Fix SCSI sense data pass through.

Modified:
  stable/11/sys/dev/virtio/scsi/virtio_scsi.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/virtio/scsi/virtio_scsi.c
==============================================================================
--- stable/11/sys/dev/virtio/scsi/virtio_scsi.c	Fri Apr 19 03:47:23 2019	(r346367)
+++ stable/11/sys/dev/virtio/scsi/virtio_scsi.c	Fri Apr 19 03:47:59 2019	(r346368)
@@ -1308,8 +1308,7 @@ vtscsi_complete_scsi_cmd_response(struct vtscsi_softc 
 		else
 			csio->sense_resid = 0;
 
-		bzero(&csio->sense_data, sizeof(csio->sense_data));
-		memcpy(cmd_resp->sense, &csio->sense_data,
+		memcpy(&csio->sense_data, cmd_resp->sense,
 		    csio->sense_len - csio->sense_resid);
 	}
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 05:56:36 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3BA0158657B;
 Fri, 19 Apr 2019 05:56:35 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com
 [IPv6:2607:f8b0:4864:20::634])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4F3CF8F211;
 Fri, 19 Apr 2019 05:56:35 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pl1-x634.google.com with SMTP id cv12so2180921plb.9;
 Thu, 18 Apr 2019 22:56:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=xeISQ4x22iCyKhNqD8fprOySwp87jkD5iT1s2RUJSjU=;
 b=ExAq50xcs29SLlWrmvv0c1ZmZ8d57QVidLM3wU8NXPiJJkBQ6l8ej7RFyP5VJ0SIAh
 zbQt98EVYiTsrmYqPRIi6cx1q2FXocnKE7Vb6BA9AxmyMSlkn70v2rOQ1hUiBU/NgD0j
 ZIbikSk4lb5i5uwB9f4VgOsvzoRBzHlmO8I7fkPR6dFd01mq7mvsZuW3YR1Tms/8F0EI
 Wj7sN7ToVwm2H+PWxKcNIyTOrCSMJzRfhQQ59sK97qqOVq5Yao7CHMNvG9JeHyht0dSp
 a9Dbv3hIYfdKUCalwJH7iqYULTkKnozEAfzEa2krbU1nRnwptUDMnMZv2R8/nt/9n6cr
 9m3A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=xeISQ4x22iCyKhNqD8fprOySwp87jkD5iT1s2RUJSjU=;
 b=W8v6hFpmuFDgFrKtpoqRNS95YXnSVESe6U89WjPMe6dTgYteCK3516/7rhCByfbSxR
 QZNYkzL1Ya5CLtftJaNWt9M1I2WwgBv2j0XZ3TYL3832EFXQ/hZcFYZUT0VokjYbPf9y
 nZ457qut50vRf2ex6PYMSDYTHdV/IHg5bsOdnPFf+Bg9CQUiiUK2PpvHjdnrNzkcd/pq
 gn4zB/OjSfX6rrESE94sSI+Y4O//hX2TS3rSWx6nkha6Rjxw+I3h+PA0if6gaumzOa7T
 uvHhFh1gIi3avewjOAYEMWJLv0msKvA0IeXDJF81LH7sAP3jBaEA3pxSCPUuFcxUpdZe
 dbiQ==
X-Gm-Message-State: APjAAAV+IhKFSt9kr7YTt64IzuddjQhi3qSHZ8c/PETzgn/v1EczXcah
 UmhJPFlJqK/mo1/8J1RFiRtBkh4yv0o=
X-Google-Smtp-Source: APXvYqzRN36+4qDY6Udgyito3+DZ7c6RMnC24PVZaXnnj09QQmfsN36qlKDf+uKWa/LCuIH0lo/EmQ==
X-Received: by 2002:a17:902:e302:: with SMTP id
 cg2mr1883852plb.285.1555653393676; 
 Thu, 18 Apr 2019 22:56:33 -0700 (PDT)
Received: from [192.168.20.22] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id k186sm7515009pfc.137.2019.04.18.22.56.32
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 18 Apr 2019 22:56:32 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (1.0)
Subject: Re: svn commit: r346358 - in head: . sys/dev/random sys/libkern
 sys/mips/conf sys/sys
From: Enji Cooper 
X-Mailer: iPhone Mail (16E227)
In-Reply-To: <201904182048.x3IKmtG2073301@repo.freebsd.org>
Date: Thu, 18 Apr 2019 22:56:32 -0700
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201904182048.x3IKmtG2073301@repo.freebsd.org>
To: Conrad Meyer 
X-Rspamd-Queue-Id: 4F3CF8F211
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.95 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.95)[-0.953,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 05:56:36 -0000


> On Apr 18, 2019, at 13:48, Conrad Meyer  wrote:
>=20
> Author: cem
> Date: Thu Apr 18 20:48:54 2019
> New Revision: 346358
> URL: https://svnweb.freebsd.org/changeset/base/346358
>=20
> Log:
>  random(4): Restore availability tradeoff prior to r346250
>=20
>  As discussed in that commit message, it is a dangerous default.  But the
>  safe default causes enough pain on a variety of platforms that for now,
>  restore the prior default.
>=20
>  Some of this is self-induced pain we should/could do better about; for
>  example, programmatic CI systems and VM managers should introduce entropy=

>  from the host for individual VM instances.  This is considered a future w=
ork
>  item.
>=20
>  On modern x86 and Power9 systems, this may be wholly unnecessary after
>  D19928 lands (even in the non-ideal case where early /boot/entropy is
>  unavailable), because they have fast hardware random sources available ea=
rly
>  in boot.  But D19928 is not yet landed and we have a host of architecture=
s
>  which do not provide fast random sources.
>=20
>  This change adds several tunables and diagnostic sysctls, documented
>  thoroughly in UPDATING and sys/dev/random/random_infra.c.

Thank you for doing this Conrad!

One request: can these sysctls/tunables please be documented in random(4)? N=
ot everyone has access to UPDATING with binary distributions.

Thank you so very much!
-Enji=

From owner-svn-src-all@freebsd.org  Fri Apr 19 06:49:47 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9872D1587344;
 Fri, 19 Apr 2019 06:49:47 +0000 (UTC) (envelope-from phk@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 365C56847C;
 Fri, 19 Apr 2019 06:49:47 +0000 (UTC) (envelope-from phk@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 1A0E12AA75;
 Fri, 19 Apr 2019 06:49:47 +0000 (UTC) (envelope-from phk@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3J6nk26086970;
 Fri, 19 Apr 2019 06:49:46 GMT (envelope-from phk@FreeBSD.org)
Received: (from phk@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3J6nkdC086969;
 Fri, 19 Apr 2019 06:49:46 GMT (envelope-from phk@FreeBSD.org)
Message-Id: <201904190649.x3J6nkdC086969@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org
 using -f
From: Poul-Henning Kamp 
Date: Fri, 19 Apr 2019 06:49:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346369 - head/sbin/md5
X-SVN-Group: head
X-SVN-Commit-Author: phk
X-SVN-Commit-Paths: head/sbin/md5
X-SVN-Commit-Revision: 346369
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 365C56847C
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.95)[-0.950,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 06:49:47 -0000

Author: phk
Date: Fri Apr 19 06:49:46 2019
New Revision: 346369
URL: https://svnweb.freebsd.org/changeset/base/346369

Log:
  Close filedescriptors when done with them.

Modified:
  head/sbin/md5/md5.c

Modified: head/sbin/md5/md5.c
==============================================================================
--- head/sbin/md5/md5.c	Fri Apr 19 03:47:59 2019	(r346368)
+++ head/sbin/md5/md5.c	Fri Apr 19 06:49:46 2019	(r346369)
@@ -247,7 +247,9 @@ main(int argc, char *argv[])
 					err(1, "capsicum");
 #endif
 			}
-			if ((p = Algorithm[digest].Fd(fd, buf)) == NULL) {
+			p = Algorithm[digest].Fd(fd, buf);
+			(void)close(fd);
+			if (p == NULL) {
 				warn("%s", *argv);
 				failed++;
 			} else {

From owner-svn-src-all@freebsd.org  Fri Apr 19 10:52:55 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E18C0158C811;
 Fri, 19 Apr 2019 10:52:55 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 873F770E54;
 Fri, 19 Apr 2019 10:52:55 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 544032D4CB;
 Fri, 19 Apr 2019 10:52:55 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JAqt3C020034;
 Fri, 19 Apr 2019 10:52:55 GMT (envelope-from kp@FreeBSD.org)
Received: (from kp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JAqte4020033;
 Fri, 19 Apr 2019 10:52:55 GMT (envelope-from kp@FreeBSD.org)
Message-Id: <201904191052.x3JAqte4020033@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org
 using -f
From: Kristof Provost 
Date: Fri, 19 Apr 2019 10:52:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346370 - head/sbin/pfctl
X-SVN-Group: head
X-SVN-Commit-Author: kp
X-SVN-Commit-Paths: head/sbin/pfctl
X-SVN-Commit-Revision: 346370
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 873F770E54
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.975,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 10:52:56 -0000

Author: kp
Date: Fri Apr 19 10:52:54 2019
New Revision: 346370
URL: https://svnweb.freebsd.org/changeset/base/346370

Log:
  pfctl: Fix ifgroup check
  
  We cannot just assume that any name which ends with a letter is a group
  That's not been true since we allowed renaming of network interfaces. It's also
  not true for things like epair0a.
  
  Try to retrieve the group members for the name to check, since we'll get ENOENT
  if the group doesn't exist.
  
  MFC after:	1 week
  Event:		Aberdeen hackathon 2019

Modified:
  head/sbin/pfctl/pfctl_optimize.c

Modified: head/sbin/pfctl/pfctl_optimize.c
==============================================================================
--- head/sbin/pfctl/pfctl_optimize.c	Fri Apr 19 06:49:46 2019	(r346369)
+++ head/sbin/pfctl/pfctl_optimize.c	Fri Apr 19 10:52:54 2019	(r346370)
@@ -1500,14 +1500,24 @@ superblock_inclusive(struct superblock *block, struct 
 int
 interface_group(const char *ifname)
 {
+	int			s;
+	struct ifgroupreq	ifgr;
+
 	if (ifname == NULL || !ifname[0])
 		return (0);
 
-	/* Real interfaces must end in a number, interface groups do not */
-	if (isdigit(ifname[strlen(ifname) - 1]))
-		return (0);
-	else
-		return (1);
+	s = get_query_socket();
+
+	memset(&ifgr, 0, sizeof(ifgr));
+	strlcpy(ifgr.ifgr_name, ifname, IFNAMSIZ);
+	if (ioctl(s, SIOCGIFGMEMB, (caddr_t)&ifgr) == -1) {
+		if (errno == ENOENT)
+			return (0);
+		else
+			err(1, "SIOCGIFGMEMB");
+	}
+
+	return (1);
 }
 
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:07:07 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C8F2158EA2A;
 Fri, 19 Apr 2019 12:07:07 +0000 (UTC)
 (envelope-from oshogbo.vx@gmail.com)
Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com
 [IPv6:2a00:1450:4864:20::12c])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 35E41731C5;
 Fri, 19 Apr 2019 12:07:06 +0000 (UTC)
 (envelope-from oshogbo.vx@gmail.com)
Received: by mail-lf1-x12c.google.com with SMTP id i68so3918365lfi.10;
 Fri, 19 Apr 2019 05:07:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to:user-agent;
 bh=jjqHxxVBIYetT13OgJJ0bw1na2r4Sk4JvFTnIF3BDLE=;
 b=eZd6ewxwvnGEaoNmTbv9rNK33dke5joIlLcW8P0OJi7hrmT9hsPKztkgMxoiM4B27X
 wrYvpfljJy8PGpfr7CsKcURTR7KdA2aYFqzCRo1tYup+rcMdiepIPb6ijYn2NdITzBdq
 E1RsW8vcMfLo7kHkfoMw97WJJjgx56wChrv8MjlQjio/zJwdTzB1qfBdwejFK/7OhMTp
 4UDZFhytKre+LrxhRa8uIZkizWMItTRtTWSi4XSeXl3NeoDqoxnbEjR3C4GLzfYNbI8b
 GTRRG7of6hhDatkGjfZxOUj9QIRP9yGQBxPMfjUOw5rrgTnuqFT+icxVLx37T6DFp0n9
 kTrA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:date:from:to:cc:subject:message-id
 :references:mime-version:content-disposition:in-reply-to:user-agent;
 bh=jjqHxxVBIYetT13OgJJ0bw1na2r4Sk4JvFTnIF3BDLE=;
 b=bM7kID1CbhHm+ndxTuQA+07HXvmAxxXvpA0zQD/FgeXZRrYWYVnmenh7s4sT4VUnhS
 LXWGFOE/jSB9PyIKfVBcEI6L7gjEID3AWDp5D4Sne2aGsZS1DRylnkUW/aN8JsCwcoA6
 q5oi3EkBiq5mCrwoRbAHCoKpKVa35WIpbnLExk9y1n7bjFaX8qNs7dm5EV9ZyqtkNiBK
 9TcuXoUCdCQ9tDr+hDP6eaUWL5Qx3VjbtgnHmA2LasM4Wkl2RnJucbcgSnmO8xswOL0F
 up2xdhTcjF+XGd2jaL+L4D/Iy4FNHIvBGAKVBrGOoe8buajWiQhBL0IjHJYsWqLcBzXU
 V1lQ==
X-Gm-Message-State: APjAAAU9BMtj29XOmraILMqRKtIGPq9ejBP6XqpBjvESB3vb0Kdk/B1U
 WZBVgxdgtd6YbnfScgTCYhzqeYZYvlc=
X-Google-Smtp-Source: APXvYqx/cqYCL902SrTBQ6pyxX70aeAgf84kUmhYtDFDeZc4Ji+tjsdy6G7laJPS/cG+Pu/aV+x+kw==
X-Received: by 2002:a19:8017:: with SMTP id b23mr2223359lfd.12.1555675622770; 
 Fri, 19 Apr 2019 05:07:02 -0700 (PDT)
Received: from jarvis ([77.79.224.226])
 by smtp.gmail.com with ESMTPSA id d80sm414629lfd.90.2019.04.19.05.07.00
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Apr 2019 05:07:01 -0700 (PDT)
Sender: Mariusz Zaborski 
Date: Fri, 19 Apr 2019 14:06:25 +0200
From: Mariusz Zaborski 
To: Adrian Chadd 
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r346322 - head/lib/libcasper/services/cap_fileargs
Message-ID: <20190419120625.GA2747@jarvis>
References: <201904171658.x3HGwckd080598@repo.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z"
Content-Disposition: inline
In-Reply-To: <201904171658.x3HGwckd080598@repo.freebsd.org>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Rspamd-Queue-Id: 35E41731C5
X-Spamd-Bar: -------
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=eZd6ewxw;
 spf=pass (mx1.freebsd.org: domain of oshogbovx@gmail.com designates
 2a00:1450:4864:20::12c as permitted sender) smtp.mailfrom=oshogbovx@gmail.com
X-Spamd-Result: default: False [-7.64 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[];
 TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36];
 RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+];
 MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com];
 NEURAL_HAM_SHORT(-0.99)[-0.988,0]; SIGNED_PGP(-2.00)[];
 FORGED_SENDER(0.30)[oshogbo@freebsd.org,oshogbovx@gmail.com];
 MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com];
 ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
 TAGGED_FROM(0.00)[];
 FROM_NEQ_ENVFROM(0.00)[oshogbo@freebsd.org,oshogbovx@gmail.com];
 ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[];
 RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 MIME_GOOD(-0.20)[multipart/signed,text/plain];
 RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org];
 IP_SCORE(-2.84)[ip: (-9.53), ipnet: 2a00:1450::/32(-2.38), asn: 15169(-2.24),
 country: US(-0.06)]; 
 RCVD_IN_DNSWL_NONE(0.00)[c.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org
 : 127.0.5.0]; MID_RHS_NOT_FQDN(0.50)[]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:07:07 -0000


--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Apr 17, 2019 at 04:58:38PM +0000, Adrian Chadd wrote:
> Author: adrian
> Date: Wed Apr 17 16:58:38 2019
> New Revision: 346322
> URL: https://svnweb.freebsd.org/changeset/base/346322
>=20
> Log:
>   [casper] fix compilation when casper is disabled.
>  =20
>   This triggers an error in gcc-mips 6.4.0 complaining about unused argum=
ents.
>  =20
>   Tested:
>  =20
>   * compiled/run on mips32; nothing complained.
>=20
> Modified:
>   head/lib/libcasper/services/cap_fileargs/cap_fileargs.h
>=20
> Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.h	Wed Apr 17 16=
:45:42 2019	(r346321)
> +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.h	Wed Apr 17 16=
:58:38 2019	(r346322)
> @@ -108,8 +108,12 @@ fileargs_cinitnv(cap_channel_t *cas __unused, nvlist=
_t
>  	lstat(name, sb)
>  #define	fileargs_open(fa, name)							\
>  	open(name, fa->fa_flags, fa->fa_mode)
> -#define	fileargs_fopen(fa, name, mode)						\
> -	fopen(name, mode)
> +static inline
> +FILE *fileargs_fopen(fileargs_t *fa, const char *name, const char *mode)
> +{
> +	(void) fa;
__unused is not good enough?
> +	return (fopen(name, mode));
> +}
>  #define	fileargs_free(fa)	(free(fa))
>  #endif
> =20
>=20

--=20
Mariusz Zaborski
oshogbo//vx		| http://oshogbo.vexillium.org
FreeBSD committer	| https://freebsd.org
Software developer	| http://wheelsystems.com
If it's not broken, let's fix it till it is!!1

--7AUc2qLy4jB3hD7Z
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkD1x0xkJXVVY1Gwf38KEGuLGxWQFAly5ub4ACgkQ38KEGuLG
xWSAyxAAoDpfjabhuC7jWIoSj9d7qswZRdwG29tXSMQmpR5XXeNnIqH/5Avgji5m
6AFtksNmD6nquVw/hFQmPZ5Lx0//8LSc4iBOuSadunIiTrR2MwSsr7SQ3PTD077q
o+j4OHNnMqJpiwht6FvoC5iXx9sqsI52eoAo5MAq/1FhiAPkzm4VxHyxehZHM6Rq
X8SbxG0KClFOh0umt/WF0RZN8aMAnMdqK+wQEkgbgqa6PNQ7sI4NAnDem0+pwNL/
SsD/2h4JXP+g6IuHEJUYXRkZ3vobc5ovd/su+IzqBywSjQ3wraGwiEq75NKIMrDh
doi9NRdyKHKdKXI/m2CJ2AtVpMCpnSJ+b0McpsIJ8l04ElNMxXj8Uw5vlUK9cTR1
0B0E5Z4/15GPSwcD1/CzpIXP1oH3GkXj9wyJuYv8D94r5Xpw04M6ECKydEvUHfVS
j7Z0mA7IxaLC5+wYVm8SSfcSyj48x6JLRMGfDrnFfyEzrE0Qy+hUvV9eJEedc5xn
kD651vNchdisLu9INXlhqke5RIlVvea+083JERVsUDkLDcCFoURqk93wyGIMBUNs
mIm/4SaDSgh5p0BNqUw/BM+R4AxLqCyfUFlAaJbJa5jPjhQduGKD2LdZEtBGtrRA
RtTUu0iWDCF3tkyWIjmo+S2H+34kP5fRQv2E5rna449v0louZdY=
=dVXk
-----END PGP SIGNATURE-----

--7AUc2qLy4jB3hD7Z--

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:30:16 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B25A158F5D4;
 Fri, 19 Apr 2019 12:30:16 +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 2D1377430D;
 Fri, 19 Apr 2019 12:30:16 +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 055852E3F2;
 Fri, 19 Apr 2019 12:30:16 +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 x3JCUFwu067572;
 Fri, 19 Apr 2019 12:30:15 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCUFCN067571;
 Fri, 19 Apr 2019 12:30:15 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191230.x3JCUFCN067571@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:30: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: r346371 - stable/12/lib/libthr/thread
X-SVN-Group: stable-12
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/12/lib/libthr/thread
X-SVN-Commit-Revision: 346371
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 2D1377430D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:30:16 -0000

Author: kib
Date: Fri Apr 19 12:30:15 2019
New Revision: 346371
URL: https://svnweb.freebsd.org/changeset/base/346371

Log:
  MFC r346158:
  Do not access mutex memory after unlock.
  
  PR:	237195

Modified:
  stable/12/lib/libthr/thread/thr_mutex.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libthr/thread/thr_mutex.c
==============================================================================
--- stable/12/lib/libthr/thread/thr_mutex.c	Fri Apr 19 10:52:54 2019	(r346370)
+++ stable/12/lib/libthr/thread/thr_mutex.c	Fri Apr 19 12:30:15 2019	(r346371)
@@ -949,7 +949,7 @@ mutex_unlock_common(struct pthread_mutex *m, bool cv, 
 {
 	struct pthread *curthread;
 	uint32_t id;
-	int deferred, error, robust;
+	int deferred, error, private, robust;
 
 	if (__predict_false(m <= THR_MUTEX_DESTROYED)) {
 		if (m == THR_MUTEX_DESTROYED)
@@ -967,6 +967,7 @@ mutex_unlock_common(struct pthread_mutex *m, bool cv, 
 		return (EPERM);
 
 	error = 0;
+	private = (m->m_flags & PMUTEX_FLAG_PRIVATE) != 0;
 	if (__predict_false(PMUTEX_TYPE(m->m_flags) ==
 	    PTHREAD_MUTEX_RECURSIVE && m->m_count > 0)) {
 		m->m_count--;
@@ -991,7 +992,7 @@ mutex_unlock_common(struct pthread_mutex *m, bool cv, 
 		if (robust)
 			_mutex_leave_robust(curthread, m);
 	}
-	if (!cv && m->m_flags & PMUTEX_FLAG_PRIVATE)
+	if (!cv && private)
 		THR_CRITICAL_LEAVE(curthread);
 	return (error);
 }

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:31:17 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF9B2158F765;
 Fri, 19 Apr 2019 12:31:17 +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 855A8744D9;
 Fri, 19 Apr 2019 12:31:17 +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 610882E41E;
 Fri, 19 Apr 2019 12:31:17 +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 x3JCVHOf070665;
 Fri, 19 Apr 2019 12:31:17 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCVHHo070664;
 Fri, 19 Apr 2019 12:31:17 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191231.x3JCVHHo070664@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:31:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346372 - stable/11/lib/libthr/thread
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/11/lib/libthr/thread
X-SVN-Commit-Revision: 346372
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 855A8744D9
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:31:18 -0000

Author: kib
Date: Fri Apr 19 12:31:16 2019
New Revision: 346372
URL: https://svnweb.freebsd.org/changeset/base/346372

Log:
  MFC r346158:
  Do not access mutex memory after unlock.
  
  PR:	237195

Modified:
  stable/11/lib/libthr/thread/thr_mutex.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libthr/thread/thr_mutex.c
==============================================================================
--- stable/11/lib/libthr/thread/thr_mutex.c	Fri Apr 19 12:30:15 2019	(r346371)
+++ stable/11/lib/libthr/thread/thr_mutex.c	Fri Apr 19 12:31:16 2019	(r346372)
@@ -945,7 +945,7 @@ mutex_unlock_common(struct pthread_mutex *m, bool cv, 
 {
 	struct pthread *curthread;
 	uint32_t id;
-	int deferred, error, robust;
+	int deferred, error, private, robust;
 
 	if (__predict_false(m <= THR_MUTEX_DESTROYED)) {
 		if (m == THR_MUTEX_DESTROYED)
@@ -963,6 +963,7 @@ mutex_unlock_common(struct pthread_mutex *m, bool cv, 
 		return (EPERM);
 
 	error = 0;
+	private = (m->m_flags & PMUTEX_FLAG_PRIVATE) != 0;
 	if (__predict_false(PMUTEX_TYPE(m->m_flags) ==
 	    PTHREAD_MUTEX_RECURSIVE && m->m_count > 0)) {
 		m->m_count--;
@@ -987,7 +988,7 @@ mutex_unlock_common(struct pthread_mutex *m, bool cv, 
 		if (robust)
 			_mutex_leave_robust(curthread, m);
 	}
-	if (!cv && m->m_flags & PMUTEX_FLAG_PRIVATE)
+	if (!cv && private)
 		THR_CRITICAL_LEAVE(curthread);
 	return (error);
 }

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:33:17 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3CF3158F88A;
 Fri, 19 Apr 2019 12:33:16 +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 94CCF74879;
 Fri, 19 Apr 2019 12:33:16 +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 7030A2E5AA;
 Fri, 19 Apr 2019 12:33:16 +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 x3JCXGx9072599;
 Fri, 19 Apr 2019 12:33:16 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCXGwJ072598;
 Fri, 19 Apr 2019 12:33:16 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191233.x3JCXGwJ072598@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:33:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346373 - stable/12/lib/libdevctl
X-SVN-Group: stable-12
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/12/lib/libdevctl
X-SVN-Commit-Revision: 346373
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 94CCF74879
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:33:17 -0000

Author: kib
Date: Fri Apr 19 12:33:16 2019
New Revision: 346373
URL: https://svnweb.freebsd.org/changeset/base/346373

Log:
  MFC r345959:
  Add __BEGIN_DECLS/__END_DECLS braces to libdevctl header.

Modified:
  stable/12/lib/libdevctl/devctl.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libdevctl/devctl.h
==============================================================================
--- stable/12/lib/libdevctl/devctl.h	Fri Apr 19 12:31:16 2019	(r346372)
+++ stable/12/lib/libdevctl/devctl.h	Fri Apr 19 12:33:16 2019	(r346373)
@@ -31,6 +31,7 @@
 
 #include 
 
+__BEGIN_DECLS
 int	devctl_attach(const char *device);
 int	devctl_detach(const char *device, bool force);
 int	devctl_enable(const char *device);
@@ -43,5 +44,6 @@ int	devctl_rescan(const char *device);
 int	devctl_delete(const char *device, bool force);
 int	devctl_freeze(void);
 int	devctl_thaw(void);
+__END_DECLS
 
 #endif /* !__DEVCTL_H__ */

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:33:59 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05093158F8D5;
 Fri, 19 Apr 2019 12:33:59 +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 9E2A374998;
 Fri, 19 Apr 2019 12:33:58 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7734C2E5AB;
 Fri, 19 Apr 2019 12:33:58 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JCXwuN072683;
 Fri, 19 Apr 2019 12:33:58 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCXw3Z072682;
 Fri, 19 Apr 2019 12:33:58 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191233.x3JCXw3Z072682@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:33:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346374 - stable/11/lib/libdevctl
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/11/lib/libdevctl
X-SVN-Commit-Revision: 346374
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 9E2A374998
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:33:59 -0000

Author: kib
Date: Fri Apr 19 12:33:58 2019
New Revision: 346374
URL: https://svnweb.freebsd.org/changeset/base/346374

Log:
  MFC r345959:
  Add __BEGIN_DECLS/__END_DECLS braces to libdevctl header.

Modified:
  stable/11/lib/libdevctl/devctl.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libdevctl/devctl.h
==============================================================================
--- stable/11/lib/libdevctl/devctl.h	Fri Apr 19 12:33:16 2019	(r346373)
+++ stable/11/lib/libdevctl/devctl.h	Fri Apr 19 12:33:58 2019	(r346374)
@@ -31,6 +31,7 @@
 
 #include 
 
+__BEGIN_DECLS
 int	devctl_attach(const char *device);
 int	devctl_detach(const char *device, bool force);
 int	devctl_enable(const char *device);
@@ -41,5 +42,6 @@ int	devctl_set_driver(const char *device, const char *
 int	devctl_clear_driver(const char *device, bool force);
 int	devctl_rescan(const char *device);
 int	devctl_delete(const char *device, bool force);
+__END_DECLS
 
 #endif /* !__DEVCTL_H__ */

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:38:50 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DFF0158FAAB;
 Fri, 19 Apr 2019 12:38:50 +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 B090E74D7A;
 Fri, 19 Apr 2019 12:38:49 +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 8B8FF2E5AF;
 Fri, 19 Apr 2019 12:38:49 +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 x3JCcndW073225;
 Fri, 19 Apr 2019 12:38:49 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCcnNQ073223;
 Fri, 19 Apr 2019 12:38:49 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191238.x3JCcnNQ073223@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:38: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: r346375 - stable/12/sys/dev/smartpqi
X-SVN-Group: stable-12
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/12/sys/dev/smartpqi
X-SVN-Commit-Revision: 346375
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: B090E74D7A
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:38:50 -0000

Author: kib
Date: Fri Apr 19 12:38:48 2019
New Revision: 346375
URL: https://svnweb.freebsd.org/changeset/base/346375

Log:
  MFC r345964:
  Remove single-use DEV_RESET() macro.

Modified:
  stable/12/sys/dev/smartpqi/smartpqi_cam.c
  stable/12/sys/dev/smartpqi/smartpqi_defines.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/smartpqi/smartpqi_cam.c
==============================================================================
--- stable/12/sys/dev/smartpqi/smartpqi_cam.c	Fri Apr 19 12:33:58 2019	(r346374)
+++ stable/12/sys/dev/smartpqi/smartpqi_cam.c	Fri Apr 19 12:38:48 2019	(r346375)
@@ -725,7 +725,7 @@ static int pqisrc_io_start(struct cam_sim *sim, union 
 		return error;
 	}
 	/* Check device reset */
-	if (DEV_RESET(dvp)) {
+	if (dvp->reset_in_progress) {
 		ccb->ccb_h.status = CAM_SCSI_BUSY | CAM_REQ_INPROG | CAM_BUSY;
 		DBG_WARN("Device %d reset returned busy\n", ccb->ccb_h.target_id);
 		return error;

Modified: stable/12/sys/dev/smartpqi/smartpqi_defines.h
==============================================================================
--- stable/12/sys/dev/smartpqi/smartpqi_defines.h	Fri Apr 19 12:33:58 2019	(r346374)
+++ stable/12/sys/dev/smartpqi/smartpqi_defines.h	Fri Apr 19 12:38:48 2019	(r346375)
@@ -386,8 +386,6 @@ enum pqisrc_ctrl_mode{
 #define IS_AIO_PATH(dev)				(dev->aio_enabled)
 #define IS_RAID_PATH(dev)				(!dev->aio_enabled)
 
-#define DEV_RESET(dvp)                          (dvp->reset_in_progress)
-
 /* SOP data direction flags */
 #define SOP_DATA_DIR_NONE			0x00
 #define SOP_DATA_DIR_FROM_DEVICE		0x01

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:40:22 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFEE4158FB5B;
 Fri, 19 Apr 2019 12:40:22 +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 50CB174EE5;
 Fri, 19 Apr 2019 12:40:22 +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 2D0402E5B3;
 Fri, 19 Apr 2019 12:40:22 +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 x3JCeLiD073372;
 Fri, 19 Apr 2019 12:40:21 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCeL8d073370;
 Fri, 19 Apr 2019 12:40:21 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191240.x3JCeL8d073370@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:40:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346376 - stable/11/sys/dev/smartpqi
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/11/sys/dev/smartpqi
X-SVN-Commit-Revision: 346376
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 50CB174EE5
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:40:22 -0000

Author: kib
Date: Fri Apr 19 12:40:21 2019
New Revision: 346376
URL: https://svnweb.freebsd.org/changeset/base/346376

Log:
  MFC r345964:
  Remove single-use DEV_RESET() macro.

Modified:
  stable/11/sys/dev/smartpqi/smartpqi_cam.c
  stable/11/sys/dev/smartpqi/smartpqi_defines.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/smartpqi/smartpqi_cam.c
==============================================================================
--- stable/11/sys/dev/smartpqi/smartpqi_cam.c	Fri Apr 19 12:38:48 2019	(r346375)
+++ stable/11/sys/dev/smartpqi/smartpqi_cam.c	Fri Apr 19 12:40:21 2019	(r346376)
@@ -726,7 +726,7 @@ static int pqisrc_io_start(struct cam_sim *sim, union 
 		return error;
 	}
 	/* Check device reset */
-	if (DEV_RESET(dvp)) {
+	if (dvp->reset_in_progress) {
 		ccb->ccb_h.status = CAM_SCSI_BUSY | CAM_REQ_INPROG | CAM_BUSY;
 		DBG_WARN("Device %d reset returned busy\n", ccb->ccb_h.target_id);
 		return error;

Modified: stable/11/sys/dev/smartpqi/smartpqi_defines.h
==============================================================================
--- stable/11/sys/dev/smartpqi/smartpqi_defines.h	Fri Apr 19 12:38:48 2019	(r346375)
+++ stable/11/sys/dev/smartpqi/smartpqi_defines.h	Fri Apr 19 12:40:21 2019	(r346376)
@@ -382,8 +382,6 @@ enum pqisrc_ctrl_mode{
 #define IS_AIO_PATH(dev)				(dev->aio_enabled)
 #define IS_RAID_PATH(dev)				(!dev->aio_enabled)
 
-#define DEV_RESET(dvp)                          (dvp->reset_in_progress)
-
 /* SOP data direction flags */
 #define SOP_DATA_DIR_NONE			0x00
 #define SOP_DATA_DIR_FROM_DEVICE		0x01

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:45:47 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 228EC158FD97;
 Fri, 19 Apr 2019 12:45:47 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.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 B647075330;
 Fri, 19 Apr 2019 12:45:46 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 903D22E754;
 Fri, 19 Apr 2019 12:45:46 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JCjkmg078293;
 Fri, 19 Apr 2019 12:45:46 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCjkdA078291;
 Fri, 19 Apr 2019 12:45:46 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191245.x3JCjkdA078291@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:45:46 +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: r346377 - in stable/12/sys: kern sys
X-SVN-Group: stable-12
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: in stable/12/sys: kern sys
X-SVN-Commit-Revision: 346377
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: B647075330
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.979,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:45:47 -0000

Author: kib
Date: Fri Apr 19 12:45:45 2019
New Revision: 346377
URL: https://svnweb.freebsd.org/changeset/base/346377

Log:
  MFC r345960:
  Provide newbus infrastructure for initiating device reset.

Modified:
  stable/12/sys/kern/bus_if.m
  stable/12/sys/kern/subr_bus.c
  stable/12/sys/sys/bus.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/bus_if.m
==============================================================================
--- stable/12/sys/kern/bus_if.m	Fri Apr 19 12:40:21 2019	(r346376)
+++ stable/12/sys/kern/bus_if.m	Fri Apr 19 12:45:45 2019	(r346377)
@@ -66,6 +66,16 @@ CODE {
 
 		panic("bus_add_child is not implemented");
 	}
+
+	static int null_reset_post(device_t bus, device_t dev)
+	{
+		return (0);
+	}
+
+	static int null_reset_prepare(device_t bus, device_t dev)
+	{
+		return (0);
+	}
 };
 
 /**
@@ -848,3 +858,48 @@ METHOD int get_cpus {
 	size_t		_setsize;
 	cpuset_t	*_cpuset;
 } DEFAULT bus_generic_get_cpus;
+
+/**
+ * @brief Prepares the given child of the bus for reset
+ *
+ * Typically bus detaches or suspends children' drivers, and then
+ * calls this method to save bus-specific information, for instance,
+ * PCI config space, which is damaged by reset.
+ *
+ * The bus_helper_reset_prepare() helper is provided to ease
+ * implementing bus reset methods.
+ *
+ * @param _dev		the bus device
+ * @param _child	the child device
+ */
+METHOD int reset_prepare {
+	device_t _dev;
+	device_t _child;
+} DEFAULT null_reset_prepare;
+
+/**
+ * @brief Restores the child operations after the reset
+ *
+ * The bus_helper_reset_post() helper is provided to ease
+ * implementing bus reset methods.
+ *
+ * @param _dev		the bus device
+ * @param _child	the child device
+ */
+METHOD int reset_post {
+	device_t _dev;
+	device_t _child;
+} DEFAULT null_reset_post;
+
+/**
+ * @brief Performs reset of the child
+ *
+ * @param _dev		the bus device
+ * @param _child	the child device
+ * @param _flags	DEVF_RESET_ flags
+ */
+METHOD int reset_child {
+	device_t _dev;
+	device_t _child;
+	int _flags;
+};

Modified: stable/12/sys/kern/subr_bus.c
==============================================================================
--- stable/12/sys/kern/subr_bus.c	Fri Apr 19 12:40:21 2019	(r346376)
+++ stable/12/sys/kern/subr_bus.c	Fri Apr 19 12:45:45 2019	(r346377)
@@ -3854,6 +3854,96 @@ bus_generic_resume(device_t dev)
 	return (0);
 }
 
+
+/**
+ * @brief Helper function for implementing BUS_RESET_POST
+ *
+ * Bus can use this function to implement common operations of
+ * re-attaching or resuming the children after the bus itself was
+ * reset, and after restoring bus-unique state of children.
+ *
+ * @param dev	The bus
+ * #param flags	DEVF_RESET_*
+ */
+int
+bus_helper_reset_post(device_t dev, int flags)
+{
+	device_t child;
+	int error, error1;
+
+	error = 0;
+	TAILQ_FOREACH(child, &dev->children,link) {
+		BUS_RESET_POST(dev, child);
+		error1 = (flags & DEVF_RESET_DETACH) != 0 ?
+		    device_probe_and_attach(child) :
+		    BUS_RESUME_CHILD(dev, child);
+		if (error == 0 && error1 != 0)
+			error = error1;
+	}
+	return (error);
+}
+
+static void
+bus_helper_reset_prepare_rollback(device_t dev, device_t child, int flags)
+{
+
+	child = TAILQ_NEXT(child, link);
+	if (child == NULL)
+		return;
+	TAILQ_FOREACH_FROM(child, &dev->children,link) {
+		BUS_RESET_POST(dev, child);
+		if ((flags & DEVF_RESET_DETACH) != 0)
+			device_probe_and_attach(child);
+		else
+			BUS_RESUME_CHILD(dev, child);
+	}
+}
+
+/**
+ * @brief Helper function for implementing BUS_RESET_PREPARE
+ *
+ * Bus can use this function to implement common operations of
+ * detaching or suspending the children before the bus itself is
+ * reset, and then save bus-unique state of children that must
+ * persists around reset.
+ *
+ * @param dev	The bus
+ * #param flags	DEVF_RESET_*
+ */
+int
+bus_helper_reset_prepare(device_t dev, int flags)
+{
+	device_t child;
+	int error;
+
+	if (dev->state != DS_ATTACHED)
+		return (EBUSY);
+
+	TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) {
+		if ((flags & DEVF_RESET_DETACH) != 0) {
+			error = device_get_state(child) == DS_ATTACHED ?
+			    device_detach(child) : 0;
+		} else {
+			error = BUS_SUSPEND_CHILD(dev, child);
+		}
+		if (error == 0) {
+			error = BUS_RESET_PREPARE(dev, child);
+			if (error != 0) {
+				if ((flags & DEVF_RESET_DETACH) != 0)
+					device_probe_and_attach(child);
+				else
+					BUS_RESUME_CHILD(dev, child);
+			}
+		}
+		if (error != 0) {
+			bus_helper_reset_prepare_rollback(dev, child, flags);
+			return (error);
+		}
+	}
+	return (0);
+}
+
+
 /**
  * @brief Helper function for implementing BUS_PRINT_CHILD().
  *

Modified: stable/12/sys/sys/bus.h
==============================================================================
--- stable/12/sys/sys/bus.h	Fri Apr 19 12:40:21 2019	(r346376)
+++ stable/12/sys/sys/bus.h	Fri Apr 19 12:45:45 2019	(r346377)
@@ -143,6 +143,10 @@ struct devreq {
 /* Flags for DEV_DELETE. */
 #define	DEVF_FORCE_DELETE	0x0000001
 
+/* Flags for DEV_RESET */
+#define	DEVF_RESET_DETACH	0x0000001	/* Detach drivers vs suspend
+						   device */
+
 #ifdef _KERNEL
 
 #include 
@@ -494,6 +498,8 @@ int	bus_generic_unmap_resource(device_t dev, device_t 
 				   struct resource_map *map);
 int	bus_generic_write_ivar(device_t dev, device_t child, int which,
 			       uintptr_t value);
+int	bus_helper_reset_post(device_t dev, int flags);
+int	bus_helper_reset_prepare(device_t dev, int flags);
 int	bus_null_rescan(device_t dev);
 
 /*

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:48:19 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13BE7158FEB9;
 Fri, 19 Apr 2019 12:48:19 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 AA46F7554D;
 Fri, 19 Apr 2019 12:48: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 874382E756;
 Fri, 19 Apr 2019 12:48: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 x3JCmIhT078462;
 Fri, 19 Apr 2019 12:48:18 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCmHfi078459;
 Fri, 19 Apr 2019 12:48:17 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191248.x3JCmHfi078459@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:48:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346378 - in stable/12/sys: amd64/vmm/io dev/pci
X-SVN-Group: stable-12
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: in stable/12/sys: amd64/vmm/io dev/pci
X-SVN-Commit-Revision: 346378
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: AA46F7554D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.980,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:48:19 -0000

Author: kib
Date: Fri Apr 19 12:48:17 2019
New Revision: 346378
URL: https://svnweb.freebsd.org/changeset/base/346378

Log:
  MFC r345963, r345997:
  Implement resets for PCI buses and PCIe bridges.

Modified:
  stable/12/sys/amd64/vmm/io/ppt.c
  stable/12/sys/dev/pci/pci.c
  stable/12/sys/dev/pci/pci_pci.c
  stable/12/sys/dev/pci/pcivar.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/vmm/io/ppt.c
==============================================================================
--- stable/12/sys/amd64/vmm/io/ppt.c	Fri Apr 19 12:45:45 2019	(r346377)
+++ stable/12/sys/amd64/vmm/io/ppt.c	Fri Apr 19 12:48:17 2019	(r346378)
@@ -356,25 +356,12 @@ ppt_is_mmio(struct vm *vm, vm_paddr_t gpa)
 static void
 ppt_pci_reset(device_t dev)
 {
-	int ps;
 
 	if (pcie_flr(dev,
-		     max(pcie_get_max_completion_timeout(dev) / 1000, 10),
-		     true))
+	     max(pcie_get_max_completion_timeout(dev) / 1000, 10), true))
 		return;
 
-	/*
-	 * If FLR fails, attempt a power-management reset by cycling
-	 * the device in/out of D3 state.
-	 * PCI spec says we can only go into D3 state from D0 state.
-	 * Transition from D[12] into D0 before going to D3 state.
-	 */
-	ps = pci_get_powerstate(dev);
-	if (ps != PCI_POWERSTATE_D0 && ps != PCI_POWERSTATE_D3)
-		pci_set_powerstate(dev, PCI_POWERSTATE_D0);
-	if (pci_get_powerstate(dev) != PCI_POWERSTATE_D3)
-		pci_set_powerstate(dev, PCI_POWERSTATE_D3);
-	pci_set_powerstate(dev, ps);
+	pci_power_reset(dev);
 }
 
 int

Modified: stable/12/sys/dev/pci/pci.c
==============================================================================
--- stable/12/sys/dev/pci/pci.c	Fri Apr 19 12:45:45 2019	(r346377)
+++ stable/12/sys/dev/pci/pci.c	Fri Apr 19 12:48:17 2019	(r346378)
@@ -125,6 +125,10 @@ static int		pci_remap_intr_method(device_t bus, device
 			    u_int irq);
 static void		pci_hint_device_unit(device_t acdev, device_t child,
 			    const char *name, int *unitp);
+static int		pci_reset_post(device_t dev, device_t child);
+static int		pci_reset_prepare(device_t dev, device_t child);
+static int		pci_reset_child(device_t dev, device_t child,
+			    int flags);
 
 static int		pci_get_id_method(device_t dev, device_t child,
 			    enum pci_id_type type, uintptr_t *rid);
@@ -149,6 +153,9 @@ static device_method_t pci_methods[] = {
 	DEVMETHOD(bus_driver_added,	pci_driver_added),
 	DEVMETHOD(bus_setup_intr,	pci_setup_intr),
 	DEVMETHOD(bus_teardown_intr,	pci_teardown_intr),
+	DEVMETHOD(bus_reset_prepare,	pci_reset_prepare),
+	DEVMETHOD(bus_reset_post,	pci_reset_post),
+	DEVMETHOD(bus_reset_child,	pci_reset_child),
 
 	DEVMETHOD(bus_get_dma_tag,	pci_get_dma_tag),
 	DEVMETHOD(bus_get_resource_list,pci_get_resource_list),
@@ -6353,6 +6360,94 @@ pcie_flr(device_t dev, u_int max_delay, bool force)
 	    PCIEM_STA_TRANSACTION_PND)
 		pci_printf(&dinfo->cfg, "Transactions pending after FLR!\n");
 	return (true);
+}
+
+/*
+ * Attempt a power-management reset by cycling the device in/out of D3
+ * state.  PCI spec says we can only go into D3 state from D0 state.
+ * Transition from D[12] into D0 before going to D3 state.
+ */
+int
+pci_power_reset(device_t dev)
+{
+	int ps;
+
+	ps = pci_get_powerstate(dev);
+	if (ps != PCI_POWERSTATE_D0 && ps != PCI_POWERSTATE_D3)
+		pci_set_powerstate(dev, PCI_POWERSTATE_D0);
+	pci_set_powerstate(dev, PCI_POWERSTATE_D3);
+	pci_set_powerstate(dev, ps);
+	return (0);
+}
+
+/*
+ * Try link drop and retrain of the downstream port of upstream
+ * switch, for PCIe.  According to the PCIe 3.0 spec 6.6.1, this must
+ * cause Conventional Hot reset of the device in the slot.
+ * Alternative, for PCIe, could be the secondary bus reset initiatied
+ * on the upstream switch PCIR_BRIDGECTL_1, bit 6.
+ */
+int
+pcie_link_reset(device_t port, int pcie_location)
+{
+	uint16_t v;
+
+	v = pci_read_config(port, pcie_location + PCIER_LINK_CTL, 2);
+	v |= PCIEM_LINK_CTL_LINK_DIS;
+	pci_write_config(port, pcie_location + PCIER_LINK_CTL, v, 2);
+	pause_sbt("pcier1", mstosbt(20), 0, 0);
+	v &= ~PCIEM_LINK_CTL_LINK_DIS;
+	v |= PCIEM_LINK_CTL_RETRAIN_LINK;
+	pci_write_config(port, pcie_location + PCIER_LINK_CTL, v, 2);
+	pause_sbt("pcier2", mstosbt(100), 0, 0); /* 100 ms */
+	v = pci_read_config(port, pcie_location + PCIER_LINK_STA, 2);
+	return ((v & PCIEM_LINK_STA_TRAINING) != 0 ? ETIMEDOUT : 0);
+}
+
+static int
+pci_reset_post(device_t dev, device_t child)
+{
+
+	if (dev == device_get_parent(child))
+		pci_restore_state(child);
+	return (0);
+}
+
+static int
+pci_reset_prepare(device_t dev, device_t child)
+{
+
+	if (dev == device_get_parent(child))
+		pci_save_state(child);
+	return (0);
+}
+
+static int
+pci_reset_child(device_t dev, device_t child, int flags)
+{
+	int error;
+
+	if (dev == NULL || device_get_parent(child) != dev)
+		return (0);
+	if ((flags & DEVF_RESET_DETACH) != 0) {
+		error = device_get_state(child) == DS_ATTACHED ?
+		    device_detach(child) : 0;
+	} else {
+		error = BUS_SUSPEND_CHILD(dev, child);
+	}
+	if (error == 0) {
+		if (!pcie_flr(child, 1000, false)) {
+			error = BUS_RESET_PREPARE(dev, child);
+			if (error == 0)
+				pci_power_reset(child);
+			BUS_RESET_POST(dev, child);
+		}
+		if ((flags & DEVF_RESET_DETACH) != 0)
+			device_probe_and_attach(child);
+		else
+			BUS_RESUME_CHILD(dev, child);
+	}
+	return (error);
 }
 
 const struct pci_device_table *

Modified: stable/12/sys/dev/pci/pci_pci.c
==============================================================================
--- stable/12/sys/dev/pci/pci_pci.c	Fri Apr 19 12:45:45 2019	(r346377)
+++ stable/12/sys/dev/pci/pci_pci.c	Fri Apr 19 12:48:17 2019	(r346378)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -80,6 +81,7 @@ static void		pcib_pcie_dll_timeout(void *arg);
 #endif
 static int		pcib_request_feature_default(device_t pcib, device_t dev,
 			    enum pci_feature feature);
+static int		pcib_reset_child(device_t dev, device_t child, int flags);
 
 static device_method_t pcib_methods[] = {
     /* Device interface */
@@ -106,6 +108,7 @@ static device_method_t pcib_methods[] = {
     DEVMETHOD(bus_deactivate_resource,	bus_generic_deactivate_resource),
     DEVMETHOD(bus_setup_intr,		bus_generic_setup_intr),
     DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
+    DEVMETHOD(bus_reset_child,		pcib_reset_child),
 
     /* pcib interface */
     DEVMETHOD(pcib_maxslots,		pcib_ari_maxslots),
@@ -2907,4 +2910,32 @@ pcib_request_feature_default(device_t pcib, device_t d
 	 */
 	bus = device_get_parent(pcib);
 	return (PCIB_REQUEST_FEATURE(device_get_parent(bus), dev, feature));
+}
+
+static int
+pcib_reset_child(device_t dev, device_t child, int flags)
+{
+	struct pci_devinfo *pdinfo;
+	int error;
+
+	error = 0;
+	if (dev == NULL || device_get_parent(child) != dev)
+		goto out;
+	error = ENXIO;
+	if (device_get_devclass(child) != devclass_find("pci"))
+		goto out;
+	pdinfo = device_get_ivars(dev);
+	if (pdinfo->cfg.pcie.pcie_location != 0 &&
+	    (pdinfo->cfg.pcie.pcie_type == PCIEM_TYPE_DOWNSTREAM_PORT ||
+	    pdinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT)) {
+		error = bus_helper_reset_prepare(child, flags);
+		if (error == 0) {
+			error = pcie_link_reset(dev,
+			    pdinfo->cfg.pcie.pcie_location);
+			/* XXXKIB call _post even if error != 0 ? */
+			bus_helper_reset_post(child, flags);
+		}
+	}
+out:
+	return (error);
 }

Modified: stable/12/sys/dev/pci/pcivar.h
==============================================================================
--- stable/12/sys/dev/pci/pcivar.h	Fri Apr 19 12:45:45 2019	(r346377)
+++ stable/12/sys/dev/pci/pcivar.h	Fri Apr 19 12:48:17 2019	(r346378)
@@ -674,6 +674,7 @@ int	pci_get_max_read_req(device_t dev);
 void	pci_restore_state(device_t dev);
 void	pci_save_state(device_t dev);
 int	pci_set_max_read_req(device_t dev, int size);
+int	pci_power_reset(device_t dev);
 uint32_t pcie_read_config(device_t dev, int reg, int width);
 void	pcie_write_config(device_t dev, int reg, uint32_t value, int width);
 uint32_t pcie_adjust_config(device_t dev, int reg, uint32_t mask,
@@ -681,6 +682,7 @@ uint32_t pcie_adjust_config(device_t dev, int reg, uin
 bool	pcie_flr(device_t dev, u_int max_delay, bool force);
 int	pcie_get_max_completion_timeout(device_t dev);
 bool	pcie_wait_for_pending_transactions(device_t dev, u_int max_delay);
+int	pcie_link_reset(device_t port, int pcie_location);
 
 void	pci_print_faulted_dev(void);
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:50:27 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 241E7158FF9B;
 Fri, 19 Apr 2019 12:50:27 +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 B5FCD756D4;
 Fri, 19 Apr 2019 12:50:26 +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 915E72E75B;
 Fri, 19 Apr 2019 12:50:26 +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 x3JCoQkg078628;
 Fri, 19 Apr 2019 12:50:26 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCoQ3w078627;
 Fri, 19 Apr 2019 12:50:26 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191250.x3JCoQ3w078627@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:50: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: r346379 - in stable/12/sys: kern sys
X-SVN-Group: stable-12
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: in stable/12/sys: kern sys
X-SVN-Commit-Revision: 346379
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: B5FCD756D4
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:50:27 -0000

Author: kib
Date: Fri Apr 19 12:50:25 2019
New Revision: 346379
URL: https://svnweb.freebsd.org/changeset/base/346379

Log:
  MFC r345965:
  Add DEV_RESET /dev/devctl2 ioctl.

Modified:
  stable/12/sys/kern/subr_bus.c
  stable/12/sys/sys/bus.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/subr_bus.c
==============================================================================
--- stable/12/sys/kern/subr_bus.c	Fri Apr 19 12:48:17 2019	(r346378)
+++ stable/12/sys/kern/subr_bus.c	Fri Apr 19 12:50:25 2019	(r346379)
@@ -5636,6 +5636,7 @@ devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t d
 	case DEV_CLEAR_DRIVER:
 	case DEV_RESCAN:
 	case DEV_DELETE:
+	case DEV_RESET:
 		error = priv_check(td, PRIV_DRIVER);
 		if (error == 0)
 			error = find_device(req, &dev);
@@ -5860,6 +5861,14 @@ devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t d
 			device_do_deferred_actions();
 			device_frozen = false;
 		}
+		break;
+	case DEV_RESET:
+		if ((req->dr_flags & ~(DEVF_RESET_DETACH)) != 0) {
+			error = EINVAL;
+			break;
+		}
+		error = BUS_RESET_CHILD(device_get_parent(dev), dev,
+		    req->dr_flags);
 		break;
 	}
 	mtx_unlock(&Giant);

Modified: stable/12/sys/sys/bus.h
==============================================================================
--- stable/12/sys/sys/bus.h	Fri Apr 19 12:48:17 2019	(r346378)
+++ stable/12/sys/sys/bus.h	Fri Apr 19 12:50:25 2019	(r346379)
@@ -130,6 +130,7 @@ struct devreq {
 #define	DEV_DELETE	_IOW('D', 10, struct devreq)
 #define	DEV_FREEZE	_IOW('D', 11, struct devreq)
 #define	DEV_THAW	_IOW('D', 12, struct devreq)
+#define	DEV_RESET	_IOW('D', 13, struct devreq)
 
 /* Flags for DEV_DETACH and DEV_DISABLE. */
 #define	DEVF_FORCE_DETACH	0x0000001

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:54:07 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0056156B1F5;
 Fri, 19 Apr 2019 12:54:06 +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 8317A75ADD;
 Fri, 19 Apr 2019 12:54:06 +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 5D80C2E8FE;
 Fri, 19 Apr 2019 12:54:06 +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 x3JCs6pp083582;
 Fri, 19 Apr 2019 12:54:06 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCs54F083577;
 Fri, 19 Apr 2019 12:54:05 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191254.x3JCs54F083577@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:54: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: r346380 - in stable/12: lib/libdevctl usr.sbin/devctl
X-SVN-Group: stable-12
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: in stable/12: lib/libdevctl usr.sbin/devctl
X-SVN-Commit-Revision: 346380
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 8317A75ADD
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.98)[-0.979,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:54:07 -0000

Author: kib
Date: Fri Apr 19 12:54:05 2019
New Revision: 346380
URL: https://svnweb.freebsd.org/changeset/base/346380

Log:
  MFC r345966, r345968:
  Implement devctl(8) command 'reset', using DEV_RESET /dev/devctl2 ioctl.

Modified:
  stable/12/lib/libdevctl/devctl.3
  stable/12/lib/libdevctl/devctl.c
  stable/12/lib/libdevctl/devctl.h
  stable/12/usr.sbin/devctl/devctl.8
  stable/12/usr.sbin/devctl/devctl.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libdevctl/devctl.3
==============================================================================
--- stable/12/lib/libdevctl/devctl.3	Fri Apr 19 12:50:25 2019	(r346379)
+++ stable/12/lib/libdevctl/devctl.3	Fri Apr 19 12:54:05 2019	(r346380)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 22, 2018
+.Dd April 4, 2019
 .Dt DEVCTL 3
 .Os
 .Sh NAME
@@ -38,6 +38,7 @@
 .Nm devctl_enable ,
 .Nm devctl_freeze ,
 .Nm devctl_rescan ,
+.Nm devctl_reset ,
 .Nm devctl_resume ,
 .Nm devctl_set_driver ,
 .Nm devctl_suspend ,
@@ -64,6 +65,8 @@
 .Ft int
 .Fn devctl_rescan "const char *device"
 .Ft int
+.Fn devctl_reset "const char *device" "bool detach"
+.Ft int
 .Fn devctl_resume "const char *device"
 .Ft int
 .Fn devctl_set_driver "const char *device" "const char *driver" "bool force"
@@ -205,6 +208,15 @@ The
 .Fn devctl_thaw
 function resumes (thaws the freeze) probe and attach processing
 initiated in response to drivers being loaded.
+.Pp
+The
+.Fn devctl_reset
+function resets the specified device using bus-specific reset method.
+The
+.Fa detach
+argument, if true, specifies that the device driver is detached before
+the reset, and re-attached afterwards.
+If false, the device is suspended before the reset, and resumed after.
 .Sh RETURN VALUES
 .Rv -std devctl_attach devctl_clear_driver devctl_delete devctl_detach \
 devctl_disable devctl_enable devctl_suspend devctl_rescan devctl_resume \
@@ -378,6 +390,21 @@ is false.
 .Fa dev
 is the root device of the device tree.
 .El
+.Pp
+The
+.Fn devctl_reset
+function may fail if:
+.Bl -tag -width Er
+.It Bq Er ENXIO
+The bus does not implement the reset method.
+.It Bq Er ETIMEDOUT
+The device failed to respond after the reset in the time limits
+specific to the bus.
+.El
+The
+.Fn devctl_reset
+function may also return errors caused by the attach, detach, suspend,
+and resume methods of the device driver.
 .Sh SEE ALSO
 .Xr devinfo 3 ,
 .Xr devstat 3 ,
@@ -392,3 +419,20 @@ If a device is suspended individually via
 .Fn devctl_suspend
 and the entire machine is subsequently suspended,
 the device will be resumed when the machine resumes.
+.Pp
+Similarly, if the device is suspended, and
+.Fn devctl_reset
+is called on the device with
+.Fa detach
+set to
+.Va false ,
+the device is resumed by the
+.Fn devctl_reset
+call.
+Or, if the driver for the device is detached manually, and
+.Fn devctl_reset
+is called on the device with
+.Fa detach
+set to
+.Va true ,
+device reset re-attaches the driver.

Modified: stable/12/lib/libdevctl/devctl.c
==============================================================================
--- stable/12/lib/libdevctl/devctl.c	Fri Apr 19 12:50:25 2019	(r346379)
+++ stable/12/lib/libdevctl/devctl.c	Fri Apr 19 12:54:05 2019	(r346380)
@@ -159,3 +159,11 @@ devctl_thaw(void)
 
 	return (devctl_simple_request(DEV_THAW, "", 0));
 }
+
+int
+devctl_reset(const char *device, bool detach)
+{
+
+	return (devctl_simple_request(DEV_RESET, device, detach ?
+	    DEVF_RESET_DETACH : 0));
+}

Modified: stable/12/lib/libdevctl/devctl.h
==============================================================================
--- stable/12/lib/libdevctl/devctl.h	Fri Apr 19 12:50:25 2019	(r346379)
+++ stable/12/lib/libdevctl/devctl.h	Fri Apr 19 12:54:05 2019	(r346380)
@@ -44,6 +44,7 @@ int	devctl_rescan(const char *device);
 int	devctl_delete(const char *device, bool force);
 int	devctl_freeze(void);
 int	devctl_thaw(void);
+int	devctl_reset(const char *device, bool detach);
 __END_DECLS
 
 #endif /* !__DEVCTL_H__ */

Modified: stable/12/usr.sbin/devctl/devctl.8
==============================================================================
--- stable/12/usr.sbin/devctl/devctl.8	Fri Apr 19 12:50:25 2019	(r346379)
+++ stable/12/usr.sbin/devctl/devctl.8	Fri Apr 19 12:54:05 2019	(r346380)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 29, 2016
+.Dd April 4, 2019
 .Dt DEVCTL 8
 .Os
 .Sh NAME
@@ -67,6 +67,10 @@
 .Cm delete
 .Op Fl f
 .Ar device
+.Nm
+.Cm reset
+.Op Fl d
+.Ar device
 .Sh DESCRIPTION
 The
 .Nm
@@ -167,7 +171,35 @@ the device will be deleted even if it is physically pr
 This command should be used with care as a device that is deleted but present
 can no longer be used unless the parent bus device rediscovers the device via
 a rescan request.
+.It Xo Cm reset
+.Op Fl d
+.Ar device
+.Xc
+Reset the device, using bus-specific reset method.
+Drivers for the devices being reset are suspended around the reset.
+If the
+.Fl d
+option is specified, drivers are detached instead.
+.Pp
+Currently, resets are implemented for PCIe buses and PCI devices.
+For PCIe bus, the link is disabled and then re-trained, causing all
+children of the bus to reset.
+Use
+.Fl p
+option of
+.Xr devinfo 8
+tool to report parent bus for the device.
+For PCI device, if Function-Level Reset is implemented by it, FLR is
+tried first; if failed or not implemented, power reset is tried.
+.Pp
+If you have detached or suspended a child device explicitly and then
+do a reset, the child device will end up attached.
 .El
+.Sh BUGS
+Currently there is no administrative flag to prevent re-attach or resume
+of the manually detached or suspended devices after reset.
+Similarly, there is no flag to prevent un-suspending of the the manually
+suspended devices after system resume.
 .Sh SEE ALSO
 .Xr devctl 3 ,
 .Xr devinfo 8

Modified: stable/12/usr.sbin/devctl/devctl.c
==============================================================================
--- stable/12/usr.sbin/devctl/devctl.c	Fri Apr 19 12:50:25 2019	(r346379)
+++ stable/12/usr.sbin/devctl/devctl.c	Fri Apr 19 12:54:05 2019	(r346380)
@@ -83,7 +83,9 @@ usage(void)
 	    "       devctl rescan device\n"
 	    "       devctl delete [-f] device\n"
 	    "       devctl freeze\n"
-	    "       devctl thaw\n");
+	    "       devctl thaw\n"
+	    "       devctl reset [-d] device\n"
+	    );
 	exit(1);
 }
 
@@ -384,6 +386,40 @@ thaw(int ac, char **av __unused)
 	return (0);
 }
 DEVCTL_COMMAND(top, thaw, thaw);
+
+static void
+reset_usage(void)
+{
+
+	fprintf(stderr, "usage: devctl reset [-d] device\n");
+	exit(1);
+}
+
+static int
+reset(int ac, char **av)
+{
+	bool detach_drv;
+	int ch;
+
+	detach_drv = false;
+	while ((ch = getopt(ac, av, "d")) != -1)
+		switch (ch) {
+		case 'd':
+			detach_drv = true;
+			break;
+		default:
+			reset_usage();
+		}
+	ac -= optind;
+	av += optind;
+
+	if (ac != 1)
+		reset_usage();
+	if (devctl_reset(av[0], detach_drv) < 0)
+		err(1, "Failed to reset %s", av[0]);
+	return (0);
+}
+DEVCTL_COMMAND(top, reset, reset);
 
 int
 main(int ac, char *av[])

From owner-svn-src-all@freebsd.org  Fri Apr 19 12:57:38 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E071156B3A0;
 Fri, 19 Apr 2019 12:57:38 +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 2D3A475E14;
 Fri, 19 Apr 2019 12:57:38 +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 085382E902;
 Fri, 19 Apr 2019 12:57:38 +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 x3JCvblQ083976;
 Fri, 19 Apr 2019 12:57:37 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JCvbqu083974;
 Fri, 19 Apr 2019 12:57:37 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191257.x3JCvbqu083974@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 12:57:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346381 - in stable/11/sys: kern sys
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: in stable/11/sys: kern sys
X-SVN-Commit-Revision: 346381
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 2D3A475E14
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.979,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 12:57:38 -0000

Author: kib
Date: Fri Apr 19 12:57:37 2019
New Revision: 346381
URL: https://svnweb.freebsd.org/changeset/base/346381

Log:
  MFC r345960:
  Provide newbus infrastructure for initiating device reset.

Modified:
  stable/11/sys/kern/bus_if.m
  stable/11/sys/kern/subr_bus.c
  stable/11/sys/sys/bus.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/bus_if.m
==============================================================================
--- stable/11/sys/kern/bus_if.m	Fri Apr 19 12:54:05 2019	(r346380)
+++ stable/11/sys/kern/bus_if.m	Fri Apr 19 12:57:37 2019	(r346381)
@@ -66,6 +66,16 @@ CODE {
 
 		panic("bus_add_child is not implemented");
 	}
+
+	static int null_reset_post(device_t bus, device_t dev)
+	{
+		return (0);
+	}
+
+	static int null_reset_prepare(device_t bus, device_t dev)
+	{
+		return (0);
+	}
 };
 
 /**
@@ -810,3 +820,48 @@ METHOD int get_cpus {
 	size_t		_setsize;
 	cpuset_t	*_cpuset;
 } DEFAULT bus_generic_get_cpus;
+
+/**
+ * @brief Prepares the given child of the bus for reset
+ *
+ * Typically bus detaches or suspends children' drivers, and then
+ * calls this method to save bus-specific information, for instance,
+ * PCI config space, which is damaged by reset.
+ *
+ * The bus_helper_reset_prepare() helper is provided to ease
+ * implementing bus reset methods.
+ *
+ * @param _dev		the bus device
+ * @param _child	the child device
+ */
+METHOD int reset_prepare {
+	device_t _dev;
+	device_t _child;
+} DEFAULT null_reset_prepare;
+
+/**
+ * @brief Restores the child operations after the reset
+ *
+ * The bus_helper_reset_post() helper is provided to ease
+ * implementing bus reset methods.
+ *
+ * @param _dev		the bus device
+ * @param _child	the child device
+ */
+METHOD int reset_post {
+	device_t _dev;
+	device_t _child;
+} DEFAULT null_reset_post;
+
+/**
+ * @brief Performs reset of the child
+ *
+ * @param _dev		the bus device
+ * @param _child	the child device
+ * @param _flags	DEVF_RESET_ flags
+ */
+METHOD int reset_child {
+	device_t _dev;
+	device_t _child;
+	int _flags;
+};

Modified: stable/11/sys/kern/subr_bus.c
==============================================================================
--- stable/11/sys/kern/subr_bus.c	Fri Apr 19 12:54:05 2019	(r346380)
+++ stable/11/sys/kern/subr_bus.c	Fri Apr 19 12:57:37 2019	(r346381)
@@ -3822,6 +3822,96 @@ bus_generic_resume(device_t dev)
 	return (0);
 }
 
+
+/**
+ * @brief Helper function for implementing BUS_RESET_POST
+ *
+ * Bus can use this function to implement common operations of
+ * re-attaching or resuming the children after the bus itself was
+ * reset, and after restoring bus-unique state of children.
+ *
+ * @param dev	The bus
+ * #param flags	DEVF_RESET_*
+ */
+int
+bus_helper_reset_post(device_t dev, int flags)
+{
+	device_t child;
+	int error, error1;
+
+	error = 0;
+	TAILQ_FOREACH(child, &dev->children,link) {
+		BUS_RESET_POST(dev, child);
+		error1 = (flags & DEVF_RESET_DETACH) != 0 ?
+		    device_probe_and_attach(child) :
+		    BUS_RESUME_CHILD(dev, child);
+		if (error == 0 && error1 != 0)
+			error = error1;
+	}
+	return (error);
+}
+
+static void
+bus_helper_reset_prepare_rollback(device_t dev, device_t child, int flags)
+{
+
+	child = TAILQ_NEXT(child, link);
+	if (child == NULL)
+		return;
+	TAILQ_FOREACH_FROM(child, &dev->children,link) {
+		BUS_RESET_POST(dev, child);
+		if ((flags & DEVF_RESET_DETACH) != 0)
+			device_probe_and_attach(child);
+		else
+			BUS_RESUME_CHILD(dev, child);
+	}
+}
+
+/**
+ * @brief Helper function for implementing BUS_RESET_PREPARE
+ *
+ * Bus can use this function to implement common operations of
+ * detaching or suspending the children before the bus itself is
+ * reset, and then save bus-unique state of children that must
+ * persists around reset.
+ *
+ * @param dev	The bus
+ * #param flags	DEVF_RESET_*
+ */
+int
+bus_helper_reset_prepare(device_t dev, int flags)
+{
+	device_t child;
+	int error;
+
+	if (dev->state != DS_ATTACHED)
+		return (EBUSY);
+
+	TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) {
+		if ((flags & DEVF_RESET_DETACH) != 0) {
+			error = device_get_state(child) == DS_ATTACHED ?
+			    device_detach(child) : 0;
+		} else {
+			error = BUS_SUSPEND_CHILD(dev, child);
+		}
+		if (error == 0) {
+			error = BUS_RESET_PREPARE(dev, child);
+			if (error != 0) {
+				if ((flags & DEVF_RESET_DETACH) != 0)
+					device_probe_and_attach(child);
+				else
+					BUS_RESUME_CHILD(dev, child);
+			}
+		}
+		if (error != 0) {
+			bus_helper_reset_prepare_rollback(dev, child, flags);
+			return (error);
+		}
+	}
+	return (0);
+}
+
+
 /**
  * @brief Helper function for implementing BUS_PRINT_CHILD().
  *

Modified: stable/11/sys/sys/bus.h
==============================================================================
--- stable/11/sys/sys/bus.h	Fri Apr 19 12:54:05 2019	(r346380)
+++ stable/11/sys/sys/bus.h	Fri Apr 19 12:57:37 2019	(r346381)
@@ -133,6 +133,10 @@ struct devreq {
 /* Flags for DEV_DELETE. */
 #define	DEVF_FORCE_DELETE	0x0000001
 
+/* Flags for DEV_RESET */
+#define	DEVF_RESET_DETACH	0x0000001	/* Detach drivers vs suspend
+						   device */
+
 #ifdef _KERNEL
 
 #include 
@@ -479,6 +483,8 @@ int	bus_generic_unmap_resource(device_t dev, device_t 
 				   struct resource_map *map);
 int	bus_generic_write_ivar(device_t dev, device_t child, int which,
 			       uintptr_t value);
+int	bus_helper_reset_post(device_t dev, int flags);
+int	bus_helper_reset_prepare(device_t dev, int flags);
 int	bus_null_rescan(device_t dev);
 
 /*

From owner-svn-src-all@freebsd.org  Fri Apr 19 13:04:49 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CA22156B76F;
 Fri, 19 Apr 2019 13:04:49 +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 3B3277625A;
 Fri, 19 Apr 2019 13:04:49 +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 2BC032EAA8;
 Fri, 19 Apr 2019 13:04:49 +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 x3JD4mBL089162;
 Fri, 19 Apr 2019 13:04:48 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JD4mqn089159;
 Fri, 19 Apr 2019 13:04:48 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191304.x3JD4mqn089159@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 13:04:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346382 - stable/11/sys/dev/pci
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: stable/11/sys/dev/pci
X-SVN-Commit-Revision: 346382
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 3B3277625A
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.979,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 13:04:49 -0000

Author: kib
Date: Fri Apr 19 13:04:48 2019
New Revision: 346382
URL: https://svnweb.freebsd.org/changeset/base/346382

Log:
  MFC r345963, r345997:
  Implement resets for PCI buses and PCIe bridges.

Modified:
  stable/11/sys/dev/pci/pci.c
  stable/11/sys/dev/pci/pci_pci.c
  stable/11/sys/dev/pci/pcivar.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/pci/pci.c
==============================================================================
--- stable/11/sys/dev/pci/pci.c	Fri Apr 19 12:57:37 2019	(r346381)
+++ stable/11/sys/dev/pci/pci.c	Fri Apr 19 13:04:48 2019	(r346382)
@@ -121,6 +121,10 @@ static void		pci_resume_msi(device_t dev);
 static void		pci_resume_msix(device_t dev);
 static int		pci_remap_intr_method(device_t bus, device_t dev,
 			    u_int irq);
+static int		pci_reset_post(device_t dev, device_t child);
+static int		pci_reset_prepare(device_t dev, device_t child);
+static int		pci_reset_child(device_t dev, device_t child,
+			    int flags);
 
 static int		pci_get_id_method(device_t dev, device_t child,
 			    enum pci_id_type type, uintptr_t *rid);
@@ -145,6 +149,9 @@ static device_method_t pci_methods[] = {
 	DEVMETHOD(bus_driver_added,	pci_driver_added),
 	DEVMETHOD(bus_setup_intr,	pci_setup_intr),
 	DEVMETHOD(bus_teardown_intr,	pci_teardown_intr),
+	DEVMETHOD(bus_reset_prepare,	pci_reset_prepare),
+	DEVMETHOD(bus_reset_post,	pci_reset_post),
+	DEVMETHOD(bus_reset_child,	pci_reset_child),
 
 	DEVMETHOD(bus_get_dma_tag,	pci_get_dma_tag),
 	DEVMETHOD(bus_get_resource_list,pci_get_resource_list),
@@ -6295,6 +6302,94 @@ pcie_flr(device_t dev, u_int max_delay, bool force)
 	    PCIEM_STA_TRANSACTION_PND)
 		pci_printf(&dinfo->cfg, "Transactions pending after FLR!\n");
 	return (true);
+}
+
+/*
+ * Attempt a power-management reset by cycling the device in/out of D3
+ * state.  PCI spec says we can only go into D3 state from D0 state.
+ * Transition from D[12] into D0 before going to D3 state.
+ */
+int
+pci_power_reset(device_t dev)
+{
+	int ps;
+
+	ps = pci_get_powerstate(dev);
+	if (ps != PCI_POWERSTATE_D0 && ps != PCI_POWERSTATE_D3)
+		pci_set_powerstate(dev, PCI_POWERSTATE_D0);
+	pci_set_powerstate(dev, PCI_POWERSTATE_D3);
+	pci_set_powerstate(dev, ps);
+	return (0);
+}
+
+/*
+ * Try link drop and retrain of the downstream port of upstream
+ * switch, for PCIe.  According to the PCIe 3.0 spec 6.6.1, this must
+ * cause Conventional Hot reset of the device in the slot.
+ * Alternative, for PCIe, could be the secondary bus reset initiatied
+ * on the upstream switch PCIR_BRIDGECTL_1, bit 6.
+ */
+int
+pcie_link_reset(device_t port, int pcie_location)
+{
+	uint16_t v;
+
+	v = pci_read_config(port, pcie_location + PCIER_LINK_CTL, 2);
+	v |= PCIEM_LINK_CTL_LINK_DIS;
+	pci_write_config(port, pcie_location + PCIER_LINK_CTL, v, 2);
+	pause_sbt("pcier1", mstosbt(20), 0, 0);
+	v &= ~PCIEM_LINK_CTL_LINK_DIS;
+	v |= PCIEM_LINK_CTL_RETRAIN_LINK;
+	pci_write_config(port, pcie_location + PCIER_LINK_CTL, v, 2);
+	pause_sbt("pcier2", mstosbt(100), 0, 0); /* 100 ms */
+	v = pci_read_config(port, pcie_location + PCIER_LINK_STA, 2);
+	return ((v & PCIEM_LINK_STA_TRAINING) != 0 ? ETIMEDOUT : 0);
+}
+
+static int
+pci_reset_post(device_t dev, device_t child)
+{
+
+	if (dev == device_get_parent(child))
+		pci_restore_state(child);
+	return (0);
+}
+
+static int
+pci_reset_prepare(device_t dev, device_t child)
+{
+
+	if (dev == device_get_parent(child))
+		pci_save_state(child);
+	return (0);
+}
+
+static int
+pci_reset_child(device_t dev, device_t child, int flags)
+{
+	int error;
+
+	if (dev == NULL || device_get_parent(child) != dev)
+		return (0);
+	if ((flags & DEVF_RESET_DETACH) != 0) {
+		error = device_get_state(child) == DS_ATTACHED ?
+		    device_detach(child) : 0;
+	} else {
+		error = BUS_SUSPEND_CHILD(dev, child);
+	}
+	if (error == 0) {
+		if (!pcie_flr(child, 1000, false)) {
+			error = BUS_RESET_PREPARE(dev, child);
+			if (error == 0)
+				pci_power_reset(child);
+			BUS_RESET_POST(dev, child);
+		}
+		if ((flags & DEVF_RESET_DETACH) != 0)
+			device_probe_and_attach(child);
+		else
+			BUS_RESUME_CHILD(dev, child);
+	}
+	return (error);
 }
 
 static void

Modified: stable/11/sys/dev/pci/pci_pci.c
==============================================================================
--- stable/11/sys/dev/pci/pci_pci.c	Fri Apr 19 12:57:37 2019	(r346381)
+++ stable/11/sys/dev/pci/pci_pci.c	Fri Apr 19 13:04:48 2019	(r346382)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -76,6 +77,7 @@ static void		pcib_pcie_ab_timeout(void *arg);
 static void		pcib_pcie_cc_timeout(void *arg);
 static void		pcib_pcie_dll_timeout(void *arg);
 #endif
+static int		pcib_reset_child(device_t dev, device_t child, int flags);
 
 static device_method_t pcib_methods[] = {
     /* Device interface */
@@ -102,6 +104,7 @@ static device_method_t pcib_methods[] = {
     DEVMETHOD(bus_deactivate_resource,	bus_generic_deactivate_resource),
     DEVMETHOD(bus_setup_intr,		bus_generic_setup_intr),
     DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
+    DEVMETHOD(bus_reset_child,		pcib_reset_child),
 
     /* pcib interface */
     DEVMETHOD(pcib_maxslots,		pcib_ari_maxslots),
@@ -2828,4 +2831,32 @@ pcib_try_enable_ari(device_t pcib, device_t dev)
 	pcib_enable_ari(sc, pcie_pos);
 
 	return (0);
+}
+
+static int
+pcib_reset_child(device_t dev, device_t child, int flags)
+{
+	struct pci_devinfo *pdinfo;
+	int error;
+
+	error = 0;
+	if (dev == NULL || device_get_parent(child) != dev)
+		goto out;
+	error = ENXIO;
+	if (device_get_devclass(child) != devclass_find("pci"))
+		goto out;
+	pdinfo = device_get_ivars(dev);
+	if (pdinfo->cfg.pcie.pcie_location != 0 &&
+	    (pdinfo->cfg.pcie.pcie_type == PCIEM_TYPE_DOWNSTREAM_PORT ||
+	    pdinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT)) {
+		error = bus_helper_reset_prepare(child, flags);
+		if (error == 0) {
+			error = pcie_link_reset(dev,
+			    pdinfo->cfg.pcie.pcie_location);
+			/* XXXKIB call _post even if error != 0 ? */
+			bus_helper_reset_post(child, flags);
+		}
+	}
+out:
+	return (error);
 }

Modified: stable/11/sys/dev/pci/pcivar.h
==============================================================================
--- stable/11/sys/dev/pci/pcivar.h	Fri Apr 19 12:57:37 2019	(r346381)
+++ stable/11/sys/dev/pci/pcivar.h	Fri Apr 19 13:04:48 2019	(r346382)
@@ -612,6 +612,7 @@ int	pci_get_max_read_req(device_t dev);
 void	pci_restore_state(device_t dev);
 void	pci_save_state(device_t dev);
 int	pci_set_max_read_req(device_t dev, int size);
+int	pci_power_reset(device_t dev);
 uint32_t pcie_read_config(device_t dev, int reg, int width);
 void	pcie_write_config(device_t dev, int reg, uint32_t value, int width);
 uint32_t pcie_adjust_config(device_t dev, int reg, uint32_t mask,
@@ -619,6 +620,7 @@ uint32_t pcie_adjust_config(device_t dev, int reg, uin
 bool	pcie_flr(device_t dev, u_int max_delay, bool force);
 int	pcie_get_max_completion_timeout(device_t dev);
 bool	pcie_wait_for_pending_transactions(device_t dev, u_int max_delay);
+int	pcie_link_reset(device_t port, int pcie_location);
 
 void	pci_print_faulted_dev(void);
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 13:05:26 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50DF8156B7BA;
 Fri, 19 Apr 2019 13:05:26 +0000 (UTC) (envelope-from gjb@freebsd.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
 [IPv6:2610:1c1:1:6074::16:84])
 (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 "freefall.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id E865C76370;
 Fri, 19 Apr 2019 13:05:25 +0000 (UTC) (envelope-from gjb@freebsd.org)
Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by freefall.freebsd.org (Postfix) with ESMTPS id 66FC01747D;
 Fri, 19 Apr 2019 13:05:25 +0000 (UTC) (envelope-from gjb@freebsd.org)
Date: Fri, 19 Apr 2019 13:05:22 +0000
From: Glen Barber 
To: Colin Percival 
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org,
 portmgr@freebsd.org
Subject: Re: svn commit: r340905 - in stable/12: release/pkg_repos usr.sbin/pkg
Message-ID: <20190419130522.GI39941@FreeBSD.org>
References: <201811241747.wAOHlr6W029937@repo.freebsd.org>
 <0100016a32795508-fd8bbc41-2b38-40ae-903a-e3ef3739dfd8-000000@email.amazonses.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="Pgaa2uWPnPrfixyx"
Content-Disposition: inline
In-Reply-To: <0100016a32795508-fd8bbc41-2b38-40ae-903a-e3ef3739dfd8-000000@email.amazonses.com>
User-Agent: Mutt/1.11.2 (2019-01-07)
X-Rspamd-Queue-Id: E865C76370
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[freebsd.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.997,0];
 NEURAL_HAM_SHORT(-0.99)[-0.987,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 13:05:26 -0000


--Pgaa2uWPnPrfixyx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Apr 18, 2019 at 10:02:53PM +0000, Colin Percival wrote:
> On 11/24/18 9:47 AM, Glen Barber wrote:
> > Author: gjb
> > Date: Sat Nov 24 17:47:53 2018
> > New Revision: 340905
> > URL: https://svnweb.freebsd.org/changeset/base/340905
> >=20
> > Log:
> >   Revert r340161 in stable/12, setting the default pkg(8) repository ba=
ck
> >   to 'latest' from 'quarterly' prior to branching releng/12.0.
> It looks like this is incorrect for non-x86 architectures.  Portmgr may
> correct me here, but it looks like "latest" builds are only done on non-x=
86
> architectures on HEAD.  (The same problem also applies on stable/11.)
>=20
> I'm guessing that the answer here is to have different package configurat=
ions
> installed depending on the architecture; I knew how to do this with the o=
ld
> style of src/etc but I'm not sure how to do it now that pkgbase has spread
> configuration files all over the tree.
>=20

For 13.0-CURRENT, both latest and quarterly are updated.  For non-x86 on
12.0-STABLE and 11.2-STABLE, quarterly is updated (not latest), so from
a general sense of this particular commit, it is correct.

But you are also correct in your assertion that the current default
(latest) for non-x86 does appear to be incorrect.

I'll do some poking around into this.

Thank you for bringing this up.

Glen


--Pgaa2uWPnPrfixyx
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAly5x4YACgkQAxRYpUeP
4pN8IA//d/nKqUlI+8b+Mb7Dbb7Vyf3tNwEdsU6IIE1btByJpDyBJklaBXtXtpNK
em9v0t5H8T+i87ZGUzIbieg6LpZyT3PElJhnT2q0tpV6fb9JzdAvgDF7dzw8hmjS
sURwaX7eeFUqAhi5fiwBa/9JW2YUMxVOKNyIM/YFVmOwChcWENDr01TtT6J/z9gb
yxOlSUPkiB1Mi8dIMQJ0ulryjcSN4126o64cCxDSFM9WTPLTtTuzHHEkartPAolk
TFRG7rcvvv0xxoEEh+ptyo0Vi5YMD1SF3M0jQiLkXrnrwLdc2RxTiz/hySodlYLn
MMX24J6mor4qC4Ir7aXjH8G50Nmj6cVyNXVG1/IqeSPiEN12n6bQCkFgzQ4w7uc1
3UB/qKh1aoeYfBWyb4aLCCRum3dMZg0IZrWeKA4Y70qClt6xsBYB/NjpI+I/7oWQ
GW8ol38Uz3JEsXn+KlVxVD+e4k0dJ/PwHzx6zknMAiFkNpykUYAhdulDVKnr1+xI
lSJmbHWsqLHXAimuoZ2/2bFoJKzuOVeecEe8IU5rF9+YWUV7Gc6w0behpdMgXCdF
o+aaUOgQIn7mZnSymndagfp/PifQ61rTjZW5uW2yqdp+CZc/X5WJHJamE2J6bBlr
4/qOBy34BCPKGanUprVagNtkHgHkJxFRO0inK34KbRmQRNELvuY=
=7gV1
-----END PGP SIGNATURE-----

--Pgaa2uWPnPrfixyx--

From owner-svn-src-all@freebsd.org  Fri Apr 19 13:09:17 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97FF6156B8D5;
 Fri, 19 Apr 2019 13:09:17 +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 39D8076504;
 Fri, 19 Apr 2019 13:09:17 +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 0FCF22EAA9;
 Fri, 19 Apr 2019 13:09:17 +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 x3JD9GB3089409;
 Fri, 19 Apr 2019 13:09:16 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JD9GsC089407;
 Fri, 19 Apr 2019 13:09:16 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191309.x3JD9GsC089407@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 13:09:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346383 - in stable/11/sys: kern sys
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: in stable/11/sys: kern sys
X-SVN-Commit-Revision: 346383
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 39D8076504
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 13:09:17 -0000

Author: kib
Date: Fri Apr 19 13:09:16 2019
New Revision: 346383
URL: https://svnweb.freebsd.org/changeset/base/346383

Log:
  MFC r345965:
  Add DEV_RESET /dev/devctl2 ioctl.

Modified:
  stable/11/sys/kern/subr_bus.c
  stable/11/sys/sys/bus.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/subr_bus.c
==============================================================================
--- stable/11/sys/kern/subr_bus.c	Fri Apr 19 13:04:48 2019	(r346382)
+++ stable/11/sys/kern/subr_bus.c	Fri Apr 19 13:09:16 2019	(r346383)
@@ -5476,6 +5476,7 @@ devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t d
 	case DEV_CLEAR_DRIVER:
 	case DEV_RESCAN:
 	case DEV_DELETE:
+	case DEV_RESET:
 		error = priv_check(td, PRIV_DRIVER);
 		if (error == 0)
 			error = find_device(req, &dev);
@@ -5683,6 +5684,14 @@ devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t d
 		error = device_delete_child(parent, dev);
 		break;
 	}
+	case DEV_RESET:
+		if ((req->dr_flags & ~(DEVF_RESET_DETACH)) != 0) {
+			error = EINVAL;
+			break;
+		}
+		error = BUS_RESET_CHILD(device_get_parent(dev), dev,
+		    req->dr_flags);
+		break;
 	}
 	mtx_unlock(&Giant);
 	return (error);

Modified: stable/11/sys/sys/bus.h
==============================================================================
--- stable/11/sys/sys/bus.h	Fri Apr 19 13:04:48 2019	(r346382)
+++ stable/11/sys/sys/bus.h	Fri Apr 19 13:09:16 2019	(r346383)
@@ -120,6 +120,7 @@ struct devreq {
 #define	DEV_CLEAR_DRIVER _IOW('D', 8, struct devreq)
 #define	DEV_RESCAN	_IOW('D', 9, struct devreq)
 #define	DEV_DELETE	_IOW('D', 10, struct devreq)
+#define	DEV_RESET	_IOW('D', 13, struct devreq)
 
 /* Flags for DEV_DETACH and DEV_DISABLE. */
 #define	DEVF_FORCE_DETACH	0x0000001

From owner-svn-src-all@freebsd.org  Fri Apr 19 13:18:56 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6821156BCFD;
 Fri, 19 Apr 2019 13:18:56 +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 496AB76BEC;
 Fri, 19 Apr 2019 13:18:56 +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 264802EC66;
 Fri, 19 Apr 2019 13:18:56 +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 x3JDIuqE094907;
 Fri, 19 Apr 2019 13:18:56 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JDItK0094902;
 Fri, 19 Apr 2019 13:18:55 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201904191318.x3JDItK0094902@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov 
Date: Fri, 19 Apr 2019 13:18:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346384 - in stable/11: lib/libdevctl usr.sbin/devctl
X-SVN-Group: stable-11
X-SVN-Commit-Author: kib
X-SVN-Commit-Paths: in stable/11: lib/libdevctl usr.sbin/devctl
X-SVN-Commit-Revision: 346384
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 496AB76BEC
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.979,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 13:18:57 -0000

Author: kib
Date: Fri Apr 19 13:18:54 2019
New Revision: 346384
URL: https://svnweb.freebsd.org/changeset/base/346384

Log:
  MFC r345966, r345968:
  Implement devctl(8) command 'reset', using DEV_RESET /dev/devctl2 ioctl.

Modified:
  stable/11/lib/libdevctl/devctl.3
  stable/11/lib/libdevctl/devctl.c
  stable/11/lib/libdevctl/devctl.h
  stable/11/usr.sbin/devctl/devctl.8
  stable/11/usr.sbin/devctl/devctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libdevctl/devctl.3
==============================================================================
--- stable/11/lib/libdevctl/devctl.3	Fri Apr 19 13:09:16 2019	(r346383)
+++ stable/11/lib/libdevctl/devctl.3	Fri Apr 19 13:18:54 2019	(r346384)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 29, 2016
+.Dd April 4, 2019
 .Dt DEVCTL 3
 .Os
 .Sh NAME
@@ -37,6 +37,7 @@
 .Nm devctl_disable ,
 .Nm devctl_enable ,
 .Nm devctl_rescan ,
+.Nm devctl_reset ,
 .Nm devctl_resume ,
 .Nm devctl_set_driver ,
 .Nm devctl_suspend
@@ -60,6 +61,8 @@
 .Ft int
 .Fn devctl_rescan "const char *device"
 .Ft int
+.Fn devctl_reset "const char *device" "bool detach"
+.Ft int
 .Fn devctl_resume "const char *device"
 .Ft int
 .Fn devctl_set_driver "const char *device" "const char *driver" "bool force"
@@ -189,6 +192,15 @@ The
 .Fn devctl_rescan
 function rescans a bus device checking for devices that have been added or
 removed.
+.Pp
+The
+.Fn devctl_reset
+function resets the specified device using bus-specific reset method.
+The
+.Fa detach
+argument, if true, specifies that the device driver is detached before
+the reset, and re-attached afterwards.
+If false, the device is suspended before the reset, and resumed after.
 .Sh RETURN VALUES
 .Rv -std devctl_attach devctl_clear_driver devctl_delete devctl_detach \
 devctl_disable devctl_enable devctl_suspend devctl_rescan devctl_resume \
@@ -362,6 +374,21 @@ is false.
 .Fa dev
 is the root device of the device tree.
 .El
+.Pp
+The
+.Fn devctl_reset
+function may fail if:
+.Bl -tag -width Er
+.It Bq Er ENXIO
+The bus does not implement the reset method.
+.It Bq Er ETIMEDOUT
+The device failed to respond after the reset in the time limits
+specific to the bus.
+.El
+The
+.Fn devctl_reset
+function may also return errors caused by the attach, detach, suspend,
+and resume methods of the device driver.
 .Sh SEE ALSO
 .Xr devinfo 3 ,
 .Xr devstat 3 ,
@@ -376,3 +403,20 @@ If a device is suspended individually via
 .Fn devctl_suspend
 and the entire machine is subsequently suspended,
 the device will be resumed when the machine resumes.
+.Pp
+Similarly, if the device is suspended, and
+.Fn devctl_reset
+is called on the device with
+.Fa detach
+set to
+.Va false ,
+the device is resumed by the
+.Fn devctl_reset
+call.
+Or, if the driver for the device is detached manually, and
+.Fn devctl_reset
+is called on the device with
+.Fa detach
+set to
+.Va true ,
+device reset re-attaches the driver.

Modified: stable/11/lib/libdevctl/devctl.c
==============================================================================
--- stable/11/lib/libdevctl/devctl.c	Fri Apr 19 13:09:16 2019	(r346383)
+++ stable/11/lib/libdevctl/devctl.c	Fri Apr 19 13:18:54 2019	(r346384)
@@ -145,3 +145,11 @@ devctl_delete(const char *device, bool force)
 	return (devctl_simple_request(DEV_DELETE, device, force ?
 	    DEVF_FORCE_DELETE : 0));
 }
+
+int
+devctl_reset(const char *device, bool detach)
+{
+
+	return (devctl_simple_request(DEV_RESET, device, detach ?
+	    DEVF_RESET_DETACH : 0));
+}

Modified: stable/11/lib/libdevctl/devctl.h
==============================================================================
--- stable/11/lib/libdevctl/devctl.h	Fri Apr 19 13:09:16 2019	(r346383)
+++ stable/11/lib/libdevctl/devctl.h	Fri Apr 19 13:18:54 2019	(r346384)
@@ -42,6 +42,7 @@ int	devctl_set_driver(const char *device, const char *
 int	devctl_clear_driver(const char *device, bool force);
 int	devctl_rescan(const char *device);
 int	devctl_delete(const char *device, bool force);
+int	devctl_reset(const char *device, bool detach);
 __END_DECLS
 
 #endif /* !__DEVCTL_H__ */

Modified: stable/11/usr.sbin/devctl/devctl.8
==============================================================================
--- stable/11/usr.sbin/devctl/devctl.8	Fri Apr 19 13:09:16 2019	(r346383)
+++ stable/11/usr.sbin/devctl/devctl.8	Fri Apr 19 13:18:54 2019	(r346384)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 29, 2016
+.Dd April 4, 2019
 .Dt DEVCTL 8
 .Os
 .Sh NAME
@@ -67,6 +67,10 @@
 .Cm delete
 .Op Fl f
 .Ar device
+.Nm
+.Cm reset
+.Op Fl d
+.Ar device
 .Sh DESCRIPTION
 The
 .Nm
@@ -167,7 +171,35 @@ the device will be deleted even if it is physically pr
 This command should be used with care as a device that is deleted but present
 can no longer be used unless the parent bus device rediscovers the device via
 a rescan request.
+.It Xo Cm reset
+.Op Fl d
+.Ar device
+.Xc
+Reset the device, using bus-specific reset method.
+Drivers for the devices being reset are suspended around the reset.
+If the
+.Fl d
+option is specified, drivers are detached instead.
+.Pp
+Currently, resets are implemented for PCIe buses and PCI devices.
+For PCIe bus, the link is disabled and then re-trained, causing all
+children of the bus to reset.
+Use
+.Fl p
+option of
+.Xr devinfo 8
+tool to report parent bus for the device.
+For PCI device, if Function-Level Reset is implemented by it, FLR is
+tried first; if failed or not implemented, power reset is tried.
+.Pp
+If you have detached or suspended a child device explicitly and then
+do a reset, the child device will end up attached.
 .El
+.Sh BUGS
+Currently there is no administrative flag to prevent re-attach or resume
+of the manually detached or suspended devices after reset.
+Similarly, there is no flag to prevent un-suspending of the the manually
+suspended devices after system resume.
 .Sh SEE ALSO
 .Xr devctl 3 ,
 .Xr devinfo 8

Modified: stable/11/usr.sbin/devctl/devctl.c
==============================================================================
--- stable/11/usr.sbin/devctl/devctl.c	Fri Apr 19 13:09:16 2019	(r346383)
+++ stable/11/usr.sbin/devctl/devctl.c	Fri Apr 19 13:18:54 2019	(r346384)
@@ -71,7 +71,7 @@ DEVCTL_TABLE(top, set);
 static void
 usage(void)
 {
-	fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
+	fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
 	    "usage: devctl attach device",
 	    "       devctl detach [-f] device",
 	    "       devctl disable [-f] device",
@@ -81,7 +81,9 @@ usage(void)
 	    "       devctl set driver [-f] device driver",
 	    "       devctl clear driver [-f] device",
 	    "       devctl rescan device",
-	    "       devctl delete [-f] device");
+	    "       devctl delete [-f] device",
+	    "       devctl reset [-d] device"
+	    );
 	exit(1);
 }
 
@@ -342,6 +344,40 @@ delete(int ac, char **av)
 	return (0);
 }
 DEVCTL_COMMAND(top, delete, delete);
+
+static void
+reset_usage(void)
+{
+
+	fprintf(stderr, "usage: devctl reset [-d] device\n");
+	exit(1);
+}
+
+static int
+reset(int ac, char **av)
+{
+	bool detach_drv;
+	int ch;
+
+	detach_drv = false;
+	while ((ch = getopt(ac, av, "d")) != -1)
+		switch (ch) {
+		case 'd':
+			detach_drv = true;
+			break;
+		default:
+			reset_usage();
+		}
+	ac -= optind;
+	av += optind;
+
+	if (ac != 1)
+		reset_usage();
+	if (devctl_reset(av[0], detach_drv) < 0)
+		err(1, "Failed to reset %s", av[0]);
+	return (0);
+}
+DEVCTL_COMMAND(top, reset, reset);
 
 int
 main(int ac, char *av[])

From owner-svn-src-all@freebsd.org  Fri Apr 19 13:23:42 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8516E156C074;
 Fri, 19 Apr 2019 13:23:42 +0000 (UTC) (envelope-from gjb@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 2880D7703E;
 Fri, 19 Apr 2019 13:23:42 +0000 (UTC) (envelope-from gjb@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 02BEE2EE09;
 Fri, 19 Apr 2019 13:23:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JDNftp000175;
 Fri, 19 Apr 2019 13:23:41 GMT (envelope-from gjb@FreeBSD.org)
Received: (from gjb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JDNf7T000174;
 Fri, 19 Apr 2019 13:23:41 GMT (envelope-from gjb@FreeBSD.org)
Message-Id: <201904191323.x3JDNf7T000174@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
 using -f
From: Glen Barber 
Date: Fri, 19 Apr 2019 13:23: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: r346385 - in stable: 11/etc 12/usr.sbin/portsnap/portsnap
X-SVN-Group: stable-12
X-SVN-Commit-Author: gjb
X-SVN-Commit-Paths: in stable: 11/etc 12/usr.sbin/portsnap/portsnap
X-SVN-Commit-Revision: 346385
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 2880D7703E
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 13:23:42 -0000

Author: gjb
Date: Fri Apr 19 13:23:41 2019
New Revision: 346385
URL: https://svnweb.freebsd.org/changeset/base/346385

Log:
  MFC r346275:
   Remove INDEX-10 reference, as 10.x is now EoL.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/12/usr.sbin/portsnap/portsnap/portsnap.conf
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/etc/portsnap.conf
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/usr.sbin/portsnap/portsnap/portsnap.conf
==============================================================================
--- stable/12/usr.sbin/portsnap/portsnap/portsnap.conf	Fri Apr 19 13:18:54 2019	(r346384)
+++ stable/12/usr.sbin/portsnap/portsnap/portsnap.conf	Fri Apr 19 13:23:41 2019	(r346385)
@@ -30,6 +30,5 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3
 # REFUSE korean polish portuguese russian ukrainian vietnamese
 
 # List of INDEX files to build and the DESCRIBE file to use for each
-#INDEX INDEX-10 DESCRIBE.10
 #INDEX INDEX-11 DESCRIBE.11
 INDEX INDEX-12 DESCRIBE.12

From owner-svn-src-all@freebsd.org  Fri Apr 19 13:23:42 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CB03156C06A;
 Fri, 19 Apr 2019 13:23:42 +0000 (UTC) (envelope-from gjb@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 D59187703D;
 Fri, 19 Apr 2019 13:23:41 +0000 (UTC) (envelope-from gjb@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 A6E702EE08;
 Fri, 19 Apr 2019 13:23:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JDNfjp000169;
 Fri, 19 Apr 2019 13:23:41 GMT (envelope-from gjb@FreeBSD.org)
Received: (from gjb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JDNfCP000168;
 Fri, 19 Apr 2019 13:23:41 GMT (envelope-from gjb@FreeBSD.org)
Message-Id: <201904191323.x3JDNfCP000168@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
 using -f
From: Glen Barber 
Date: Fri, 19 Apr 2019 13:23:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346385 - in stable: 11/etc 12/usr.sbin/portsnap/portsnap
X-SVN-Group: stable-11
X-SVN-Commit-Author: gjb
X-SVN-Commit-Paths: in stable: 11/etc 12/usr.sbin/portsnap/portsnap
X-SVN-Commit-Revision: 346385
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: D59187703D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.977,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 13:23:42 -0000

Author: gjb
Date: Fri Apr 19 13:23:41 2019
New Revision: 346385
URL: https://svnweb.freebsd.org/changeset/base/346385

Log:
  MFC r346275:
   Remove INDEX-10 reference, as 10.x is now EoL.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/11/etc/portsnap.conf
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/usr.sbin/portsnap/portsnap/portsnap.conf
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/etc/portsnap.conf
==============================================================================
--- stable/11/etc/portsnap.conf	Fri Apr 19 13:18:54 2019	(r346384)
+++ stable/11/etc/portsnap.conf	Fri Apr 19 13:23:41 2019	(r346385)
@@ -30,5 +30,4 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3
 # REFUSE korean polish portuguese russian ukrainian vietnamese
 
 # List of INDEX files to build and the DESCRIBE file to use for each
-#INDEX INDEX-10 DESCRIBE.10
 INDEX INDEX-11 DESCRIBE.11

From owner-svn-src-all@freebsd.org  Fri Apr 19 13:43:36 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07171156CB31;
 Fri, 19 Apr 2019 13:43:36 +0000 (UTC)
 (envelope-from tychon@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 9DECB77B1F;
 Fri, 19 Apr 2019 13:43:35 +0000 (UTC)
 (envelope-from tychon@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 750702F16F;
 Fri, 19 Apr 2019 13:43:35 +0000 (UTC)
 (envelope-from tychon@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JDhZ9C010459;
 Fri, 19 Apr 2019 13:43:35 GMT (envelope-from tychon@FreeBSD.org)
Received: (from tychon@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JDhYVF010453;
 Fri, 19 Apr 2019 13:43:34 GMT (envelope-from tychon@FreeBSD.org)
Message-Id: <201904191343.x3JDhYVF010453@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tychon set sender to
 tychon@FreeBSD.org using -f
From: Tycho Nightingale 
Date: Fri, 19 Apr 2019 13:43:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346386 - in head/sys: dev/bge dev/pci dev/twa x86/iommu
X-SVN-Group: head
X-SVN-Commit-Author: tychon
X-SVN-Commit-Paths: in head/sys: dev/bge dev/pci dev/twa x86/iommu
X-SVN-Commit-Revision: 346386
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 9DECB77B1F
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.99 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.99)[-0.987,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 13:43:36 -0000

Author: tychon
Date: Fri Apr 19 13:43:33 2019
New Revision: 346386
URL: https://svnweb.freebsd.org/changeset/base/346386

Log:
  remove the 4GB boundary requirement on PCI DMA segments
  
  Reviewed by:	kib
  Discussed with:	jhb
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D19867

Modified:
  head/sys/dev/bge/if_bgereg.h
  head/sys/dev/pci/pci.c
  head/sys/dev/pci/pcivar.h
  head/sys/dev/twa/tw_osl.h
  head/sys/dev/twa/tw_osl_freebsd.c
  head/sys/x86/iommu/intel_ctx.c

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Fri Apr 19 13:23:41 2019	(r346385)
+++ head/sys/dev/bge/if_bgereg.h	Fri Apr 19 13:43:33 2019	(r346386)
@@ -3067,3 +3067,11 @@ struct bge_softc {
 #define	BGE_LOCK_ASSERT(_sc)	mtx_assert(&(_sc)->bge_mtx, MA_OWNED)
 #define	BGE_UNLOCK(_sc)		mtx_unlock(&(_sc)->bge_mtx)
 #define	BGE_LOCK_DESTROY(_sc)	mtx_destroy(&(_sc)->bge_mtx)
+
+#ifdef BUS_SPACE_MAXADDR
+#if (BUS_SPACE_MAXADDR > 0xFFFFFFFF)
+#define	BGE_DMA_BOUNDARY	(0x100000000)
+#else
+#define	BGE_DMA_BOUNDARY	0
+#endif
+#endif

Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c	Fri Apr 19 13:23:41 2019	(r346385)
+++ head/sys/dev/pci/pci.c	Fri Apr 19 13:43:33 2019	(r346386)
@@ -4343,9 +4343,6 @@ pci_attach_common(device_t dev)
 {
 	struct pci_softc *sc;
 	int busno, domain;
-#ifdef PCI_DMA_BOUNDARY
-	int error, tag_valid;
-#endif
 #ifdef PCI_RES_BUS
 	int rid;
 #endif
@@ -4365,23 +4362,7 @@ pci_attach_common(device_t dev)
 	if (bootverbose)
 		device_printf(dev, "domain=%d, physical bus=%d\n",
 		    domain, busno);
-#ifdef PCI_DMA_BOUNDARY
-	tag_valid = 0;
-	if (device_get_devclass(device_get_parent(device_get_parent(dev))) !=
-	    devclass_find("pci")) {
-		error = bus_dma_tag_create(bus_get_dma_tag(dev), 1,
-		    PCI_DMA_BOUNDARY, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
-		    NULL, NULL, BUS_SPACE_MAXSIZE, BUS_SPACE_UNRESTRICTED,
-		    BUS_SPACE_MAXSIZE, 0, NULL, NULL, &sc->sc_dma_tag);
-		if (error)
-			device_printf(dev, "Failed to create DMA tag: %d\n",
-			    error);
-		else
-			tag_valid = 1;
-	}
-	if (!tag_valid)
-#endif
-		sc->sc_dma_tag = bus_get_dma_tag(dev);
+	sc->sc_dma_tag = bus_get_dma_tag(dev);
 	return (0);
 }
 

Modified: head/sys/dev/pci/pcivar.h
==============================================================================
--- head/sys/dev/pci/pcivar.h	Fri Apr 19 13:23:41 2019	(r346385)
+++ head/sys/dev/pci/pcivar.h	Fri Apr 19 13:43:33 2019	(r346386)
@@ -693,14 +693,6 @@ int	pcie_link_reset(device_t port, int pcie_location);
 
 void	pci_print_faulted_dev(void);
 
-#ifdef BUS_SPACE_MAXADDR
-#if (BUS_SPACE_MAXADDR > 0xFFFFFFFF)
-#define	PCI_DMA_BOUNDARY	0x100000000
-#else
-#define	PCI_DMA_BOUNDARY	0
-#endif
-#endif
-
 #endif	/* _SYS_BUS_H_ */
 
 /*

Modified: head/sys/dev/twa/tw_osl.h
==============================================================================
--- head/sys/dev/twa/tw_osl.h	Fri Apr 19 13:23:41 2019	(r346385)
+++ head/sys/dev/twa/tw_osl.h	Fri Apr 19 13:43:33 2019	(r346386)
@@ -57,6 +57,12 @@
 #define TW_OSLI_MAX_NUM_IOS		(TW_OSLI_MAX_NUM_REQUESTS - 2)
 #define TW_OSLI_MAX_NUM_AENS		0x100
 
+#ifdef PAE
+#define	TW_OSLI_DMA_BOUNDARY		(1u << 31)
+#else
+#define	TW_OSLI_DMA_BOUNDARY		((bus_size_t)((uint64_t)1 << 32))
+#endif
+
 /* Possible values of req->state. */
 #define TW_OSLI_REQ_STATE_INIT		0x0	/* being initialized */
 #define TW_OSLI_REQ_STATE_BUSY		0x1	/* submitted to CL */

Modified: head/sys/dev/twa/tw_osl_freebsd.c
==============================================================================
--- head/sys/dev/twa/tw_osl_freebsd.c	Fri Apr 19 13:23:41 2019	(r346385)
+++ head/sys/dev/twa/tw_osl_freebsd.c	Fri Apr 19 13:43:33 2019	(r346386)
@@ -551,7 +551,7 @@ tw_osli_alloc_mem(struct twa_softc *sc)
 	/* Create the parent dma tag. */
 	if (bus_dma_tag_create(bus_get_dma_tag(sc->bus_dev), /* parent */
 				sc->alignment,		/* alignment */
-				0,			/* boundary */
+				TW_OSLI_DMA_BOUNDARY,	/* boundary */
 				BUS_SPACE_MAXADDR,	/* lowaddr */
 				BUS_SPACE_MAXADDR, 	/* highaddr */
 				NULL, NULL, 		/* filter, filterarg */

Modified: head/sys/x86/iommu/intel_ctx.c
==============================================================================
--- head/sys/x86/iommu/intel_ctx.c	Fri Apr 19 13:23:41 2019	(r346385)
+++ head/sys/x86/iommu/intel_ctx.c	Fri Apr 19 13:43:33 2019	(r346386)
@@ -130,7 +130,7 @@ ctx_tag_init(struct dmar_ctx *ctx, device_t dev)
 	maxaddr = MIN(ctx->domain->end, BUS_SPACE_MAXADDR);
 	ctx->ctx_tag.common.ref_count = 1; /* Prevent free */
 	ctx->ctx_tag.common.impl = &bus_dma_dmar_impl;
-	ctx->ctx_tag.common.boundary = PCI_DMA_BOUNDARY;
+	ctx->ctx_tag.common.boundary = 0;
 	ctx->ctx_tag.common.lowaddr = maxaddr;
 	ctx->ctx_tag.common.highaddr = maxaddr;
 	ctx->ctx_tag.common.maxsize = maxaddr;

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:33:55 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 715C6156FCA9;
 Fri, 19 Apr 2019 15:33:55 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 166B483CD7;
 Fri, 19 Apr 2019 15:33:55 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09A45457;
 Fri, 19 Apr 2019 15:33:55 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JFXsIv070520;
 Fri, 19 Apr 2019 15:33:54 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFXs6k070519;
 Fri, 19 Apr 2019 15:33:54 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191533.x3JFXs6k070519@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:33:54 +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: r346388 - stable/12/sys/netinet
X-SVN-Group: stable-12
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/12/sys/netinet
X-SVN-Commit-Revision: 346388
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 166B483CD7
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:33:55 -0000

Author: bz
Date: Fri Apr 19 15:33:54 2019
New Revision: 346388
URL: https://svnweb.freebsd.org/changeset/base/346388

Log:
  MFC r340494:
  
    Improve the comment for arpresolve_full() in if_ether.c.
    No functional changes.

Modified:
  stable/12/sys/netinet/if_ether.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/if_ether.c
==============================================================================
--- stable/12/sys/netinet/if_ether.c	Fri Apr 19 15:05:32 2019	(r346387)
+++ stable/12/sys/netinet/if_ether.c	Fri Apr 19 15:33:54 2019	(r346388)
@@ -433,10 +433,10 @@ arprequest(struct ifnet *ifp, const struct in_addr *si
 /*
  * Resolve an IP address into an ethernet address - heavy version.
  * Used internally by arpresolve().
- * We have already checked than  we can't use existing lle without
- * modification so we have to acquire LLE_EXCLUSIVE lle lock.
+ * We have already checked that we can't use an existing lle without
+ * modification so we have to acquire an LLE_EXCLUSIVE lle lock.
  *
- * On success, desten and flags are filled in and the function returns 0;
+ * On success, desten and pflags are filled in and the function returns 0;
  * If the packet must be held pending resolution, we return EWOULDBLOCK
  * On other errors, we return the corresponding error code.
  * Note that m_freem() handles NULL.

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:34:22 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEFDE156FD07;
 Fri, 19 Apr 2019 15:34:22 +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 7426583DDF;
 Fri, 19 Apr 2019 15:34:22 +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 51503458;
 Fri, 19 Apr 2019 15:34:22 +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 x3JFYMiu070586;
 Fri, 19 Apr 2019 15:34:22 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFYMPF070585;
 Fri, 19 Apr 2019 15:34:22 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191534.x3JFYMPF070585@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:34:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346389 - stable/11/sys/netinet
X-SVN-Group: stable-11
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/11/sys/netinet
X-SVN-Commit-Revision: 346389
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 7426583DDF
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:34:23 -0000

Author: bz
Date: Fri Apr 19 15:34:21 2019
New Revision: 346389
URL: https://svnweb.freebsd.org/changeset/base/346389

Log:
  MFC r340494:
  
    Improve the comment for arpresolve_full() in if_ether.c.
    No functional changes.

Modified:
  stable/11/sys/netinet/if_ether.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/if_ether.c
==============================================================================
--- stable/11/sys/netinet/if_ether.c	Fri Apr 19 15:33:54 2019	(r346388)
+++ stable/11/sys/netinet/if_ether.c	Fri Apr 19 15:34:21 2019	(r346389)
@@ -431,10 +431,10 @@ arprequest(struct ifnet *ifp, const struct in_addr *si
 /*
  * Resolve an IP address into an ethernet address - heavy version.
  * Used internally by arpresolve().
- * We have already checked than  we can't use existing lle without
- * modification so we have to acquire LLE_EXCLUSIVE lle lock.
+ * We have already checked that we can't use an existing lle without
+ * modification so we have to acquire an LLE_EXCLUSIVE lle lock.
  *
- * On success, desten and flags are filled in and the function returns 0;
+ * On success, desten and pflags are filled in and the function returns 0;
  * If the packet must be held pending resolution, we return EWOULDBLOCK
  * On other errors, we return the corresponding error code.
  * Note that m_freem() handles NULL.

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:44:46 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 929DE15700F7;
 Fri, 19 Apr 2019 15:44:46 +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 348C68439E;
 Fri, 19 Apr 2019 15:44:46 +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 0AF01654;
 Fri, 19 Apr 2019 15:44:46 +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 x3JFijiq075970;
 Fri, 19 Apr 2019 15:44:45 GMT (envelope-from mav@FreeBSD.org)
Received: (from mav@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFijLe075969;
 Fri, 19 Apr 2019 15:44:45 GMT (envelope-from mav@FreeBSD.org)
Message-Id: <201904191544.x3JFijLe075969@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org
 using -f
From: Alexander Motin 
Date: Fri, 19 Apr 2019 15:44:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346390 -
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-SVN-Group: head
X-SVN-Commit-Author: mav
X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-SVN-Commit-Revision: 346390
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 348C68439E
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.962,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:44:46 -0000

Author: mav
Date: Fri Apr 19 15:44:45 2019
New Revision: 346390
URL: https://svnweb.freebsd.org/changeset/base/346390

Log:
  Change the way FreeBSD GID inheritance is hacked.
  
  I believe previous ifdef caused NULL dereference in later zfs_log_create()
  on attempt to create file inside directory belonging to ephemeral group
  created on illumos, trying to write to log information about GID domain
  of the newly created file, inheriting the ephemeral GID.
  
  This patch reuses original illumos SGID code with exception that due to
  lack of ID mapping code on FreeBSD ephemeral GID will turn into GID_NOBODY
  by another ifdef inside zfs_fuid_map_id().
  
  MFC after:	1 month
  Sponsored by:	iXsystems, Inc.

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c	Fri Apr 19 15:34:21 2019	(r346389)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c	Fri Apr 19 15:44:45 2019	(r346390)
@@ -1655,7 +1655,9 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va
 				acl_ids->z_fgid = 0;
 		}
 		if (acl_ids->z_fgid == 0) {
+#ifndef __FreeBSD_kernel__
 			if (dzp->z_mode & S_ISGID) {
+#endif
 				char		*domain;
 				uint32_t	rid;
 
@@ -1674,15 +1676,13 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va
 					    FUID_INDEX(acl_ids->z_fgid),
 					    acl_ids->z_fgid, ZFS_GROUP);
 				}
+#ifndef __FreeBSD_kernel__
 			} else {
 				acl_ids->z_fgid = zfs_fuid_create_cred(zfsvfs,
 				    ZFS_GROUP, cr, &acl_ids->z_fuidp);
-#ifdef __FreeBSD_kernel__
-				gid = acl_ids->z_fgid = dzp->z_gid;
-#else
 				gid = crgetgid(cr);
-#endif
 			}
+#endif
 		}
 	}
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:45:37 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 855C9157018E;
 Fri, 19 Apr 2019 15:45:37 +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 24240845B8;
 Fri, 19 Apr 2019 15:45:37 +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 F2E2D656;
 Fri, 19 Apr 2019 15:45:36 +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 x3JFjadb076201;
 Fri, 19 Apr 2019 15:45:36 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFjaQj076200;
 Fri, 19 Apr 2019 15:45:36 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191545.x3JFjaQj076200@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:45:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346391 -
 stable/12/sys/compat/linuxkpi/common/include/linux
X-SVN-Group: stable-12
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux
X-SVN-Commit-Revision: 346391
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 24240845B8
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:45:37 -0000

Author: bz
Date: Fri Apr 19 15:45:36 2019
New Revision: 346391
URL: https://svnweb.freebsd.org/changeset/base/346391

Log:
  MFC r344700:
  
    Add ushort and ulong to linux/types.h.
  
    When porting code once written for Linux we find not only uints but also ushort and ulong.
    Provide central typedefs as part of the linuxkpi for those as well.

Modified:
  stable/12/sys/compat/linuxkpi/common/include/linux/types.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linuxkpi/common/include/linux/types.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/linux/types.h	Fri Apr 19 15:44:45 2019	(r346390)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/types.h	Fri Apr 19 15:45:36 2019	(r346391)
@@ -53,7 +53,9 @@ typedef uint32_t __be32;
 typedef uint64_t __le64;
 typedef uint64_t __be64;
 
+typedef unsigned short ushort;
 typedef unsigned int    uint;
+typedef unsigned long ulong;
 typedef unsigned gfp_t;
 typedef uint64_t loff_t;
 typedef vm_paddr_t resource_size_t;

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:46:09 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DFBD1570207;
 Fri, 19 Apr 2019 15:46:09 +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 043F1846DA;
 Fri, 19 Apr 2019 15:46:09 +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 D057A657;
 Fri, 19 Apr 2019 15:46:08 +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 x3JFk87g076275;
 Fri, 19 Apr 2019 15:46:08 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFk8vP076274;
 Fri, 19 Apr 2019 15:46:08 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191546.x3JFk8vP076274@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:46:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346392 -
 stable/11/sys/compat/linuxkpi/common/include/linux
X-SVN-Group: stable-11
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux
X-SVN-Commit-Revision: 346392
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 043F1846DA
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:46:09 -0000

Author: bz
Date: Fri Apr 19 15:46:08 2019
New Revision: 346392
URL: https://svnweb.freebsd.org/changeset/base/346392

Log:
  MFC r344700:
  
    Add ushort and ulong to linux/types.h.
  
    When porting code once written for Linux we find not only uints but also ushort and ulong.
    Provide central typedefs as part of the linuxkpi for those as well.

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/types.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/types.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/types.h	Fri Apr 19 15:45:36 2019	(r346391)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/types.h	Fri Apr 19 15:46:08 2019	(r346392)
@@ -53,7 +53,9 @@ typedef uint32_t __be32;
 typedef uint64_t __le64;
 typedef uint64_t __be64;
 
+typedef unsigned short ushort;
 typedef unsigned int    uint;
+typedef unsigned long ulong;
 typedef unsigned gfp_t;
 typedef uint64_t loff_t;
 typedef vm_paddr_t resource_size_t;

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:48:58 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BE8B1570373;
 Fri, 19 Apr 2019 15:48:58 +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 A8F52848E3;
 Fri, 19 Apr 2019 15:48:57 +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 7F8FF659;
 Fri, 19 Apr 2019 15:48:57 +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 x3JFmv7R076454;
 Fri, 19 Apr 2019 15:48:57 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFmv13076453;
 Fri, 19 Apr 2019 15:48:57 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191548.x3JFmv13076453@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:48:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346393 - stable/12/sys/dev/usb
X-SVN-Group: stable-12
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/12/sys/dev/usb
X-SVN-Commit-Revision: 346393
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: A8F52848E3
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:48:58 -0000

Author: bz
Date: Fri Apr 19 15:48:57 2019
New Revision: 346393
URL: https://svnweb.freebsd.org/changeset/base/346393

Log:
  MFC r344959:
  
    Add two more products found inside a T480 to usbdevs.
  
    Add an Intel Bluetooth module.
    Add Synaptics as a vendor with a fingerprint reader product.

Modified:
  stable/12/sys/dev/usb/usbdevs
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/usb/usbdevs
==============================================================================
--- stable/12/sys/dev/usb/usbdevs	Fri Apr 19 15:46:08 2019	(r346392)
+++ stable/12/sys/dev/usb/usbdevs	Fri Apr 19 15:48:57 2019	(r346393)
@@ -351,6 +351,7 @@ vendor ALCATELT		0x06b9	Alcatel Telecom
 vendor AGFA		0x06bd	AGFA-Gevaert
 vendor ASIAMD		0x06be	Asia Microelectronic Development
 vendor BIZLINK		0x06c4	Bizlink International
+vendor SYNAPTICS	0x06cb  Synaptics, Inc.
 vendor KEYSPAN		0x06cd	Keyspan / InnoSys Inc.
 vendor CONTEC		0x06ce	Contec products
 vendor AASHIMA		0x06d6	Aashima Technology
@@ -2582,6 +2583,7 @@ product INTEL2 IRMH        	0x0020	Integrated Rate Mat
 product INTEL2 IRMH2        	0x0024	Integrated Rate Matching Hub
 product INTEL2 IRMH3        	0x8000	Integrated Rate Matching Hub
 product INTEL2 IRMH4        	0x8008	Integrated Rate Matching Hub
+product INTEL2 SNP		0x0a2b	Stone Peak (7265) Bluetooth Module
 product INTEL2 SFP		0x0aa7  Sandy Peak (3168) Bluetooth Module
 product INTEL2 JFP		0x0aaa	Jefferson Peak (9460/9560) Bluetooth Module
 product INTEL2 THP 		0x0025	Thunder Peak (9160/9260) Bluetooth Module
@@ -2673,6 +2675,9 @@ product KEISOKUGIKEN USBDAQ	0x0068	HKS-0200 USBDAQ
 /* Kensington products */
 product KENSINGTON ORBIT	0x1003	Orbit USB/PS2 trackball
 product KENSINGTON TURBOBALL	0x1005	TurboBall
+
+/* Synaptics products */
+product SYNAPTICS FPR9A		0x009a	Fingerprint Reader
 
 /* Keyspan products */
 product KEYSPAN USA28_NF	0x0101	USA-28 serial Adapter (no firmware)

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:50:52 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 817AC1570491;
 Fri, 19 Apr 2019 15:50:52 +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 1DE3D84C67;
 Fri, 19 Apr 2019 15:50:52 +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 E9E13678;
 Fri, 19 Apr 2019 15:50:51 +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 x3JFopfZ079915;
 Fri, 19 Apr 2019 15:50:51 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFopsP079914;
 Fri, 19 Apr 2019 15:50:51 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191550.x3JFopsP079914@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:50: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: r346394 - stable/12/sys/dev/sdhci
X-SVN-Group: stable-12
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/12/sys/dev/sdhci
X-SVN-Commit-Revision: 346394
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 1DE3D84C67
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:50:52 -0000

Author: bz
Date: Fri Apr 19 15:50:51 2019
New Revision: 346394
URL: https://svnweb.freebsd.org/changeset/base/346394

Log:
  MFC r345370:
  
    Align struct sdhci_slot MMCCAM members.
  
    Whitespace only, no functional change.

Modified:
  stable/12/sys/dev/sdhci/sdhci.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/sdhci/sdhci.h
==============================================================================
--- stable/12/sys/dev/sdhci/sdhci.h	Fri Apr 19 15:48:57 2019	(r346393)
+++ stable/12/sys/dev/sdhci/sdhci.h	Fri Apr 19 15:50:51 2019	(r346394)
@@ -413,10 +413,10 @@ struct sdhci_slot {
 #ifdef MMCCAM
 	/* CAM stuff */
 	union ccb	*ccb;
-	struct cam_devq		*devq;
-	struct cam_sim		*sim;
-	struct mtx		sim_mtx;
-	u_char			card_present; /* XXX Maybe derive this from elsewhere? */
+	struct cam_devq	*devq;
+	struct cam_sim	*sim;
+	struct mtx	sim_mtx;
+	u_char		card_present;	/* XXX Maybe derive this from elsewhere? */
 #endif
 };
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:52:10 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B51E5157083F;
 Fri, 19 Apr 2019 15:52:10 +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 502FA84F8E;
 Fri, 19 Apr 2019 15:52:10 +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 1F1FA7E6;
 Fri, 19 Apr 2019 15:52:10 +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 x3JFqAc7081494;
 Fri, 19 Apr 2019 15:52:10 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFq9PK081493;
 Fri, 19 Apr 2019 15:52:09 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191552.x3JFq9PK081493@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:52:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346395 - stable/12/sys/dev/sdhci
X-SVN-Group: stable-12
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/12/sys/dev/sdhci
X-SVN-Commit-Revision: 346395
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 502FA84F8E
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.962,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:52:11 -0000

Author: bz
Date: Fri Apr 19 15:52:09 2019
New Revision: 346395
URL: https://svnweb.freebsd.org/changeset/base/346395

Log:
  MFC r345372:
  
    Whitespace cleanup in sdhci.c
  
    No functional changes.  Replace whitespace by tabs, indent with 4 spaces,
    coalesce multi-line shorter than 80 characters,

Modified:
  stable/12/sys/dev/sdhci/sdhci.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/sdhci/sdhci.c
==============================================================================
--- stable/12/sys/dev/sdhci/sdhci.c	Fri Apr 19 15:50:51 2019	(r346394)
+++ stable/12/sys/dev/sdhci/sdhci.c	Fri Apr 19 15:52:09 2019	(r346395)
@@ -1553,23 +1553,23 @@ sdhci_retune(void *arg)
 static void
 sdhci_req_done(struct sdhci_slot *slot)
 {
-        union ccb *ccb;
+	union ccb *ccb;
 
 	if (__predict_false(sdhci_debug > 1))
 		slot_printf(slot, "%s\n", __func__);
 	if (slot->ccb != NULL && slot->curcmd != NULL) {
 		callout_stop(&slot->timeout_callout);
-                ccb = slot->ccb;
-                slot->ccb = NULL;
+		ccb = slot->ccb;
+		slot->ccb = NULL;
 		slot->curcmd = NULL;
 
-                /* Tell CAM the request is finished */
-                struct ccb_mmcio *mmcio;
-                mmcio = &ccb->mmcio;
+		/* Tell CAM the request is finished */
+		struct ccb_mmcio *mmcio;
+		mmcio = &ccb->mmcio;
 
-                ccb->ccb_h.status =
-                        (mmcio->cmd.error == 0 ? CAM_REQ_CMP : CAM_REQ_CMP_ERR);
-                xpt_done(ccb);
+		ccb->ccb_h.status =
+		    (mmcio->cmd.error == 0 ? CAM_REQ_CMP : CAM_REQ_CMP_ERR);
+		xpt_done(ccb);
 	}
 }
 #else
@@ -2483,47 +2483,45 @@ void
 sdhci_start_slot(struct sdhci_slot *slot)
 {
 
-        if ((slot->devq = cam_simq_alloc(1)) == NULL) {
-                goto fail;
-        }
+	if ((slot->devq = cam_simq_alloc(1)) == NULL)
+		goto fail;
 
-        mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF);
-        slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll,
-                                  "sdhci_slot", slot, device_get_unit(slot->bus),
-                                  &slot->sim_mtx, 1, 1, slot->devq);
+	mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF);
+	slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll,
+	    "sdhci_slot", slot, device_get_unit(slot->bus),
+	    &slot->sim_mtx, 1, 1, slot->devq);
 
-        if (slot->sim == NULL) {
-                cam_simq_free(slot->devq);
-                slot_printf(slot, "cannot allocate CAM SIM\n");
-                goto fail;
-        }
+	if (slot->sim == NULL) {
+		cam_simq_free(slot->devq);
+		slot_printf(slot, "cannot allocate CAM SIM\n");
+		goto fail;
+	}
 
-        mtx_lock(&slot->sim_mtx);
-        if (xpt_bus_register(slot->sim, slot->bus, 0) != 0) {
-                slot_printf(slot,
-                              "cannot register SCSI pass-through bus\n");
-                cam_sim_free(slot->sim, FALSE);
-                cam_simq_free(slot->devq);
-                mtx_unlock(&slot->sim_mtx);
-                goto fail;
-        }
+	mtx_lock(&slot->sim_mtx);
+	if (xpt_bus_register(slot->sim, slot->bus, 0) != 0) {
+		slot_printf(slot, "cannot register SCSI pass-through bus\n");
+		cam_sim_free(slot->sim, FALSE);
+		cam_simq_free(slot->devq);
+		mtx_unlock(&slot->sim_mtx);
+		goto fail;
+	}
+	mtx_unlock(&slot->sim_mtx);
 
-        mtx_unlock(&slot->sim_mtx);
-        /* End CAM-specific init */
+	/* End CAM-specific init */
 	slot->card_present = 0;
 	sdhci_card_task(slot, 0);
-        return;
+	return;
 
 fail:
-        if (slot->sim != NULL) {
-                mtx_lock(&slot->sim_mtx);
-                xpt_bus_deregister(cam_sim_path(slot->sim));
-                cam_sim_free(slot->sim, FALSE);
-                mtx_unlock(&slot->sim_mtx);
-        }
+	if (slot->sim != NULL) {
+		mtx_lock(&slot->sim_mtx);
+		xpt_bus_deregister(cam_sim_path(slot->sim));
+		cam_sim_free(slot->sim, FALSE);
+		mtx_unlock(&slot->sim_mtx);
+	}
 
-        if (slot->devq != NULL)
-                cam_simq_free(slot->devq);
+	if (slot->devq != NULL)
+		cam_simq_free(slot->devq);
 }
 
 static void
@@ -2653,15 +2651,13 @@ sdhci_cam_get_possible_host_clock(const struct sdhci_s
 	clock = max_clock;
 
 	if (slot->version < SDHCI_SPEC_300) {
-		for (i = 0; i < SDHCI_200_MAX_DIVIDER;
-		     i <<= 1) {
+		for (i = 0; i < SDHCI_200_MAX_DIVIDER; i <<= 1) {
 			if (clock <= proposed_clock)
 				break;
 			clock >>= 1;
 		}
 	} else {
-		for (i = 0; i < SDHCI_300_MAX_DIVIDER;
-		     i += 2) {
+		for (i = 0; i < SDHCI_300_MAX_DIVIDER; i += 2) {
 			if (clock <= proposed_clock)
 				break;
 			clock = max_clock / (i + 2);
@@ -2711,7 +2707,7 @@ sdhci_cam_settran_settings(struct sdhci_slot *slot, un
 		slot_printf(slot, "Bus mode => %d\n", ios->bus_mode);
 	}
 
-        /* XXX Provide a way to call a chip-specific IOS update, required for TI */
+	/* XXX Provide a way to call a chip-specific IOS update, required for TI */
 	return (sdhci_cam_update_ios(slot));
 }
 
@@ -2779,7 +2775,7 @@ sdhci_cam_request(struct sdhci_slot *slot, union ccb *
 	if (mmcio->cmd.data != NULL) {
 		if (mmcio->cmd.data->len == 0 || mmcio->cmd.data->flags == 0)
 			panic("data->len = %d, data->flags = %d -- something is b0rked",
-			      (int)mmcio->cmd.data->len, mmcio->cmd.data->flags);
+			    (int)mmcio->cmd.data->len, mmcio->cmd.data->flags);
 	}
 	slot->ccb = ccb;
 	slot->flags = 0;

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:53:31 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5CFE1570906;
 Fri, 19 Apr 2019 15:53:31 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 63BE885119;
 Fri, 19 Apr 2019 15:53:31 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3464880A;
 Fri, 19 Apr 2019 15:53:31 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JFrVXr081607;
 Fri, 19 Apr 2019 15:53:31 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFrVJT081606;
 Fri, 19 Apr 2019 15:53:31 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191553.x3JFrVJT081606@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:53:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346396 - stable/12/sys/arm/broadcom/bcm2835
X-SVN-Group: stable-12
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/12/sys/arm/broadcom/bcm2835
X-SVN-Commit-Revision: 346396
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 63BE885119
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:53:32 -0000

Author: bz
Date: Fri Apr 19 15:53:30 2019
New Revision: 346396
URL: https://svnweb.freebsd.org/changeset/base/346396

Log:
  MFC r345757:
  
    Improve debugging options in bcm2835_sdhci.c
  
    Similar to bcm2835_sdhost.c add a TUNABLE and SYSCTL to selectively
    turn on debugging printfs if debugging is turned on at compile time.

Modified:
  stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==============================================================================
--- stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c	Fri Apr 19 15:52:09 2019	(r346395)
+++ stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c	Fri Apr 19 15:53:30 2019	(r346396)
@@ -66,8 +66,17 @@ __FBSDID("$FreeBSD$");
 #define	NUM_DMA_SEGS			2
 
 #ifdef DEBUG
-#define dprintf(fmt, args...) do { printf("%s(): ", __func__);   \
-    printf(fmt,##args); } while (0)
+static int bcm2835_sdhci_debug = 0;
+
+TUNABLE_INT("hw.bcm2835.sdhci.debug", &bcm2835_sdhci_debug);
+SYSCTL_INT(_hw_sdhci, OID_AUTO, bcm2835_sdhci_debug, CTLFLAG_RWTUN,
+    &bcm2835_sdhci_debug, 0, "bcm2835 SDHCI debug level");
+
+#define	dprintf(fmt, args...)					\
+	do {							\
+		if (bcm2835_sdhci_debug)			\
+			printf("%s: " fmt, __func__, ##args);	\
+	}  while (0)
 #else
 #define dprintf(fmt, args...)
 #endif

From owner-svn-src-all@freebsd.org  Fri Apr 19 15:54:33 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EF8B1570992;
 Fri, 19 Apr 2019 15:54: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 461AB85269;
 Fri, 19 Apr 2019 15:54: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 1EE1D81B;
 Fri, 19 Apr 2019 15:54: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 x3JFsXkj081715;
 Fri, 19 Apr 2019 15:54:33 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JFsW07081714;
 Fri, 19 Apr 2019 15:54:32 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191554.x3JFsW07081714@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 15:54:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346397 - stable/11/sys/arm/broadcom/bcm2835
X-SVN-Group: stable-11
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: stable/11/sys/arm/broadcom/bcm2835
X-SVN-Commit-Revision: 346397
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 461AB85269
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 15:54:33 -0000

Author: bz
Date: Fri Apr 19 15:54:32 2019
New Revision: 346397
URL: https://svnweb.freebsd.org/changeset/base/346397

Log:
  MFC r345757:
  
    Improve debugging options in bcm2835_sdhci.c
  
    Similar to bcm2835_sdhost.c add a TUNABLE and SYSCTL to selectively
    turn on debugging printfs if debugging is turned on at compile time.

Modified:
  stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==============================================================================
--- stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c	Fri Apr 19 15:53:30 2019	(r346396)
+++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c	Fri Apr 19 15:54:32 2019	(r346397)
@@ -63,8 +63,17 @@ __FBSDID("$FreeBSD$");
 #define	NUM_DMA_SEGS			2
 
 #ifdef DEBUG
-#define dprintf(fmt, args...) do { printf("%s(): ", __func__);   \
-    printf(fmt,##args); } while (0)
+static int bcm2835_sdhci_debug = 0;
+
+TUNABLE_INT("hw.bcm2835.sdhci.debug", &bcm2835_sdhci_debug);
+SYSCTL_INT(_hw_sdhci, OID_AUTO, bcm2835_sdhci_debug, CTLFLAG_RWTUN,
+    &bcm2835_sdhci_debug, 0, "bcm2835 SDHCI debug level");
+
+#define	dprintf(fmt, args...)					\
+	do {							\
+		if (bcm2835_sdhci_debug)			\
+			printf("%s: " fmt, __func__, ##args);	\
+	}  while (0)
 #else
 #define dprintf(fmt, args...)
 #endif

From owner-svn-src-all@freebsd.org  Fri Apr 19 17:06:45 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E8301572AF2;
 Fri, 19 Apr 2019 17:06:45 +0000 (UTC) (envelope-from thj@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 9C81487F92;
 Fri, 19 Apr 2019 17:06:44 +0000 (UTC) (envelope-from thj@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 774691524;
 Fri, 19 Apr 2019 17:06:44 +0000 (UTC) (envelope-from thj@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JH6iDI019619;
 Fri, 19 Apr 2019 17:06:44 GMT (envelope-from thj@FreeBSD.org)
Received: (from thj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JH6hGF019614;
 Fri, 19 Apr 2019 17:06:43 GMT (envelope-from thj@FreeBSD.org)
Message-Id: <201904191706.x3JH6hGF019614@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org
 using -f
From: Tom Jones 
Date: Fri, 19 Apr 2019 17:06:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346398 - in head: sys/netinet6 usr.bin/netstat
 usr.bin/systat
X-SVN-Group: head
X-SVN-Commit-Author: thj
X-SVN-Commit-Paths: in head: sys/netinet6 usr.bin/netstat usr.bin/systat
X-SVN-Commit-Revision: 346398
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 9C81487F92
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.979,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 17:06:45 -0000

Author: thj
Date: Fri Apr 19 17:06:43 2019
New Revision: 346398
URL: https://svnweb.freebsd.org/changeset/base/346398

Log:
  Add stat counter for ipv6 atomic fragments
  
  Add a stat counter to track ipv6 atomic fragments. Atomic fragments can be
  generated in response to invalid path MTU values, but are also a potential
  attack vector and considered harmful (see RFC6946 and RFC8021).
  
  While here add tracking of the atomic fragment counter to netstat and systat.
  
  Reviewed by:    tuexen, jtl, bz
  Approved by:    jtl (mentor), bz (mentor)
  Event:  Aberdeen hackathon 2019
  Differential Revision:  https://reviews.freebsd.org/D17511

Modified:
  head/sys/netinet6/frag6.c
  head/sys/netinet6/ip6_var.h
  head/usr.bin/netstat/inet6.c
  head/usr.bin/systat/ip6.c

Modified: head/sys/netinet6/frag6.c
==============================================================================
--- head/sys/netinet6/frag6.c	Fri Apr 19 15:54:32 2019	(r346397)
+++ head/sys/netinet6/frag6.c	Fri Apr 19 17:06:43 2019	(r346398)
@@ -277,12 +277,12 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
 	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 (see RFC 6946 and section 4.5 of RFC
+	 * 8200).  Just skip the fragment header.
 	 */
 	if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) {
-		/* XXX-BZ we want dedicated counters for this. */
-		IP6STAT_INC(ip6s_reassembled);
+		IP6STAT_INC(ip6s_atomicfrags);
 		in6_ifstat_inc(dstifp, ifs6_reass_ok);
 		*offp = offset;
 		m->m_flags |= M_FRAGMENTED;

Modified: head/sys/netinet6/ip6_var.h
==============================================================================
--- head/sys/netinet6/ip6_var.h	Fri Apr 19 15:54:32 2019	(r346397)
+++ head/sys/netinet6/ip6_var.h	Fri Apr 19 17:06:43 2019	(r346398)
@@ -208,6 +208,7 @@ struct	ip6stat {
 	uint64_t ip6s_localout;		/* total ip packets generated here */
 	uint64_t ip6s_odropped;		/* lost packets due to nobufs, etc. */
 	uint64_t ip6s_reassembled;	/* total packets reassembled ok */
+	uint64_t ip6s_atomicfrags;	/* atomic fragments */
 	uint64_t ip6s_fragmented;	/* datagrams successfully fragmented */
 	uint64_t ip6s_ofragments;	/* output fragments created */
 	uint64_t ip6s_cantfrag;		/* don't fragment flag was set, etc. */

Modified: head/usr.bin/netstat/inet6.c
==============================================================================
--- head/usr.bin/netstat/inet6.c	Fri Apr 19 15:54:32 2019	(r346397)
+++ head/usr.bin/netstat/inet6.c	Fri Apr 19 17:06:43 2019	(r346398)
@@ -391,6 +391,8 @@ ip6_stats(u_long off, const char *name, int af1 __unus
 	    "{N:/fragment%s dropped after timeout}\n");
 	p(ip6s_fragoverflow, "\t{:dropped-fragments-overflow/%ju} "
 	    "{N:/fragment%s that exceeded limit}\n");
+	p(ip6s_atomicfrags, "\t{:atomic-fragments/%ju} "
+	    "{N:/atomic fragment%s}\n");
 	p(ip6s_reassembled, "\t{:reassembled-packets/%ju} "
 	    "{N:/packet%s reassembled ok}\n");
 	p(ip6s_delivered, "\t{:received-local-packets/%ju} "

Modified: head/usr.bin/systat/ip6.c
==============================================================================
--- head/usr.bin/systat/ip6.c	Fri Apr 19 15:54:32 2019	(r346397)
+++ head/usr.bin/systat/ip6.c	Fri Apr 19 17:06:43 2019	(r346398)
@@ -121,16 +121,16 @@ labelip6(void)
 	L(6, "- fragments dropped");	R(6, "destinations unreachable");
 	L(7, "- fragments timed out");	R(7, "packets output via raw IP");
 	L(8, "- fragments overflown");
-	L(9, "- packets reassembled ok"); R(9, "Input next-header histogram");
-	L(10, "packets forwarded");	R(10, " - destination options");
-	L(11, "- unreachable dests");	R(11, " - hop-by-hop options");
-	L(12, "- redirects generated");	R(12, " - IPv4");
-	L(13, "option errors");		R(13, " - TCP");
-	L(14, "unwanted multicasts");	R(14, " - UDP");
-	L(15, "delivered to upper layer"); R(15, " - IPv6");
-	L(16, "bad scope packets");	R(16, " - routing header");
-	L(17, "address selection failed"); R(17, " - fragmentation header");
-					R(18, " - ICMP6");
+	L(9, "- atomic fragments"); 	R(9, "Input next-header histogram");
+	L(10, "- packets reassembled ok"); R(10, " - destination options");
+	L(11, "packets forwarded");	R(11, " - hop-by-hop options");
+	L(12, "- unreachable dests");	R(12, " - IPv4");
+	L(13, "- redirects generated");	R(13, " - TCP");
+	L(14, "option errors");		R(14, " - UDP");
+	L(15, "unwanted multicasts");	R(15, " - IPv6");
+	L(16, "delivered to upper layer"); R(16, " - routing header");
+	L(17, "bad scope packets");	R(17, " - fragmentation header");
+	L(18, "address selection failed");R(18, " - ICMP6");
 					R(19, " - none");
 #undef L
 #undef R
@@ -165,6 +165,7 @@ domode(struct ip6stat *ret)
 	DO(ip6s_fragdropped);
 	DO(ip6s_fragtimeout);
 	DO(ip6s_fragoverflow);
+	DO(ip6s_atomicfrags);
 	DO(ip6s_forward);
 	DO(ip6s_cantforward);
 	DO(ip6s_redirectsent);
@@ -214,22 +215,23 @@ showip6(void)
 	DO(ip6s_fragtimeout, 7, 0);
 	DO(ip6s_rawout, 7, 35);
 	DO(ip6s_fragoverflow, 8, 0);
-	DO(ip6s_reassembled, 9, 0);
-	DO(ip6s_forward, 10, 0);
+	DO(ip6s_atomicfrags, 9, 0);
+	DO(ip6s_reassembled, 10, 0);
+	DO(ip6s_forward, 11, 0);
 	DO(ip6s_nxthist[IPPROTO_DSTOPTS], 10, 35);
-	DO(ip6s_cantforward, 11, 0);
+	DO(ip6s_cantforward, 12, 0);
 	DO(ip6s_nxthist[IPPROTO_HOPOPTS], 11, 35);
-	DO(ip6s_redirectsent, 12, 0);
+	DO(ip6s_redirectsent, 13, 0);
 	DO(ip6s_nxthist[IPPROTO_IPV4], 12, 35);
-	DO(ip6s_badoptions, 13, 0);
+	DO(ip6s_badoptions, 14, 0);
 	DO(ip6s_nxthist[IPPROTO_TCP], 13, 35);
-	DO(ip6s_notmember, 14, 0);
+	DO(ip6s_notmember, 15, 0);
 	DO(ip6s_nxthist[IPPROTO_UDP], 14, 35);
-	DO(ip6s_delivered, 15, 0);
+	DO(ip6s_delivered, 16, 0);
 	DO(ip6s_nxthist[IPPROTO_IPV6], 15, 35);
-	DO(ip6s_badscope, 16, 0);
+	DO(ip6s_badscope, 17, 0);
 	DO(ip6s_nxthist[IPPROTO_ROUTING], 16, 35);
-	DO(ip6s_sources_none, 17, 0);
+	DO(ip6s_sources_none, 18, 0);
 	DO(ip6s_nxthist[IPPROTO_FRAGMENT], 17, 35);
 	DO(ip6s_nxthist[IPPROTO_ICMPV6], 18, 35);
 	DO(ip6s_nxthist[IPPROTO_NONE], 19, 35);

From owner-svn-src-all@freebsd.org  Fri Apr 19 17:15:59 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4950E1572D96;
 Fri, 19 Apr 2019 17:15:59 +0000 (UTC) (envelope-from cem@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 E36798841A;
 Fri, 19 Apr 2019 17:15:58 +0000 (UTC) (envelope-from cem@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 BC00916F3;
 Fri, 19 Apr 2019 17:15:58 +0000 (UTC) (envelope-from cem@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JHFwwE025095;
 Fri, 19 Apr 2019 17:15:58 GMT (envelope-from cem@FreeBSD.org)
Received: (from cem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JHFwhC025094;
 Fri, 19 Apr 2019 17:15:58 GMT (envelope-from cem@FreeBSD.org)
Message-Id: <201904191715.x3JHFwhC025094@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org
 using -f
From: Conrad Meyer 
Date: Fri, 19 Apr 2019 17:15:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346399 - head/share/man/man4
X-SVN-Group: head
X-SVN-Commit-Author: cem
X-SVN-Commit-Paths: head/share/man/man4
X-SVN-Commit-Revision: 346399
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: E36798841A
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.978,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 17:15:59 -0000

Author: cem
Date: Fri Apr 19 17:15:58 2019
New Revision: 346399
URL: https://svnweb.freebsd.org/changeset/base/346399

Log:
  random.4: Include description of knobs added in r346358
  
  Reported by:	ngie
  Sponsored by:	Dell EMC Isilon

Modified:
  head/share/man/man4/random.4

Modified: head/share/man/man4/random.4
==============================================================================
--- head/share/man/man4/random.4	Fri Apr 19 17:06:43 2019	(r346398)
+++ head/share/man/man4/random.4	Fri Apr 19 17:15:58 2019	(r346399)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 15, 2019
+.Dd April 19, 2019
 .Dt RANDOM 4
 .Os
 .Sh NAME
@@ -85,6 +85,10 @@ kern.random.harvest.mask_bin: 00000010000000111011111
 kern.random.harvest.mask: 66015
 kern.random.use_chacha20_cipher: 0
 kern.random.random_sources: 'Intel Secure Key RNG'
+kern.random.initial_seeding.bypass_before_seeding: 1
+kern.random.initial_seeding.read_random_bypassed_before_seeding: 0
+kern.random.initial_seeding.arc4random_bypassed_before_seeding: 0
+kern.random.initial_seeding.disable_bypass_warnings: 0
 .Ed
 .Pp
 Other than
@@ -132,6 +136,55 @@ for more on the harvesting of entropy.
 .Bl -tag -width ".Pa /dev/urandom"
 .It Pa /dev/random
 .It Pa /dev/urandom
+.El
+.Sh DIAGNOSTICS
+The following tunables are related to initial seeding of the
+.Nm
+device:
+.Bl -tag -width 4
+.It Va kern.random.initial_seeding.bypass_before_seeding
+Defaults to 1 (on).
+When set, the system will bypass the
+.Nm
+device prior to initial seeding.
+On is
+.Em unsafe ,
+but provides availability on many systems that lack early sources
+of entropy, or cannot load
+.Pa /boot/entropy
+sufficiently early in boot for
+.Nm
+consumers.
+When unset (0), the system will block
+.Xr read_random 9
+and
+.Xr arc4random 9
+requests if and until the
+.Nm
+device is initially seeded.
+.It Va kern.random.initial_seeding.disable_bypass_warnings
+Defaults to 0 (off).
+When set non-zero, disables warnings in dmesg when the
+.Nm
+device is bypassed.
+.El
+.Pp
+The following read-only
+.Xr sysctl 8
+variables allow programmatic diagnostic of whether
+.Nm
+device bypass occurred during boot.
+If they are set (non-zero), the specific functional unit bypassed the strong
+.Nm
+device output and either produced no output
+.Xr ( read_random 9 )
+or seeded itself with minimal, non-cryptographic entropy
+.Xr ( arc4random 9 ) .
+.Bl -bullet
+.It
+.Va kern.random.initial_seeding.read_random_bypassed_before_seeding
+.It
+.Va kern.random.initial_seeding.arc4random_bypassed_before_seeding
 .El
 .Sh SEE ALSO
 .Xr getrandom 2 ,

From owner-svn-src-all@freebsd.org  Fri Apr 19 17:17:43 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id F15B61572F6C;
 Fri, 19 Apr 2019 17:17:42 +0000 (UTC)
 (envelope-from tuexen@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 9262B88780;
 Fri, 19 Apr 2019 17:17:42 +0000 (UTC)
 (envelope-from tuexen@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 6803716F6;
 Fri, 19 Apr 2019 17:17:42 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JHHgT2025422;
 Fri, 19 Apr 2019 17:17:42 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JHHg24025421;
 Fri, 19 Apr 2019 17:17:42 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201904191717.x3JHHg24025421@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen 
Date: Fri, 19 Apr 2019 17:17:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346400 - head/sys/netinet6
X-SVN-Group: head
X-SVN-Commit-Author: tuexen
X-SVN-Commit-Paths: head/sys/netinet6
X-SVN-Commit-Revision: 346400
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 9262B88780
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.978,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 17:17:43 -0000

Author: tuexen
Date: Fri Apr 19 17:17:41 2019
New Revision: 346400
URL: https://svnweb.freebsd.org/changeset/base/346400

Log:
  Improve input validation for the socket option IPV6_CHECKSUM.
  
  When using the IPPROTO_IPV6 level socket option IPV6_CHECKSUM on a raw
  IPv6 socket, ensure that the value is either -1 or a non-negative even
  number.
  
  Reviewed by:		bz@, thj@
  MFC after:		1 week
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D19966

Modified:
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c	Fri Apr 19 17:15:58 2019	(r346399)
+++ head/sys/netinet6/ip6_output.c	Fri Apr 19 17:17:41 2019	(r346400)
@@ -2221,8 +2221,11 @@ ip6_raw_ctloutput(struct socket *so, struct sockopt *s
 					    sizeof(optval));
 			if (error)
 				break;
-			if ((optval % 2) != 0) {
-				/* the API assumes even offset values */
+			if (optval < -1 || (optval % 2) != 0) {
+				/*
+				 * The API assumes non-negative even offset
+				 * values or -1 as a special value.
+				 */
 				error = EINVAL;
 			} else if (so->so_proto->pr_protocol ==
 			    IPPROTO_ICMPV6) {

From owner-svn-src-all@freebsd.org  Fri Apr 19 17:21:37 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34E5A157323C;
 Fri, 19 Apr 2019 17:21:37 +0000 (UTC)
 (envelope-from tuexen@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 CCEBD88D73;
 Fri, 19 Apr 2019 17:21:36 +0000 (UTC)
 (envelope-from tuexen@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 47B5F1763;
 Fri, 19 Apr 2019 17:21:36 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JHLaef027930;
 Fri, 19 Apr 2019 17:21:36 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JHLa7F027929;
 Fri, 19 Apr 2019 17:21:36 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201904191721.x3JHLa7F027929@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen 
Date: Fri, 19 Apr 2019 17:21:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346401 - head/sys/netinet6
X-SVN-Group: head
X-SVN-Commit-Author: tuexen
X-SVN-Commit-Paths: head/sys/netinet6
X-SVN-Commit-Revision: 346401
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: CCEBD88D73
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.95)[-0.948,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 17:21:37 -0000

Author: tuexen
Date: Fri Apr 19 17:21:35 2019
New Revision: 346401
URL: https://svnweb.freebsd.org/changeset/base/346401

Log:
  Avoid a buffer overwrite in rip6_output() when computing the checksum
  as requested by the user via the IPPROTO_IPV6 level socket option
  IPV6_CHECKSUM. The check if there are enough bytes in the packet to
  store the checksum at the requested offset was wrong by 1.
  
  Reviewed by:		bz@
  MFC after:		1 week
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D19967

Modified:
  head/sys/netinet6/raw_ip6.c

Modified: head/sys/netinet6/raw_ip6.c
==============================================================================
--- head/sys/netinet6/raw_ip6.c	Fri Apr 19 17:17:41 2019	(r346400)
+++ head/sys/netinet6/raw_ip6.c	Fri Apr 19 17:21:35 2019	(r346401)
@@ -495,7 +495,7 @@ rip6_output(struct mbuf *m, struct socket *so, ...)
 			off = offsetof(struct icmp6_hdr, icmp6_cksum);
 		else
 			off = in6p->in6p_cksum;
-		if (plen < off + 1) {
+		if (plen < off + 2) {
 			error = EINVAL;
 			goto bad;
 		}

From owner-svn-src-all@freebsd.org  Fri Apr 19 17:28:29 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FEE1157368E;
 Fri, 19 Apr 2019 17:28:29 +0000 (UTC)
 (envelope-from tuexen@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 04DCE890FC;
 Fri, 19 Apr 2019 17:28:29 +0000 (UTC)
 (envelope-from tuexen@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 CF31418D4;
 Fri, 19 Apr 2019 17:28:28 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JHSS2X030567;
 Fri, 19 Apr 2019 17:28:28 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JHSSR4030566;
 Fri, 19 Apr 2019 17:28:28 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201904191728.x3JHSSR4030566@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen 
Date: Fri, 19 Apr 2019 17:28:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346402 - head/sys/netinet6
X-SVN-Group: head
X-SVN-Commit-Author: tuexen
X-SVN-Commit-Paths: head/sys/netinet6
X-SVN-Commit-Revision: 346402
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 04DCE890FC
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.95)[-0.948,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 17:28:29 -0000

Author: tuexen
Date: Fri Apr 19 17:28:28 2019
New Revision: 346402
URL: https://svnweb.freebsd.org/changeset/base/346402

Log:
  When a checksum has to be computed for a received IPv6 packet because it
  is requested by the application using the IPPROTO_IPV6 level socket option
  IPV6_CHECKSUM on a raw socket, ensure that the packet contains enough
  bytes to contain the checksum at the specified offset.
  
  Reported by:		syzbot+6295fcc5a8aced81d599@syzkaller.appspotmail.com
  Reviewed by:		bz@
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D19968

Modified:
  head/sys/netinet6/raw_ip6.c

Modified: head/sys/netinet6/raw_ip6.c
==============================================================================
--- head/sys/netinet6/raw_ip6.c	Fri Apr 19 17:21:35 2019	(r346401)
+++ head/sys/netinet6/raw_ip6.c	Fri Apr 19 17:28:28 2019	(r346402)
@@ -239,7 +239,8 @@ rip6_input(struct mbuf **mp, int *offp, int proto)
 		}
 		if (in6p->in6p_cksum != -1) {
 			RIP6STAT_INC(rip6s_isum);
-			if (in6_cksum(m, proto, *offp,
+			if (m->m_pkthdr.len - (*offp + in6p->in6p_cksum) < 2 ||
+			    in6_cksum(m, proto, *offp,
 			    m->m_pkthdr.len - *offp)) {
 				RIP6STAT_INC(rip6s_badsum);
 				goto skip_2;

From owner-svn-src-all@freebsd.org  Fri Apr 19 17:28:40 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C92CB15736D1;
 Fri, 19 Apr 2019 17:28:40 +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 68C37891E8;
 Fri, 19 Apr 2019 17:28:40 +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 AC32518D5;
 Fri, 19 Apr 2019 17:28:38 +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 x3JHSc6A030618;
 Fri, 19 Apr 2019 17:28:38 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JHSc4Y030616;
 Fri, 19 Apr 2019 17:28:38 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191728.x3JHSc4Y030616@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 17:28: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: r346403 - in stable/12: usr.bin/netstat usr.sbin/syslogd
X-SVN-Group: stable-12
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: in stable/12: usr.bin/netstat usr.sbin/syslogd
X-SVN-Commit-Revision: 346403
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 68C37891E8
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.94 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.94)[-0.945,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 17:28:41 -0000

Author: bz
Date: Fri Apr 19 17:28:38 2019
New Revision: 346403
URL: https://svnweb.freebsd.org/changeset/base/346403

Log:
  MFC r344740:
  
    Fix compilation of world with WITHOUT_{INET,INET6}_SUPPORT or both set.
  
    Buildworld failed when both WITHOUT_INET6_SUPPORT and INET equivalent were set.
    Fix netstat and syslogd by applying appropriate #ifdef INET/INET6 to make world
    compile again.

Modified:
  stable/12/usr.bin/netstat/inet.c
  stable/12/usr.sbin/syslogd/syslogd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/netstat/inet.c
==============================================================================
--- stable/12/usr.bin/netstat/inet.c	Fri Apr 19 17:28:28 2019	(r346402)
+++ stable/12/usr.bin/netstat/inet.c	Fri Apr 19 17:28:38 2019	(r346403)
@@ -85,8 +85,10 @@ __FBSDID("$FreeBSD$");
 #include "netstat.h"
 #include "nl_defs.h"
 
-void	inetprint(const char *, struct in_addr *, int, const char *, int,
+#ifdef INET
+static void inetprint(const char *, struct in_addr *, int, const char *, int,
     const int);
+#endif
 #ifdef INET6
 static int udp_done, tcp_done, sdp_done;
 #endif /* INET6 */
@@ -390,6 +392,7 @@ protopr(u_long off, const char *name, int af1, int pro
 			    so->so_rcv.sb_cc, so->so_snd.sb_cc);
 		}
 		if (numeric_port) {
+#ifdef INET
 			if (inp->inp_vflag & INP_IPV4) {
 				inetprint("local", &inp->inp_laddr,
 				    (int)inp->inp_lport, name, 1, af1);
@@ -397,8 +400,12 @@ protopr(u_long off, const char *name, int af1, int pro
 					inetprint("remote", &inp->inp_faddr,
 					    (int)inp->inp_fport, name, 1, af1);
 			}
+#endif
+#if defined(INET) && defined(INET6)
+			else
+#endif
 #ifdef INET6
-			else if (inp->inp_vflag & INP_IPV6) {
+			if (inp->inp_vflag & INP_IPV6) {
 				inet6print("local", &inp->in6p_laddr,
 				    (int)inp->inp_lport, name, 1);
 				if (!Lflag)
@@ -407,6 +414,7 @@ protopr(u_long off, const char *name, int af1, int pro
 			} /* else nothing printed now */
 #endif /* INET6 */
 		} else if (inp->inp_flags & INP_ANONPORT) {
+#ifdef INET
 			if (inp->inp_vflag & INP_IPV4) {
 				inetprint("local", &inp->inp_laddr,
 				    (int)inp->inp_lport, name, 1, af1);
@@ -414,8 +422,12 @@ protopr(u_long off, const char *name, int af1, int pro
 					inetprint("remote", &inp->inp_faddr,
 					    (int)inp->inp_fport, name, 0, af1);
 			}
+#endif
+#if defined(INET) && defined(INET6)
+			else
+#endif
 #ifdef INET6
-			else if (inp->inp_vflag & INP_IPV6) {
+			if (inp->inp_vflag & INP_IPV6) {
 				inet6print("local", &inp->in6p_laddr,
 				    (int)inp->inp_lport, name, 1);
 				if (!Lflag)
@@ -424,6 +436,7 @@ protopr(u_long off, const char *name, int af1, int pro
 			} /* else nothing printed now */
 #endif /* INET6 */
 		} else {
+#ifdef INET
 			if (inp->inp_vflag & INP_IPV4) {
 				inetprint("local", &inp->inp_laddr,
 				    (int)inp->inp_lport, name, 0, af1);
@@ -433,8 +446,12 @@ protopr(u_long off, const char *name, int af1, int pro
 					    inp->inp_lport != inp->inp_fport,
 					    af1);
 			}
+#endif
+#if defined(INET) && defined(INET6)
+			else
+#endif
 #ifdef INET6
-			else if (inp->inp_vflag & INP_IPV6) {
+			if (inp->inp_vflag & INP_IPV6) {
 				inet6print("local", &inp->in6p_laddr,
 				    (int)inp->inp_lport, name, 0);
 				if (!Lflag)
@@ -1314,10 +1331,11 @@ pim_stats(u_long off __unused, const char *name, int a
 	xo_close_container(name);
 }
 
+#ifdef INET
 /*
  * Pretty print an Internet address (net address + port).
  */
-void
+static void
 inetprint(const char *container, struct in_addr *in, int port,
     const char *proto, int num_port, const int af1)
 {
@@ -1404,3 +1422,4 @@ inetname(struct in_addr *inp)
 	}
 	return (line);
 }
+#endif

Modified: stable/12/usr.sbin/syslogd/syslogd.c
==============================================================================
--- stable/12/usr.sbin/syslogd/syslogd.c	Fri Apr 19 17:28:28 2019	(r346402)
+++ stable/12/usr.sbin/syslogd/syslogd.c	Fri Apr 19 17:28:38 2019	(r346403)
@@ -1609,6 +1609,7 @@ iovlist_append(struct iovlist *il, const char *str)
 	}
 }
 
+#if defined(INET) || defined(INET6)
 static void
 iovlist_truncate(struct iovlist *il, size_t size)
 {
@@ -1629,6 +1630,7 @@ iovlist_truncate(struct iovlist *il, size_t size)
 		}
 	}
 }
+#endif
 
 static void
 fprintlog_write(struct filed *f, struct iovlist *il, int flags)
@@ -2947,7 +2949,11 @@ timedout(int sig __unused)
  * Returns -1 on error, 0 if the argument was valid.
  */
 static int
+#if defined(INET) || defined(INET6)
 allowaddr(char *s)
+#else
+allowaddr(char *s __unused)
+#endif
 {
 #if defined(INET) || defined(INET6)
 	char *cp1, *cp2;
@@ -3109,13 +3115,13 @@ allowaddr(char *s)
 		}
 		printf("port = %d\n", ap->port);
 	}
-#endif
 
 	return (0);
 err:
 	if (res != NULL)
 		freeaddrinfo(res);
 	free(ap);
+#endif
 	return (-1);
 }
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 17:29:21 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7CC61573784;
 Fri, 19 Apr 2019 17:29:21 +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 5EBBA8935E;
 Fri, 19 Apr 2019 17:29:21 +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 3991F18DE;
 Fri, 19 Apr 2019 17:29:21 +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 x3JHTLAj030703;
 Fri, 19 Apr 2019 17:29:21 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JHTKxS030701;
 Fri, 19 Apr 2019 17:29:20 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201904191729.x3JHTKxS030701@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Apr 2019 17:29:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346404 - in stable/11: usr.bin/netstat usr.sbin/syslogd
X-SVN-Group: stable-11
X-SVN-Commit-Author: bz
X-SVN-Commit-Paths: in stable/11: usr.bin/netstat usr.sbin/syslogd
X-SVN-Commit-Revision: 346404
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 5EBBA8935E
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.94 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.94)[-0.945,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 17:29:22 -0000

Author: bz
Date: Fri Apr 19 17:29:20 2019
New Revision: 346404
URL: https://svnweb.freebsd.org/changeset/base/346404

Log:
  MFC 344740:
  
    Fix compilation of world with WITHOUT_{INET,INET6}_SUPPORT or both set.
  
    Buildworld failed when both WITHOUT_INET6_SUPPORT and INET equivalent were set.
    Fix netstat and syslogd by applying appropriate #ifdef INET/INET6 to make world
    compile again.

Modified:
  stable/11/usr.bin/netstat/inet.c
  stable/11/usr.sbin/syslogd/syslogd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/netstat/inet.c
==============================================================================
--- stable/11/usr.bin/netstat/inet.c	Fri Apr 19 17:28:38 2019	(r346403)
+++ stable/11/usr.bin/netstat/inet.c	Fri Apr 19 17:29:20 2019	(r346404)
@@ -84,8 +84,10 @@ __FBSDID("$FreeBSD$");
 #include "netstat.h"
 #include "nl_defs.h"
 
-void	inetprint(const char *, struct in_addr *, int, const char *, int,
+#ifdef INET
+static void inetprint(const char *, struct in_addr *, int, const char *, int,
     const int);
+#endif
 #ifdef INET6
 static int udp_done, tcp_done, sdp_done;
 #endif /* INET6 */
@@ -506,6 +508,7 @@ protopr(u_long off, const char *name, int af1, int pro
 			    so->so_rcv.sb_cc, so->so_snd.sb_cc);
 		}
 		if (numeric_port) {
+#ifdef INET
 			if (inp->inp_vflag & INP_IPV4) {
 				inetprint("local", &inp->inp_laddr,
 				    (int)inp->inp_lport, name, 1, af1);
@@ -513,8 +516,12 @@ protopr(u_long off, const char *name, int af1, int pro
 					inetprint("remote", &inp->inp_faddr,
 					    (int)inp->inp_fport, name, 1, af1);
 			}
+#endif
+#if defined(INET) && defined(INET6)
+			else
+#endif
 #ifdef INET6
-			else if (inp->inp_vflag & INP_IPV6) {
+			if (inp->inp_vflag & INP_IPV6) {
 				inet6print("local", &inp->in6p_laddr,
 				    (int)inp->inp_lport, name, 1);
 				if (!Lflag)
@@ -523,6 +530,7 @@ protopr(u_long off, const char *name, int af1, int pro
 			} /* else nothing printed now */
 #endif /* INET6 */
 		} else if (inp->inp_flags & INP_ANONPORT) {
+#ifdef INET
 			if (inp->inp_vflag & INP_IPV4) {
 				inetprint("local", &inp->inp_laddr,
 				    (int)inp->inp_lport, name, 1, af1);
@@ -530,8 +538,12 @@ protopr(u_long off, const char *name, int af1, int pro
 					inetprint("remote", &inp->inp_faddr,
 					    (int)inp->inp_fport, name, 0, af1);
 			}
+#endif
+#if defined(INET) && defined(INET6)
+			else
+#endif
 #ifdef INET6
-			else if (inp->inp_vflag & INP_IPV6) {
+			if (inp->inp_vflag & INP_IPV6) {
 				inet6print("local", &inp->in6p_laddr,
 				    (int)inp->inp_lport, name, 1);
 				if (!Lflag)
@@ -540,6 +552,7 @@ protopr(u_long off, const char *name, int af1, int pro
 			} /* else nothing printed now */
 #endif /* INET6 */
 		} else {
+#ifdef INET
 			if (inp->inp_vflag & INP_IPV4) {
 				inetprint("local", &inp->inp_laddr,
 				    (int)inp->inp_lport, name, 0, af1);
@@ -549,8 +562,12 @@ protopr(u_long off, const char *name, int af1, int pro
 					    inp->inp_lport != inp->inp_fport,
 					    af1);
 			}
+#endif
+#if defined(INET) && defined(INET6)
+			else
+#endif
 #ifdef INET6
-			else if (inp->inp_vflag & INP_IPV6) {
+			if (inp->inp_vflag & INP_IPV6) {
 				inet6print("local", &inp->in6p_laddr,
 				    (int)inp->inp_lport, name, 0);
 				if (!Lflag)
@@ -1415,10 +1432,11 @@ pim_stats(u_long off __unused, const char *name, int a
 	xo_close_container(name);
 }
 
+#ifdef INET
 /*
  * Pretty print an Internet address (net address + port).
  */
-void
+static void
 inetprint(const char *container, struct in_addr *in, int port,
     const char *proto, int num_port, const int af1)
 {
@@ -1505,3 +1523,4 @@ inetname(struct in_addr *inp)
 	}
 	return (line);
 }
+#endif

Modified: stable/11/usr.sbin/syslogd/syslogd.c
==============================================================================
--- stable/11/usr.sbin/syslogd/syslogd.c	Fri Apr 19 17:28:38 2019	(r346403)
+++ stable/11/usr.sbin/syslogd/syslogd.c	Fri Apr 19 17:29:20 2019	(r346404)
@@ -1607,6 +1607,7 @@ iovlist_append(struct iovlist *il, const char *str)
 	}
 }
 
+#if defined(INET) || defined(INET6)
 static void
 iovlist_truncate(struct iovlist *il, size_t size)
 {
@@ -1627,6 +1628,7 @@ iovlist_truncate(struct iovlist *il, size_t size)
 		}
 	}
 }
+#endif
 
 static void
 fprintlog_write(struct filed *f, struct iovlist *il, int flags)
@@ -2945,7 +2947,11 @@ timedout(int sig __unused)
  * Returns -1 on error, 0 if the argument was valid.
  */
 static int
+#if defined(INET) || defined(INET6)
 allowaddr(char *s)
+#else
+allowaddr(char *s __unused)
+#endif
 {
 #if defined(INET) || defined(INET6)
 	char *cp1, *cp2;
@@ -3107,13 +3113,13 @@ allowaddr(char *s)
 		}
 		printf("port = %d\n", ap->port);
 	}
-#endif
 
 	return (0);
 err:
 	if (res != NULL)
 		freeaddrinfo(res);
 	free(ap);
+#endif
 	return (-1);
 }
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 17:51:28 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B77C21573F39;
 Fri, 19 Apr 2019 17:51:28 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com
 [IPv6:2607:f8b0:4864:20::52a])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 139D889F27;
 Fri, 19 Apr 2019 17:51:28 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pg1-x52a.google.com with SMTP id l18so2815746pgj.6;
 Fri, 19 Apr 2019 10:51:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=dNtxEoEQL9EVvT5VuE+S9u4YzS/mGn6WvwxfWJA/U6U=;
 b=WNkXlCKnwpdnUeVcskZu8Zrg551L2zlb8uu1R36ApjRW6oOWpA15163WNOIMKh1EsR
 EmavImOhwXgnAp8qFPlM4PUJmgxkJrN0XaDJspjHJGHM7bRC2yIGqoZp66GEIvJ+UFGK
 qsbVdcqDfSFrD1jHEWxAk3ux1U1pXR+/bvlalP7/fu+b2+KWKQMrifBSujtEudx4mUjN
 coieSTvpkkiPnEx4kMtRrWruXCa8tp5lUYRArm+erJg/Zfmr5JvPwY1fcNPnAEnIJdBq
 MixyezYZtNyl2wGJjJiDjB1ia1DIoJ0xLzw2IbEptZvJxeXW2jRWJ/QL4yYeHAIHCIAC
 zCvg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=dNtxEoEQL9EVvT5VuE+S9u4YzS/mGn6WvwxfWJA/U6U=;
 b=dAolEcmrrqkAYR1pby0a2OugEn2mJAymLOCBuRkKOqzPU3md545HnMrm6ZoxJGiwQw
 AzQjlhZ9pzCEJPzLoOdry8iyYjrHmf6Y1scA0v0qXsqzOmx7iyrRm2rDBDgrjqvhRkQN
 vjGTPkPoRA2tTbfREFlKY232wJmohPho8fcDhcY+GYxNkI982ai19vTX3/Y2BFaHyzl2
 MryTSVQT440zvbOWvfWMNOGbNMyoBe+sTh2CK1p0mxj+T+8Bo7BZ9iCJ3x8EmhG4HfnY
 izgiJFnsldgIWHYtcpRicwEC4c5Vq5UIyArJip52ACK3VOyaX9gTwrtm5ICbIMuzCnMr
 IKyA==
X-Gm-Message-State: APjAAAVr5veElLF6pzTo9GrFlnIt+T1UNZC9ChfBPkOkvwXfG9pK/yNo
 SuGJZ+9NlRiKYoSzb1ZPvXU9HkIQ38Q=
X-Google-Smtp-Source: APXvYqz+IRGmNeO1DdmYOK6sL/3Q8CiJSh8esfAq6SNAacE0dy0tQZKPD8G7r70VahnXQuLm2WS8+g==
X-Received: by 2002:a62:4d43:: with SMTP id a64mr5258345pfb.174.1555696285372; 
 Fri, 19 Apr 2019 10:51:25 -0700 (PDT)
Received: from [192.168.20.22] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id s19sm6832923pfe.74.2019.04.19.10.51.24
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Apr 2019 10:51:24 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (1.0)
Subject: Re: svn commit: r346399 - head/share/man/man4
From: Enji Cooper 
X-Mailer: iPhone Mail (16E227)
In-Reply-To: <201904191715.x3JHFwhC025094@repo.freebsd.org>
Date: Fri, 19 Apr 2019 10:51:24 -0700
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201904191715.x3JHFwhC025094@repo.freebsd.org>
To: Conrad Meyer 
X-Rspamd-Queue-Id: 139D889F27
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.97 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 17:51:28 -0000


> On Apr 19, 2019, at 10:15, Conrad Meyer  wrote:
>=20
> Author: cem
> Date: Fri Apr 19 17:15:58 2019
> New Revision: 346399
> URL: https://svnweb.freebsd.org/changeset/base/346399
>=20
> Log:
>  random.4: Include description of knobs added in r346358
>=20
>  Reported by:    ngie
>  Sponsored by:    Dell EMC Isilon

Thank you so very much Conrad \^O^/!!! You=E2=80=99re awesome!
-Enji=

From owner-svn-src-all@freebsd.org  Fri Apr 19 18:00:34 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97F2415741E1;
 Fri, 19 Apr 2019 18:00:34 +0000 (UTC)
 (envelope-from adrian@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 3B3698A404;
 Fri, 19 Apr 2019 18:00:34 +0000 (UTC)
 (envelope-from adrian@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 083FB1E33;
 Fri, 19 Apr 2019 18:00:34 +0000 (UTC)
 (envelope-from adrian@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JI0XjX047530;
 Fri, 19 Apr 2019 18:00:33 GMT (envelope-from adrian@FreeBSD.org)
Received: (from adrian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JI0XkQ047529;
 Fri, 19 Apr 2019 18:00:33 GMT (envelope-from adrian@FreeBSD.org)
Message-Id: <201904191800.x3JI0XkQ047529@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: adrian set sender to
 adrian@FreeBSD.org using -f
From: Adrian Chadd 
Date: Fri, 19 Apr 2019 18:00:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346405 - head/sys/dev/ath
X-SVN-Group: head
X-SVN-Commit-Author: adrian
X-SVN-Commit-Paths: head/sys/dev/ath
X-SVN-Commit-Revision: 346405
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 3B3698A404
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.97)[-0.970,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 18:00:34 -0000

Author: adrian
Date: Fri Apr 19 18:00:33 2019
New Revision: 346405
URL: https://svnweb.freebsd.org/changeset/base/346405

Log:
  [ath] Fix return value check to not complain.
  
  Compilers complain more about things, so let's keep them happy.

Modified:
  head/sys/dev/ath/if_athvar.h

Modified: head/sys/dev/ath/if_athvar.h
==============================================================================
--- head/sys/dev/ath/if_athvar.h	Fri Apr 19 17:29:20 2019	(r346404)
+++ head/sys/dev/ath/if_athvar.h	Fri Apr 19 18:00:33 2019	(r346405)
@@ -1352,7 +1352,7 @@ void	ath_intr(void *);
 	== HAL_OK)
 #define	ath_hal_setrxbufsize(_ah, _req) \
 	(ath_hal_setcapability(_ah, HAL_CAP_RXBUFSIZE, 0, _req, NULL)	\
-	== HAL_OK)
+	== AH_TRUE)
 
 #define	ath_hal_getchannoise(_ah, _c) \
 	((*(_ah)->ah_getChanNoise)((_ah), (_c)))

From owner-svn-src-all@freebsd.org  Fri Apr 19 18:09:39 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4B7A15745A0;
 Fri, 19 Apr 2019 18:09:38 +0000 (UTC)
 (envelope-from tuexen@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 887658AC2C;
 Fri, 19 Apr 2019 18:09:38 +0000 (UTC)
 (envelope-from tuexen@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 5C4221FE6;
 Fri, 19 Apr 2019 18:09:38 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JI9cA5051691;
 Fri, 19 Apr 2019 18:09:38 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JI9chr051690;
 Fri, 19 Apr 2019 18:09:38 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201904191809.x3JI9chr051690@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen 
Date: Fri, 19 Apr 2019 18:09:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346406 - head/sys/netinet6
X-SVN-Group: head
X-SVN-Commit-Author: tuexen
X-SVN-Commit-Paths: head/sys/netinet6
X-SVN-Commit-Revision: 346406
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 887658AC2C
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.94 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.94)[-0.937,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 18:09:39 -0000

Author: tuexen
Date: Fri Apr 19 18:09:37 2019
New Revision: 346406
URL: https://svnweb.freebsd.org/changeset/base/346406

Log:
  When an IPv6 packet is received for a raw socket which has the
  IPPROTO_IPV6 level socket option IPV6_CHECKSUM enabled and the
  checksum check fails, drop the message. Without this fix, an
  ICMP6 message was sent indicating a parameter problem.
  
  Thanks to bz@ for suggesting a way to simplify this fix.
  
  Reviewed by:		bz@
  MFC after:		1 week
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D19969

Modified:
  head/sys/netinet6/raw_ip6.c

Modified: head/sys/netinet6/raw_ip6.c
==============================================================================
--- head/sys/netinet6/raw_ip6.c	Fri Apr 19 18:00:33 2019	(r346405)
+++ head/sys/netinet6/raw_ip6.c	Fri Apr 19 18:09:37 2019	(r346406)
@@ -243,6 +243,12 @@ rip6_input(struct mbuf **mp, int *offp, int proto)
 			    in6_cksum(m, proto, *offp,
 			    m->m_pkthdr.len - *offp)) {
 				RIP6STAT_INC(rip6s_badsum);
+				/*
+				 * Drop the received message, don't send an
+				 * ICMP6 message. Set proto to IPPROTO_NONE
+				 * to achieve that.
+				 */
+				proto = IPPROTO_NONE;
 				goto skip_2;
 			}
 		}

From owner-svn-src-all@freebsd.org  Fri Apr 19 18:09:50 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24D0E15745CB;
 Fri, 19 Apr 2019 18:09:50 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com
 [IPv6:2607:f8b0:4864:20::444])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 884D88AD1D;
 Fri, 19 Apr 2019 18:09:49 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pf1-x444.google.com with SMTP id 9so2852643pfj.13;
 Fri, 19 Apr 2019 11:09:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=bUi1cu7Htl3Gsf7hhYKZ6yb5ttLVV3vhNIcPOJovSA4=;
 b=GzBbYWmXlZ4GRsuuaEYvtF85flKpQ9I0Hf+y1sbsTj++qofEAXF6vsAbODbJZvMrMK
 m+XBmwiPvaWJIuhnRac/SvPpjvxxd7V1grvXEIrkek7AIXr0u1z2rQPusyQGj/sboX5d
 M7VRn/g5Ao+OjWScEmQyiNW/PwVE5l7FJDFwS9yG1iobYxUD7nBd+BBW00iuG3/QmVED
 ZW+DsEtJHCriFVXrXRM5nuplz78DjFYGhqQI3PKAMyRI/hYmiJCo09YsV/pq4c9ZqvXD
 jROA+Cfhl1jUukzo4Xj8K1vyeLQrkhmrc56JFRgDxGihZayhlEctS57aZllzbdE+oqT0
 T4nw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=bUi1cu7Htl3Gsf7hhYKZ6yb5ttLVV3vhNIcPOJovSA4=;
 b=TA1MbeEcudhpT8CyO+5Urd8R4yaFDqcJtvvVutHI3iV/MDoTCpKXYf2VlmQNzYvxik
 eaB1E+V9/+QBBxcbQN3IfvSclFuKK+matjsB3HAlYTYIo53et3jsOfSawViPk4EfyiwD
 4D1ngCFzMZfKfBO9LTn2O7bf0B7+TdIxS8eV4qbW+s2+un8oavTgrkAoVaD7f+ueZ3WG
 HHtcX58i4GUIsl3Noj4xI56TC1ReCkMhcmDRxJMsoOLe+H+I+5CzNhj9LyrzYz/awEbJ
 RkZd2FmFwdHvpsWl2OQ7gUwbXhL/+TD+9OW57iGz07PovIfA5ZcatA4XDFTjb1D+a8eI
 MOOQ==
X-Gm-Message-State: APjAAAV6IDRkvAiS7F9bMJIZ0tXqKNp+D5Gx7V36rKIMbZNwlpNixW04
 0SMtMKgjTPYm9G6QmiSUpDVcJqea7BA=
X-Google-Smtp-Source: APXvYqxjlI7JatWvfMCnsrD8ZSzVsayUgOpg5lnZOA5WDr7dGjggjbzFN5BfXot1ZwkzGV9BtuDcdw==
X-Received: by 2002:a62:2046:: with SMTP id g67mr5237676pfg.121.1555697385058; 
 Fri, 19 Apr 2019 11:09:45 -0700 (PDT)
Received: from [192.168.20.22] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id z22sm5566873pgv.23.2019.04.19.11.09.44
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Apr 2019 11:09:44 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (1.0)
Subject: Re: svn commit: r346390 -
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
From: Enji Cooper 
X-Mailer: iPhone Mail (16E227)
In-Reply-To: <201904191544.x3JFijLe075969@repo.freebsd.org>
Date: Fri, 19 Apr 2019 11:09:43 -0700
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <0F708A9C-D29D-466A-B541-06DB7127349E@gmail.com>
References: <201904191544.x3JFijLe075969@repo.freebsd.org>
To: Alexander Motin 
X-Rspamd-Queue-Id: 884D88AD1D
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.94 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.94)[-0.935,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 18:09:50 -0000


> On Apr 19, 2019, at 08:44, Alexander Motin  wrote:
>=20
> Author: mav
> Date: Fri Apr 19 15:44:45 2019
> New Revision: 346390
> URL: https://svnweb.freebsd.org/changeset/base/346390
>=20
> Log:
>  Change the way FreeBSD GID inheritance is hacked.
>=20
>  I believe previous ifdef caused NULL dereference in later zfs_log_create(=
)
>  on attempt to create file inside directory belonging to ephemeral group
>  created on illumos, trying to write to log information about GID domain
>  of the newly created file, inheriting the ephemeral GID.
>=20
>  This patch reuses original illumos SGID code with exception that due to
>  lack of ID mapping code on FreeBSD ephemeral GID will turn into GID_NOBOD=
Y
>  by another ifdef inside zfs_fuid_map_id().

Hi mav@!
    I was wondering, does this break ACL mappings with sticky bits for the g=
roup ID (or was it broken to begin with)? If the latter, does it make sense t=
o file a bug/add a TODO comment?
Thank you!
-Enji=

From owner-svn-src-all@freebsd.org  Fri Apr 19 18:29:25 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3D6C1575033;
 Fri, 19 Apr 2019 18:29:25 +0000 (UTC)
 (envelope-from mavbsd@gmail.com)
Received: from mail-yw1-xc44.google.com (mail-yw1-xc44.google.com
 [IPv6:2607:f8b0:4864:20::c44])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 544A08BBDE;
 Fri, 19 Apr 2019 18:29:25 +0000 (UTC)
 (envelope-from mavbsd@gmail.com)
Received: by mail-yw1-xc44.google.com with SMTP id e76so2155849ywa.9;
 Fri, 19 Apr 2019 11:29:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=jp/VuxaLW34EsE/Yf4J6pEZU7qLK4ot8gNmmzGE8XkI=;
 b=BKvu7bdIwbtl0HfRKdSZZOVzS3znqQLqsJZfTS6+HJD7kfZk1AhE4y/WHgfxQKCotO
 gHov4vq3oJRvwQdkeHXVX23DPvIOYHlmPqT68fYAir6MtsreM1I+b5HanEe9JNlVkGwO
 YmpOWcDmXZr1SWEcEbbu4qHa2wnjmgXRlTpbmPcnFOFvhxkQ/P3e9x53SGJ9Pjlu5hHF
 ujjrPfDS5qy5gvd6h/NyOMlX7HuAvCEg0p74M/5WYTNfx8iKnkqNNCV5DYVBT93z/1QC
 dxD04/VUgcEqoopjqKv02pXkBXruwZ+1qjXZ0Px3xUZmT1nxWHJoHjGkC6lY4w/Y53ys
 257Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp
 :autocrypt:message-id:date:user-agent:mime-version:in-reply-to
 :content-language:content-transfer-encoding;
 bh=jp/VuxaLW34EsE/Yf4J6pEZU7qLK4ot8gNmmzGE8XkI=;
 b=G7B+Mg4aSj8+iQPlnivXBRNUMSO/buEWN3mTNLHdcciTvQb+OmhmFhKPNu+Wy+21+G
 l79DeQplKIc6BdMFxuhrojNx165JIR4fjfCxZXsnvr8Pl9uWSCTJW4GbA0tYad84Dicb
 V58foL4xf+inwBx9unRrWcpNYGchnYti8S9U/W6XxrsXaU5TnajhnBETGFbhPkCwekOt
 r3Ragjt8LLsvzDi8ur0Lbs0nZyPIFNi5SfFXuyx1lOE40piBQMWMIP1nj7q2yLrZmZqL
 mgqVGkIktE23oyyI7/cuQnRMYGukO5kJQRzdVIUBYjlVvottPnKEGK55hPNs0zuf8nvd
 sDfw==
X-Gm-Message-State: APjAAAXvJASEPMlZVgUomCdcLfF+BUIb9wjq8TltmACqbxz/zrEkIiCa
 v6UElsjb9LFkgkqZoU6qUq8G2acQ
X-Google-Smtp-Source: APXvYqwieeEh78VhFzYGn3NjkoCuGZcf620dW8DqqeSrbu8szDgBt9qrErBWSl1C5gGBKYar2X6lZg==
X-Received: by 2002:a81:4c07:: with SMTP id z7mr4379331ywa.0.1555698564553;
 Fri, 19 Apr 2019 11:29:24 -0700 (PDT)
Received: from mavoffice.ixsystems.com ([12.189.233.129])
 by smtp.gmail.com with ESMTPSA id z193sm2001932ywa.70.2019.04.19.11.29.23
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Apr 2019 11:29:24 -0700 (PDT)
Sender: Alexander Motin 
Subject: Re: svn commit: r346390 -
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
To: Enji Cooper 
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
References: <201904191544.x3JFijLe075969@repo.freebsd.org>
 <0F708A9C-D29D-466A-B541-06DB7127349E@gmail.com>
From: Alexander Motin 
Openpgp: preference=signencrypt
Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata=
 xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g
 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne
 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP
 g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU
 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB
 AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH
 AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN
 McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm
 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y
 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z
 zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6
 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ
 Yr4+raTOwE0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z
 AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv
 mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt
 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ
 R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5
 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU
 fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3
 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW
 RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI
 W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL
 NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac
 w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA
 qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz
 gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg
 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza
 B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F
 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg==
Message-ID: <8d763a63-0915-d9f6-1b90-5e902f06ebe4@FreeBSD.org>
Date: Fri, 19 Apr 2019 14:29:23 -0400
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101
 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <0F708A9C-D29D-466A-B541-06DB7127349E@gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 544A08BBDE
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.94 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.94)[-0.936,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 18:29:26 -0000

On 19.04.2019 14:09, Enji Cooper wrote:
>> On Apr 19, 2019, at 08:44, Alexander Motin  wrote:
>>
>> Author: mav
>> Date: Fri Apr 19 15:44:45 2019
>> New Revision: 346390
>> URL: https://svnweb.freebsd.org/changeset/base/346390
>>
>> Log:
>>  Change the way FreeBSD GID inheritance is hacked.
>>
>>  I believe previous ifdef caused NULL dereference in later zfs_log_create()
>>  on attempt to create file inside directory belonging to ephemeral group
>>  created on illumos, trying to write to log information about GID domain
>>  of the newly created file, inheriting the ephemeral GID.
>>
>>  This patch reuses original illumos SGID code with exception that due to
>>  lack of ID mapping code on FreeBSD ephemeral GID will turn into GID_NOBODY
>>  by another ifdef inside zfs_fuid_map_id().
> 
> Hi mav@!
>     I was wondering, does this break ACL mappings with sticky bits for the group ID (or was it broken to begin with)? If the latter, does it make sense to file a bug/add a TODO comment?

I don't believe this change should have any visible results for native
FreeBSD pools.  It does change change handling of some pools coming from
illumos, but previous behavior in that case resulted in kernel panic, so
anything else is better, while full compatibility is impossible, since
FreeBSD has no kernel-side AD UID/GID mapping, used by illumos SMB.

Could you better describe what ACL mapping breakage you are talking about?

-- 
Alexander Motin

From owner-svn-src-all@freebsd.org  Fri Apr 19 18:34:13 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 335A21575277;
 Fri, 19 Apr 2019 18:34:13 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com
 [IPv6:2607:f8b0:4864:20::444])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id ADA3C8C06B;
 Fri, 19 Apr 2019 18:34:12 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pf1-x444.google.com with SMTP id h5so2901049pfo.0;
 Fri, 19 Apr 2019 11:34:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=IiR/cve4fomaxs81NIJVeW1YfCiYPHkUKWOkNdQsIL4=;
 b=LUPqoSeVim7kJs0tznW3XkhbGPIHDDEDavDoz0uCgvE8aYMnpZ2cyp+5lvazrDfxe+
 I+eFI+sN9elVuNAhO9oxvkEvxV3n1dFDJfvRZk/viJyxSqs3PfM4A1/YwngEmRCliBy5
 EA+7+PNE/tgXaWSpdIxqsh5pORhRme9V0l3SwW9AK4LifToD3y1m7narFeJ/N5VkodgT
 jS4DthauB7Bs0rk1MNDBmyeG8u9LFIiKoqn9U5IuzGF1i4Ycv2Hhle1VYYsFZFpiPyTG
 /cvMId22S72Z7rRJz/K7MuPk0D8n6hJv2o31CSayfJYj79+FR73/ckpuP1kN9u3C++rp
 CF8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=IiR/cve4fomaxs81NIJVeW1YfCiYPHkUKWOkNdQsIL4=;
 b=lSonsJwY5nBaBqtJBhjd2TyePsCe2SqP72SgCJ4w91/ICeRQy183vEK2i6o3k98TNV
 TPplW3o+KkrzIbBrhDn5DVckjPBoY4Y/Nqub14k5p/AZUhc9+TDpa3+NKHCBZA30hyUe
 u8WxMNAUmiHL9h01uFqv5dCm2FwV7m21+HDCmm+wtY4Kth9FwIXjsOws7T4cK7e+k3YO
 FKoNHIGTfX83pkoI/L1Kyihfflo8nJwEYerExViImNmMK3suF46CtAx5oqPSGOJgOP0B
 4PxrdixTptJYil402Cg126tX1ILi1B7JN22h5DWJ+FWGnWcpjWC8RViqb1GK6kViZM9E
 TS0Q==
X-Gm-Message-State: APjAAAXzQsQrlJk/e8f/maha8gbpFxcZpUAH40e/tviH7pwVQRIwYvru
 t+LPPt5+1n8ajY/5lDOvNCLzQhEouho=
X-Google-Smtp-Source: APXvYqzxDoxJozIbv6AU0IpG4HyaHRp65II0xIVhbToTTcMcnap/BqXOf7NW49vUrFjmfgk/yo8xJw==
X-Received: by 2002:a63:28f:: with SMTP id 137mr5356941pgc.377.1555698851406; 
 Fri, 19 Apr 2019 11:34:11 -0700 (PDT)
Received: from [192.168.20.22] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id h8sm2722108pgd.42.2019.04.19.11.34.10
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Apr 2019 11:34:10 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (1.0)
Subject: Re: svn commit: r346390 -
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
From: Enji Cooper 
X-Mailer: iPhone Mail (16E227)
In-Reply-To: <8d763a63-0915-d9f6-1b90-5e902f06ebe4@FreeBSD.org>
Date: Fri, 19 Apr 2019 11:34:10 -0700
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201904191544.x3JFijLe075969@repo.freebsd.org>
 <0F708A9C-D29D-466A-B541-06DB7127349E@gmail.com>
 <8d763a63-0915-d9f6-1b90-5e902f06ebe4@FreeBSD.org>
To: Alexander Motin 
X-Rspamd-Queue-Id: ADA3C8C06B
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.94 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.94)[-0.936,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 18:34:13 -0000


> On Apr 19, 2019, at 11:29, Alexander Motin  wrote:
>=20
> On 19.04.2019 14:09, Enji Cooper wrote:
>>> On Apr 19, 2019, at 08:44, Alexander Motin  wrote:
>>>=20
>>> Author: mav
>>> Date: Fri Apr 19 15:44:45 2019
>>> New Revision: 346390
>>> URL: https://svnweb.freebsd.org/changeset/base/346390
>>>=20
>>> Log:
>>> Change the way FreeBSD GID inheritance is hacked.
>>>=20
>>> I believe previous ifdef caused NULL dereference in later zfs_log_create=
()
>>> on attempt to create file inside directory belonging to ephemeral group
>>> created on illumos, trying to write to log information about GID domain
>>> of the newly created file, inheriting the ephemeral GID.
>>>=20
>>> This patch reuses original illumos SGID code with exception that due to
>>> lack of ID mapping code on FreeBSD ephemeral GID will turn into GID_NOBO=
DY
>>> by another ifdef inside zfs_fuid_map_id().
>>=20
>> Hi mav@!
>>    I was wondering, does this break ACL mappings with sticky bits for the=
 group ID (or was it broken to begin with)? If the latter, does it make sens=
e to file a bug/add a TODO comment?
>=20
> I don't believe this change should have any visible results for native
> FreeBSD pools.  It does change change handling of some pools coming from
> illumos, but previous behavior in that case resulted in kernel panic, so
> anything else is better, while full compatibility is impossible, since
> FreeBSD has no kernel-side AD UID/GID mapping, used by illumos SMB.
>=20
> Could you better describe what ACL mapping breakage you are talking about?=


    Ah... Yeah, it makes sense to leave this alone since it=E2=80=99s a miss=
ing ZFS on FreeBSD feature.
Thank you!
-Enji

PS I was likely messing up my interpretation of the stat field. I didn=E2=80=
=99t read the manpage yet.=

From owner-svn-src-all@freebsd.org  Fri Apr 19 19:45:00 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80B1A1576E2C;
 Fri, 19 Apr 2019 19:45:00 +0000 (UTC) (envelope-from imp@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 21B238EE42;
 Fri, 19 Apr 2019 19:45:00 +0000 (UTC) (envelope-from imp@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 EAE113114;
 Fri, 19 Apr 2019 19:44:59 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JJixtY005180;
 Fri, 19 Apr 2019 19:44:59 GMT (envelope-from imp@FreeBSD.org)
Received: (from imp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JJixAJ005179;
 Fri, 19 Apr 2019 19:44:59 GMT (envelope-from imp@FreeBSD.org)
Message-Id: <201904191944.x3JJixAJ005179@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org
 using -f
From: Warner Losh 
Date: Fri, 19 Apr 2019 19:44:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346407 - head/stand/efi/include
X-SVN-Group: head
X-SVN-Commit-Author: imp
X-SVN-Commit-Paths: head/stand/efi/include
X-SVN-Commit-Revision: 346407
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 21B238EE42
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.960,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 19:45:00 -0000

Author: imp
Date: Fri Apr 19 19:44:59 2019
New Revision: 346407
URL: https://svnweb.freebsd.org/changeset/base/346407

Log:
  Add define for CONST.
  
  Newer interfaces take CONST parameters, so define CONST to minimize
  differences between our headers and the standards docs.
  
  Differential Revision: https://reviews.freebsd.org/D19971

Modified:
  head/stand/efi/include/efidef.h

Modified: head/stand/efi/include/efidef.h
==============================================================================
--- head/stand/efi/include/efidef.h	Fri Apr 19 18:09:37 2019	(r346406)
+++ head/stand/efi/include/efidef.h	Fri Apr 19 19:44:59 2019	(r346407)
@@ -63,6 +63,7 @@ typedef VOID            *EFI_EVENT;
     #define IN
     #define OUT
     #define OPTIONAL
+    #define CONST const
 #endif
 
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 19:45:16 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 498AF1576E50;
 Fri, 19 Apr 2019 19:45:16 +0000 (UTC) (envelope-from imp@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 E1D148EF8F;
 Fri, 19 Apr 2019 19:45:15 +0000 (UTC) (envelope-from imp@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 B80553119;
 Fri, 19 Apr 2019 19:45:15 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JJjFYA005253;
 Fri, 19 Apr 2019 19:45:15 GMT (envelope-from imp@FreeBSD.org)
Received: (from imp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JJjF4g005252;
 Fri, 19 Apr 2019 19:45:15 GMT (envelope-from imp@FreeBSD.org)
Message-Id: <201904191945.x3JJjF4g005252@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org
 using -f
From: Warner Losh 
Date: Fri, 19 Apr 2019 19:45:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346408 - head/stand/efi/include
X-SVN-Group: head
X-SVN-Commit-Author: imp
X-SVN-Commit-Paths: head/stand/efi/include
X-SVN-Commit-Revision: 346408
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: E1D148EF8F
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.960,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 19:45:16 -0000

Author: imp
Date: Fri Apr 19 19:45:15 2019
New Revision: 346408
URL: https://svnweb.freebsd.org/changeset/base/346408

Log:
  Add UEFI definitions related to converting string to DEVICE_PATH
  
  Add definitions from UEFI 2.7 Errata B standards doc for converting a
  text string to a device path. Added clearly missing 'e' at the end of
  Device to resolve mismatch in that document in
  EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL element names.
  
  Differential Revision: https://reviews.freebsd.org/D19971

Modified:
  head/stand/efi/include/efidevp.h

Modified: head/stand/efi/include/efidevp.h
==============================================================================
--- head/stand/efi/include/efidevp.h	Fri Apr 19 19:44:59 2019	(r346407)
+++ head/stand/efi/include/efidevp.h	Fri Apr 19 19:45:15 2019	(r346408)
@@ -433,6 +433,9 @@ typedef union {
 #define	EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID				\
     { 0x8b843e20, 0x8132, 0x4852, { 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } }
 
+#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID				\
+    { 0x05c99a21, 0xc70f, 0x4ad2, { 0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } }
+
 INTERFACE_DECL(_EFI_DEVICE_PATH_PROTOCOL);
 
 typedef
@@ -455,6 +458,23 @@ typedef struct _EFI_DEVICE_PATH_TO_TEXT_PROTOCOL {
 	EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
 	EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
 } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
+
+typedef
+struct _EFI_DEVICE_PATH*
+(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (
+    IN CONST CHAR16* TextDeviceNode
+    );
+typedef
+struct _EFI_DEVICE_PATH*
+(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (
+    IN CONST CHAR16* TextDevicePath
+    );
+
+
+typedef struct _EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL {
+	EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode;
+	EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath;
+} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
 
 #pragma pack()
 

From owner-svn-src-all@freebsd.org  Fri Apr 19 19:45:21 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B31431576E7E;
 Fri, 19 Apr 2019 19:45:21 +0000 (UTC) (envelope-from imp@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 4AEE88EFD3;
 Fri, 19 Apr 2019 19:45:21 +0000 (UTC) (envelope-from imp@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 80AF3311A;
 Fri, 19 Apr 2019 19:45:20 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JJjKFt005308;
 Fri, 19 Apr 2019 19:45:20 GMT (envelope-from imp@FreeBSD.org)
Received: (from imp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JJjKuB005307;
 Fri, 19 Apr 2019 19:45:20 GMT (envelope-from imp@FreeBSD.org)
Message-Id: <201904191945.x3JJjKuB005307@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org
 using -f
From: Warner Losh 
Date: Fri, 19 Apr 2019 19:45:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346409 - in head/stand/efi: include libefi
X-SVN-Group: head
X-SVN-Commit-Author: imp
X-SVN-Commit-Paths: in head/stand/efi: include libefi
X-SVN-Commit-Revision: 346409
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 4AEE88EFD3
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.962,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 19:45:21 -0000

Author: imp
Date: Fri Apr 19 19:45:19 2019
New Revision: 346409
URL: https://svnweb.freebsd.org/changeset/base/346409

Log:
  Add wrapper functions to convert strings to EFI_DEVICE_PATH
  
  In anticipation of new functionality, create routines to convert char *
  and a CHAR16 * to a EFI_DEVICE_PATH
  	EFI_DEVICE_PATH *efi_name_to_devpath(const char *path);
  	EFI_DEVICE_PATH *efi_name_to_devpath16(CHAR16 *path);
  	void efi_devpath_free(EFI_DEVICE_PATH *dp);
  The first two return an EFI_DEVICE_PATH for the passed in paths. The
  third frees up the storage the first two return when the caller is
  done with it.
  
  Differential Revision: https://reviews.freebsd.org/D19971

Modified:
  head/stand/efi/include/efilib.h
  head/stand/efi/libefi/devpath.c

Modified: head/stand/efi/include/efilib.h
==============================================================================
--- head/stand/efi/include/efilib.h	Fri Apr 19 19:45:15 2019	(r346408)
+++ head/stand/efi/include/efilib.h	Fri Apr 19 19:45:19 2019	(r346409)
@@ -92,6 +92,9 @@ CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *);
 void efi_free_devpath_name(CHAR16 *);
 EFI_DEVICE_PATH *efi_devpath_to_media_path(EFI_DEVICE_PATH *);
 UINTN efi_devpath_length(EFI_DEVICE_PATH *);
+EFI_DEVICE_PATH *efi_name_to_devpath(const char *path);
+EFI_DEVICE_PATH *efi_name_to_devpath16(CHAR16 *path);
+void efi_devpath_free(EFI_DEVICE_PATH *dp);
 
 int efi_status_to_errno(EFI_STATUS);
 EFI_STATUS errno_to_efi_status(int errno);

Modified: head/stand/efi/libefi/devpath.c
==============================================================================
--- head/stand/efi/libefi/devpath.c	Fri Apr 19 19:45:15 2019	(r346408)
+++ head/stand/efi/libefi/devpath.c	Fri Apr 19 19:45:19 2019	(r346409)
@@ -28,12 +28,15 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 
 static EFI_GUID ImageDevicePathGUID =
     EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID;
 static EFI_GUID DevicePathGUID = DEVICE_PATH_PROTOCOL;
 static EFI_GUID DevicePathToTextGUID = EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID;
-static EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *textProtocol;
+static EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *toTextProtocol;
+static EFI_GUID DevicePathFromTextGUID = EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID;
+static EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *fromTextProtocol;
 
 EFI_DEVICE_PATH *
 efi_lookup_image_devpath(EFI_HANDLE handle)
@@ -63,22 +66,20 @@ efi_lookup_devpath(EFI_HANDLE handle)
 CHAR16 *
 efi_devpath_name(EFI_DEVICE_PATH *devpath)
 {
-	static int once = 1;
 	EFI_STATUS status;
 
 	if (devpath == NULL)
 		return (NULL);
-	if (once) {
+	if (toTextProtocol == NULL) {
 		status = BS->LocateProtocol(&DevicePathToTextGUID, NULL,
-		    (VOID **)&textProtocol);
+		    (VOID **)&toTextProtocol);
 		if (EFI_ERROR(status))
-			textProtocol = NULL;
-		once = 0;
+			toTextProtocol = NULL;
 	}
-	if (textProtocol == NULL)
+	if (toTextProtocol == NULL)
 		return (NULL);
 
-	return (textProtocol->ConvertDevicePathToText(devpath, TRUE, TRUE));
+	return (toTextProtocol->ConvertDevicePathToText(devpath, TRUE, TRUE));
 }
 
 void
@@ -86,6 +87,46 @@ efi_free_devpath_name(CHAR16 *text)
 {
 
 	BS->FreePool(text);
+}
+
+EFI_DEVICE_PATH *
+efi_name_to_devpath(const char *path)
+{
+	EFI_DEVICE_PATH *devpath;
+	CHAR16 *uv;
+	size_t ul;
+
+	uv = NULL;
+	if (utf8_to_ucs2(path, &uv, &ul) != 0)
+		return (NULL);
+	devpath = efi_name_to_devpath16(uv);
+	free(uv);
+	return (devpath);
+}
+
+EFI_DEVICE_PATH *
+efi_name_to_devpath16(CHAR16 *path)
+{
+	EFI_STATUS status;
+
+	if (path == NULL)
+		return (NULL);
+	if (fromTextProtocol == NULL) {
+		status = BS->LocateProtocol(&DevicePathFromTextGUID, NULL,
+		    (VOID **)&fromTextProtocol);
+		if (EFI_ERROR(status))
+			fromTextProtocol = NULL;
+	}
+	if (fromTextProtocol == NULL)
+		return (NULL);
+
+	return (fromTextProtocol->ConvertTextToDevicePath(path));
+}
+
+void efi_devpath_free(EFI_DEVICE_PATH *devpath)
+{
+
+	BS->FreePool(devpath);
 }
 
 EFI_DEVICE_PATH *

From owner-svn-src-all@freebsd.org  Fri Apr 19 20:05:50 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3C48157762E;
 Fri, 19 Apr 2019 20:05:49 +0000 (UTC) (envelope-from cem@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 85D068FD2D;
 Fri, 19 Apr 2019 20:05:49 +0000 (UTC) (envelope-from cem@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 73E093490;
 Fri, 19 Apr 2019 20:05:49 +0000 (UTC) (envelope-from cem@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JK5nmY015807;
 Fri, 19 Apr 2019 20:05:49 GMT (envelope-from cem@FreeBSD.org)
Received: (from cem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JK5mhm015801;
 Fri, 19 Apr 2019 20:05:48 GMT (envelope-from cem@FreeBSD.org)
Message-Id: <201904192005.x3JK5mhm015801@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org
 using -f
From: Conrad Meyer 
Date: Fri, 19 Apr 2019 20:05:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346410 - in head: lib/libc/gen share/man/man9 sys/conf
 sys/libkern sys/sys
X-SVN-Group: head
X-SVN-Commit-Author: cem
X-SVN-Commit-Paths: in head: lib/libc/gen share/man/man9 sys/conf sys/libkern
 sys/sys
X-SVN-Commit-Revision: 346410
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 85D068FD2D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.962,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 20:05:50 -0000

Author: cem
Date: Fri Apr 19 20:05:47 2019
New Revision: 346410
URL: https://svnweb.freebsd.org/changeset/base/346410

Log:
  libkern: Bring in arc4random_uniform(9) from libc
  
  It is a useful arc4random wrapper in the kernel for much the same reasons as
  in userspace.  Move the source to libkern (because kernel build is
  restricted to sys/, but userspace can include any file it likes) and build
  kernel and libc versions from the same source file.
  
  Copy the documentation from arc4random_uniform(3) to the section 9 page.
  
  While here, add missing arc4random_buf(9) symlink.
  
  Sponsored by:	Dell EMC Isilon

Added:
  head/sys/libkern/arc4random_uniform.c
     - copied, changed from r346409, head/lib/libc/gen/arc4random_uniform.c
Deleted:
  head/lib/libc/gen/arc4random_uniform.c
Modified:
  head/lib/libc/gen/Makefile.inc
  head/share/man/man9/Makefile
  head/share/man/man9/random.9
  head/sys/conf/files
  head/sys/sys/libkern.h

Modified: head/lib/libc/gen/Makefile.inc
==============================================================================
--- head/lib/libc/gen/Makefile.inc	Fri Apr 19 19:45:19 2019	(r346409)
+++ head/lib/libc/gen/Makefile.inc	Fri Apr 19 20:05:47 2019	(r346410)
@@ -3,6 +3,7 @@
 
 # machine-independent gen sources
 .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen
+.PATH: ${SRCTOP}/sys/libkern
 
 CONFS=	shells
 

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Fri Apr 19 19:45:19 2019	(r346409)
+++ head/share/man/man9/Makefile	Fri Apr 19 20:05:47 2019	(r346410)
@@ -1668,6 +1668,8 @@ MLINKS+=psignal.9 gsignal.9 \
 	psignal.9 tdsignal.9
 MLINKS+=random.9 arc4rand.9 \
 	random.9 arc4random.9 \
+	random.9 arc4random_buf.9 \
+	random.9 arc4random_uniform.9 \
 	random.9 is_random_seeded.9 \
 	random.9 read_random.9 \
 	random.9 read_random_uio.9 \

Modified: head/share/man/man9/random.9
==============================================================================
--- head/share/man/man9/random.9	Fri Apr 19 19:45:19 2019	(r346409)
+++ head/share/man/man9/random.9	Fri Apr 19 20:05:47 2019	(r346410)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\" "
-.Dd April 16, 2019
+.Dd April 19, 2019
 .Dt RANDOM 9
 .Os
 .Sh NAME
@@ -45,6 +45,8 @@
 .Fn arc4random "void"
 .Ft void
 .Fn arc4random_buf "void *ptr" "size_t len"
+.Ft uint32_t
+.Fn arc4random_uniform "uint32_t upper_bound"
 .Ft void
 .Fn arc4rand "void *ptr" "u_int length" "int reseed"
 .Pp
@@ -79,6 +81,15 @@ fills
 with
 .Fa len
 bytes of random data.
+.Pp
+.Fn arc4random_uniform
+will return a single 32-bit value, uniformly distributed but less than
+.Fa upper_bound .
+This is recommended over constructions like
+.Dq Li arc4random() % upper_bound
+as it avoids "modulo bias" when the upper bound is not a power of two.
+In the worst case, this function may consume multiple iterations
+to ensure uniformity.
 .Pp
 The
 .Fn arc4rand

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Fri Apr 19 19:45:19 2019	(r346409)
+++ head/sys/conf/files	Fri Apr 19 20:05:47 2019	(r346410)
@@ -3985,6 +3985,7 @@ kgssapi/gsstest.c		optional kgssapi_debug
 # the file should be moved to conf/files. from here.
 #
 libkern/arc4random.c		standard
+libkern/arc4random_uniform.c	standard
 crypto/chacha20/chacha.c	standard
 libkern/asprintf.c		standard
 libkern/bcd.c			standard

Copied and modified: head/sys/libkern/arc4random_uniform.c (from r346409, head/lib/libc/gen/arc4random_uniform.c)
==============================================================================
--- head/lib/libc/gen/arc4random_uniform.c	Fri Apr 19 19:45:19 2019	(r346409, copy source)
+++ head/sys/libkern/arc4random_uniform.c	Fri Apr 19 20:05:47 2019	(r346410)
@@ -19,7 +19,11 @@
  */
 
 #include 
+#ifdef _KERNEL
+#include 
+#else
 #include 
+#endif
 
 /*
  * Calculate a uniformly distributed random number less than upper_bound

Modified: head/sys/sys/libkern.h
==============================================================================
--- head/sys/sys/libkern.h	Fri Apr 19 19:45:19 2019	(r346409)
+++ head/sys/sys/libkern.h	Fri Apr 19 20:05:47 2019	(r346410)
@@ -128,6 +128,7 @@ struct malloc_type;
 uint32_t arc4random(void);
 void	 arc4random_buf(void *, size_t);
 void	 arc4rand(void *, u_int, int);
+uint32_t arc4random_uniform(uint32_t);
 int	 timingsafe_bcmp(const void *, const void *, size_t);
 void	*bsearch(const void *, const void *, size_t,
 	    size_t, int (*)(const void *, const void *));

From owner-svn-src-all@freebsd.org  Fri Apr 19 20:06:23 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34969157768D;
 Fri, 19 Apr 2019 20:06:23 +0000 (UTC) (envelope-from cem@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 C7ACF8FE67;
 Fri, 19 Apr 2019 20:06:22 +0000 (UTC) (envelope-from cem@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 A0B243491;
 Fri, 19 Apr 2019 20:06:22 +0000 (UTC) (envelope-from cem@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JK6M4k015871;
 Fri, 19 Apr 2019 20:06:22 GMT (envelope-from cem@FreeBSD.org)
Received: (from cem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JK6MNf015870;
 Fri, 19 Apr 2019 20:06:22 GMT (envelope-from cem@FreeBSD.org)
Message-Id: <201904192006.x3JK6MNf015870@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org
 using -f
From: Conrad Meyer 
Date: Fri, 19 Apr 2019 20:06:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346411 - head/sys/sys
X-SVN-Group: head
X-SVN-Commit-Author: cem
X-SVN-Commit-Paths: head/sys/sys
X-SVN-Commit-Revision: 346411
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: C7ACF8FE67
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.960,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 20:06:23 -0000

Author: cem
Date: Fri Apr 19 20:06:22 2019
New Revision: 346411
URL: https://svnweb.freebsd.org/changeset/base/346411

Log:
  Bump __FreeBSD_version after r346410

Modified:
  head/sys/sys/param.h

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Fri Apr 19 20:05:47 2019	(r346410)
+++ head/sys/sys/param.h	Fri Apr 19 20:06:22 2019	(r346411)
@@ -60,7 +60,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300020	/* Master, propagated to newvers */
+#define __FreeBSD_version 1300021	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

From owner-svn-src-all@freebsd.org  Fri Apr 19 20:08:46 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72E2D1577748;
 Fri, 19 Apr 2019 20:08:46 +0000 (UTC) (envelope-from cem@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 14A0A68005;
 Fri, 19 Apr 2019 20:08:46 +0000 (UTC) (envelope-from cem@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 05FC43494;
 Fri, 19 Apr 2019 20:08:46 +0000 (UTC) (envelope-from cem@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JK8jnL016015;
 Fri, 19 Apr 2019 20:08:45 GMT (envelope-from cem@FreeBSD.org)
Received: (from cem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JK8jbD016014;
 Fri, 19 Apr 2019 20:08:45 GMT (envelope-from cem@FreeBSD.org)
Message-Id: <201904192008.x3JK8jbD016014@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org
 using -f
From: Conrad Meyer 
Date: Fri, 19 Apr 2019 20:08:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346412 - head/sys/conf
X-SVN-Group: head
X-SVN-Commit-Author: cem
X-SVN-Commit-Paths: head/sys/conf
X-SVN-Commit-Revision: 346412
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 14A0A68005
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.960,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 20:08:46 -0000

Author: cem
Date: Fri Apr 19 20:08:45 2019
New Revision: 346412
URL: https://svnweb.freebsd.org/changeset/base/346412

Log:
  kernel build: Disable unhelpful GCC warning (tripped after r346352)
  
  -Wformat-zero-length does not highlight any particularly wrong code and it
  is especially meaningless for device_printf().  Turn it off entirely to
  remove a source of false positives.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk	Fri Apr 19 20:06:22 2019	(r346411)
+++ head/sys/conf/kern.mk	Fri Apr 19 20:08:45 2019	(r346412)
@@ -61,7 +61,8 @@ CWARNEXTRA?=	-Wno-error=address				\
 CWARNEXTRA+=	-Wno-error=misleading-indentation		\
 		-Wno-error=nonnull-compare			\
 		-Wno-error=shift-overflow			\
-		-Wno-error=tautological-compare
+		-Wno-error=tautological-compare			\
+		-Wno-format-zero-length
 .endif
 .if ${COMPILER_VERSION} >= 70200
 CWARNEXTRA+=	-Wno-error=memset-elt-size

From owner-svn-src-all@freebsd.org  Fri Apr 19 20:09:14 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E5A01577787;
 Fri, 19 Apr 2019 20:09:14 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 D5A666814C;
 Fri, 19 Apr 2019 20:09:13 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0A6D3495;
 Fri, 19 Apr 2019 20:09:13 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JK9DqW016081;
 Fri, 19 Apr 2019 20:09:13 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JK9D9G016080;
 Fri, 19 Apr 2019 20:09:13 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201904192009.x3JK9D9G016080@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
 using -f
From: Dimitry Andric 
Date: Fri, 19 Apr 2019 20:09:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346413 - stable/11/lib/clang/libllvm
X-SVN-Group: stable-11
X-SVN-Commit-Author: dim
X-SVN-Commit-Paths: stable/11/lib/clang/libllvm
X-SVN-Commit-Revision: 346413
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: D5A666814C
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.958,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 20:09:14 -0000

Author: dim
Date: Fri Apr 19 20:09:13 2019
New Revision: 346413
URL: https://svnweb.freebsd.org/changeset/base/346413

Log:
  Fix minor mismerge in r346296, where one file for the LLVM BPF target
  was missing.  This would lead to link errors when attempting to build
  clang and llvm executables.
  
  Direct commit to stable/11, since head and stable/12 have correct
  libllvm Makefiles.

Modified:
  stable/11/lib/clang/libllvm/Makefile

Modified: stable/11/lib/clang/libllvm/Makefile
==============================================================================
--- stable/11/lib/clang/libllvm/Makefile	Fri Apr 19 20:08:45 2019	(r346412)
+++ stable/11/lib/clang/libllvm/Makefile	Fri Apr 19 20:09:13 2019	(r346413)
@@ -1014,6 +1014,7 @@ SRCS_MIN+=	Target/BPF/BPFMCInstLower.cpp
 SRCS_MIN+=	Target/BPF/BPFMIChecking.cpp
 SRCS_MIN+=	Target/BPF/BPFMIPeephole.cpp
 SRCS_MIN+=	Target/BPF/BPFRegisterInfo.cpp
+SRCS_MIN+=	Target/BPF/BPFSelectionDAGInfo.cpp
 SRCS_MIN+=	Target/BPF/BPFSubtarget.cpp
 SRCS_MIN+=	Target/BPF/BPFTargetMachine.cpp
 SRCS_MIN+=	Target/BPF/BTFDebug.cpp

From owner-svn-src-all@freebsd.org  Fri Apr 19 20:22:23 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DAC41577C66;
 Fri, 19 Apr 2019 20:22:23 +0000 (UTC) (envelope-from imp@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 9E0C86A03A;
 Fri, 19 Apr 2019 20:22:22 +0000 (UTC) (envelope-from imp@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 711B53889;
 Fri, 19 Apr 2019 20:22:22 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JKMMhK025742;
 Fri, 19 Apr 2019 20:22:22 GMT (envelope-from imp@FreeBSD.org)
Received: (from imp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JKMM3U025741;
 Fri, 19 Apr 2019 20:22:22 GMT (envelope-from imp@FreeBSD.org)
Message-Id: <201904192022.x3JKMM3U025741@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org
 using -f
From: Warner Losh 
Date: Fri, 19 Apr 2019 20:22:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346414 - stable/12/sys/cam/scsi
X-SVN-Group: stable-12
X-SVN-Commit-Author: imp
X-SVN-Commit-Paths: stable/12/sys/cam/scsi
X-SVN-Commit-Revision: 346414
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 9E0C86A03A
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.958,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 20:22:23 -0000

Author: imp
Date: Fri Apr 19 20:22:21 2019
New Revision: 346414
URL: https://svnweb.freebsd.org/changeset/base/346414

Log:
  MFC: 342657, 345025
  
  Quirks for Chipfancier chips. Their READ CAPACITY 10 and READ CAPACITY
  16 values differ, and the default of using RC16 gets the improper one.

Modified:
  stable/12/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/12/sys/cam/scsi/scsi_da.c	Fri Apr 19 20:09:13 2019	(r346413)
+++ stable/12/sys/cam/scsi/scsi_da.c	Fri Apr 19 20:22:21 2019	(r346414)
@@ -858,6 +858,15 @@ static struct da_quirk_entry da_quirk_table[] =
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "I-O DATA", "USB Flash Disk*",
 		 "*"}, /*quirks*/ DA_Q_NO_RC16
 	},
+	{
+		/*
+		 * SLC CHIPFANCIER USB drives
+		 * PR: usb/234503 (RC10 right, RC16 wrong)
+		 * 16GB, 32GB and 128GB confirmed to have same issue
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "*SLC", "CHIPFANCIER",
+		 "*"}, /*quirks*/ DA_Q_NO_RC16
+       },
 	/* ATA/SATA devices over SAS/USB/... */
 	{
 		/* Hitachi Advanced Format (4k) drives */

From owner-svn-src-all@freebsd.org  Fri Apr 19 20:23:40 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6F8E1577EB7;
 Fri, 19 Apr 2019 20:23:40 +0000 (UTC) (envelope-from imp@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 7731C6A20F;
 Fri, 19 Apr 2019 20:23:40 +0000 (UTC) (envelope-from imp@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 EE3A739B4;
 Fri, 19 Apr 2019 20:23:39 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JKNd8Q026597;
 Fri, 19 Apr 2019 20:23:39 GMT (envelope-from imp@FreeBSD.org)
Received: (from imp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JKNdQL026596;
 Fri, 19 Apr 2019 20:23:39 GMT (envelope-from imp@FreeBSD.org)
Message-Id: <201904192023.x3JKNdQL026596@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org
 using -f
From: Warner Losh 
Date: Fri, 19 Apr 2019 20:23:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346415 - stable/11/sys/cam/scsi
X-SVN-Group: stable-11
X-SVN-Commit-Author: imp
X-SVN-Commit-Paths: stable/11/sys/cam/scsi
X-SVN-Commit-Revision: 346415
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 7731C6A20F
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.958,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 20:23:41 -0000

Author: imp
Date: Fri Apr 19 20:23:39 2019
New Revision: 346415
URL: https://svnweb.freebsd.org/changeset/base/346415

Log:
  MFC: 342657, 345025
  
  Quirks for Chipfancier chips. Their READ CAPACITY 10 and READ CAPACITY
  16 values differ, and the default of using RC16	gets the improper one.
  
  PR:		234503

Modified:
  stable/11/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/11/sys/cam/scsi/scsi_da.c	Fri Apr 19 20:22:21 2019	(r346414)
+++ stable/11/sys/cam/scsi/scsi_da.c	Fri Apr 19 20:23:39 2019	(r346415)
@@ -836,6 +836,15 @@ static struct da_quirk_entry da_quirk_table[] =
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "I-O DATA", "USB Flash Disk*",
 		 "*"}, /*quirks*/ DA_Q_NO_RC16
 	},
+	{
+		/*
+		 * SLC CHIPFANCIER USB drives
+		 * PR: usb/234503 (RC10 right, RC16 wrong)
+		 * 16GB, 32GB and 128GB confirmed to have same issue
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "*SLC", "CHIPFANCIER",
+		 "*"}, /*quirks*/ DA_Q_NO_RC16
+       },
 	/* ATA/SATA devices over SAS/USB/... */
 	{
 		/* Hitachi Advanced Format (4k) drives */

From owner-svn-src-all@freebsd.org  Fri Apr 19 20:29:50 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 425141578037;
 Fri, 19 Apr 2019 20:29:50 +0000 (UTC) (envelope-from bde@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 DA9086A563;
 Fri, 19 Apr 2019 20:29:49 +0000 (UTC) (envelope-from bde@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 B0FE839BA;
 Fri, 19 Apr 2019 20:29:49 +0000 (UTC) (envelope-from bde@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JKTnV2026913;
 Fri, 19 Apr 2019 20:29:49 GMT (envelope-from bde@FreeBSD.org)
Received: (from bde@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JKTn8R026912;
 Fri, 19 Apr 2019 20:29:49 GMT (envelope-from bde@FreeBSD.org)
Message-Id: <201904192029.x3JKTn8R026912@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org
 using -f
From: Bruce Evans 
Date: Fri, 19 Apr 2019 20:29:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346416 - head/lib/libvgl
X-SVN-Group: head
X-SVN-Commit-Author: bde
X-SVN-Commit-Paths: head/lib/libvgl
X-SVN-Commit-Revision: 346416
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: DA9086A563
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 20:29:50 -0000

Author: bde
Date: Fri Apr 19 20:29:49 2019
New Revision: 346416
URL: https://svnweb.freebsd.org/changeset/base/346416

Log:
  Fix copying of overlapping bitmaps.  The cases of copying within the
  screen bitmap and within a single MEMBUF were broken when first source
  line is before the first destination line and the sub-bitmaps overlap.
  
  The fix just copies horizontal lines in reverse order when the first
  source line is before the first destination line.  This switches
  directions unnecessarily in some cases, but the switch is about as
  fast as doing a precise detection of overlaps.  When the first lines
  are the same, there can be undetected overlap in the horizontal
  direction.  The old code already handles this mostly accidentally by
  using bcopy() for MEMBUFs and by copying through a temporary buffer
  for the screen bitmap although the latter is sub-optimal in direct
  modes.

Modified:
  head/lib/libvgl/bitmap.c

Modified: head/lib/libvgl/bitmap.c
==============================================================================
--- head/lib/libvgl/bitmap.c	Fri Apr 19 20:23:39 2019	(r346415)
+++ head/lib/libvgl/bitmap.c	Fri Apr 19 20:29:49 2019	(r346416)
@@ -269,7 +269,7 @@ int
 __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
 	      VGLBitmap *dst, int dstx, int dsty, int width, int hight)
 {
-  int srcline, dstline;
+  int srcline, dstline, yend, yextra, ystep;
 
   if (srcx>src->VXsize || srcy>src->VYsize
 	|| dstx>dst->VXsize || dsty>dst->VYsize)
@@ -296,8 +296,17 @@ __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
      hight=dst->VYsize-dsty;
   if (width < 0 || hight < 0)
      return -1;
+  yend = srcy + hight;
+  yextra = 0;
+  ystep = 1;
+  if (src->Bitmap == dst->Bitmap && srcy < dsty) {
+    yend = srcy;
+    yextra = hight - 1;
+    ystep = -1;
+  }
   if (src->Type == MEMBUF) {
-    for (srcline=srcy, dstline=dsty; srclineBitmap+(srcline*src->VXsize+srcx)*dst->PixelBytes);
     }
@@ -319,7 +328,8 @@ __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
     } else {
       p = buffer;
     }
-    for (srcline=srcy, dstline=dsty; srcline
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34F171578DEC;
 Fri, 19 Apr 2019 21:05:00 +0000 (UTC)
 (envelope-from o.hartmann@walstatt.org)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.18])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 981546B99C;
 Fri, 19 Apr 2019 21:04:59 +0000 (UTC)
 (envelope-from o.hartmann@walstatt.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1555707891;
 bh=sOoCgq4cAk+QTtkqk8mwqA8Aneoif721FeS3Sy0J1MM=;
 h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References;
 b=laf68ydrIesRPRfO/BRlNBpJ/BPW3TSP9iDyIfHlN7dlGiRNsDkM9YgvKGA3sSh3i
 9Yv2hdBPmbmj9KbiMD52n8TY4yM6A6Zwadm4kwwctmrHo5J4DMno/6BryyxfREyeHG
 lNecC8Df1J2v/N8wFJeOG32259bMomWyC+rSMZV0=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from thor.intern.walstatt.dynvpn.de ([77.13.145.114]) by
 mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id
 0MbgKD-1had3u2hNN-00Izcd; Fri, 19 Apr 2019 22:59:39 +0200
Date: Fri, 19 Apr 2019 22:59:04 +0200
From: "O. Hartmann" 
To: Conrad Meyer 
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r346410 - in head: lib/libc/gen share/man/man9
 sys/conf sys/libkern sys/sys
Message-ID: <20190419225931.1311745d@thor.intern.walstatt.dynvpn.de>
In-Reply-To: <201904192005.x3JK5mhm015801@repo.freebsd.org>
References: <201904192005.x3JK5mhm015801@repo.freebsd.org>
Organization: WALSTATT
User-Agent: OutScare 3.1415926
X-Operating-System: ImNotAnOperatingSystem 3.141592527
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
X-Provags-ID: V03:K1:/5BPKC2jCC9/Ud/P8wD77VTyeLhqlYjJLiHEqfjOyb7xK2yb6Ql
 SizUxi2B0L8/3jOQOzUbGi8E3jREoRos+6KsUTTwlE2I4S6wqUFtA+W8X2tlRvFZGnVpiMk
 Tc5YpWq/OR8vFx2vl0EixI8VcsxTS+y54JJFTmL2QyOX/u7KTsGmh36HRgJHV24HpYDg4AM
 +HswBpBzVEzcH08muZygQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:9rWY2u0C+3Q=:LGzGi4URDxe4nTDwH4mWGL
 JRBhtCdoYk/+/j8AEYEIsSn2sMvdJxkD7VhBgcuHNOPkDpe0WbMj+yHAj50LrosNEtqP59KZC
 IV2ePOGHQNCC2OrzHiBRx1BD7U9ju68/p2WV1WuL58671Dwq9LnSjsgXd381l8zbgvaUyPDGG
 ci868/lkztF3Yz/++7Vc4aAdFBdn8+APZKDIMZnwCo+uU9nh+aeGZw41hHQ0esJj1kyXfHsbZ
 8UsDYregW/QnhJukvJI3cq1LMoFLW3IMxEkisl8j7zFZbExOGwMuvprqpxiwxAF3FTk9Di5+I
 RLWTVRODzTqdmJO6CW7rts1V9Wc86nV9TOG8bknCBKdAy/+2Xjqnab7tk2Ahz6VPdkAxqwUlQ
 7saQRHKufN/voUraH8I9hyQzqEFM5SIvQvxbkAA3lHl4nu7fo+ymbJc3cPp/wMbxhOrexIzUu
 K6zrCb3Bkjrt5CP30nf16RDCuEXI4RhOqqZ3J8Dh+bVx07dR2LpJtdMTMiP3igdVAhuRz/gbJ
 pE9Jd8kS07jUq13zX/lLckg581O2EYrKqsevfHTIqqiD0dYYufZgubmibR1vtzo+GvUFfbdMz
 nxT3hCrQeq0k952M+nvOhgW0fGXLha2D4N/PMRfY3gLihSm8deonvIuOn1t1AHYy6J2CisH7v
 DNTiZBbROtqtWVY7WaQ0AZw2n1AjoG6VclTrixYlSmWlQXVoYdW041odZvRqoQVwYJFKcr1n8
 /b4jVWYKHmawwMpKQbGt8zHt0ALOPm8Ipuq8qF0sfM37PXph1va4i8YiT6m0m6Nzh3GoxSxpP
 4k52NoKTh7de5z1blf5dlcB1VYyCnmiwbSzTeg+qvW98mR6DQ0A8xnbfTiLkccDy1G3Opo24i
 BJxXieSIPVUyW26D0as8z6e+s0zRUDPgNZZN4V+A1LRUeiKP2NnUk6LyemrtDOl1+Vxk9IU7l
 o4YUVuJyv5A==
X-Rspamd-Queue-Id: 981546B99C
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.94 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.94)[-0.942,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 21:05:00 -0000

LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIEZy
aSwgMTkgQXByIDIwMTkgMjA6MDU6NDggKzAwMDAgKFVUQykNCkNvbnJhZCBNZXllciA8Y2VtQEZy
ZWVCU0Qub3JnPiBzY2hyaWViOg0KDQo+IEF1dGhvcjogY2VtDQo+IERhdGU6IEZyaSBBcHIgMTkg
MjA6MDU6NDcgMjAxOQ0KPiBOZXcgUmV2aXNpb246IDM0NjQxMA0KPiBVUkw6IGh0dHBzOi8vc3Zu
d2ViLmZyZWVic2Qub3JnL2NoYW5nZXNldC9iYXNlLzM0NjQxMA0KPiANCj4gTG9nOg0KPiAgIGxp
Ymtlcm46IEJyaW5nIGluIGFyYzRyYW5kb21fdW5pZm9ybSg5KSBmcm9tIGxpYmMNCj4gICANCj4g
ICBJdCBpcyBhIHVzZWZ1bCBhcmM0cmFuZG9tIHdyYXBwZXIgaW4gdGhlIGtlcm5lbCBmb3IgbXVj
aCB0aGUgc2FtZSByZWFzb25zIGFzDQo+ICAgaW4gdXNlcnNwYWNlLiAgTW92ZSB0aGUgc291cmNl
IHRvIGxpYmtlcm4gKGJlY2F1c2Uga2VybmVsIGJ1aWxkIGlzDQo+ICAgcmVzdHJpY3RlZCB0byBz
eXMvLCBidXQgdXNlcnNwYWNlIGNhbiBpbmNsdWRlIGFueSBmaWxlIGl0IGxpa2VzKSBhbmQgYnVp
bGQNCj4gICBrZXJuZWwgYW5kIGxpYmMgdmVyc2lvbnMgZnJvbSB0aGUgc2FtZSBzb3VyY2UgZmls
ZS4NCj4gICANCj4gICBDb3B5IHRoZSBkb2N1bWVudGF0aW9uIGZyb20gYXJjNHJhbmRvbV91bmlm
b3JtKDMpIHRvIHRoZSBzZWN0aW9uIDkgcGFnZS4NCj4gICANCj4gICBXaGlsZSBoZXJlLCBhZGQg
bWlzc2luZyBhcmM0cmFuZG9tX2J1Zig5KSBzeW1saW5rLg0KPiAgIA0KPiAgIFNwb25zb3JlZCBi
eToJRGVsbCBFTUMgSXNpbG9uDQo+IA0KPiBBZGRlZDoNCj4gICBoZWFkL3N5cy9saWJrZXJuL2Fy
YzRyYW5kb21fdW5pZm9ybS5jDQo+ICAgICAgLSBjb3BpZWQsIGNoYW5nZWQgZnJvbSByMzQ2NDA5
LCBoZWFkL2xpYi9saWJjL2dlbi9hcmM0cmFuZG9tX3VuaWZvcm0uYw0KPiBEZWxldGVkOg0KPiAg
IGhlYWQvbGliL2xpYmMvZ2VuL2FyYzRyYW5kb21fdW5pZm9ybS5jDQo+IE1vZGlmaWVkOg0KPiAg
IGhlYWQvbGliL2xpYmMvZ2VuL01ha2VmaWxlLmluYw0KPiAgIGhlYWQvc2hhcmUvbWFuL21hbjkv
TWFrZWZpbGUNCj4gICBoZWFkL3NoYXJlL21hbi9tYW45L3JhbmRvbS45DQo+ICAgaGVhZC9zeXMv
Y29uZi9maWxlcw0KPiAgIGhlYWQvc3lzL3N5cy9saWJrZXJuLmgNCj4gDQo+IE1vZGlmaWVkOiBo
ZWFkL2xpYi9saWJjL2dlbi9NYWtlZmlsZS5pbmMNCj4gPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQo+
IC0tLSBoZWFkL2xpYi9saWJjL2dlbi9NYWtlZmlsZS5pbmMJRnJpIEFwciAxOSAxOTo0NToxOSAy
MDE5CShyMzQ2NDA5KQ0KPiArKysgaGVhZC9saWIvbGliYy9nZW4vTWFrZWZpbGUuaW5jCUZyaSBB
cHIgMTkgMjA6MDU6NDcgMjAxOQkocjM0NjQxMCkNCj4gQEAgLTMsNiArMyw3IEBADQo+ICANCj4g
ICMgbWFjaGluZS1pbmRlcGVuZGVudCBnZW4gc291cmNlcw0KPiAgLlBBVEg6ICR7TElCQ19TUkNU
T1B9LyR7TElCQ19BUkNIfS9nZW4gJHtMSUJDX1NSQ1RPUH0vZ2VuDQo+ICsuUEFUSDogJHtTUkNU
T1B9L3N5cy9saWJrZXJuDQo+ICANCj4gIENPTkZTPQlzaGVsbHMNCj4gIA0KPiANCj4gTW9kaWZp
ZWQ6IGhlYWQvc2hhcmUvbWFuL21hbjkvTWFrZWZpbGUNCj4gPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
DQo+IC0tLSBoZWFkL3NoYXJlL21hbi9tYW45L01ha2VmaWxlCUZyaSBBcHIgMTkgMTk6NDU6MTkg
MjAxOQkocjM0NjQwOSkNCj4gKysrIGhlYWQvc2hhcmUvbWFuL21hbjkvTWFrZWZpbGUJRnJpIEFw
ciAxOSAyMDowNTo0NyAyMDE5CShyMzQ2NDEwKQ0KPiBAQCAtMTY2OCw2ICsxNjY4LDggQEAgTUxJ
TktTKz1wc2lnbmFsLjkgZ3NpZ25hbC45IFwNCj4gIAlwc2lnbmFsLjkgdGRzaWduYWwuOQ0KPiAg
TUxJTktTKz1yYW5kb20uOSBhcmM0cmFuZC45IFwNCj4gIAlyYW5kb20uOSBhcmM0cmFuZG9tLjkg
XA0KPiArCXJhbmRvbS45IGFyYzRyYW5kb21fYnVmLjkgXA0KPiArCXJhbmRvbS45IGFyYzRyYW5k
b21fdW5pZm9ybS45IFwNCj4gIAlyYW5kb20uOSBpc19yYW5kb21fc2VlZGVkLjkgXA0KPiAgCXJh
bmRvbS45IHJlYWRfcmFuZG9tLjkgXA0KPiAgCXJhbmRvbS45IHJlYWRfcmFuZG9tX3Vpby45IFwN
Cj4gDQo+IE1vZGlmaWVkOiBoZWFkL3NoYXJlL21hbi9tYW45L3JhbmRvbS45DQo+ID09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PQ0KPiAtLS0gaGVhZC9zaGFyZS9tYW4vbWFuOS9yYW5kb20uOQlGcmkgQXBy
IDE5IDE5OjQ1OjE5IDIwMTkJKHIzNDY0MDkpDQo+ICsrKyBoZWFkL3NoYXJlL21hbi9tYW45L3Jh
bmRvbS45CUZyaSBBcHIgMTkgMjA6MDU6NDcgMjAxOQkocjM0NjQxMCkNCj4gQEAgLTI2LDcgKzI2
LDcgQEANCj4gIC5cIg0KPiAgLlwiICRGcmVlQlNEJA0KPiAgLlwiICINCj4gLS5EZCBBcHJpbCAx
NiwgMjAxOQ0KPiArLkRkIEFwcmlsIDE5LCAyMDE5DQo+ICAuRHQgUkFORE9NIDkNCj4gIC5Pcw0K
PiAgLlNoIE5BTUUNCj4gQEAgLTQ1LDYgKzQ1LDggQEANCj4gIC5GbiBhcmM0cmFuZG9tICJ2b2lk
Ig0KPiAgLkZ0IHZvaWQNCj4gIC5GbiBhcmM0cmFuZG9tX2J1ZiAidm9pZCAqcHRyIiAic2l6ZV90
IGxlbiINCj4gKy5GdCB1aW50MzJfdA0KPiArLkZuIGFyYzRyYW5kb21fdW5pZm9ybSAidWludDMy
X3QgdXBwZXJfYm91bmQiDQo+ICAuRnQgdm9pZA0KPiAgLkZuIGFyYzRyYW5kICJ2b2lkICpwdHIi
ICJ1X2ludCBsZW5ndGgiICJpbnQgcmVzZWVkIg0KPiAgLlBwDQo+IEBAIC03OSw2ICs4MSwxNSBA
QCBmaWxscw0KPiAgd2l0aA0KPiAgLkZhIGxlbg0KPiAgYnl0ZXMgb2YgcmFuZG9tIGRhdGEuDQo+
ICsuUHANCj4gKy5GbiBhcmM0cmFuZG9tX3VuaWZvcm0NCj4gK3dpbGwgcmV0dXJuIGEgc2luZ2xl
IDMyLWJpdCB2YWx1ZSwgdW5pZm9ybWx5IGRpc3RyaWJ1dGVkIGJ1dCBsZXNzIHRoYW4NCj4gKy5G
YSB1cHBlcl9ib3VuZCAuDQo+ICtUaGlzIGlzIHJlY29tbWVuZGVkIG92ZXIgY29uc3RydWN0aW9u
cyBsaWtlDQo+ICsuRHEgTGkgYXJjNHJhbmRvbSgpICUgdXBwZXJfYm91bmQNCj4gK2FzIGl0IGF2
b2lkcyAibW9kdWxvIGJpYXMiIHdoZW4gdGhlIHVwcGVyIGJvdW5kIGlzIG5vdCBhIHBvd2VyIG9m
IHR3by4NCj4gK0luIHRoZSB3b3JzdCBjYXNlLCB0aGlzIGZ1bmN0aW9uIG1heSBjb25zdW1lIG11
bHRpcGxlIGl0ZXJhdGlvbnMNCj4gK3RvIGVuc3VyZSB1bmlmb3JtaXR5Lg0KPiAgLlBwDQo+ICBU
aGUNCj4gIC5GbiBhcmM0cmFuZA0KPiANCj4gTW9kaWZpZWQ6IGhlYWQvc3lzL2NvbmYvZmlsZXMN
Cj4gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09DQo+IC0tLSBoZWFkL3N5cy9jb25mL2ZpbGVzCUZyaSBB
cHIgMTkgMTk6NDU6MTkgMjAxOQkocjM0NjQwOSkNCj4gKysrIGhlYWQvc3lzL2NvbmYvZmlsZXMJ
RnJpIEFwciAxOSAyMDowNTo0NyAyMDE5CShyMzQ2NDEwKQ0KPiBAQCAtMzk4NSw2ICszOTg1LDcg
QEAga2dzc2FwaS9nc3N0ZXN0LmMJCW9wdGlvbmFsIGtnc3NhcGlfZGVidWcNCj4gICMgdGhlIGZp
bGUgc2hvdWxkIGJlIG1vdmVkIHRvIGNvbmYvZmlsZXMuPGFyY2g+IGZyb20gaGVyZS4NCj4gICMN
Cj4gIGxpYmtlcm4vYXJjNHJhbmRvbS5jCQlzdGFuZGFyZA0KPiArbGlia2Vybi9hcmM0cmFuZG9t
X3VuaWZvcm0uYwlzdGFuZGFyZA0KPiAgY3J5cHRvL2NoYWNoYTIwL2NoYWNoYS5jCXN0YW5kYXJk
DQo+ICBsaWJrZXJuL2FzcHJpbnRmLmMJCXN0YW5kYXJkDQo+ICBsaWJrZXJuL2JjZC5jCQkJc3Rh
bmRhcmQNCj4gDQo+IENvcGllZCBhbmQgbW9kaWZpZWQ6IGhlYWQvc3lzL2xpYmtlcm4vYXJjNHJh
bmRvbV91bmlmb3JtLmMgKGZyb20gcjM0NjQwOSwNCj4gaGVhZC9saWIvbGliYy9nZW4vYXJjNHJh
bmRvbV91bmlmb3JtLmMpDQo+ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAtLS0NCj4gaGVhZC9saWIv
bGliYy9nZW4vYXJjNHJhbmRvbV91bmlmb3JtLmMJRnJpIEFwciAxOSAxOTo0NToxOSAyMDE5CShy
MzQ2NDA5LCBjb3B5DQo+IHNvdXJjZSkgKysrIGhlYWQvc3lzL2xpYmtlcm4vYXJjNHJhbmRvbV91
bmlmb3JtLmMJRnJpIEFwciAxOSAyMDowNTo0NyAyMDE5DQo+IChyMzQ2NDEwKSBAQCAtMTksNyAr
MTksMTEgQEAgKi8NCj4gIA0KPiAgI2luY2x1ZGUgPHN5cy90eXBlcy5oPg0KPiArI2lmZGVmIF9L
RVJORUwNCj4gKyNpbmNsdWRlIDxzeXMvbGlia2Vybi5oPg0KPiArI2Vsc2UNCj4gICNpbmNsdWRl
IDxzdGRsaWIuaD4NCj4gKyNlbmRpZg0KPiAgDQo+ICAvKg0KPiAgICogQ2FsY3VsYXRlIGEgdW5p
Zm9ybWx5IGRpc3RyaWJ1dGVkIHJhbmRvbSBudW1iZXIgbGVzcyB0aGFuIHVwcGVyX2JvdW5kDQo+
IA0KPiBNb2RpZmllZDogaGVhZC9zeXMvc3lzL2xpYmtlcm4uaA0KPiA9PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT0NCj4gLS0tIGhlYWQvc3lzL3N5cy9saWJrZXJuLmgJRnJpIEFwciAxOSAxOTo0NToxOSAy
MDE5CShyMzQ2NDA5KQ0KPiArKysgaGVhZC9zeXMvc3lzL2xpYmtlcm4uaAlGcmkgQXByIDE5IDIw
OjA1OjQ3IDIwMTkJKHIzNDY0MTApDQo+IEBAIC0xMjgsNiArMTI4LDcgQEAgc3RydWN0IG1hbGxv
Y190eXBlOw0KPiAgdWludDMyX3QgYXJjNHJhbmRvbSh2b2lkKTsNCj4gIHZvaWQJIGFyYzRyYW5k
b21fYnVmKHZvaWQgKiwgc2l6ZV90KTsNCj4gIHZvaWQJIGFyYzRyYW5kKHZvaWQgKiwgdV9pbnQs
IGludCk7DQo+ICt1aW50MzJfdCBhcmM0cmFuZG9tX3VuaWZvcm0odWludDMyX3QpOw0KPiAgaW50
CSB0aW1pbmdzYWZlX2JjbXAoY29uc3Qgdm9pZCAqLCBjb25zdCB2b2lkICosIHNpemVfdCk7DQo+
ICB2b2lkCSpic2VhcmNoKGNvbnN0IHZvaWQgKiwgY29uc3Qgdm9pZCAqLCBzaXplX3QsDQo+ICAJ
ICAgIHNpemVfdCwgaW50ICgqKShjb25zdCB2b2lkICosIGNvbnN0IHZvaWQgKikpOw0KPiBfX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KPiBzdm4tc3JjLWhl
YWRAZnJlZWJzZC5vcmcgbWFpbGluZyBsaXN0DQo+IGh0dHBzOi8vbGlzdHMuZnJlZWJzZC5vcmcv
bWFpbG1hbi9saXN0aW5mby9zdm4tc3JjLWhlYWQNCj4gVG8gdW5zdWJzY3JpYmUsIHNlbmQgYW55
IG1haWwgdG8gInN2bi1zcmMtaGVhZC11bnN1YnNjcmliZUBmcmVlYnNkLm9yZyINCg0KQWZ0ZXIg
YXBwbHlpbmcgcjM0NjQxMCB0byBvdXIgc291cmNlIHRyZWUsIGJ1aWxkd29ybGQgZmFpbHMgKFdJ
VEhfTUVUQV9NT0RFIGlzIHNldCk6DQoNClsuLi5dDQpCdWlsZGluZyAvdXNyL29iai91c3Ivc3Jj
L2FtZDY0LmFtZDY0L2xpYi9saWJjL2V2X3RpbWVycy5vDQotIC0tLSBpbmV0X250b2EubyAtLS0N
CkluIGZpbGUgaW5jbHVkZWQgZnJvbSAvdXNyL3NyYy9zeXMvbGlia2Vybi9pbmV0X250b2EuYzoz
NDoNCi91c3Ivb2JqL3Vzci9zcmMvYW1kNjQuYW1kNjQvdG1wL3Vzci9pbmNsdWRlL3N5cy9zeXN0
bS5oOjE3Mjo4OiBlcnJvcjogdW5rbm93biB0eXBlIG5hbWUgJ2Jvb2wnDQpleHRlcm4gYm9vbCBk
eW5hbWljX2tlbnY7DQogICAgICAgXg0KL3Vzci9vYmovdXNyL3NyYy9hbWQ2NC5hbWQ2NC90bXAv
dXNyL2luY2x1ZGUvc3lzL3N5c3RtLmg6MjExOjU6IHdhcm5pbmc6IGRlY2xhcmF0aW9uIG9mDQpi
dWlsdC1pbiBmdW5jdGlvbiAnc2V0am1wJyByZXF1aXJlcyBpbmNsdXNpb24gb2YgdGhlIGhlYWRl
ciA8c2V0am1wLmg+DQpbLVdidWlsdGluLXJlcXVpcmVzLWhlYWRlcl0gaW50ICAgICBzZXRqbXAo
c3RydWN0IF9qbXBfYnVmICopIF9fcmV0dXJuc190d2ljZTsgXg0KL3Vzci9vYmovdXNyL3NyYy9h
bWQ2NC5hbWQ2NC90bXAvdXNyL2luY2x1ZGUvc3lzL3N5c3RtLmg6MjEyOjY6IHdhcm5pbmc6IGRl
Y2xhcmF0aW9uIG9mDQpidWlsdC1pbiBmdW5jdGlvbiAnbG9uZ2ptcCcgcmVxdWlyZXMgaW5jbHVz
aW9uIG9mIHRoZSBoZWFkZXIgPHNldGptcC5oPg0KWy1XYnVpbHRpbi1yZXF1aXJlcy1oZWFkZXJd
IHZvaWQgICAgbG9uZ2ptcChzdHJ1Y3QgX2ptcF9idWYgKiwgaW50KSBfX2RlYWQyOyBeDQovdXNy
L29iai91c3Ivc3JjL2FtZDY0LmFtZDY0L3RtcC91c3IvaW5jbHVkZS9zeXMvc3lzdG0uaDoyODU6
Njogd2FybmluZzogaW5jb21wYXRpYmxlDQpyZWRlY2xhcmF0aW9uIG9mIGxpYnJhcnkgZnVuY3Rp
b24gJ2xvZycgWy1XaW5jb21wYXRpYmxlLWxpYnJhcnktcmVkZWNsYXJhdGlvbl0gdm9pZA0KbG9n
KGludCwgY29uc3QgY2hhciAqLCAuLi4pIF9fcHJpbnRmbGlrZSgyLCAzKTsgXg0KL3Vzci9vYmov
dXNyL3NyYy9hbWQ2NC5hbWQ2NC90bXAvdXNyL2luY2x1ZGUvc3lzL3N5c3RtLmg6Mjg1OjY6IG5v
dGU6ICdsb2cnIGlzIGEgYnVpbHRpbiB3aXRoDQp0eXBlICdkb3VibGUgKGRvdWJsZSknIC91c3Iv
b2JqL3Vzci9zcmMvYW1kNjQuYW1kNjQvdG1wL3Vzci9pbmNsdWRlL3N5cy9zeXN0bS5oOjM4Mjoz
OTogZXJyb3I6DQp1bmtub3duIHR5cGUgbmFtZSAndWludGZwdHJfdCc7IGRpZCB5b3UgbWVhbiAn
dWludHB0cl90Jz8gdm9pZCAgICBwcm9mY2xvY2soaW50IGNudCwgaW50DQp1c2VybW9kZSwgdWlu
dGZwdHJfdCBwYyk7IF4NCi91c3Ivb2JqL3Vzci9zcmMvYW1kNjQuYW1kNjQvdG1wL3Vzci9pbmNs
dWRlL3N5cy9fc3RkaW50Lmg6ODA6MjI6IG5vdGU6ICd1aW50cHRyX3QnIGRlY2xhcmVkDQpoZXJl
IHR5cGVkZWYgX191aW50cHRyX3QgICAgICAgICAgICAgdWludHB0cl90Ow0KDQoNCklzIHRoZXJl
IGFuIGluY2x1ZGUgbWlzc2luZz8NCg0KS2luZCByZWdhcmRzLA0KDQpPLiBIYXJ0bWFubg0KDQot
IC0tIA0KTy4gSGFydG1hbm4NCg0KSWNoIHdpZGVyc3ByZWNoZSBkZXIgTnV0enVuZyBvZGVyIMOc
YmVybWl0dGx1bmcgbWVpbmVyIERhdGVuIGbDvHINCldlcmJlendlY2tlIG9kZXIgZsO8ciBkaWUg
TWFya3QtIG9kZXIgTWVpbnVuZ3Nmb3JzY2h1bmcgKMKnIDI4IEFicy4gNCBCRFNHKS4NCi0tLS0t
QkVHSU4gUEdQIFNJR05BVFVSRS0tLS0tDQoNCmlIVUVBUllJQUIwV0lRU3k4SUJ4QVBEa3FWQmFU
SjQ0TjFaWlBiYTVSd1VDWExvMnN3QUtDUkE0TjFaWlBiYTUNClIwQWJBUDQyRi9UeWZtZ2tIM0k5
SlFYdHUyMkREbHc2YVZvTzRQTjU2VmpBWVZjN2dRRUFnbzE5dnhEejJadXANCm5ZZnlvaVRNRGxq
MWIwOHN1SUduMnFlKy9KT0poQUU9DQo9UnFLOQ0KLS0tLS1FTkQgUEdQIFNJR05BVFVSRS0tLS0t
DQo=

From owner-svn-src-all@freebsd.org  Fri Apr 19 21:17:21 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD75215790FC;
 Fri, 19 Apr 2019 21:17:20 +0000 (UTC)
 (envelope-from ml+freebsd@vishwin.info)
Received: from varun.vishwin.info (varun.vishwin.info [46.101.93.59])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "varun.vishwin.info",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id D2F196C137;
 Fri, 19 Apr 2019 21:17:19 +0000 (UTC)
 (envelope-from ml+freebsd@vishwin.info)
Received: from varun.vishwin.info (fd35:9eae:7575::2 [IPv6:fd35:9eae:7575::2])
 by varun.vishwin.info (OpenSMTPD) with ESMTP id df32beb9;
 Fri, 19 Apr 2019 17:17:14 -0400 (EDT)
Received: from [IPv6:2001:470:8:6ca:cad7:19ff:fec0:a06d]
 (2001:470:8:6ca:cad7:19ff:fec0:a06d
 [IPv6:2001:470:8:6ca:cad7:19ff:fec0:a06d])
 by varun.vishwin.info (OpenSMTPD) with ESMTPSA id b46e0e7f
 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO;
 Fri, 19 Apr 2019 17:17:14 -0400 (EDT)
Subject: Re: svn commit: r346410 - in head: lib/libc/gen share/man/man9
 sys/conf sys/libkern sys/sys
To: "O. Hartmann" , Conrad Meyer 
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
References: <201904192005.x3JK5mhm015801@repo.freebsd.org>
 <20190419225931.1311745d@thor.intern.walstatt.dynvpn.de>
From: Charlie Li 
Openpgp: preference=signencrypt
Autocrypt: addr=ml+freebsd@vishwin.info; keydata=
 mQINBFt7iHUBEADCorTixbMGuHd9WYSKCELlv/TFcRtvpHUw/n9LtXzKixUUwl7iuMFMYTz3
 QXePX0Twq4jCQYySfcxWbPkLsSYlPOkaGQ+XytfmIHoqG5ba4i1fp+F41is0oCtLt1+oL84j
 NKUd13em/JWd+PJeQbSTVnHbT2yaAi7vqWw5WKVaMExjfPGU5TArV46wSRU6Zuy1ZX66q0q5
 dPzeBdeKYWJE8aGtyi3pYUpKUOX4gxiNetf6leDFZ4OsexWaRdU0n8fId5d1qwjAE3lOwV5z
 0Ilt8t4iXtX3JL3DAQyLZIeXHIg9O3rrpPMXQWSp2/5g39PohNk7farbhcpIKxuDN+L5N6U9
 OxNHBSCv9FGDO4R/mw3YwJCovDzsF7RSyXQDIY36yjdh2uTLZ0uD5Ci/DPmJUySFLRvpqWnQ
 M7V5cYhdqDfcElGpRbi8JZQVYRJjvI5Jj0byG98KeaD0YFxKqmmm+Oh+xWXE7xt/DsBoZeZJ
 BFP84LvFbwQqprvI+sg+1z2+JIgNbYwl8VaYzfyGnqTEXTOsQYEKTdKA9MODSAsN31MlQICe
 CIHZV+OwOqH1KQ/mZp59AnpXAmj4T94bnahE9yJtVW/qglX/nTeFNUdu5MyEgkeB0x7mx+t0
 3hE20yp/NbyvG1T/o53NHwHiURC/8Fxd1NWPZ6n4X8npQn6iyQARAQABtC5DaGFybGllIExp
 IChGcmVlQlNEKSA8bWwrZnJlZWJzZEB2aXNod2luLmluZm8+iQJOBBMBCAA4FiEE/3/Cqr5a
 +41PbEb+jnB43vIDq2wFAlt7iwoCGyMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQjnB4
 3vIDq2zlBQ/7Boe3K9i4pxvIlBWlFDmDuclLiju/LTsc81mO607TIwUMx5p3BfnhqTwqpcuT
 Gilj2JKSlIw0NioJ3HnPiPyIpMmOmdeLBwvBn8iBmjs14DdDMgKusE8gKc0KRFbTM397rB7K
 oXj2/R8VF3Uuo8i3vlWyah6p+Osz1dAad/7COqPeM9OBMKaYAOrdKvxMC96l5k+Wc1JKOLeA
 BP7BtgmQB7HydHUm+dzqUB1rgMP2djIXd5Ngc749kzNQIFvC9ZXbaABw5M4JqKRbVFm08Wgw
 IUyhkNEtMpkBxMPwqXsk3t1KVptYQSAfW/+8mWDP2sgUOyz9O2IBfb1acCPk04/jf8SsXRaT
 HzJr64NseWlZUHAMYl9EC09gdE6UDCIHR68+IzutMtgT17Djuu1HRYly+RWAGkyTOeR7Sv/V
 2B89Nsq5OfHYs3F2vD57/aRj5TmZJDQWxH/rDYbj8Pk6UjXcaY6QWUtNFidvCMFlBpXuncXU
 ZWgTsJEyZLHP5SJ7S9sRSHU5+CVUkjsbEFNuHkkGHAkSnpP+HosnH8/q9Rykn9FTamLbiQRQ
 UxJ6+IlqvOUtRRrMGMBF7ZIFGHcl8tcKynsPTeaHjpqPhCrZx8PmCKKoJHwW4Ua7+cdZkBJq
 R20qvXuLIrInjkIpA1CbacMckS5a7el6pi/nU0NG1S1K4Zu5Ag0EW3uIdQEQANdl7YHG8JOy
 HbEYv+7ExSrO96qBRavg1FsDG0riDmlsOSfZ2fqL6/YJF5WsfsX99+YSdIiLQfC4QOw/cA+M
 I65pgY4cCu42L7YIW/AR+jB1hFg+Q/cbeOwjuKPFYtZvxeDpSsaA6iIR+p+t4DXkjWl86g6W
 aFLC+til/rCilFHY/1/6M918F1gm/6xCIADDFu0BXLkASc5B4LuvaFEiJIuI9ZoQDIgWxnsX
 0tXXE36SwK/XrowzRzsOa+2iOHAPKu7rPGHwy28vO4T5Uq7UynMZG2sK3RTbOijaxL4IJF4W
 MRqpuGdBSJ4sWmr5aIpgX9au5L1TNAAILJpHXnkv+k825+9VgbhFtFYBHEkgUtXb+w34JnkH
 okpr9A78dpWb+T+jOEP6ZUgM+4VVy+hCCpbcCVI2PEXu8w2z3+4yZWxIFmy8UYZRoeTMKzV2
 zLeisoA0XA8jj548YNPiAl20Mjyoqu42WNv0P8fD9PMTcfLFCj2PlxOhuUFaIUH3ty0/bNeS
 jPtVK+L9x4W37R7U1tYk+tB5MlPakQiSQtdToB+8K34rnBt/3kCoAYL7Hygw9+qyZrEKZDtP
 5JKekfgsy28t1z66xWCUwq9PHuUFiij3cjbwIbskI9uy2+xITcXt4ZqVfpZcdGmjfbdTPkGf
 PH2pjDoCJaezYdbha/3OVhmVABEBAAGJAjYEGAEIACAWIQT/f8Kqvlr7jU9sRv6OcHje8gOr
 bAUCW3uIdQIbDAAKCRCOcHje8gOrbExnD/9qwSL4HiorJmUEJ+5CTh8IJql4PzeQK8Dx93gi
 Zs5jWVlCJTmcpQNirWIZM2eRt67C/wTJjLmEVGzySVLpGiUqhXqdROgFmDwvEnmpIbtWWyvG
 sgSOCmZj/tz0GEtLSsjJcV/kLffkv7XEKkt9ZjIJnFYVYSovDK1o2PoO6Rfi5AWHHB7jYhjS
 HJvJjDx0yClO9gEYhtw7R60YOLH+cKoDou9tu+4wR3QwRsNGO6wrzLGhptxuBrDMI+HuOx+j
 wBTliuzuvZrry6OdKDDdq5D4vvQCj4vFnK4p7LZXhBshCMoLkWoA0I2T+YF/V5Ob5EuvsTIC
 re/pO/g941ipVkehvVNAsiplSaHjasB1HS6BQ95csI8E/b6PnKm+IECp2bANbLP1jrxKeBGj
 UkeyRxTmOV/ADUIIj8S4a2yOxTxlysN2O5wqXCJcxaYelC/Y4TUcL6ENxn2dLBdCYKQEna0u
 DdxZp7fS+pXN6qyK8Qz6Q42MHAxFAZdLKf6a44d4HQt6rPcWdETVlnVKnJr0b9kg5K1Q8N4k
 PVoTGVrkGAZhmjFYsqWulq445VU46mX7WcqsrZx8LqNTwP6i3Bf71FJ9EBxTyA8fP8k0qosP
 8U8D7jhcc5x4yVW8RBBtB+a5q3odWdFnjMLEm4wtxBH/mSN/UKRcFSBvKQ8FxTgpX4Yxcw==
Organization: FreeBSD
Message-ID: 
Date: Fri, 19 Apr 2019 17:17:07 -0400
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101
 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <20190419225931.1311745d@thor.intern.walstatt.dynvpn.de>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="ZHHnbvi9607DH2TbTd5XfiWzWZ7UlhxDy"
X-Rspamd-Queue-Id: D2F196C137
X-Spamd-Bar: ------
X-Spamd-Result: default: False [-6.95 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.95)[-0.954,0]; TAGGED_FROM(0.00)[freebsd]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 21:17:21 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--ZHHnbvi9607DH2TbTd5XfiWzWZ7UlhxDy
Content-Type: multipart/mixed; boundary="2BfhjZzXBVR6jvpMGLa18sYNs5kEXT3FD";
 protected-headers="v1"
From: Charlie Li 
To: "O. Hartmann" , Conrad Meyer 
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
Message-ID: 
Subject: Re: svn commit: r346410 - in head: lib/libc/gen share/man/man9
 sys/conf sys/libkern sys/sys
References: <201904192005.x3JK5mhm015801@repo.freebsd.org>
 <20190419225931.1311745d@thor.intern.walstatt.dynvpn.de>
In-Reply-To: <20190419225931.1311745d@thor.intern.walstatt.dynvpn.de>

--2BfhjZzXBVR6jvpMGLa18sYNs5kEXT3FD
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB-large
Content-Transfer-Encoding: quoted-printable

O. Hartmann wrote:
> Am Fri, 19 Apr 2019 20:05:48 +0000 (UTC) Conrad Meyer schrieb:
>> Modified: head/lib/libc/gen/Makefile.inc
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/lib/libc/gen/Makefile.inc	Fri Apr 19 19:45:19 2019	(r346409)
>> +++ head/lib/libc/gen/Makefile.inc	Fri Apr 19 20:05:47 2019	(r346410)
>> @@ -3,6 +3,7 @@
>=20
>>  # machine-independent gen sources
>>  .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen
>> +.PATH: ${SRCTOP}/sys/libkern
>=20
>>  CONFS=3D	shells
>=20
>=20
> After applying r346410 to our source tree, buildworld fails (WITH_META_=
MODE is set):
>=20
> [...]
> Building /usr/obj/usr/src/amd64.amd64/lib/libc/ev_timers.o
> --- inet_ntoa.o ---
> In file included from /usr/src/sys/libkern/inet_ntoa.c:34:
> /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/systm.h:172:8: error: =
unknown type name 'bool'
> extern bool dynamic_kenv;
>        ^
> /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/systm.h:211:5: warning=
: declaration of
> built-in function 'setjmp' requires inclusion of the header 
> [-Wbuiltin-requires-header] int     setjmp(struct _jmp_buf *) __returns=
_twice; ^
> /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/systm.h:212:6: warning=
: declaration of
> built-in function 'longjmp' requires inclusion of the header =

> [-Wbuiltin-requires-header] void    longjmp(struct _jmp_buf *, int) __d=
ead2; ^
> /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/systm.h:285:6: warning=
: incompatible
> redeclaration of library function 'log' [-Wincompatible-library-redecla=
ration] void
> log(int, const char *, ...) __printflike(2, 3); ^
> /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/systm.h:285:6: note: '=
log' is a builtin with
> type 'double (double)' /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys=
/systm.h:382:39: error:
> unknown type name 'uintfptr_t'; did you mean 'uintptr_t'? void    profc=
lock(int cnt, int
> usermode, uintfptr_t pc); ^
> /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/_stdint.h:80:22: note:=
 'uintptr_t' declared
> here typedef __uintptr_t             uintptr_t;
>=20
>=20
> Is there an include missing?
> Beat me to the initial email. With the specific file change quoted
above, looks like inet_*.c are getting pulled from sys/libkern instead
of the proper lib/libc/inet.

--=20
Charlie Li
=E2=80=A6nope, still don't have an exit line.

(This email address is for mailing list use; replace local-part with
vishwin for off-list communication if possible)


--2BfhjZzXBVR6jvpMGLa18sYNs5kEXT3FD--

--ZHHnbvi9607DH2TbTd5XfiWzWZ7UlhxDy
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE/3/Cqr5a+41PbEb+jnB43vIDq2wFAly6OtMACgkQjnB43vID
q2wUgQ/+MoQ4p3qlILb3ytLESCts57WC/oAlm4rSPUxFjvpmxRp7SiCAFSXNLhRj
KANK5i6QEU1K+9YjwyuVz2wtUBdACy4Mt0qIBCEhJTQpBpMOQkuuTHdJIZpsbGy/
6TuijkaIVXVkgpyOEXoVUR4TlNW6yME2FdRjwRwwV2+3KcILJ/OQMSIcjrOo5RpJ
FRLyjHOhxbqtoxQ8Nwc2WnOTmwFFudozvJaJ4iCze1x8uD0QGxRbt0WjATCYtNCE
/49djSVysxQnBYR1FK3wNQpFpHHtAYiQ14QXXZOzYRaH/VFfZ4ScMG33OUfAxoPW
ISHO3nGl/aqsRv1LSkmeitkWatFfHd/q+tO6a7d05Cvwy3+bh0fZDJvvCggfufTG
ewxOYw2iKLxsUl940SBmYV4tiDaF5OFY53hnq8K6L7jEJZauC91jB1DmPP89MUK3
4+ylXu4J+8d6BnJsGXkPYcs69XPvLcL3437d/OAhxKG3N5EE2ZS13kWsbLgWOSJQ
4KumLUHlo/Vuo9mmkG44xpSHaSs0KYve792OQR8NY8ii9HQ+pOYJkCwSr4o5MXFE
bAHZKQzMy70fC7Jk2B1h2KucA+3Ej38Ar+XMyFBkioeO0bl0Vy6AyhYsh9sumACW
qHnFumjWk5N2/TcM4ECocg9F0GGpvfg/BPbbnr4d2nMY1zji7jQ=
=4brR
-----END PGP SIGNATURE-----

--ZHHnbvi9607DH2TbTd5XfiWzWZ7UlhxDy--

From owner-svn-src-all@freebsd.org  Fri Apr 19 21:58:52 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A2D5157A1C6;
 Fri, 19 Apr 2019 21:58:52 +0000 (UTC) (envelope-from jhb@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 F14296D60D;
 Fri, 19 Apr 2019 21:58:51 +0000 (UTC) (envelope-from jhb@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 CB8D14AD3;
 Fri, 19 Apr 2019 21:58:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JLwpta074046;
 Fri, 19 Apr 2019 21:58:51 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JLwpOV074045;
 Fri, 19 Apr 2019 21:58:51 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201904192158.x3JLwpOV074045@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin 
Date: Fri, 19 Apr 2019 21:58:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346419 - head/tests/sys/opencrypto
X-SVN-Group: head
X-SVN-Commit-Author: jhb
X-SVN-Commit-Paths: head/tests/sys/opencrypto
X-SVN-Commit-Revision: 346419
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: F14296D60D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.981,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 21:58:52 -0000

Author: jhb
Date: Fri Apr 19 21:58:51 2019
New Revision: 346419
URL: https://svnweb.freebsd.org/changeset/base/346419

Log:
  Sync cryptographic algorithm constants with current cryptodev.h.
  
  Reviewed by:	cem
  MFC after:	2 weeks
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D19881

Modified:
  head/tests/sys/opencrypto/cryptodevh.py

Modified: head/tests/sys/opencrypto/cryptodevh.py
==============================================================================
--- head/tests/sys/opencrypto/cryptodevh.py	Fri Apr 19 21:50:23 2019	(r346418)
+++ head/tests/sys/opencrypto/cryptodevh.py	Fri Apr 19 21:58:51 2019	(r346419)
@@ -197,7 +197,19 @@ CRYPTO_AES_NIST_GCM_16 = 25
 CRYPTO_AES_128_NIST_GMAC = 26
 CRYPTO_AES_192_NIST_GMAC = 27
 CRYPTO_AES_256_NIST_GMAC = 28
-CRYPTO_ALGORITHM_MAX = 28
+CRYPTO_BLAKE2B = 29
+CRYPTO_BLAKE2S = 30
+CRYPTO_CHACHA20 = 31
+CRYPTO_SHA2_224_HMAC = 32
+CRYPTO_RIPEMD160 = 33
+CRYPTO_SHA2_224 = 34
+CRYPTO_SHA2_256 = 35
+CRYPTO_SHA2_384 = 36
+CRYPTO_SHA2_512 = 37
+CRYPTO_POLY1305 = 38
+CRYPTO_AES_CCM_CBC_MAC = 39
+CRYPTO_AES_CCM_16 = 40
+CRYPTO_ALGORITHM_MAX = 40
 CRYPTO_ALG_FLAG_SUPPORTED = 0x01
 CRYPTO_ALG_FLAG_RNG_ENABLE = 0x02
 CRYPTO_ALG_FLAG_DSA_SHA = 0x04

From owner-svn-src-all@freebsd.org  Fri Apr 19 22:08:20 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC649157A46B;
 Fri, 19 Apr 2019 22:08:19 +0000 (UTC) (envelope-from cem@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 6B7096DAE6;
 Fri, 19 Apr 2019 22:08:19 +0000 (UTC) (envelope-from cem@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 22E3E4C84;
 Fri, 19 Apr 2019 22:08:19 +0000 (UTC) (envelope-from cem@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JM8JST079289;
 Fri, 19 Apr 2019 22:08:19 GMT (envelope-from cem@FreeBSD.org)
Received: (from cem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JM8HWM079280;
 Fri, 19 Apr 2019 22:08:17 GMT (envelope-from cem@FreeBSD.org)
Message-Id: <201904192208.x3JM8HWM079280@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org
 using -f
From: Conrad Meyer 
Date: Fri, 19 Apr 2019 22:08:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346420 - in head: lib/libc/gen share/man/man9 sys/conf
 sys/libkern sys/sys
X-SVN-Group: head
X-SVN-Commit-Author: cem
X-SVN-Commit-Paths: in head: lib/libc/gen share/man/man9 sys/conf sys/libkern
 sys/sys
X-SVN-Commit-Revision: 346420
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 6B7096DAE6
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.982,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 22:08:20 -0000

Author: cem
Date: Fri Apr 19 22:08:17 2019
New Revision: 346420
URL: https://svnweb.freebsd.org/changeset/base/346420

Log:
  Revert r346410 and r346411
  
  libkern in .PATH has too many filename conflicts with libc and my -DNO_CLEAN
  tinderbox didn't catch that ahead of time.  Mea culpa.

Added:
  head/lib/libc/gen/arc4random_uniform.c
     - copied unchanged from r346409, head/lib/libc/gen/arc4random_uniform.c
Deleted:
  head/sys/libkern/arc4random_uniform.c
Modified:
  head/lib/libc/gen/Makefile.inc
  head/share/man/man9/Makefile
  head/share/man/man9/random.9
  head/sys/conf/files
  head/sys/sys/libkern.h
  head/sys/sys/param.h

Modified: head/lib/libc/gen/Makefile.inc
==============================================================================
--- head/lib/libc/gen/Makefile.inc	Fri Apr 19 21:58:51 2019	(r346419)
+++ head/lib/libc/gen/Makefile.inc	Fri Apr 19 22:08:17 2019	(r346420)
@@ -3,7 +3,6 @@
 
 # machine-independent gen sources
 .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen
-.PATH: ${SRCTOP}/sys/libkern
 
 CONFS=	shells
 

Copied: head/lib/libc/gen/arc4random_uniform.c (from r346409, head/lib/libc/gen/arc4random_uniform.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/gen/arc4random_uniform.c	Fri Apr 19 22:08:17 2019	(r346420, copy of r346409, head/lib/libc/gen/arc4random_uniform.c)
@@ -0,0 +1,58 @@
+/*	$OpenBSD: arc4random_uniform.c,v 1.2 2015/09/13 08:31:47 guenther Exp $	*/
+
+/*
+ * Copyright (c) 2008, Damien Miller 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+#include 
+
+/*
+ * Calculate a uniformly distributed random number less than upper_bound
+ * avoiding "modulo bias".
+ *
+ * Uniformity is achieved by generating new random numbers until the one
+ * returned is outside the range [0, 2**32 % upper_bound).  This
+ * guarantees the selected random number will be inside
+ * [2**32 % upper_bound, 2**32) which maps back to [0, upper_bound)
+ * after reduction modulo upper_bound.
+ */
+uint32_t
+arc4random_uniform(uint32_t upper_bound)
+{
+	uint32_t r, min;
+
+	if (upper_bound < 2)
+		return 0;
+
+	/* 2**32 % x == (2**32 - x) % x */
+	min = -upper_bound % upper_bound;
+
+	/*
+	 * This could theoretically loop forever but each retry has
+	 * p > 0.5 (worst case, usually far better) of selecting a
+	 * number inside the range we need, so it should rarely need
+	 * to re-roll.
+	 */
+	for (;;) {
+		r = arc4random();
+		if (r >= min)
+			break;
+	}
+
+	return r % upper_bound;
+}

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Fri Apr 19 21:58:51 2019	(r346419)
+++ head/share/man/man9/Makefile	Fri Apr 19 22:08:17 2019	(r346420)
@@ -1668,8 +1668,6 @@ MLINKS+=psignal.9 gsignal.9 \
 	psignal.9 tdsignal.9
 MLINKS+=random.9 arc4rand.9 \
 	random.9 arc4random.9 \
-	random.9 arc4random_buf.9 \
-	random.9 arc4random_uniform.9 \
 	random.9 is_random_seeded.9 \
 	random.9 read_random.9 \
 	random.9 read_random_uio.9 \

Modified: head/share/man/man9/random.9
==============================================================================
--- head/share/man/man9/random.9	Fri Apr 19 21:58:51 2019	(r346419)
+++ head/share/man/man9/random.9	Fri Apr 19 22:08:17 2019	(r346420)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\" "
-.Dd April 19, 2019
+.Dd April 16, 2019
 .Dt RANDOM 9
 .Os
 .Sh NAME
@@ -45,8 +45,6 @@
 .Fn arc4random "void"
 .Ft void
 .Fn arc4random_buf "void *ptr" "size_t len"
-.Ft uint32_t
-.Fn arc4random_uniform "uint32_t upper_bound"
 .Ft void
 .Fn arc4rand "void *ptr" "u_int length" "int reseed"
 .Pp
@@ -81,15 +79,6 @@ fills
 with
 .Fa len
 bytes of random data.
-.Pp
-.Fn arc4random_uniform
-will return a single 32-bit value, uniformly distributed but less than
-.Fa upper_bound .
-This is recommended over constructions like
-.Dq Li arc4random() % upper_bound
-as it avoids "modulo bias" when the upper bound is not a power of two.
-In the worst case, this function may consume multiple iterations
-to ensure uniformity.
 .Pp
 The
 .Fn arc4rand

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Fri Apr 19 21:58:51 2019	(r346419)
+++ head/sys/conf/files	Fri Apr 19 22:08:17 2019	(r346420)
@@ -3985,7 +3985,6 @@ kgssapi/gsstest.c		optional kgssapi_debug
 # the file should be moved to conf/files. from here.
 #
 libkern/arc4random.c		standard
-libkern/arc4random_uniform.c	standard
 crypto/chacha20/chacha.c	standard
 libkern/asprintf.c		standard
 libkern/bcd.c			standard

Modified: head/sys/sys/libkern.h
==============================================================================
--- head/sys/sys/libkern.h	Fri Apr 19 21:58:51 2019	(r346419)
+++ head/sys/sys/libkern.h	Fri Apr 19 22:08:17 2019	(r346420)
@@ -128,7 +128,6 @@ struct malloc_type;
 uint32_t arc4random(void);
 void	 arc4random_buf(void *, size_t);
 void	 arc4rand(void *, u_int, int);
-uint32_t arc4random_uniform(uint32_t);
 int	 timingsafe_bcmp(const void *, const void *, size_t);
 void	*bsearch(const void *, const void *, size_t,
 	    size_t, int (*)(const void *, const void *));

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Fri Apr 19 21:58:51 2019	(r346419)
+++ head/sys/sys/param.h	Fri Apr 19 22:08:17 2019	(r346420)
@@ -60,7 +60,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300021	/* Master, propagated to newvers */
+#define __FreeBSD_version 1300020	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

From owner-svn-src-all@freebsd.org  Fri Apr 19 22:20:43 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5658E157A70B;
 Fri, 19 Apr 2019 22:20:43 +0000 (UTC) (envelope-from jhb@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 E85806E023;
 Fri, 19 Apr 2019 22:20:42 +0000 (UTC) (envelope-from jhb@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 BF5FC4E6C;
 Fri, 19 Apr 2019 22:20:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3JMKgkP084685;
 Fri, 19 Apr 2019 22:20:42 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JMKg0s084684;
 Fri, 19 Apr 2019 22:20:42 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201904192220.x3JMKg0s084684@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin 
Date: Fri, 19 Apr 2019 22:20:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346421 - head/tests/sys/opencrypto
X-SVN-Group: head
X-SVN-Commit-Author: jhb
X-SVN-Commit-Paths: head/tests/sys/opencrypto
X-SVN-Commit-Revision: 346421
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: E85806E023
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.981,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 22:20:43 -0000

Author: jhb
Date: Fri Apr 19 22:20:42 2019
New Revision: 346421
URL: https://svnweb.freebsd.org/changeset/base/346421

Log:
  Test SHA2-224-HMAC now that OCF supports it.
  
  Reviewed by:	cem
  MFC after:	2 weeks
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D19882

Modified:
  head/tests/sys/opencrypto/cryptotest.py

Modified: head/tests/sys/opencrypto/cryptotest.py
==============================================================================
--- head/tests/sys/opencrypto/cryptotest.py	Fri Apr 19 22:08:17 2019	(r346420)
+++ head/tests/sys/opencrypto/cryptotest.py	Fri Apr 19 22:20:42 2019	(r346421)
@@ -279,11 +279,8 @@ def GenTestCase(cname):
 					alg = cryptodev.CRYPTO_SHA1_HMAC
 					blocksize = 64
 				elif hashlen == 28:
-					# Cryptodev doesn't support SHA-224
-					# Slurp remaining input in section
-					for data in lines:
-						continue
-					continue
+					alg = cryptodev.CRYPTO_SHA2_224_HMAC
+					blocksize = 64
 				elif hashlen == 32:
 					alg = cryptodev.CRYPTO_SHA2_256_HMAC
 					blocksize = 64

From owner-svn-src-all@freebsd.org  Fri Apr 19 23:27:28 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79EBF157BF9A;
 Fri, 19 Apr 2019 23:27:28 +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 13C4470B63;
 Fri, 19 Apr 2019 23:27:28 +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 F04195A20;
 Fri, 19 Apr 2019 23:27:23 +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 x3JNRN8m023727;
 Fri, 19 Apr 2019 23:27:23 GMT (envelope-from rmacklem@FreeBSD.org)
Received: (from rmacklem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JNRNOY023726;
 Fri, 19 Apr 2019 23:27:23 GMT (envelope-from rmacklem@FreeBSD.org)
Message-Id: <201904192327.x3JNRNOY023726@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to
 rmacklem@FreeBSD.org using -f
From: Rick Macklem 
Date: Fri, 19 Apr 2019 23:27:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346423 - head/sys/fs/nfsserver
X-SVN-Group: head
X-SVN-Commit-Author: rmacklem
X-SVN-Commit-Paths: head/sys/fs/nfsserver
X-SVN-Commit-Revision: 346423
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 13C4470B63
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.95)[-0.952,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 23:27:28 -0000

Author: rmacklem
Date: Fri Apr 19 23:27:23 2019
New Revision: 346423
URL: https://svnweb.freebsd.org/changeset/base/346423

Log:
  Replace "vp" with NULL to make the code more readable.
  
  At the time of this nfsv4_sattr() call, "vp == NULL", so this patch doesn't
  change the semantics, but I think it makes the code more readable.
  It also makes it consistent with the nfsv4_sattr() call a few lines above
  this one. Found during code inspection.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 19 23:04:07 2019	(r346422)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 19 23:27:23 2019	(r346423)
@@ -2886,7 +2886,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int is
 			NFSM_DISSECT(tl, u_int32_t *, NFSX_VERF);
 			cverf[0] = *tl++;
 			cverf[1] = *tl;
-			error = nfsv4_sattr(nd, vp, &nva, &attrbits, aclp, p);
+			error = nfsv4_sattr(nd, NULL, &nva, &attrbits, aclp, p);
 			if (error != 0)
 				goto nfsmout;
 			if (NFSISSET_ATTRBIT(&attrbits,

From owner-svn-src-all@freebsd.org  Fri Apr 19 23:35:09 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C567B157C2CB;
 Fri, 19 Apr 2019 23:35:09 +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 300B57158D;
 Fri, 19 Apr 2019 23:35:09 +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 03F235BD8;
 Fri, 19 Apr 2019 23:35:09 +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 x3JNZ8IE029227;
 Fri, 19 Apr 2019 23:35:08 GMT (envelope-from rmacklem@FreeBSD.org)
Received: (from rmacklem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3JNZ81b029224;
 Fri, 19 Apr 2019 23:35:08 GMT (envelope-from rmacklem@FreeBSD.org)
Message-Id: <201904192335.x3JNZ81b029224@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to
 rmacklem@FreeBSD.org using -f
From: Rick Macklem 
Date: Fri, 19 Apr 2019 23:35:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346424 - in head/sys/fs: nfs nfsserver
X-SVN-Group: head
X-SVN-Commit-Author: rmacklem
X-SVN-Commit-Paths: in head/sys/fs: nfs nfsserver
X-SVN-Commit-Revision: 346424
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 300B57158D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.95 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_SHORT(-0.95)[-0.954,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 19 Apr 2019 23:35:10 -0000

Author: rmacklem
Date: Fri Apr 19 23:35:08 2019
New Revision: 346424
URL: https://svnweb.freebsd.org/changeset/base/346424

Log:
  Add support for the ModeSetMasked attribute to the NFSv4.1 server.
  
  I do not know of an extant NFSv4.1 client that currently does a Setattr
  operation for the ModeSetMasked, but it has been discussed on the linux-nfs
  mailing list.
  This patch adds support for doing a Setattr of ModeSetMasked, so that it
  will work for any future NFSv4.1 client that chooses to do so.
  Tested via a hacked FreeBSD NFSv4.1 client.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfs/nfsproto.h
  head/sys/fs/nfsserver/nfs_nfsdport.c
  head/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: head/sys/fs/nfs/nfsproto.h
==============================================================================
--- head/sys/fs/nfs/nfsproto.h	Fri Apr 19 23:27:23 2019	(r346423)
+++ head/sys/fs/nfs/nfsproto.h	Fri Apr 19 23:35:08 2019	(r346424)
@@ -1090,7 +1090,7 @@ struct nfsv3_sattr {
  */
 #define	NFSATTRBIT_SUPPSETONLY1	 (NFSATTRBM_TIMEACCESSSET |		\
 				 NFSATTRBM_TIMEMODIFYSET)
-#define	NFSATTRBIT_SUPPSETONLY2	0
+#define	NFSATTRBIT_SUPPSETONLY2	(NFSATTRBM_MODESETMASKED)
 
 /*
  * NFSATTRBIT_SETABLE - SETABLE0 - bits 0<->31
@@ -1106,7 +1106,8 @@ struct nfsv3_sattr {
  	NFSATTRBM_OWNERGROUP |						\
  	NFSATTRBM_TIMEACCESSSET |					\
  	NFSATTRBM_TIMEMODIFYSET)
-#define	NFSATTRBIT_SETABLE2		0
+#define	NFSATTRBIT_SETABLE2						\
+	(NFSATTRBM_MODESETMASKED)
 
 /*
  * NFSATTRBIT_NFSV41 - Attributes only supported by NFSv4.1.

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c	Fri Apr 19 23:27:23 2019	(r346423)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	Fri Apr 19 23:35:08 2019	(r346424)
@@ -2699,10 +2699,12 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, str
 	int attrsum = 0;
 	int i, j;
 	int error, attrsize, bitpos, aclsize, aceerr, retnotsup = 0;
-	int toclient = 0;
+	int moderet, toclient = 0;
 	u_char *cp, namestr[NFSV4_SMALLSTR + 1];
 	uid_t uid;
 	gid_t gid;
+	u_short mode, mask;		/* Same type as va_mode. */
+	struct vattr va;
 
 	error = nfsrv_getattrbits(nd, attrbitp, NULL, &retnotsup);
 	if (error)
@@ -2720,6 +2722,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, str
 	} else {
 		bitpos = 0;
 	}
+	moderet = 0;
 	for (; bitpos < NFSATTRBIT_MAX; bitpos++) {
 	    if (attrsum > attrsize) {
 		error = NFSERR_BADXDR;
@@ -2769,6 +2772,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, str
 			attrsum += (NFSX_UNSIGNED + NFSM_RNDUP(i));
 			break;
 		case NFSATTRBIT_MODE:
+			moderet = NFSERR_INVAL;	/* Can't do MODESETMASKED. */
 			NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
 			nvap->na_mode = nfstov_mode(*tl);
 			attrsum += NFSX_UNSIGNED;
@@ -2871,6 +2875,32 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, str
 			    if (!toclient)
 				nvap->na_vaflags |= VA_UTIMES_NULL;
 			}
+			break;
+		case NFSATTRBIT_MODESETMASKED:
+			NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED);
+			mode = fxdr_unsigned(u_short, *tl++);
+			mask = fxdr_unsigned(u_short, *tl);
+			/*
+			 * vp == NULL implies an Open/Create operation.
+			 * This attribute can only be used for Setattr and
+			 * only for NFSv4.1 or higher.
+			 * If moderet != 0, a mode attribute has also been
+			 * specified and this attribute cannot be done in the
+			 * same Setattr operation.
+			 */
+			if ((nd->nd_flag & ND_NFSV41) == 0)
+				nd->nd_repstat = NFSERR_ATTRNOTSUPP;
+			else if ((mode & ~07777) != 0 || (mask & ~07777) != 0 ||
+			    vp == NULL)
+				nd->nd_repstat = NFSERR_INVAL;
+			else if (moderet == 0)
+				moderet = VOP_GETATTR(vp, &va, nd->nd_cred);
+			if (moderet == 0)
+				nvap->na_mode = (mode & mask) |
+				    (va.va_mode & ~mask);
+			else
+				nd->nd_repstat = moderet;
+			attrsum += 2 * NFSX_UNSIGNED;
 			break;
 		default:
 			nd->nd_repstat = NFSERR_ATTRNOTSUPP;

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 19 23:27:23 2019	(r346423)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 19 23:35:08 2019	(r346424)
@@ -464,13 +464,18 @@ nfsrvd_setattr(struct nfsrv_descript *nd, __unused int
 		}
 	    }
 	    if (!nd->nd_repstat &&
-		NFSISSET_ATTRBIT(&attrbits, NFSATTRBIT_MODE)) {
+		(NFSISSET_ATTRBIT(&attrbits, NFSATTRBIT_MODE) ||
+		 NFSISSET_ATTRBIT(&attrbits, NFSATTRBIT_MODESETMASKED))) {
 		NFSVNO_ATTRINIT(&nva2);
 		NFSVNO_SETATTRVAL(&nva2, mode, nva.na_mode);
 		nd->nd_repstat = nfsvno_setattr(vp, &nva2, nd->nd_cred, p,
 		    exp);
-		if (!nd->nd_repstat)
-		    NFSSETBIT_ATTRBIT(&retbits, NFSATTRBIT_MODE);
+		if (!nd->nd_repstat) {
+		    if (NFSISSET_ATTRBIT(&attrbits, NFSATTRBIT_MODE))
+			NFSSETBIT_ATTRBIT(&retbits, NFSATTRBIT_MODE);
+		    if (NFSISSET_ATTRBIT(&attrbits, NFSATTRBIT_MODESETMASKED))
+			NFSSETBIT_ATTRBIT(&retbits, NFSATTRBIT_MODESETMASKED);
+		}
 	    }
 
 #ifdef NFS4_ACL_EXTATTR_NAME

From owner-svn-src-all@freebsd.org  Sat Apr 20 02:44:39 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1380D158057F;
 Sat, 20 Apr 2019 02:44:39 +0000 (UTC)
 (envelope-from jhibbits@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 A688E76D7D;
 Sat, 20 Apr 2019 02:44:38 +0000 (UTC)
 (envelope-from jhibbits@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 7C0F07C5E;
 Sat, 20 Apr 2019 02:44:38 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3K2icJ8029474;
 Sat, 20 Apr 2019 02:44:38 GMT (envelope-from jhibbits@FreeBSD.org)
Received: (from jhibbits@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3K2icC1029473;
 Sat, 20 Apr 2019 02:44:38 GMT (envelope-from jhibbits@FreeBSD.org)
Message-Id: <201904200244.x3K2icC1029473@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to
 jhibbits@FreeBSD.org using -f
From: Justin Hibbits 
Date: Sat, 20 Apr 2019 02:44:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346426 - head/sys/powerpc/powernv
X-SVN-Group: head
X-SVN-Commit-Author: jhibbits
X-SVN-Commit-Paths: head/sys/powerpc/powernv
X-SVN-Commit-Revision: 346426
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: A688E76D7D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.966,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 02:44:39 -0000

Author: jhibbits
Date: Sat Apr 20 02:44:38 2019
New Revision: 346426
URL: https://svnweb.freebsd.org/changeset/base/346426

Log:
  powerpc64/powernv: Relax flash block write requirements
  
  Since writes don't necessarily need to be on erase-block boundaries, we can
  relax the block size and alignments down to sector size.  If it needs to be
  erased, opalflash_erase() will check proper alignment and size.

Modified:
  head/sys/powerpc/powernv/opal_flash.c

Modified: head/sys/powerpc/powernv/opal_flash.c
==============================================================================
--- head/sys/powerpc/powernv/opal_flash.c	Sat Apr 20 00:04:31 2019	(r346425)
+++ head/sys/powerpc/powernv/opal_flash.c	Sat Apr 20 02:44:38 2019	(r346426)
@@ -239,8 +239,8 @@ opalflash_write(struct opalflash_softc *sc, off_t off,
 	int rv, size, token;
 
 	/* Ensure we write aligned to a full block size. */
-	if (off % sc->sc_disk->d_stripesize != 0 ||
-	    count % sc->sc_disk->d_stripesize != 0)
+	if (off % sc->sc_disk->d_sectorsize != 0 ||
+	    count % sc->sc_disk->d_sectorsize != 0)
 		return (EIO);
 
 	if (sc->sc_erase) {

From owner-svn-src-all@freebsd.org  Sat Apr 20 02:54:21 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63B4A1580A88;
 Sat, 20 Apr 2019 02:54:21 +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 082EA772AA;
 Sat, 20 Apr 2019 02:54:21 +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 D13407E1A;
 Sat, 20 Apr 2019 02:54:20 +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 x3K2sK9S034414;
 Sat, 20 Apr 2019 02:54:20 GMT (envelope-from kevans@FreeBSD.org)
Received: (from kevans@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3K2sKt1034412;
 Sat, 20 Apr 2019 02:54:20 GMT (envelope-from kevans@FreeBSD.org)
Message-Id: <201904200254.x3K2sKt1034412@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kevans set sender to
 kevans@FreeBSD.org using -f
From: Kyle Evans 
Date: Sat, 20 Apr 2019 02:54:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346427 - in head/usr.sbin/cron: cron crontab
X-SVN-Group: head
X-SVN-Commit-Author: kevans
X-SVN-Commit-Paths: in head/usr.sbin/cron: cron crontab
X-SVN-Commit-Revision: 346427
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 082EA772AA
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.97)[-0.967,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 02:54:21 -0000

Author: kevans
Date: Sat Apr 20 02:54:20 2019
New Revision: 346427
URL: https://svnweb.freebsd.org/changeset/base/346427

Log:
  cron(8): schedule interval jobs that get loaded during execution
  
  Jobs using the @ syntax currently only get executed if they exist
  when cron is started. The simplest reproducer of this is:
  
  echo '@20 root echo "Hello!"' >> /etc/cron.d/myjob
  
  myjob will get loaded at the next second==0, but this echo job will not
  run until cron restarts. These jobs are normally handled in
  run_reboot_jobs(), which sets e->lastexit of INTERVAL jobs to the startup
  time so they run 'n' seconds later.
  
  Fix this by special-casing TargetTime > 0 in the database load. Preexisting
  jobs will be handled at startup during run_reboot_jobs as normal, but if
  we've reloaded a database during runtime we'll hit this case and set
  e->lastexit to the current time when we process it. They will then run every
  'n' seconds from that point, and a full restart of cron is no longer
  required to make these jobs work.
  
  Reported by:	Juraj Lutter (otis_sk.freebsd.org)
  Reviewed by:	allanjude, bapt, bjk (earlier version), Juraj Lutter
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D19924

Modified:
  head/usr.sbin/cron/cron/database.c
  head/usr.sbin/cron/crontab/crontab.5

Modified: head/usr.sbin/cron/cron/database.c
==============================================================================
--- head/usr.sbin/cron/cron/database.c	Sat Apr 20 02:44:38 2019	(r346426)
+++ head/usr.sbin/cron/cron/database.c	Sat Apr 20 02:54:20 2019	(r346427)
@@ -259,6 +259,8 @@ process_crontab(uname, fname, tabname, statbuf, new_db
 	struct passwd	*pw = NULL;
 	int		crontab_fd = OK - 1;
 	user		*u;
+	entry		*e;
+	time_t		now;
 
 	if (strcmp(fname, SYS_NAME) && !(pw = getpwnam(uname))) {
 		/* file doesn't have a user in passwd file.
@@ -307,6 +309,21 @@ process_crontab(uname, fname, tabname, statbuf, new_db
 	u = load_user(crontab_fd, pw, fname);
 	if (u != NULL) {
 		u->mtime = statbuf->st_mtime;
+		/*
+		 * TargetTime == 0 when we're initially populating the database,
+		 * and TargetTime > 0 any time after that (i.e. we're reloading
+		 * cron.d/ files because they've been created/modified).  In the
+		 * latter case, we should check for any interval jobs and run
+		 * them 'n' seconds from the time the job was loaded/reloaded.
+		 * Otherwise, they will not be run until cron is restarted.
+		 */
+		if (TargetTime != 0) {
+			now = time(NULL);
+			for (e = u->crontab; e != NULL; e = e->next) {
+				if ((e->flags & INTERVAL) != 0)
+					e->lastexit = now;
+			}
+		}
 		link_user(new_db, u);
 	}
 

Modified: head/usr.sbin/cron/crontab/crontab.5
==============================================================================
--- head/usr.sbin/cron/crontab/crontab.5	Sat Apr 20 02:44:38 2019	(r346426)
+++ head/usr.sbin/cron/crontab/crontab.5	Sat Apr 20 02:54:20 2019	(r346427)
@@ -17,7 +17,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 15, 2019
+.Dd April 19, 2019
 .Dt CRONTAB 5
 .Os
 .Sh NAME
@@ -245,12 +245,14 @@ string		meaning
 The
 .Sq @
 symbol followed by a numeric value has a special notion of running
-a job that much seconds after completion of previous invocation of
+a job that many seconds after completion of the previous invocation of
 the job.
 Unlike regular syntax, it guarantees not to overlap two or more
-invocations of the same job.
-The first run is scheduled specified amount of seconds after cron
-has started.
+invocations of the same job during normal cron execution.
+Note, however, that overlap may occur if the job is running when the file
+containing the job is modified and subsequently reloaded.
+The first run is scheduled for the specified number of seconds after cron
+is started or the crontab entry is reloaded.
 .Sh EXAMPLE CRON FILE
 .Bd -literal
 

From owner-svn-src-all@freebsd.org  Sat Apr 20 03:21:48 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91478158189C;
 Sat, 20 Apr 2019 03:21:48 +0000 (UTC)
 (envelope-from ganbold@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 2D9ED805E5;
 Sat, 20 Apr 2019 03:21:48 +0000 (UTC)
 (envelope-from ganbold@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 F1FCB82B4;
 Sat, 20 Apr 2019 03:21:47 +0000 (UTC)
 (envelope-from ganbold@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3K3LlRc047957;
 Sat, 20 Apr 2019 03:21:47 GMT (envelope-from ganbold@FreeBSD.org)
Received: (from ganbold@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3K3LlRa047955;
 Sat, 20 Apr 2019 03:21:47 GMT (envelope-from ganbold@FreeBSD.org)
Message-Id: <201904200321.x3K3LlRa047955@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ganbold set sender to
 ganbold@FreeBSD.org using -f
From: Ganbold Tsagaankhuu 
Date: Sat, 20 Apr 2019 03:21:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346428 - in head/sys: arm64/conf conf
X-SVN-Group: head
X-SVN-Commit-Author: ganbold
X-SVN-Commit-Paths: in head/sys: arm64/conf conf
X-SVN-Commit-Revision: 346428
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 2D9ED805E5
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.97)[-0.968,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 03:21:48 -0000

Author: ganbold
Date: Sat Apr 20 03:21:47 2019
New Revision: 346428
URL: https://svnweb.freebsd.org/changeset/base/346428

Log:
  Add SY8106A Buck Regulator and Allwinner CIR devices to GENERIC arm64 kernel.

Modified:
  head/sys/arm64/conf/GENERIC
  head/sys/conf/files.arm64

Modified: head/sys/arm64/conf/GENERIC
==============================================================================
--- head/sys/arm64/conf/GENERIC	Sat Apr 20 02:54:20 2019	(r346427)
+++ head/sys/arm64/conf/GENERIC	Sat Apr 20 03:21:47 2019	(r346428)
@@ -233,6 +233,7 @@ device		iic
 device		twsi		# Allwinner I2C controller
 device		rk_i2c		# RockChip I2C controller
 device		syr827		# Silergy SYR827 PMIC
+device		sy8106a		# SY8106A Buck Regulator
 
 # Clock and reset controllers
 device		aw_ccu		# Allwinner clock controller
@@ -278,6 +279,7 @@ device		vt_efifb
 device		evdev			# input event device support
 options		EVDEV_SUPPORT		# evdev support in legacy drivers
 device		uinput			# install /dev/uinput cdev
+device		aw_cir
 
 # Pseudo devices.
 device		crypto		# core crypto support

Modified: head/sys/conf/files.arm64
==============================================================================
--- head/sys/conf/files.arm64	Sat Apr 20 02:54:20 2019	(r346427)
+++ head/sys/conf/files.arm64	Sat Apr 20 03:21:47 2019	(r346428)
@@ -27,6 +27,7 @@ cloudabi64_vdso_blob.o		optional	compat_cloudabi64	\
 # Allwinner common files
 arm/allwinner/a10_ehci.c	optional	ehci aw_ehci fdt
 arm/allwinner/a10_timer.c	optional	a10_timer fdt
+arm/allwinner/aw_cir.c		optional	evdev aw_cir fdt
 arm/allwinner/aw_gpio.c		optional	gpio aw_gpio fdt
 arm/allwinner/aw_mmc.c		optional	mmc aw_mmc fdt | mmccam aw_mmc fdt
 arm/allwinner/aw_nmi.c		optional	aw_nmi fdt \
@@ -206,6 +207,7 @@ dev/axgbe/xgbe-dev.c		optional	axgbe
 dev/axgbe/xgbe-drv.c		optional	axgbe
 dev/axgbe/xgbe-mdio.c		optional	axgbe
 dev/cpufreq/cpufreq_dt.c	optional	cpufreq fdt
+dev/iicbus/sy8106a.c		optional	sy8106a fdt
 dev/iicbus/twsi/mv_twsi.c	optional	twsi fdt
 dev/iicbus/twsi/a10_twsi.c	optional	twsi fdt
 dev/iicbus/twsi/twsi.c		optional	twsi fdt

From owner-svn-src-all@freebsd.org  Sat Apr 20 04:16:54 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD32E1582AC3;
 Sat, 20 Apr 2019 04:16:53 +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 54D0B81F7F;
 Sat, 20 Apr 2019 04:16:53 +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 2EC888CD3;
 Sat, 20 Apr 2019 04:16:53 +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 x3K4GrsL077699;
 Sat, 20 Apr 2019 04:16:53 GMT (envelope-from kevans@FreeBSD.org)
Received: (from kevans@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3K4GpdU077690;
 Sat, 20 Apr 2019 04:16:51 GMT (envelope-from kevans@FreeBSD.org)
Message-Id: <201904200416.x3K4GpdU077690@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kevans set sender to
 kevans@FreeBSD.org using -f
From: Kyle Evans 
Date: Sat, 20 Apr 2019 04:16:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346429 - in stable/11: . contrib/mdocml etc/mtree lib
 lib/libbe rescue/rescue sbin sbin/bectl sbin/bectl/tests share/mk
 tools/build/mk
X-SVN-Group: stable-11
X-SVN-Commit-Author: kevans
X-SVN-Commit-Paths: in stable/11: . contrib/mdocml etc/mtree lib lib/libbe
 rescue/rescue sbin sbin/bectl sbin/bectl/tests share/mk tools/build/mk
X-SVN-Commit-Revision: 346429
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 54D0B81F7F
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.97)[-0.973,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 04:16:54 -0000

Author: kevans
Date: Sat Apr 20 04:16:51 2019
New Revision: 346429
URL: https://svnweb.freebsd.org/changeset/base/346429

Log:
  MFC bectl(8)/libbe(3): r337663-337664,337667,337697-337699,337800,337805,
  337915-337918,337921,337924,337947,337993-337995,338221-338222,338303,
  338417,339047,339972,339994,340334,340507-340508,340592-340594,
  340635-340636,340722-340723,340974,342466,342849,342903,342911,343335,
  343543,343977,343993-343994,344034,344067,344084,345302,345769,
  345845-345846,345848,346082
  
  There are simply too many small changes to enumerate; in summary:
  
  bectl(8)/libbe(3) has been introduced from current state in -CURRENT and
  added to the stable/11 rescue build. bectl(8) is a tool for managing ZFS
  boot environments, largely inspired by beadm. It includes features such as
  being able to jail a boot environment or easily mount it for modification.
  
  Relnotes:	probably

Added:
  stable/11/lib/libbe/
     - copied from r337663, head/lib/libbe/
  stable/11/lib/libbe/Makefile
     - copied, changed from r337995, head/lib/libbe/Makefile
  stable/11/sbin/bectl/
     - copied from r337663, head/sbin/bectl/
  stable/11/sbin/bectl/tests/
     - copied from r340594, head/sbin/bectl/tests/
Modified:
  stable/11/Makefile.inc1
  stable/11/contrib/mdocml/lib.in
  stable/11/etc/mtree/BSD.tests.dist
  stable/11/lib/Makefile
  stable/11/lib/libbe/be.c
  stable/11/lib/libbe/be.h
  stable/11/lib/libbe/be_access.c
  stable/11/lib/libbe/be_error.c
  stable/11/lib/libbe/be_impl.h
  stable/11/lib/libbe/be_info.c
  stable/11/lib/libbe/libbe.3
  stable/11/rescue/rescue/Makefile
  stable/11/sbin/Makefile
  stable/11/sbin/bectl/Makefile
  stable/11/sbin/bectl/bectl.8
  stable/11/sbin/bectl/bectl.c
  stable/11/sbin/bectl/bectl_jail.c
  stable/11/sbin/bectl/bectl_list.c
  stable/11/sbin/bectl/tests/bectl_test.sh
  stable/11/share/mk/bsd.libnames.mk
  stable/11/share/mk/src.libnames.mk
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==============================================================================
--- stable/11/Makefile.inc1	Sat Apr 20 03:21:47 2019	(r346428)
+++ stable/11/Makefile.inc1	Sat Apr 20 04:16:51 2019	(r346429)
@@ -2155,7 +2155,7 @@ _prebuild_libs=	${_kerberos5_lib_libasn1} \
 		${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
 		${_cddl_lib_libuutil} \
 		${_cddl_lib_libavl} \
-		${_cddl_lib_libzfs_core} \
+		${_cddl_lib_libzfs_core} ${_cddl_lib_libzfs} \
 		${_cddl_lib_libctf} \
 		lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \
 		${_secure_lib_libcrypto} ${_lib_libldns} \
@@ -2224,7 +2224,15 @@ _cddl_lib_libavl= cddl/lib/libavl
 _cddl_lib_libuutil= cddl/lib/libuutil
 .if ${MK_ZFS} != "no"
 _cddl_lib_libzfs_core= cddl/lib/libzfs_core
+_cddl_lib_libzfs= cddl/lib/libzfs
+
 cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
+
+cddl/lib/libzfs__L: cddl/lib/libzfs_core__L lib/msun__L lib/libutil__L
+cddl/lib/libzfs__L: lib/libthr__L lib/libmd__L lib/libz__L cddl/lib/libumem__L
+cddl/lib/libzfs__L: cddl/lib/libuutil__L cddl/lib/libavl__L lib/libgeom__L
+
+lib/libbe__L: cddl/lib/libzfs__L
 .endif
 _cddl_lib_libctf= cddl/lib/libctf
 _cddl_lib= cddl/lib

Modified: stable/11/contrib/mdocml/lib.in
==============================================================================
--- stable/11/contrib/mdocml/lib.in	Sat Apr 20 03:21:47 2019	(r346428)
+++ stable/11/contrib/mdocml/lib.in	Sat Apr 20 04:16:51 2019	(r346429)
@@ -28,6 +28,7 @@ LINE("lib80211",	"802.11 Wireless Network Management L
 LINE("libarchive",	"Streaming Archive Library (libarchive, \\-larchive)")
 LINE("libarm",		"ARM Architecture Library (libarm, \\-larm)")
 LINE("libarm32",	"ARM32 Architecture Library (libarm32, \\-larm32)")
+LINE("libbe",		"Boot Environment Library (libbe, \\-lbe)")
 LINE("libbluetooth",	"Bluetooth Library (libbluetooth, \\-lbluetooth)")
 LINE("libbsm",		"Basic Security Module Library (libbsm, \\-lbsm)")
 LINE("libc",		"Standard C\\~Library (libc, \\-lc)")

Modified: stable/11/etc/mtree/BSD.tests.dist
==============================================================================
--- stable/11/etc/mtree/BSD.tests.dist	Sat Apr 20 03:21:47 2019	(r346428)
+++ stable/11/etc/mtree/BSD.tests.dist	Sat Apr 20 04:16:51 2019	(r346429)
@@ -380,6 +380,8 @@
         ..
     ..
     sbin
+        bectl
+        ..
         dhclient
         ..
         devd

Modified: stable/11/lib/Makefile
==============================================================================
--- stable/11/lib/Makefile	Sat Apr 20 03:21:47 2019	(r346428)
+++ stable/11/lib/Makefile	Sat Apr 20 04:16:51 2019	(r346429)
@@ -290,6 +290,7 @@ _libproc=	libproc
 _librtld_db=	librtld_db
 .endif
 SUBDIR.${MK_OFED}+=	ofed
+SUBDIR.${MK_ZFS}+=	libbe
 
 SUBDIR.${MK_OPENMP}+=	libomp
 

Copied and modified: stable/11/lib/libbe/Makefile (from r337995, head/lib/libbe/Makefile)
==============================================================================
--- head/lib/libbe/Makefile	Sat Aug 18 03:20:59 2018	(r337995, copy source)
+++ stable/11/lib/libbe/Makefile	Sat Apr 20 04:16:51 2019	(r346429)
@@ -2,6 +2,7 @@
 
 PACKAGE=	lib${LIB}
 LIB=		be
+SHLIBDIR?= /lib
 SHLIB_MAJOR=	1
 SHLIB_MINOR=	0
 

Modified: stable/11/lib/libbe/be.c
==============================================================================
--- head/lib/libbe/be.c	Sat Aug 11 23:50:09 2018	(r337663)
+++ stable/11/lib/libbe/be.c	Sat Apr 20 04:16:51 2019	(r346429)
@@ -29,11 +29,12 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
+#include 
 #include 
-#include 
+#include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -44,31 +45,49 @@ __FBSDID("$FreeBSD$");
 #include "be.h"
 #include "be_impl.h"
 
+struct be_destroy_data {
+	libbe_handle_t		*lbh;
+	char			*snapname;
+};
+
 #if SOON
 static int be_create_child_noent(libbe_handle_t *lbh, const char *active,
     const char *child_path);
 static int be_create_child_cloned(libbe_handle_t *lbh, const char *active);
 #endif
 
+/* Arbitrary... should tune */
+#define	BE_SNAP_SERIAL_MAX	1024
+
 /*
  * Iterator function for locating the rootfs amongst the children of the
  * zfs_be_root set by loader(8).  data is expected to be a libbe_handle_t *.
  */
 static int
-be_locate_rootfs(zfs_handle_t *chkds, void *data)
+be_locate_rootfs(libbe_handle_t *lbh)
 {
-	libbe_handle_t *lbh;
-	char *mntpoint;
+	struct statfs sfs;
+	struct extmnttab entry;
+	zfs_handle_t *zfs;
 
-	lbh = (libbe_handle_t *)data;
-	if (lbh == NULL)
+	/*
+	 * Check first if root is ZFS; if not, we'll bail on rootfs capture.
+	 * Unfortunately needed because zfs_path_to_zhandle will emit to
+	 * stderr if / isn't actually a ZFS filesystem, which we'd like
+	 * to avoid.
+	 */
+	if (statfs("/", &sfs) == 0) {
+		statfs2mnttab(&sfs, &entry);
+		if (strcmp(entry.mnt_fstype, MNTTYPE_ZFS) != 0)
+			return (1);
+	} else
 		return (1);
-
-	if (zfs_is_mounted(chkds, &mntpoint) && strcmp(mntpoint, "/") == 0) {
-		strncpy(lbh->rootfs, zfs_get_name(chkds), BE_MAXPATHLEN);
+	zfs = zfs_path_to_zhandle(lbh->lzh, "/", ZFS_TYPE_FILESYSTEM);
+	if (zfs == NULL)
 		return (1);
-	}
 
+	strlcpy(lbh->rootfs, zfs_get_name(zfs), sizeof(lbh->rootfs));
+	zfs_close(zfs);
 	return (0);
 }
 
@@ -77,52 +96,41 @@ be_locate_rootfs(zfs_handle_t *chkds, void *data)
  * dataset, for example, zroot/ROOT.
  */
 libbe_handle_t *
-libbe_init(void)
+libbe_init(const char *root)
 {
-	struct stat sb;
-	dev_t root_dev, boot_dev;
+	char altroot[MAXPATHLEN];
 	libbe_handle_t *lbh;
-	zfs_handle_t *rootds;
 	char *poolname, *pos;
 	int pnamelen;
 
 	lbh = NULL;
 	poolname = pos = NULL;
-	pnamelen = 0;
-	rootds = NULL;
 
-	/* Verify that /boot and / are mounted on the same filesystem */
-	/* TODO: use errno here?? */
-	if (stat("/", &sb) != 0)
-		goto err;
-
-	root_dev = sb.st_dev;
-
-	if (stat("/boot", &sb) != 0)
-		goto err;
-
-	boot_dev = sb.st_dev;
-
-	if (root_dev != boot_dev) {
-		fprintf(stderr, "/ and /boot not on same device, quitting\n");
-		goto err;
-	}
-
 	if ((lbh = calloc(1, sizeof(libbe_handle_t))) == NULL)
 		goto err;
 
 	if ((lbh->lzh = libzfs_init()) == NULL)
 		goto err;
 
-	/* Obtain path to boot environment root */
-	if ((kenv(KENV_GET, "zfs_be_root", lbh->root, BE_MAXPATHLEN)) == -1)
-		goto err;
+	/*
+	 * Grab rootfs, we'll work backwards from there if an optional BE root
+	 * has not been passed in.
+	 */
+	if (be_locate_rootfs(lbh) != 0) {
+		if (root == NULL)
+			goto err;
+		*lbh->rootfs = '\0';
+	}
+	if (root == NULL) {
+		/* Strip off the final slash from rootfs to get the be root */
+		strlcpy(lbh->root, lbh->rootfs, sizeof(lbh->root));
+		pos = strrchr(lbh->root, '/');
+		if (pos == NULL)
+			goto err;
+		*pos = '\0';
+	} else
+		strlcpy(lbh->root, root, sizeof(lbh->root));
 
-	/* Remove leading 'zfs:' if present, otherwise use value as-is */
-	if (strcmp(lbh->root, "zfs:") == 0)
-		strncpy(lbh->root, strchr(lbh->root, ':') + sizeof(char),
-		    BE_MAXPATHLEN);
-
 	if ((pos = strchr(lbh->root, '/')) == NULL)
 		goto err;
 
@@ -131,26 +139,21 @@ libbe_init(void)
 	if (poolname == NULL)
 		goto err;
 
-	strncpy(poolname, lbh->root, pnamelen);
-	poolname[pnamelen] = '\0';
+	strlcpy(poolname, lbh->root, pnamelen + 1);
 	if ((lbh->active_phandle = zpool_open(lbh->lzh, poolname)) == NULL)
 		goto err;
+	free(poolname);
+	poolname = NULL;
 
 	if (zpool_get_prop(lbh->active_phandle, ZPOOL_PROP_BOOTFS, lbh->bootfs,
-	    BE_MAXPATHLEN, NULL, true) != 0)
+	    sizeof(lbh->bootfs), NULL, true) != 0)
 		goto err;
 
-	/* Obtain path to boot environment rootfs (currently booted) */
-	/* XXX Get dataset mounted at / by kenv/GUID from mountroot? */
-	if ((rootds = zfs_open(lbh->lzh, lbh->root, ZFS_TYPE_DATASET)) == NULL)
-		goto err;
+	if (zpool_get_prop(lbh->active_phandle, ZPOOL_PROP_ALTROOT,
+	    altroot, sizeof(altroot), NULL, true) == 0 &&
+	    strcmp(altroot, "-") != 0)
+		lbh->altroot_len = strlen(altroot);
 
-	zfs_iter_filesystems(rootds, be_locate_rootfs, lbh);
-	zfs_close(rootds);
-	rootds = NULL;
-	if (*lbh->rootfs == '\0')
-		goto err;
-
 	return (lbh);
 err:
 	if (lbh != NULL) {
@@ -160,8 +163,6 @@ err:
 			libzfs_fini(lbh->lzh);
 		free(lbh);
 	}
-	if (rootds != NULL)
-		zfs_close(rootds);
 	free(poolname);
 	return (NULL);
 }
@@ -193,12 +194,38 @@ be_nicenum(uint64_t num, char *buf, size_t buflen)
 static int
 be_destroy_cb(zfs_handle_t *zfs_hdl, void *data)
 {
+	char path[BE_MAXPATHLEN];
+	struct be_destroy_data *bdd;
+	zfs_handle_t *snap;
 	int err;
 
-	if ((err = zfs_iter_children(zfs_hdl, be_destroy_cb, data)) != 0)
+	bdd = (struct be_destroy_data *)data;
+	if (bdd->snapname == NULL) {
+		err = zfs_iter_children(zfs_hdl, be_destroy_cb, data);
+		if (err != 0)
+			return (err);
+		return (zfs_destroy(zfs_hdl, false));
+	}
+	/* If we're dealing with snapshots instead, delete that one alone */
+	err = zfs_iter_filesystems(zfs_hdl, be_destroy_cb, data);
+	if (err != 0)
 		return (err);
-	if ((err = zfs_destroy(zfs_hdl, false)) != 0)
-		return (err);
+	/*
+	 * This part is intentionally glossing over any potential errors,
+	 * because there's a lot less potential for errors when we're cleaning
+	 * up snapshots rather than a full deep BE.  The primary error case
+	 * here being if the snapshot doesn't exist in the first place, which
+	 * the caller will likely deem insignificant as long as it doesn't
+	 * exist after the call.  Thus, such a missing snapshot shouldn't jam
+	 * up the destruction.
+	 */
+	snprintf(path, sizeof(path), "%s@%s", zfs_get_name(zfs_hdl),
+	    bdd->snapname);
+	if (!zfs_dataset_exists(bdd->lbh->lzh, path, ZFS_TYPE_SNAPSHOT))
+		return (0);
+	snap = zfs_open(bdd->lbh->lzh, path, ZFS_TYPE_SNAPSHOT);
+	if (snap != NULL)
+		zfs_destroy(snap, false);
 	return (0);
 }
 
@@ -206,85 +233,144 @@ be_destroy_cb(zfs_handle_t *zfs_hdl, void *data)
  * Destroy the boot environment or snapshot specified by the name
  * parameter. Options are or'd together with the possible values:
  * BE_DESTROY_FORCE : forces operation on mounted datasets
+ * BE_DESTROY_ORIGIN: destroy the origin snapshot as well
  */
 int
 be_destroy(libbe_handle_t *lbh, const char *name, int options)
 {
+	struct be_destroy_data bdd;
+	char origin[BE_MAXPATHLEN], path[BE_MAXPATHLEN];
 	zfs_handle_t *fs;
-	char path[BE_MAXPATHLEN];
-	char *p;
+	char *snapdelim;
 	int err, force, mounted;
+	size_t rootlen;
 
-	p = path;
+	bdd.lbh = lbh;
+	bdd.snapname = NULL;
 	force = options & BE_DESTROY_FORCE;
-	err = BE_ERR_SUCCESS;
+	*origin = '\0';
 
 	be_root_concat(lbh, name, path);
 
-	if (strchr(name, '@') == NULL) {
+	if ((snapdelim = strchr(path, '@')) == NULL) {
 		if (!zfs_dataset_exists(lbh->lzh, path, ZFS_TYPE_FILESYSTEM))
 			return (set_error(lbh, BE_ERR_NOENT));
 
-		if (strcmp(path, lbh->rootfs) == 0)
+		if (strcmp(path, lbh->rootfs) == 0 ||
+		    strcmp(path, lbh->bootfs) == 0)
 			return (set_error(lbh, BE_ERR_DESTROYACT));
 
-		fs = zfs_open(lbh->lzh, p, ZFS_TYPE_FILESYSTEM);
-	} else {
+		fs = zfs_open(lbh->lzh, path, ZFS_TYPE_FILESYSTEM);
+		if (fs == NULL)
+			return (set_error(lbh, BE_ERR_ZFSOPEN));
 
+		if ((options & BE_DESTROY_ORIGIN) != 0 &&
+		    zfs_prop_get(fs, ZFS_PROP_ORIGIN, origin, sizeof(origin),
+		    NULL, NULL, 0, 1) != 0)
+			return (set_error(lbh, BE_ERR_NOORIGIN));
+
+		/* Don't destroy a mounted dataset unless force is specified */
+		if ((mounted = zfs_is_mounted(fs, NULL)) != 0) {
+			if (force) {
+				zfs_unmount(fs, NULL, 0);
+			} else {
+				free(bdd.snapname);
+				return (set_error(lbh, BE_ERR_DESTROYMNT));
+			}
+		}
+	} else {
 		if (!zfs_dataset_exists(lbh->lzh, path, ZFS_TYPE_SNAPSHOT))
 			return (set_error(lbh, BE_ERR_NOENT));
 
-		fs = zfs_open(lbh->lzh, p, ZFS_TYPE_SNAPSHOT);
+		bdd.snapname = strdup(snapdelim + 1);
+		if (bdd.snapname == NULL)
+			return (set_error(lbh, BE_ERR_NOMEM));
+		*snapdelim = '\0';
+		fs = zfs_open(lbh->lzh, path, ZFS_TYPE_DATASET);
+		if (fs == NULL) {
+			free(bdd.snapname);
+			return (set_error(lbh, BE_ERR_ZFSOPEN));
+		}
 	}
 
-	if (fs == NULL)
-		return (set_error(lbh, BE_ERR_ZFSOPEN));
-
-	/* Check if mounted, unmount if force is specified */
-	if ((mounted = zfs_is_mounted(fs, NULL)) != 0) {
-		if (force)
-			zfs_unmount(fs, NULL, 0);
-		else
-			return (set_error(lbh, BE_ERR_DESTROYMNT));
-	}
-
-	if ((err = be_destroy_cb(fs, NULL)) != 0) {
+	err = be_destroy_cb(fs, &bdd);
+	zfs_close(fs);
+	free(bdd.snapname);
+	if (err != 0) {
 		/* Children are still present or the mount is referenced */
 		if (err == EBUSY)
 			return (set_error(lbh, BE_ERR_DESTROYMNT));
 		return (set_error(lbh, BE_ERR_UNKNOWN));
 	}
 
-	return (0);
+	if ((options & BE_DESTROY_ORIGIN) == 0)
+		return (0);
+
+	/* The origin can't possibly be shorter than the BE root */
+	rootlen = strlen(lbh->root);
+	if (*origin == '\0' || strlen(origin) <= rootlen + 1)
+		return (set_error(lbh, BE_ERR_INVORIGIN));
+
+	/*
+	 * We'll be chopping off the BE root and running this back through
+	 * be_destroy, so that we properly handle the origin snapshot whether
+	 * it be that of a deep BE or not.
+	 */
+	if (strncmp(origin, lbh->root, rootlen) != 0 || origin[rootlen] != '/')
+		return (0);
+
+	return (be_destroy(lbh, origin + rootlen + 1,
+	    options & ~BE_DESTROY_ORIGIN));
 }
 
+static void
+be_setup_snapshot_name(libbe_handle_t *lbh, char *buf, size_t buflen)
+{
+	time_t rawtime;
+	int len, serial;
 
+	time(&rawtime);
+	len = strlen(buf);
+	len += strftime(buf + len, buflen - len, "@%F-%T", localtime(&rawtime));
+	/* No room for serial... caller will do its best */
+	if (buflen - len < 2)
+		return;
+
+	for (serial = 0; serial < BE_SNAP_SERIAL_MAX; ++serial) {
+		snprintf(buf + len, buflen - len, "-%d", serial);
+		if (!zfs_dataset_exists(lbh->lzh, buf, ZFS_TYPE_SNAPSHOT))
+			return;
+	}
+}
+
 int
 be_snapshot(libbe_handle_t *lbh, const char *source, const char *snap_name,
     bool recursive, char *result)
 {
 	char buf[BE_MAXPATHLEN];
-	time_t rawtime;
-	int len, err;
+	int err;
 
 	be_root_concat(lbh, source, buf);
 
-	if (!be_exists(lbh, buf))
-		return (BE_ERR_NOENT);
+	if ((err = be_exists(lbh, buf)) != 0)
+		return (set_error(lbh, err));
 
 	if (snap_name != NULL) {
-		strcat(buf, "@");
-		strcat(buf, snap_name);
+		if (strlcat(buf, "@", sizeof(buf)) >= sizeof(buf))
+			return (set_error(lbh, BE_ERR_INVALIDNAME));
+
+		if (strlcat(buf, snap_name, sizeof(buf)) >= sizeof(buf))
+			return (set_error(lbh, BE_ERR_INVALIDNAME));
+
 		if (result != NULL)
 			snprintf(result, BE_MAXPATHLEN, "%s@%s", source,
 			    snap_name);
 	} else {
-		time(&rawtime);
-		len = strlen(buf);
-		strftime(buf + len, BE_MAXPATHLEN - len,
-		    "@%F-%T", localtime(&rawtime));
-		if (result != NULL)
-			strcpy(result, strrchr(buf, '/') + 1);
+		be_setup_snapshot_name(lbh, buf, sizeof(buf));
+
+		if (result != NULL && strlcpy(result, strrchr(buf, '/') + 1,
+		    sizeof(buf)) >= sizeof(buf))
+			return (set_error(lbh, BE_ERR_INVALIDNAME));
 	}
 
 	if ((err = zfs_snapshot(lbh->lzh, buf, recursive, NULL)) != 0) {
@@ -322,7 +408,6 @@ be_create(libbe_handle_t *lbh, const char *name)
 	return (set_error(lbh, err));
 }
 
-
 static int
 be_deep_clone_prop(int prop, void *cb)
 {
@@ -331,6 +416,7 @@ be_deep_clone_prop(int prop, void *cb)
 	zprop_source_t src;
 	char pval[BE_MAXPATHLEN];
 	char source[BE_MAXPATHLEN];
+	char *val;
 
 	dccb = cb;
 	/* Skip some properties we don't want to touch */
@@ -350,8 +436,13 @@ be_deep_clone_prop(int prop, void *cb)
 	if (src != ZPROP_SRC_LOCAL)
 		return (ZPROP_CONT);
 
-	nvlist_add_string(dccb->props, zfs_prop_to_name(prop), (char *)pval);
+	/* Augment mountpoint with altroot, if needed */
+	val = pval;
+	if (prop == ZFS_PROP_MOUNTPOINT)
+		val = be_mountpoint_augmented(dccb->lbh, val);
 
+	nvlist_add_string(dccb->props, zfs_prop_to_name(prop), val);
+
 	return (ZPROP_CONT);
 }
 
@@ -391,26 +482,23 @@ be_deep_clone(zfs_handle_t *ds, void *data)
 	nvlist_alloc(&props, NV_UNIQUE_NAME, KM_SLEEP);
 	nvlist_add_string(props, "canmount", "noauto");
 
+	dccb.lbh = isdc->lbh;
 	dccb.zhp = ds;
 	dccb.props = props;
 	if (zprop_iter(be_deep_clone_prop, &dccb, B_FALSE, B_FALSE,
 	    ZFS_TYPE_FILESYSTEM) == ZPROP_INVAL)
 		return (-1);
 
-	if ((err = zfs_clone(snap_hdl, be_path, props)) != 0) {
-		switch (err) {
-		case EZFS_SUCCESS:
-			err = BE_ERR_SUCCESS;
-			break;
-		default:
-			err = BE_ERR_ZFSCLONE;
-			break;
-		}
-	}
+	if ((err = zfs_clone(snap_hdl, be_path, props)) != 0)
+		err = BE_ERR_ZFSCLONE;
 
 	nvlist_free(props);
 	zfs_close(snap_hdl);
 
+	/* Failed to clone */
+	if (err != BE_ERR_SUCCESS)
+		return (set_error(isdc->lbh, err));
+
 	sdc.lbh = isdc->lbh;
 	sdc.bename = NULL;
 	sdc.snapname = isdc->snapname;
@@ -451,14 +539,13 @@ be_create_from_existing_snap(libbe_handle_t *lbh, cons
 	else
 		bename++;
 
-	if ((parentname = strdup(snap_path)) == NULL) {
-		err = BE_ERR_UNKNOWN;
-		return (set_error(lbh, err));
-	}
+	if ((parentname = strdup(snap_path)) == NULL)
+		return (set_error(lbh, BE_ERR_UNKNOWN));
+
 	snapname = strchr(parentname, '@');
 	if (snapname == NULL) {
-		err = BE_ERR_UNKNOWN;
-		return (set_error(lbh, err));
+		free(parentname);
+		return (set_error(lbh, BE_ERR_UNKNOWN));
 	}
 	*snapname = '\0';
 	snapname++;
@@ -471,6 +558,7 @@ be_create_from_existing_snap(libbe_handle_t *lbh, cons
 	parent_hdl = zfs_open(lbh->lzh, parentname, ZFS_TYPE_DATASET);
 	err = be_deep_clone(parent_hdl, &sdc);
 
+	free(parentname);
 	return (set_error(lbh, err));
 }
 
@@ -484,7 +572,7 @@ be_create_from_existing(libbe_handle_t *lbh, const cha
 	int err;
 	char buf[BE_MAXPATHLEN];
 
-	if ((err = be_snapshot(lbh, old, NULL, true, (char *)&buf)))
+	if ((err = be_snapshot(lbh, old, NULL, true, (char *)&buf)) != 0)
 		return (set_error(lbh, err));
 
 	err = be_create_from_existing_snap(lbh, name, (char *)buf);
@@ -501,39 +589,18 @@ be_create_from_existing(libbe_handle_t *lbh, const cha
 int
 be_validate_snap(libbe_handle_t *lbh, const char *snap_name)
 {
-	zfs_handle_t *zfs_hdl;
-	char buf[BE_MAXPATHLEN];
-	char *delim_pos;
-	int err = BE_ERR_SUCCESS;
 
 	if (strlen(snap_name) >= BE_MAXPATHLEN)
 		return (BE_ERR_PATHLEN);
 
+	if (!zfs_name_valid(snap_name, ZFS_TYPE_SNAPSHOT))
+		return (BE_ERR_INVALIDNAME);
+
 	if (!zfs_dataset_exists(lbh->lzh, snap_name,
 	    ZFS_TYPE_SNAPSHOT))
 		return (BE_ERR_NOENT);
 
-	strncpy(buf, snap_name, BE_MAXPATHLEN);
-
-	/* Find the base filesystem of the snapshot */
-	if ((delim_pos = strchr(buf, '@')) == NULL)
-		return (BE_ERR_INVALIDNAME);
-	*delim_pos = '\0';
-
-	if ((zfs_hdl =
-	    zfs_open(lbh->lzh, buf, ZFS_TYPE_DATASET)) == NULL)
-		return (BE_ERR_NOORIGIN);
-
-	if ((err = zfs_prop_get(zfs_hdl, ZFS_PROP_MOUNTPOINT, buf, BE_MAXPATHLEN,
-	    NULL, NULL, 0, 1)) != 0)
-		err = BE_ERR_INVORIGIN;
-
-	if ((err != 0) && (strncmp(buf, "/", BE_MAXPATHLEN) != 0))
-		err = BE_ERR_INVORIGIN;
-
-	zfs_close(zfs_hdl);
-
-	return (err);
+	return (BE_ERR_SUCCESS);
 }
 
 
@@ -561,7 +628,7 @@ be_root_concat(libbe_handle_t *lbh, const char *name, 
 		if (name_len >= BE_MAXPATHLEN)
 			return (BE_ERR_PATHLEN);
 
-		strncpy(result, name, BE_MAXPATHLEN);
+		strlcpy(result, name, BE_MAXPATHLEN);
 		return (BE_ERR_SUCCESS);
 	} else if (name_len + root_len + 1 < BE_MAXPATHLEN) {
 		snprintf(result, BE_MAXPATHLEN, "%s/%s", lbh->root,
@@ -575,18 +642,23 @@ be_root_concat(libbe_handle_t *lbh, const char *name, 
 
 /*
  * Verifies the validity of a boot environment name (A-Za-z0-9-_.). Returns
- * BE_ERR_SUCCESS (0) if name is valid, otherwise returns BE_ERR_INVALIDNAME.
+ * BE_ERR_SUCCESS (0) if name is valid, otherwise returns BE_ERR_INVALIDNAME
+ * or BE_ERR_PATHLEN.
  * Does not set internal library error state.
  */
 int
-be_validate_name(libbe_handle_t *lbh __unused, const char *name)
+be_validate_name(libbe_handle_t *lbh, const char *name)
 {
-	for (int i = 0; *name; i++) {
-		char c = *(name++);
-		if (isalnum(c) || (c == '-') || (c == '_') || (c == '.'))
-			continue;
+
+	/*
+	 * Impose the additional restriction that the entire dataset name must
+	 * not exceed the maximum length of a dataset, i.e. MAXNAMELEN.
+	 */
+	if (strlen(lbh->root) + 1 + strlen(name) > MAXNAMELEN)
+		return (BE_ERR_PATHLEN);
+
+	if (!zfs_name_valid(name, ZFS_TYPE_DATASET))
 		return (BE_ERR_INVALIDNAME);
-	}
 
 	return (BE_ERR_SUCCESS);
 }
@@ -603,18 +675,17 @@ be_rename(libbe_handle_t *lbh, const char *old, const 
 	zfs_handle_t *zfs_hdl;
 	int err;
 
+	/*
+	 * be_validate_name is documented not to set error state, so we should
+	 * do so here.
+	 */
+	if ((err = be_validate_name(lbh, new)) != 0)
+		return (set_error(lbh, err));
 	if ((err = be_root_concat(lbh, old, full_old)) != 0)
 		return (set_error(lbh, err));
 	if ((err = be_root_concat(lbh, new, full_new)) != 0)
 		return (set_error(lbh, err));
 
-	if ((err = be_validate_name(lbh, new)) != 0)
-		return (err);
-
-	/* Check if old is active BE */
-	if (strcmp(full_old, be_active_path(lbh)) == 0)
-		return (set_error(lbh, BE_ERR_MOUNTED));
-
 	if (!zfs_dataset_exists(lbh->lzh, full_old, ZFS_TYPE_DATASET))
 		return (set_error(lbh, BE_ERR_NOENT));
 
@@ -625,20 +696,17 @@ be_rename(libbe_handle_t *lbh, const char *old, const 
 	    ZFS_TYPE_FILESYSTEM)) == NULL)
 		return (set_error(lbh, BE_ERR_ZFSOPEN));
 
-	/* XXX TODO: Allow a force flag */
-	if (zfs_is_mounted(zfs_hdl, NULL)) {
-		zfs_close(zfs_hdl);
-		return (set_error(lbh, BE_ERR_MOUNTED));
-	}
-
 	/* recurse, nounmount, forceunmount */
-	struct renameflags flags = { 0, 0, 0 };
+	struct renameflags flags = {
+		.nounmount = 1,
+	};
 
 	err = zfs_rename(zfs_hdl, NULL, full_new, flags);
 
 	zfs_close(zfs_hdl);
-
-	return (set_error(lbh, err));
+	if (err != 0)
+		return (set_error(lbh, BE_ERR_UNKNOWN));
+	return (0);
 }
 
 
@@ -670,33 +738,14 @@ int
 be_import(libbe_handle_t *lbh, const char *bootenv, int fd)
 {
 	char buf[BE_MAXPATHLEN];
-	time_t rawtime;
 	nvlist_t *props;
 	zfs_handle_t *zfs;
-	int err, len;
-	char nbuf[24];
+	recvflags_t flags = { .nomount = 1 };
+	int err;
 
-	/*
-	 * We don't need this to be incredibly random, just unique enough that
-	 * it won't conflict with an existing dataset name.  Chopping time
-	 * down to 32 bits is probably good enough for this.
-	 */
-	snprintf(nbuf, 24, "tmp%u",
-	    (uint32_t)(time(NULL) & 0xFFFFFFFF));
-	if ((err = be_root_concat(lbh, nbuf, buf)) != 0)
-		/*
-		 * Technically this is our problem, but we try to use short
-		 * enough names that we won't run into problems except in
-		 * worst-case BE root approaching MAXPATHLEN.
-		 */
-		return (set_error(lbh, BE_ERR_PATHLEN));
+	be_root_concat(lbh, bootenv, buf);
 
-	time(&rawtime);
-	len = strlen(buf);
-	strftime(buf + len, BE_MAXPATHLEN - len,
-	    "@%F-%T", localtime(&rawtime));
-
-	if ((err = lzc_receive(buf, NULL, NULL, false, fd)) != 0) {
+	if ((err = zfs_receive(lbh->lzh, buf, NULL, &flags, fd, NULL)) != 0) {
 		switch (err) {
 		case EINVAL:
 			return (set_error(lbh, BE_ERR_NOORIGIN));
@@ -709,22 +758,22 @@ be_import(libbe_handle_t *lbh, const char *bootenv, in
 		}
 	}
 
-	if ((zfs = zfs_open(lbh->lzh, buf, ZFS_TYPE_SNAPSHOT)) == NULL)
+	if ((zfs = zfs_open(lbh->lzh, buf, ZFS_TYPE_FILESYSTEM)) == NULL)
 		return (set_error(lbh, BE_ERR_ZFSOPEN));
 
 	nvlist_alloc(&props, NV_UNIQUE_NAME, KM_SLEEP);
 	nvlist_add_string(props, "canmount", "noauto");
 	nvlist_add_string(props, "mountpoint", "/");
 
-	be_root_concat(lbh, bootenv, buf);
+	err = zfs_prop_set_list(zfs, props);
+	nvlist_free(props);
 
-	err = zfs_clone(zfs, buf, props);
 	zfs_close(zfs);
 
-	nvlist_free(props);
+	if (err != 0)
+		return (set_error(lbh, BE_ERR_UNKNOWN));
 
-	/* XXX TODO: Figure out how to destroy the ghost... */
-	return (BE_ERR_SUCCESS);
+	return (0);
 }
 
 #if SOON
@@ -901,21 +950,38 @@ be_set_nextboot(libbe_handle_t *lbh, nvlist_t *config,
 	return (0);
 }
 
+/*
+ * Deactivate old BE dataset; currently just sets canmount=noauto
+ */
+static int
+be_deactivate(libbe_handle_t *lbh, const char *ds)
+{
+	zfs_handle_t *zfs;
 
+	if ((zfs = zfs_open(lbh->lzh, ds, ZFS_TYPE_DATASET)) == NULL)
+		return (1);
+	if (zfs_prop_set(zfs, "canmount", "noauto") != 0)
+		return (1);
+	zfs_close(zfs);
+	return (0);
+}
+
 int
 be_activate(libbe_handle_t *lbh, const char *bootenv, bool temporary)
 {
 	char be_path[BE_MAXPATHLEN];
 	char buf[BE_MAXPATHLEN];
+	nvlist_t *config, *dsprops, *vdevs;
+	char *origin;
 	uint64_t pool_guid;
-	nvlist_t *config, *vdevs;
+	zfs_handle_t *zhp;
 	int err;
 
 	be_root_concat(lbh, bootenv, be_path);
 
 	/* Note: be_exists fails if mountpoint is not / */
-	if (!be_exists(lbh, be_path))
-		return (BE_ERR_NOENT);
+	if ((err = be_exists(lbh, be_path)) != 0)
+		return (set_error(lbh, err));
 
 	if (temporary) {
 		config = zpool_get_config(lbh->active_phandle, NULL);
@@ -929,9 +995,7 @@ be_activate(libbe_handle_t *lbh, const char *bootenv, 
 			return (set_error(lbh, BE_ERR_UNKNOWN));
 
 		/* Expected format according to zfsbootcfg(8) man */
-		strcpy(buf, "zfs:");
-		strcat(buf, be_path);
-		strcat(buf, ":");
+		snprintf(buf, sizeof(buf), "zfs:%s:", be_path);
 
 		/* We have no config tree */
 		if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
@@ -940,16 +1004,35 @@ be_activate(libbe_handle_t *lbh, const char *bootenv, 
 
 		return (be_set_nextboot(lbh, vdevs, pool_guid, buf));
 	} else {
+		if (be_deactivate(lbh, lbh->bootfs) != 0)
+			return (-1);
+
 		/* Obtain bootenv zpool */
 		err = zpool_set_prop(lbh->active_phandle, "bootfs", be_path);
+		if (err)
+			return (-1);
 
-		switch (err) {
-		case 0:
-			return (BE_ERR_SUCCESS);
+		zhp = zfs_open(lbh->lzh, be_path, ZFS_TYPE_FILESYSTEM);
+		if (zhp == NULL)
+			return (-1);
 
-		default:
-			/* XXX TODO correct errors */
+		if (be_prop_list_alloc(&dsprops) != 0)
 			return (-1);
+
+		if (be_get_dataset_props(lbh, be_path, dsprops) != 0) {
+			nvlist_free(dsprops);
+			return (-1);
 		}
+
+		if (nvlist_lookup_string(dsprops, "origin", &origin) == 0)
+			err = zfs_promote(zhp);
+		nvlist_free(dsprops);
+
+		zfs_close(zhp);
+
+		if (err)
+			return (-1);
 	}
+
+	return (BE_ERR_SUCCESS);
 }

Modified: stable/11/lib/libbe/be.h
==============================================================================
--- head/lib/libbe/be.h	Sat Aug 11 23:50:09 2018	(r337663)
+++ stable/11/lib/libbe/be.h	Sat Apr 20 04:16:51 2019	(r346429)
@@ -49,7 +49,7 @@ typedef enum be_error {
 	BE_ERR_BADPATH,		/* path not suitable for operation */
 	BE_ERR_PATHBUSY,	/* requested path is busy */
 	BE_ERR_PATHLEN,         /* provided name exceeds maximum length limit */
-	BE_ERR_INVORIGIN,       /* snapshot origin's mountpoint is not '/' */
+	BE_ERR_BADMOUNT,        /* mountpoint is not '/' */
 	BE_ERR_NOORIGIN,        /* could not open snapshot's origin */
 	BE_ERR_MOUNTED,         /* boot environment is already mounted */
 	BE_ERR_NOMOUNT,         /* boot environment is not mounted */
@@ -59,11 +59,12 @@ typedef enum be_error {
 	BE_ERR_NOPOOL,		/* operation not supported on this pool */
 	BE_ERR_NOMEM,		/* insufficient memory */
 	BE_ERR_UNKNOWN,         /* unknown error */
+	BE_ERR_INVORIGIN,       /* invalid origin */
 } be_error_t;
 
 
 /* Library handling functions: be.c */
-libbe_handle_t *libbe_init(void);
+libbe_handle_t *libbe_init(const char *root);
 void libbe_close(libbe_handle_t *);
 
 /* Bootenv information functions: be_info.c */
@@ -93,7 +94,8 @@ int be_rename(libbe_handle_t *, const char *, const ch
 /* Bootenv removal functions */
 
 typedef enum {
-	BE_DESTROY_FORCE = 1 << 0,
+	BE_DESTROY_FORCE	= 1 << 0,
+	BE_DESTROY_ORIGIN	= 1 << 1,
 } be_destroy_opt_t;
 
 int be_destroy(libbe_handle_t *, const char *, int);
@@ -102,7 +104,7 @@ int be_destroy(libbe_handle_t *, const char *, int);
 
 typedef enum {
 	BE_MNT_FORCE		= 1 << 0,
-		BE_MNT_DEEP	= 1 << 1,
+	BE_MNT_DEEP		= 1 << 1,
 } be_mount_opt_t;
 
 int be_mount(libbe_handle_t *, char *, char *, int, char *);
@@ -118,7 +120,7 @@ void libbe_print_on_error(libbe_handle_t *, bool);
 int be_root_concat(libbe_handle_t *, const char *, char *);
 int be_validate_name(libbe_handle_t * __unused, const char *);
 int be_validate_snap(libbe_handle_t *, const char *);
-bool be_exists(libbe_handle_t *, char *);
+int be_exists(libbe_handle_t *, char *);
 
 int be_export(libbe_handle_t *, const char *, int fd);
 int be_import(libbe_handle_t *, const char *, int fd);

Modified: stable/11/lib/libbe/be_access.c
==============================================================================
--- head/lib/libbe/be_access.c	Sat Aug 11 23:50:09 2018	(r337663)
+++ stable/11/lib/libbe/be_access.c	Sat Apr 20 04:16:51 2019	(r346429)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2017 Kyle J. Kneitinger 
  * Copyright (c) 2018 Kyle Evans 
+ * Copyright (c) 2019 Wes Maag 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,6 +39,14 @@ struct be_mountcheck_info {
 	char *name;
 };
 
+struct be_mount_info {
+	libbe_handle_t *lbh;
+	const char *be;
+	const char *mountpoint;
+	int mntflags;
+	int deepmount;
+};
+
 static int
 be_mountcheck_cb(zfs_handle_t *zfs_hdl, void *data)
 {
@@ -51,23 +60,124 @@ be_mountcheck_cb(zfs_handle_t *zfs_hdl, void *data)
 		return (0);
 	if (strcmp(mountpoint, info->path) == 0) {
 		info->name = strdup(zfs_get_name(zfs_hdl));
+		free(mountpoint);
 		return (1);
 	}
+	free(mountpoint);
 	return (0);
 }
 
 /*
+ * Called from be_mount, uses the given zfs_handle and attempts to
+ * mount it at the passed mountpoint. If the deepmount flag is set, continue
+ * calling the function for each child dataset.
+ */
+static int
+be_mount_iter(zfs_handle_t *zfs_hdl, void *data)
+{
+	int err;
+	char *mountpoint;
+	char tmp[BE_MAXPATHLEN], zfs_mnt[BE_MAXPATHLEN];
+	struct be_mount_info *info;
+
+	info = (struct be_mount_info *)data;
+
+	if (zfs_is_mounted(zfs_hdl, &mountpoint)) {
+		free(mountpoint);
+		return (0);
+	}
+
+	if (zfs_prop_get_int(zfs_hdl, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_OFF)
+		return (0);
+
+	if (zfs_prop_get(zfs_hdl, ZFS_PROP_MOUNTPOINT, zfs_mnt, BE_MAXPATHLEN,
+	    NULL, NULL, 0, 1))
+		return (1);
+
+	if (strcmp("none", zfs_mnt) != 0) {
+		char opt = '\0';
+

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Sat Apr 20 05:31:58 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7E871583D16;
 Sat, 20 Apr 2019 05:31:57 +0000 (UTC) (envelope-from imp@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 769F283B0A;
 Sat, 20 Apr 2019 05:31:57 +0000 (UTC) (envelope-from imp@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 506AC9923;
 Sat, 20 Apr 2019 05:31:57 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3K5Vv3O015580;
 Sat, 20 Apr 2019 05:31:57 GMT (envelope-from imp@FreeBSD.org)
Received: (from imp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3K5VuCb015576;
 Sat, 20 Apr 2019 05:31:56 GMT (envelope-from imp@FreeBSD.org)
Message-Id: <201904200531.x3K5VuCb015576@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org
 using -f
From: Warner Losh 
Date: Sat, 20 Apr 2019 05:31:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346430 - in head/stand/efi: include libefi loader
X-SVN-Group: head
X-SVN-Commit-Author: imp
X-SVN-Commit-Paths: in head/stand/efi: include libefi loader
X-SVN-Commit-Revision: 346430
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 769F283B0A
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.983,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 05:31:58 -0000

Author: imp
Date: Sat Apr 20 05:31:56 2019
New Revision: 346430
URL: https://svnweb.freebsd.org/changeset/base/346430

Log:
  Start to reduce the number of #ifdef EFI_ZFS_BOOT
  
  There's a number of EFI_ZFS_BOOT #ifdefs that aren't needed, or can be
  eliminated with some trivial #defines. Remove the EFI_ZFS_BOOT ifdefs
  that aren't needed. Replace libzfs.h include which is not safe to
  include without EFI_ZFS_BOOT with efizfs.h which is and now
  conditionally included libzfs.h. Define efizfs_set_preferred away
  and define efi_zfs_probe to NULL when ZFS is compiled out.

Modified:
  head/stand/efi/include/efizfs.h
  head/stand/efi/libefi/devicename.c
  head/stand/efi/loader/conf.c
  head/stand/efi/loader/main.c

Modified: head/stand/efi/include/efizfs.h
==============================================================================
--- head/stand/efi/include/efizfs.h	Sat Apr 20 04:16:51 2019	(r346429)
+++ head/stand/efi/include/efizfs.h	Sat Apr 20 05:31:56 2019	(r346430)
@@ -33,6 +33,8 @@
 #define _EFIZFS_H_
 
 #ifdef EFI_ZFS_BOOT
+#include 
+
 typedef STAILQ_HEAD(zfsinfo_list, zfsinfo) zfsinfo_list_t;
 
 typedef struct zfsinfo
@@ -50,6 +52,9 @@ bool efizfs_get_guid_by_handle(EFI_HANDLE, uint64_t *)
 zfsinfo_list_t *efizfs_get_zfsinfo_list(void);
 void efizfs_set_preferred(EFI_HANDLE);
 
+#else
+#define efizfs_set_preferred(x)
+#define efi_zfs_probe NULL
 #endif
 
 #endif

Modified: head/stand/efi/libefi/devicename.c
==============================================================================
--- head/stand/efi/libefi/devicename.c	Sat Apr 20 04:16:51 2019	(r346429)
+++ head/stand/efi/libefi/devicename.c	Sat Apr 20 05:31:56 2019	(r346430)
@@ -34,12 +34,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#ifdef EFI_ZFS_BOOT
-#include 
-#endif
 
 #include 
 #include 
+#include 
 
 static int efi_parsedev(struct devdesc **, const char *, const char **);
 

Modified: head/stand/efi/loader/conf.c
==============================================================================
--- head/stand/efi/loader/conf.c	Sat Apr 20 04:16:51 2019	(r346429)
+++ head/stand/efi/loader/conf.c	Sat Apr 20 05:31:56 2019	(r346430)
@@ -31,9 +31,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#ifdef EFI_ZFS_BOOT
-#include 
-#endif
+#include 
 
 struct devsw *devsw[] = {
 	&efipart_fddev,

Modified: head/stand/efi/loader/main.c
==============================================================================
--- head/stand/efi/loader/main.c	Sat Apr 20 04:16:51 2019	(r346429)
+++ head/stand/efi/loader/main.c	Sat Apr 20 05:31:56 2019	(r346430)
@@ -50,10 +50,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#ifdef EFI_ZFS_BOOT
-#include 
 #include "efizfs.h"
-#endif
 
 #include "loader_efi.h"
 
@@ -763,18 +760,14 @@ main(int argc, CHAR16 *argv[])
 	archsw.arch_copyin = efi_copyin;
 	archsw.arch_copyout = efi_copyout;
 	archsw.arch_readin = efi_readin;
-#ifdef EFI_ZFS_BOOT
-	/* Note this needs to be set before ZFS init. */
 	archsw.arch_zfs_probe = efi_zfs_probe;
-#endif
 
         /* Get our loaded image protocol interface structure. */
 	BS->HandleProtocol(IH, &imgid, (VOID**)&img);
 
-#ifdef EFI_ZFS_BOOT
-	/* Tell ZFS probe code where we booted from */
+	/* Tell ZFS probe code where we booted from, if zfs configured */
 	efizfs_set_preferred(img->DeviceHandle);
-#endif
+
 	/* Init the time source */
 	efi_time_init();
 

From owner-svn-src-all@freebsd.org  Sat Apr 20 07:32:31 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FE461585FD1;
 Sat, 20 Apr 2019 07:32:31 +0000 (UTC)
 (envelope-from lwhsu@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 DB58A869F3;
 Sat, 20 Apr 2019 07:32:30 +0000 (UTC)
 (envelope-from lwhsu@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5E2FAE4F;
 Sat, 20 Apr 2019 07:32:30 +0000 (UTC)
 (envelope-from lwhsu@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3K7WULR080892;
 Sat, 20 Apr 2019 07:32:30 GMT (envelope-from lwhsu@FreeBSD.org)
Received: (from lwhsu@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3K7WUuM080887;
 Sat, 20 Apr 2019 07:32:30 GMT (envelope-from lwhsu@FreeBSD.org)
Message-Id: <201904200732.x3K7WUuM080887@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to
 lwhsu@FreeBSD.org using -f
From: Li-Wen Hsu 
Date: Sat, 20 Apr 2019 07:32:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346431 - head/tests/sys/opencrypto
X-SVN-Group: head
X-SVN-Commit-Author: lwhsu
X-SVN-Commit-Paths: head/tests/sys/opencrypto
X-SVN-Commit-Revision: 346431
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: DB58A869F3
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.982,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 07:32:31 -0000

Author: lwhsu
Date: Sat Apr 20 07:32:29 2019
New Revision: 346431
URL: https://svnweb.freebsd.org/changeset/base/346431

Log:
  Specify using Python2, these .py files have not been converted to use Python3
  yet, but the default Python version in ports has been switched to 3.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/tests/sys/opencrypto/Makefile
  head/tests/sys/opencrypto/cryptodev.py
  head/tests/sys/opencrypto/cryptotest.py
  head/tests/sys/opencrypto/runtests.sh

Modified: head/tests/sys/opencrypto/Makefile
==============================================================================
--- head/tests/sys/opencrypto/Makefile	Sat Apr 20 05:31:56 2019	(r346430)
+++ head/tests/sys/opencrypto/Makefile	Sat Apr 20 07:32:29 2019	(r346431)
@@ -14,7 +14,7 @@ ATF_TESTS_C+=	blake2_test poly1305_test
 
 PLAIN_TESTS_SH=	runtests
 
-TEST_METADATA.runtests+= required_programs="python"
+TEST_METADATA.runtests+= required_programs="python2"
 TEST_METADATA.runtests+= required_user="root"
 
 PYMODULES=	cryptodev.py cryptodevh.py cryptotest.py dpkt.py

Modified: head/tests/sys/opencrypto/cryptodev.py
==============================================================================
--- head/tests/sys/opencrypto/cryptodev.py	Sat Apr 20 05:31:56 2019	(r346430)
+++ head/tests/sys/opencrypto/cryptodev.py	Sat Apr 20 07:32:29 2019	(r346431)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/local/bin/python2
 #
 # Copyright (c) 2014 The FreeBSD Foundation
 # Copyright 2014 John-Mark Gurney

Modified: head/tests/sys/opencrypto/cryptotest.py
==============================================================================
--- head/tests/sys/opencrypto/cryptotest.py	Sat Apr 20 05:31:56 2019	(r346430)
+++ head/tests/sys/opencrypto/cryptotest.py	Sat Apr 20 07:32:29 2019	(r346431)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/local/bin/python2
 #
 # Copyright (c) 2014 The FreeBSD Foundation
 # All rights reserved.

Modified: head/tests/sys/opencrypto/runtests.sh
==============================================================================
--- head/tests/sys/opencrypto/runtests.sh	Sat Apr 20 05:31:56 2019	(r346430)
+++ head/tests/sys/opencrypto/runtests.sh	Sat Apr 20 07:32:29 2019	(r346431)
@@ -61,6 +61,6 @@ done
 oldcdas=$(sysctl -e kern.cryptodevallowsoft)
 sysctl kern.cryptodevallowsoft=1
 
-python $(dirname $0)/cryptotest.py
+python2 $(dirname $0)/cryptotest.py
 
 sysctl "$oldcdas"

From owner-svn-src-all@freebsd.org  Sat Apr 20 10:56:57 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54D9F158A2DD;
 Sat, 20 Apr 2019 10:56:57 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.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 C01508C298;
 Sat, 20 Apr 2019 10:56:56 +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 96D77D188;
 Sat, 20 Apr 2019 10:56:56 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KAuuOo085513;
 Sat, 20 Apr 2019 10:56:56 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KAuuxt085512;
 Sat, 20 Apr 2019 10:56:56 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201056.x3KAuuxt085512@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 10:56: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: r346432 - stable/12/sys/kern
X-SVN-Group: stable-12
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: stable/12/sys/kern
X-SVN-Commit-Revision: 346432
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: C01508C298
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 10:56:57 -0000

Author: markj
Date: Sat Apr 20 10:56:56 2019
New Revision: 346432
URL: https://svnweb.freebsd.org/changeset/base/346432

Log:
  MFC r345513:
  Reject F_SETLK_REMOTE commands when sysid == 0.

Modified:
  stable/12/sys/kern/kern_descrip.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/kern_descrip.c
==============================================================================
--- stable/12/sys/kern/kern_descrip.c	Sat Apr 20 07:32:29 2019	(r346431)
+++ stable/12/sys/kern/kern_descrip.c	Sat Apr 20 10:56:56 2019	(r346432)
@@ -602,7 +602,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_
 
 	case F_SETLK_REMOTE:
 		error = priv_check(td, PRIV_NFS_LOCKD);
-		if (error)
+		if (error != 0)
 			return (error);
 		flg = F_REMOTE;
 		goto do_setlk;
@@ -613,6 +613,12 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_
 
 	case F_SETLK:
 	do_setlk:
+		flp = (struct flock *)arg;
+		if ((flg & F_REMOTE) != 0 && flp->l_sysid == 0) {
+			error = EINVAL;
+			break;
+		}
+
 		error = fget_unlocked(fdp, fd, &cap_flock_rights, &fp, NULL);
 		if (error != 0)
 			break;
@@ -622,7 +628,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_
 			break;
 		}
 
-		flp = (struct flock *)arg;
 		if (flp->l_whence == SEEK_CUR) {
 			foffset = foffset_get(fp);
 			if (foffset < 0 ||
@@ -668,10 +673,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_
 			    flp, flg);
 			break;
 		case F_UNLCKSYS:
-			/*
-			 * Temporary api for testing remote lock
-			 * infrastructure.
-			 */
 			if (flg != F_REMOTE) {
 				error = EINVAL;
 				break;

From owner-svn-src-all@freebsd.org  Sat Apr 20 10:58:34 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA18D158A38D;
 Sat, 20 Apr 2019 10:58: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 92FE38C3E3;
 Sat, 20 Apr 2019 10:58:33 +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 6D674D18C;
 Sat, 20 Apr 2019 10:58:33 +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 x3KAwXE7085620;
 Sat, 20 Apr 2019 10:58:33 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KAwXvP085619;
 Sat, 20 Apr 2019 10:58:33 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201058.x3KAwXvP085619@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 10:58:33 +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: r346433 - stable/12/contrib/elftoolchain/libdwarf
X-SVN-Group: stable-12
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libdwarf
X-SVN-Commit-Revision: 346433
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 92FE38C3E3
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 10:58:34 -0000

Author: markj
Date: Sat Apr 20 10:58:33 2019
New Revision: 346433
URL: https://svnweb.freebsd.org/changeset/base/346433

Log:
  MFC r345593:
  Prepend DW_AT_comp_dir to relative line number directory table entries.

Modified:
  stable/12/contrib/elftoolchain/libdwarf/libdwarf_lineno.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/contrib/elftoolchain/libdwarf/libdwarf_lineno.c
==============================================================================
--- stable/12/contrib/elftoolchain/libdwarf/libdwarf_lineno.c	Sat Apr 20 10:56:56 2019	(r346432)
+++ stable/12/contrib/elftoolchain/libdwarf/libdwarf_lineno.c	Sat Apr 20 10:58:33 2019	(r346433)
@@ -33,9 +33,10 @@ _dwarf_lineno_add_file(Dwarf_LineInfo li, uint8_t **p,
     Dwarf_Error *error, Dwarf_Debug dbg)
 {
 	Dwarf_LineFile lf;
-	const char *dirname;
+	FILE *filepath;
+	const char *incdir;
 	uint8_t *src;
-	int slen;
+	size_t slen;
 
 	src = *p;
 
@@ -54,20 +55,33 @@ _dwarf_lineno_add_file(Dwarf_LineInfo li, uint8_t **p,
 		return (DW_DLE_DIR_INDEX_BAD);
 	}
 
-	/* Make full pathname if need. */
+	/* Make a full pathname if needed. */
 	if (*lf->lf_fname != '/') {
-		dirname = compdir;
+		filepath = open_memstream(&lf->lf_fullpath, &slen);
+		if (filepath == NULL) {
+			free(lf);
+			DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY);
+			return (DW_DLE_MEMORY);
+		}
+
 		if (lf->lf_dirndx > 0)
-			dirname = li->li_incdirs[lf->lf_dirndx - 1];
-		if (dirname != NULL) {
-			slen = strlen(dirname) + strlen(lf->lf_fname) + 2;
-			if ((lf->lf_fullpath = malloc(slen)) == NULL) {
-				free(lf);
-				DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY);
-				return (DW_DLE_MEMORY);
-			}
-			snprintf(lf->lf_fullpath, slen, "%s/%s", dirname,
-			    lf->lf_fname);
+			incdir = li->li_incdirs[lf->lf_dirndx - 1];
+		else
+			incdir = NULL;
+
+		/*
+		 * Prepend the compilation directory if the directory table
+		 * entry is relative.
+		 */
+		if (incdir == NULL || *incdir != '/')
+			fprintf(filepath, "%s/", compdir);
+		if (incdir != NULL)
+			fprintf(filepath, "%s/", incdir);
+		fprintf(filepath, "%s", lf->lf_fname);
+		if (fclose(filepath) != 0) {
+			free(lf);
+			DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY);
+			return (DW_DLE_MEMORY);
 		}
 	}
 

From owner-svn-src-all@freebsd.org  Sat Apr 20 11:01:48 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C604E158A5C1;
 Sat, 20 Apr 2019 11:01:48 +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 6A6AC8C7A6;
 Sat, 20 Apr 2019 11:01:48 +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 45CCAD2F0;
 Sat, 20 Apr 2019 11:01:48 +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 x3KB1mgU088898;
 Sat, 20 Apr 2019 11:01:48 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KB1lnJ088895;
 Sat, 20 Apr 2019 11:01:47 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201101.x3KB1lnJ088895@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 11:01: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: r346434 - in stable/12/sys: net netinet6
X-SVN-Group: stable-12
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: in stable/12/sys: net netinet6
X-SVN-Commit-Revision: 346434
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 6A6AC8C7A6
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 11:01:49 -0000

Author: markj
Date: Sat Apr 20 11:01:47 2019
New Revision: 346434
URL: https://svnweb.freebsd.org/changeset/base/346434

Log:
  MFC r345739:
  Do not perform DAD on stf(4) interfaces.

Modified:
  stable/12/sys/net/if_stf.c
  stable/12/sys/netinet6/in6.c
  stable/12/sys/netinet6/in6_ifattach.c
  stable/12/sys/netinet6/nd6.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/if_stf.c
==============================================================================
--- stable/12/sys/net/if_stf.c	Sat Apr 20 10:58:33 2019	(r346433)
+++ stable/12/sys/net/if_stf.c	Sat Apr 20 11:01:47 2019	(r346434)
@@ -724,6 +724,7 @@ stf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 		}
 
 		ifp->if_flags |= IFF_UP;
+		ifp->if_drv_flags |= IFF_DRV_RUNNING;
 		break;
 
 	case SIOCADDMULTI:

Modified: stable/12/sys/netinet6/in6.c
==============================================================================
--- stable/12/sys/netinet6/in6.c	Sat Apr 20 10:58:33 2019	(r346433)
+++ stable/12/sys/netinet6/in6.c	Sat Apr 20 11:01:47 2019	(r346434)
@@ -1943,26 +1943,14 @@ in6_if_up(struct ifnet *ifp)
 int
 in6if_do_dad(struct ifnet *ifp)
 {
+
 	if ((ifp->if_flags & IFF_LOOPBACK) != 0)
 		return (0);
-
-	if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) ||
-	    (ND_IFINFO(ifp)->flags & ND6_IFF_NO_DAD))
+	if ((ifp->if_flags & IFF_MULTICAST) == 0)
 		return (0);
-
-	/*
-	 * Our DAD routine requires the interface up and running.
-	 * However, some interfaces can be up before the RUNNING
-	 * status.  Additionally, users may try to assign addresses
-	 * before the interface becomes up (or running).
-	 * This function returns EAGAIN in that case.
-	 * The caller should mark "tentative" on the address instead of
-	 * performing DAD immediately.
-	 */
-	if (!((ifp->if_flags & IFF_UP) &&
-	    (ifp->if_drv_flags & IFF_DRV_RUNNING)))
-		return (EAGAIN);
-
+	if ((ND_IFINFO(ifp)->flags &
+	    (ND6_IFF_IFDISABLED | ND6_IFF_NO_DAD)) != 0)
+		return (0);
 	return (1);
 }
 

Modified: stable/12/sys/netinet6/in6_ifattach.c
==============================================================================
--- stable/12/sys/netinet6/in6_ifattach.c	Sat Apr 20 10:58:33 2019	(r346433)
+++ stable/12/sys/netinet6/in6_ifattach.c	Sat Apr 20 11:01:47 2019	(r346434)
@@ -690,6 +690,7 @@ in6_ifattach(struct ifnet *ifp, struct ifnet *altifp)
 		 * it is rather harmful to have one.
 		 */
 		ND_IFINFO(ifp)->flags &= ~ND6_IFF_AUTO_LINKLOCAL;
+		ND_IFINFO(ifp)->flags |= ND6_IFF_NO_DAD;
 		break;
 	default:
 		break;

Modified: stable/12/sys/netinet6/nd6.c
==============================================================================
--- stable/12/sys/netinet6/nd6.c	Sat Apr 20 10:58:33 2019	(r346433)
+++ stable/12/sys/netinet6/nd6.c	Sat Apr 20 11:01:47 2019	(r346434)
@@ -896,6 +896,7 @@ nd6_timer(void *arg)
 	struct nd_prhead prl;
 	struct nd_defrouter *dr, *ndr;
 	struct nd_prefix *pr, *npr;
+	struct ifnet *ifp;
 	struct in6_ifaddr *ia6, *nia6;
 	uint64_t genid;
 
@@ -992,14 +993,15 @@ nd6_timer(void *arg)
 			 * Check status of the interface.  If it is down,
 			 * mark the address as tentative for future DAD.
 			 */
-			if ((ia6->ia_ifp->if_flags & IFF_UP) == 0 ||
-			    (ia6->ia_ifp->if_drv_flags & IFF_DRV_RUNNING)
-				== 0 ||
-			    (ND_IFINFO(ia6->ia_ifp)->flags &
-				ND6_IFF_IFDISABLED) != 0) {
+			ifp = ia6->ia_ifp;
+			if ((ND_IFINFO(ifp)->flags & ND6_IFF_NO_DAD) == 0 &&
+			    ((ifp->if_flags & IFF_UP) == 0 ||
+			    (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ||
+			    (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) != 0)){
 				ia6->ia6_flags &= ~IN6_IFF_DUPLICATED;
 				ia6->ia6_flags |= IN6_IFF_TENTATIVE;
 			}
+
 			/*
 			 * A new RA might have made a deprecated address
 			 * preferred.

From owner-svn-src-all@freebsd.org  Sat Apr 20 11:02:41 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A6CA158A657;
 Sat, 20 Apr 2019 11:02:41 +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 404A08C977;
 Sat, 20 Apr 2019 11:02:41 +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 1AD9ED331;
 Sat, 20 Apr 2019 11:02:41 +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 x3KB2efm090427;
 Sat, 20 Apr 2019 11:02:40 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KB2eVR090426;
 Sat, 20 Apr 2019 11:02:40 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201102.x3KB2eVR090426@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 11:02:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346435 - stable/12/usr.sbin/bhyve
X-SVN-Group: stable-12
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve
X-SVN-Commit-Revision: 346435
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 404A08C977
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 11:02:41 -0000

Author: markj
Date: Sat Apr 20 11:02:40 2019
New Revision: 346435
URL: https://svnweb.freebsd.org/changeset/base/346435

Log:
  MFC r346011:
  Stop compiling bhyve(8) with -O0.

Modified:
  stable/12/usr.sbin/bhyve/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/bhyve/Makefile
==============================================================================
--- stable/12/usr.sbin/bhyve/Makefile	Sat Apr 20 11:01:47 2019	(r346434)
+++ stable/12/usr.sbin/bhyve/Makefile	Sat Apr 20 11:02:40 2019	(r346435)
@@ -9,8 +9,6 @@ CFLAGS+=-I${SRCTOP}/sys
 PROG=	bhyve
 PACKAGE=	bhyve
 
-DEBUG_FLAGS= -g -O0
-
 MAN=	bhyve.8
 
 BHYVE_SYSDIR?=${SRCTOP}

From owner-svn-src-all@freebsd.org  Sat Apr 20 11:03:17 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8521B158A6E0;
 Sat, 20 Apr 2019 11:03:17 +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 2A0618CAB9;
 Sat, 20 Apr 2019 11:03:17 +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 C6D3CD332;
 Sat, 20 Apr 2019 11:03:16 +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 x3KB3GPO090496;
 Sat, 20 Apr 2019 11:03:16 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KB3Gvl090495;
 Sat, 20 Apr 2019 11:03:16 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201103.x3KB3Gvl090495@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 11:03:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346436 - stable/11/usr.sbin/bhyve
X-SVN-Group: stable-11
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve
X-SVN-Commit-Revision: 346436
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 2A0618CAB9
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.961,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 11:03:17 -0000

Author: markj
Date: Sat Apr 20 11:03:16 2019
New Revision: 346436
URL: https://svnweb.freebsd.org/changeset/base/346436

Log:
  MFC r346011:
  Stop compiling bhyve(8) with -O0.

Modified:
  stable/11/usr.sbin/bhyve/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/bhyve/Makefile
==============================================================================
--- stable/11/usr.sbin/bhyve/Makefile	Sat Apr 20 11:02:40 2019	(r346435)
+++ stable/11/usr.sbin/bhyve/Makefile	Sat Apr 20 11:03:16 2019	(r346436)
@@ -7,8 +7,6 @@
 PROG=	bhyve
 PACKAGE=	bhyve
 
-DEBUG_FLAGS= -g -O0
-
 MAN=	bhyve.8
 
 BHYVE_SYSDIR?=${SRCTOP}

From owner-svn-src-all@freebsd.org  Sat Apr 20 11:03:47 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B51B6158A759;
 Sat, 20 Apr 2019 11:03:47 +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 556538CBF4;
 Sat, 20 Apr 2019 11:03:47 +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 E81B4D333;
 Sat, 20 Apr 2019 11:03:46 +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 x3KB3kiK090558;
 Sat, 20 Apr 2019 11:03:46 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KB3k1Q090557;
 Sat, 20 Apr 2019 11:03:46 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201103.x3KB3k1Q090557@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 11:03:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346437 - stable/11/usr.sbin/bhyve
X-SVN-Group: stable-11
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve
X-SVN-Commit-Revision: 346437
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 556538CBF4
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 11:03:48 -0000

Author: markj
Date: Sat Apr 20 11:03:46 2019
New Revision: 346437
URL: https://svnweb.freebsd.org/changeset/base/346437

Log:
  MFC r346010:
  Fix indentation.

Modified:
  stable/11/usr.sbin/bhyve/uart_emul.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/bhyve/uart_emul.c
==============================================================================
--- stable/11/usr.sbin/bhyve/uart_emul.c	Sat Apr 20 11:03:16 2019	(r346436)
+++ stable/11/usr.sbin/bhyve/uart_emul.c	Sat Apr 20 11:03:46 2019	(r346437)
@@ -436,75 +436,75 @@ uart_write(struct uart_softc *sc, int offset, uint8_t 
 		 */
 		sc->ier = value & 0x0F;
 		break;
-		case REG_FCR:
-			/*
-			 * When moving from FIFO and 16450 mode and vice versa,
-			 * the FIFO contents are reset.
-			 */
-			if ((sc->fcr & FCR_ENABLE) ^ (value & FCR_ENABLE)) {
-				fifosz = (value & FCR_ENABLE) ? FIFOSZ : 1;
-				rxfifo_reset(sc, fifosz);
-			}
+	case REG_FCR:
+		/*
+		 * When moving from FIFO and 16450 mode and vice versa,
+		 * the FIFO contents are reset.
+		 */
+		if ((sc->fcr & FCR_ENABLE) ^ (value & FCR_ENABLE)) {
+			fifosz = (value & FCR_ENABLE) ? FIFOSZ : 1;
+			rxfifo_reset(sc, fifosz);
+		}
 
-			/*
-			 * The FCR_ENABLE bit must be '1' for the programming
-			 * of other FCR bits to be effective.
-			 */
-			if ((value & FCR_ENABLE) == 0) {
-				sc->fcr = 0;
-			} else {
-				if ((value & FCR_RCV_RST) != 0)
-					rxfifo_reset(sc, FIFOSZ);
+		/*
+		 * The FCR_ENABLE bit must be '1' for the programming
+		 * of other FCR bits to be effective.
+		 */
+		if ((value & FCR_ENABLE) == 0) {
+			sc->fcr = 0;
+		} else {
+			if ((value & FCR_RCV_RST) != 0)
+				rxfifo_reset(sc, FIFOSZ);
 
-				sc->fcr = value &
-					 (FCR_ENABLE | FCR_DMA | FCR_RX_MASK);
-			}
-			break;
-		case REG_LCR:
-			sc->lcr = value;
-			break;
-		case REG_MCR:
-			/* Apply mask so that bits 5-7 are 0 */
-			sc->mcr = value & 0x1F;
-			msr = modem_status(sc->mcr);
+			sc->fcr = value &
+				 (FCR_ENABLE | FCR_DMA | FCR_RX_MASK);
+		}
+		break;
+	case REG_LCR:
+		sc->lcr = value;
+		break;
+	case REG_MCR:
+		/* Apply mask so that bits 5-7 are 0 */
+		sc->mcr = value & 0x1F;
+		msr = modem_status(sc->mcr);
 
-			/*
-			 * Detect if there has been any change between the
-			 * previous and the new value of MSR. If there is
-			 * then assert the appropriate MSR delta bit.
-			 */
-			if ((msr & MSR_CTS) ^ (sc->msr & MSR_CTS))
-				sc->msr |= MSR_DCTS;
-			if ((msr & MSR_DSR) ^ (sc->msr & MSR_DSR))
-				sc->msr |= MSR_DDSR;
-			if ((msr & MSR_DCD) ^ (sc->msr & MSR_DCD))
-				sc->msr |= MSR_DDCD;
-			if ((sc->msr & MSR_RI) != 0 && (msr & MSR_RI) == 0)
-				sc->msr |= MSR_TERI;
+		/*
+		 * Detect if there has been any change between the
+		 * previous and the new value of MSR. If there is
+		 * then assert the appropriate MSR delta bit.
+		 */
+		if ((msr & MSR_CTS) ^ (sc->msr & MSR_CTS))
+			sc->msr |= MSR_DCTS;
+		if ((msr & MSR_DSR) ^ (sc->msr & MSR_DSR))
+			sc->msr |= MSR_DDSR;
+		if ((msr & MSR_DCD) ^ (sc->msr & MSR_DCD))
+			sc->msr |= MSR_DDCD;
+		if ((sc->msr & MSR_RI) != 0 && (msr & MSR_RI) == 0)
+			sc->msr |= MSR_TERI;
 
-			/*
-			 * Update the value of MSR while retaining the delta
-			 * bits.
-			 */
-			sc->msr &= MSR_DELTA_MASK;
-			sc->msr |= msr;
-			break;
-		case REG_LSR:
-			/*
-			 * Line status register is not meant to be written to
-			 * during normal operation.
-			 */
-			break;
-		case REG_MSR:
-			/*
-			 * As far as I can tell MSR is a read-only register.
-			 */
-			break;
-		case REG_SCR:
-			sc->scr = value;
-			break;
-		default:
-			break;
+		/*
+		 * Update the value of MSR while retaining the delta
+		 * bits.
+		 */
+		sc->msr &= MSR_DELTA_MASK;
+		sc->msr |= msr;
+		break;
+	case REG_LSR:
+		/*
+		 * Line status register is not meant to be written to
+		 * during normal operation.
+		 */
+		break;
+	case REG_MSR:
+		/*
+		 * As far as I can tell MSR is a read-only register.
+		 */
+		break;
+	case REG_SCR:
+		sc->scr = value;
+		break;
+	default:
+		break;
 	}
 
 done:

From owner-svn-src-all@freebsd.org  Sat Apr 20 11:04:14 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CBAD158A7D5;
 Sat, 20 Apr 2019 11:04: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 0FF208CD26;
 Sat, 20 Apr 2019 11:04:14 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1128D334;
 Sat, 20 Apr 2019 11:04: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 x3KB4Doe090624;
 Sat, 20 Apr 2019 11:04:13 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KB4D8w090623;
 Sat, 20 Apr 2019 11:04:13 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201104.x3KB4D8w090623@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 11:04: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: r346438 - stable/12/usr.sbin/bhyve
X-SVN-Group: stable-12
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve
X-SVN-Commit-Revision: 346438
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 0FF208CD26
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 11:04:14 -0000

Author: markj
Date: Sat Apr 20 11:04:13 2019
New Revision: 346438
URL: https://svnweb.freebsd.org/changeset/base/346438

Log:
  MFC r346010:
  Fix indentation.

Modified:
  stable/12/usr.sbin/bhyve/uart_emul.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/bhyve/uart_emul.c
==============================================================================
--- stable/12/usr.sbin/bhyve/uart_emul.c	Sat Apr 20 11:03:46 2019	(r346437)
+++ stable/12/usr.sbin/bhyve/uart_emul.c	Sat Apr 20 11:04:13 2019	(r346438)
@@ -437,75 +437,75 @@ uart_write(struct uart_softc *sc, int offset, uint8_t 
 		 */
 		sc->ier = value & 0x0F;
 		break;
-		case REG_FCR:
-			/*
-			 * When moving from FIFO and 16450 mode and vice versa,
-			 * the FIFO contents are reset.
-			 */
-			if ((sc->fcr & FCR_ENABLE) ^ (value & FCR_ENABLE)) {
-				fifosz = (value & FCR_ENABLE) ? FIFOSZ : 1;
-				rxfifo_reset(sc, fifosz);
-			}
+	case REG_FCR:
+		/*
+		 * When moving from FIFO and 16450 mode and vice versa,
+		 * the FIFO contents are reset.
+		 */
+		if ((sc->fcr & FCR_ENABLE) ^ (value & FCR_ENABLE)) {
+			fifosz = (value & FCR_ENABLE) ? FIFOSZ : 1;
+			rxfifo_reset(sc, fifosz);
+		}
 
-			/*
-			 * The FCR_ENABLE bit must be '1' for the programming
-			 * of other FCR bits to be effective.
-			 */
-			if ((value & FCR_ENABLE) == 0) {
-				sc->fcr = 0;
-			} else {
-				if ((value & FCR_RCV_RST) != 0)
-					rxfifo_reset(sc, FIFOSZ);
+		/*
+		 * The FCR_ENABLE bit must be '1' for the programming
+		 * of other FCR bits to be effective.
+		 */
+		if ((value & FCR_ENABLE) == 0) {
+			sc->fcr = 0;
+		} else {
+			if ((value & FCR_RCV_RST) != 0)
+				rxfifo_reset(sc, FIFOSZ);
 
-				sc->fcr = value &
-					 (FCR_ENABLE | FCR_DMA | FCR_RX_MASK);
-			}
-			break;
-		case REG_LCR:
-			sc->lcr = value;
-			break;
-		case REG_MCR:
-			/* Apply mask so that bits 5-7 are 0 */
-			sc->mcr = value & 0x1F;
-			msr = modem_status(sc->mcr);
+			sc->fcr = value &
+				 (FCR_ENABLE | FCR_DMA | FCR_RX_MASK);
+		}
+		break;
+	case REG_LCR:
+		sc->lcr = value;
+		break;
+	case REG_MCR:
+		/* Apply mask so that bits 5-7 are 0 */
+		sc->mcr = value & 0x1F;
+		msr = modem_status(sc->mcr);
 
-			/*
-			 * Detect if there has been any change between the
-			 * previous and the new value of MSR. If there is
-			 * then assert the appropriate MSR delta bit.
-			 */
-			if ((msr & MSR_CTS) ^ (sc->msr & MSR_CTS))
-				sc->msr |= MSR_DCTS;
-			if ((msr & MSR_DSR) ^ (sc->msr & MSR_DSR))
-				sc->msr |= MSR_DDSR;
-			if ((msr & MSR_DCD) ^ (sc->msr & MSR_DCD))
-				sc->msr |= MSR_DDCD;
-			if ((sc->msr & MSR_RI) != 0 && (msr & MSR_RI) == 0)
-				sc->msr |= MSR_TERI;
+		/*
+		 * Detect if there has been any change between the
+		 * previous and the new value of MSR. If there is
+		 * then assert the appropriate MSR delta bit.
+		 */
+		if ((msr & MSR_CTS) ^ (sc->msr & MSR_CTS))
+			sc->msr |= MSR_DCTS;
+		if ((msr & MSR_DSR) ^ (sc->msr & MSR_DSR))
+			sc->msr |= MSR_DDSR;
+		if ((msr & MSR_DCD) ^ (sc->msr & MSR_DCD))
+			sc->msr |= MSR_DDCD;
+		if ((sc->msr & MSR_RI) != 0 && (msr & MSR_RI) == 0)
+			sc->msr |= MSR_TERI;
 
-			/*
-			 * Update the value of MSR while retaining the delta
-			 * bits.
-			 */
-			sc->msr &= MSR_DELTA_MASK;
-			sc->msr |= msr;
-			break;
-		case REG_LSR:
-			/*
-			 * Line status register is not meant to be written to
-			 * during normal operation.
-			 */
-			break;
-		case REG_MSR:
-			/*
-			 * As far as I can tell MSR is a read-only register.
-			 */
-			break;
-		case REG_SCR:
-			sc->scr = value;
-			break;
-		default:
-			break;
+		/*
+		 * Update the value of MSR while retaining the delta
+		 * bits.
+		 */
+		sc->msr &= MSR_DELTA_MASK;
+		sc->msr |= msr;
+		break;
+	case REG_LSR:
+		/*
+		 * Line status register is not meant to be written to
+		 * during normal operation.
+		 */
+		break;
+	case REG_MSR:
+		/*
+		 * As far as I can tell MSR is a read-only register.
+		 */
+		break;
+	case REG_SCR:
+		sc->scr = value;
+		break;
+	default:
+		break;
 	}
 
 done:

From owner-svn-src-all@freebsd.org  Sat Apr 20 11:05:58 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 492FD158A8AA;
 Sat, 20 Apr 2019 11:05:58 +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 DBAA38CE9B;
 Sat, 20 Apr 2019 11:05:57 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F54FD335;
 Sat, 20 Apr 2019 11:05:57 +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 x3KB5v1U090738;
 Sat, 20 Apr 2019 11:05:57 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KB5vTA090737;
 Sat, 20 Apr 2019 11:05:57 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201105.x3KB5vTA090737@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 11:05:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346439 - stable/12/sys/conf
X-SVN-Group: stable-12
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: stable/12/sys/conf
X-SVN-Commit-Revision: 346439
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: DBAA38CE9B
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 11:05:58 -0000

Author: markj
Date: Sat Apr 20 11:05:56 2019
New Revision: 346439
URL: https://svnweb.freebsd.org/changeset/base/346439

Log:
  MFC r345348, r345594:
  Use -fdebug-prefix-map to map auto-generated kernel build paths.

Modified:
  stable/12/sys/conf/kern.post.mk
  stable/12/sys/conf/kmod.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/kern.post.mk
==============================================================================
--- stable/12/sys/conf/kern.post.mk	Sat Apr 20 11:04:13 2019	(r346438)
+++ stable/12/sys/conf/kern.post.mk	Sat Apr 20 11:05:56 2019	(r346439)
@@ -310,6 +310,11 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
 
 .depend: .PRECIOUS ${SRCS}
 
+.if ${COMPILER_TYPE} == "clang" || \
+    (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000)
+_MAP_DEBUG_PREFIX= yes
+.endif
+
 _ILINKS= machine
 .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
 _ILINKS+= ${MACHINE_CPUARCH}
@@ -319,9 +324,17 @@ _ILINKS+= x86
 .endif
 
 # Ensure that the link exists without depending on it when it exists.
+# Ensure that debug info references the path in the source tree.
 .for _link in ${_ILINKS}
 .if !exists(${.OBJDIR}/${_link})
 ${SRCS} ${CLEAN:M*.o}: ${_link}
+.endif
+.if defined(_MAP_DEBUG_PREFIX)
+.if ${_link} == "machine"
+CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include
+.else
+CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include
+.endif
 .endif
 .endfor
 

Modified: stable/12/sys/conf/kmod.mk
==============================================================================
--- stable/12/sys/conf/kmod.mk	Sat Apr 20 11:04:13 2019	(r346438)
+++ stable/12/sys/conf/kmod.mk	Sat Apr 20 11:05:56 2019	(r346439)
@@ -267,6 +267,11 @@ ${FULLPROG}: ${OBJS}
 	${OBJCOPY} --strip-debug ${.TARGET}
 .endif
 
+.if ${COMPILER_TYPE} == "clang" || \
+    (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000)
+_MAP_DEBUG_PREFIX= yes
+.endif
+
 _ILINKS=machine
 .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
 _ILINKS+=${MACHINE_CPUARCH}
@@ -283,9 +288,17 @@ beforebuild: ${_ILINKS}
 
 # Ensure that the links exist without depending on it when it exists which
 # causes all the modules to be rebuilt when the directory pointed to changes.
+# Ensure that debug info references the path in the source tree.
 .for _link in ${_ILINKS}
 .if !exists(${.OBJDIR}/${_link})
 OBJS_DEPEND_GUESS+=	${_link}
+.endif
+.if defined(_MAP_DEBUG_PREFIX)
+.if ${_link} == "machine"
+CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include
+.else
+CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include
+.endif
 .endif
 .endfor
 

From owner-svn-src-all@freebsd.org  Sat Apr 20 11:34:54 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B9FD158B201;
 Sat, 20 Apr 2019 11:34:54 +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 3FA158DCC4;
 Sat, 20 Apr 2019 11:34:54 +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 1AAF7D857;
 Sat, 20 Apr 2019 11:34:54 +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 x3KBYrDA006669;
 Sat, 20 Apr 2019 11:34:53 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KBYroC006668;
 Sat, 20 Apr 2019 11:34:53 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201904201134.x3KBYroC006668@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston 
Date: Sat, 20 Apr 2019 11:34:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346440 - head/sys/modules/opensolaris
X-SVN-Group: head
X-SVN-Commit-Author: markj
X-SVN-Commit-Paths: head/sys/modules/opensolaris
X-SVN-Commit-Revision: 346440
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 3FA158DCC4
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.965,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 11:34:54 -0000

Author: markj
Date: Sat Apr 20 11:34:53 2019
New Revision: 346440
URL: https://svnweb.freebsd.org/changeset/base/346440

Log:
  Export cpu_core from opensolaris.ko.
  
  It is referenced by dtrace*.ko.
  
  PR:		191462
  Submitted by:	me.freebsd@cgf.cx
  MFC after:	1 week

Modified:
  head/sys/modules/opensolaris/Makefile

Modified: head/sys/modules/opensolaris/Makefile
==============================================================================
--- head/sys/modules/opensolaris/Makefile	Sat Apr 20 11:05:56 2019	(r346439)
+++ head/sys/modules/opensolaris/Makefile	Sat Apr 20 11:34:53 2019	(r346440)
@@ -27,6 +27,8 @@ CFLAGS+=	-I${SYSDIR}/cddl/compat/opensolaris		\
 		-I${SYSDIR}/cddl/contrib/opensolaris/uts/common	\
 		-I${SYSDIR}
 
+EXPORT_SYMS=	cpu_core
+
 IGNORE_PRAGMA=	1
 
 .include 

From owner-svn-src-all@freebsd.org  Sat Apr 20 12:51:07 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 439DD158D42C;
 Sat, 20 Apr 2019 12:51:07 +0000 (UTC)
 (envelope-from asomers@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 DC04890145;
 Sat, 20 Apr 2019 12:51:06 +0000 (UTC)
 (envelope-from asomers@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 B2BE5E449;
 Sat, 20 Apr 2019 12:51:06 +0000 (UTC)
 (envelope-from asomers@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KCp6fU044900;
 Sat, 20 Apr 2019 12:51:06 GMT (envelope-from asomers@FreeBSD.org)
Received: (from asomers@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KCp6it044898;
 Sat, 20 Apr 2019 12:51:06 GMT (envelope-from asomers@FreeBSD.org)
Message-Id: <201904201251.x3KCp6it044898@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: asomers set sender to
 asomers@FreeBSD.org using -f
From: Alan Somers 
Date: Sat, 20 Apr 2019 12:51:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346441 - in head/sys/modules: em fusefs iavf
X-SVN-Group: head
X-SVN-Commit-Author: asomers
X-SVN-Commit-Paths: in head/sys/modules: em fusefs iavf
X-SVN-Commit-Revision: 346441
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: DC04890145
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.985,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 12:51:07 -0000

Author: asomers
Date: Sat Apr 20 12:51:05 2019
New Revision: 346441
URL: https://svnweb.freebsd.org/changeset/base/346441

Log:
  Use symlinks for kernel modules rather than hardlinks
  
  When aliasing a kernel module to a different name (ie if_igb for if_em),
  it's better to use symlinks than hard links. kldxref will omit entries for
  the links, ensuring that the loaded module has the correct name.
  
  Reviewed by:	imp
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D19979

Modified:
  head/sys/modules/em/Makefile
  head/sys/modules/fusefs/Makefile
  head/sys/modules/iavf/Makefile

Modified: head/sys/modules/em/Makefile
==============================================================================
--- head/sys/modules/em/Makefile	Sat Apr 20 11:34:53 2019	(r346440)
+++ head/sys/modules/em/Makefile	Sat Apr 20 12:51:05 2019	(r346441)
@@ -22,6 +22,6 @@ CFLAGS += -I${SRCTOP}/sys/dev/e1000
 # DEVICE_POLLING for a non-interrupt-driven method
 #CFLAGS  += -DDEVICE_POLLING
 
-LINKS=	${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_igb.ko
+SYMLINKS=	${KMOD}.ko ${KMODDIR}/if_igb.ko
 
 .include 

Modified: head/sys/modules/fusefs/Makefile
==============================================================================
--- head/sys/modules/fusefs/Makefile	Sat Apr 20 11:34:53 2019	(r346440)
+++ head/sys/modules/fusefs/Makefile	Sat Apr 20 12:51:05 2019	(r346441)
@@ -8,6 +8,6 @@ SRCS=	vnode_if.h \
 	fuse_vfsops.c fuse_vnops.c fuse_internal.c fuse_main.c
 
 # Symlink for backwards compatibility with systems installed at 12.0 or older
-LINKS=	${KMODDIR}/${KMOD}.ko ${KMODDIR}/fuse.ko
+SYMLINKS=	${KMOD}.ko ${KMODDIR}/fuse.ko
 
 .include 

Modified: head/sys/modules/iavf/Makefile
==============================================================================
--- head/sys/modules/iavf/Makefile	Sat Apr 20 11:34:53 2019	(r346440)
+++ head/sys/modules/iavf/Makefile	Sat Apr 20 12:51:05 2019	(r346441)
@@ -15,6 +15,6 @@ SRCS    += i40e_common.c i40e_nvm.c i40e_adminq.c
 # Enable asserts and other debugging facilities
 # CFLAGS += -DINVARIANTS -DINVARIANTS_SUPPORT -DWITNESS
 
-LINKS=	${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_ixlv.ko
+SYMLINKS=	${KMOD}.ko ${KMODDIR}/if_ixlv.ko
 
 .include 

From owner-svn-src-all@freebsd.org  Sat Apr 20 12:57:59 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9300E158D6BF;
 Sat, 20 Apr 2019 12:57:59 +0000 (UTC)
 (envelope-from chmeeedalf@gmail.com)
Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com
 [IPv6:2a00:1450:4864:20::22a])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id E562490535;
 Sat, 20 Apr 2019 12:57:58 +0000 (UTC)
 (envelope-from chmeeedalf@gmail.com)
Received: by mail-lj1-x22a.google.com with SMTP id t4so6694699ljc.2;
 Sat, 20 Apr 2019 05:57:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=FtmbarH47SJWvM6BmazwjJ5l8MR9rX8Ik6PDo0RbBPQ=;
 b=Ozuq7NADX3o8Dqnvk3wrwv2kh/GYbO/zX0bI8/0sIck+2C9CBVfyZsXBOhoaE2FWts
 tVF7pyjn8HWK5qe00I4pb0M/Cx9mzM1LhxLOrleWUJsflBc+pPl7QPDz3ZOwB5ylZjsS
 LtyMjq2PUAgJcJ6NtgWleV1LlavpYph1ySvVxzO7dlECU2Ia4g6cYvBlja5dGtLTlgEV
 A43VARN12ENxwa0DjPBQLRUSB8fW1tJpSlZdLsmcTXfYTj6hbjpllLROBygmXHHvbj6m
 gx9zRSaecWIZoKhPU6djhxDyezeDFn2KbEPES0YaZr1KY9CgeeifWBPIRVlsYWIiX6+q
 8Ahg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=FtmbarH47SJWvM6BmazwjJ5l8MR9rX8Ik6PDo0RbBPQ=;
 b=pThQlX7rX5oxy9/bxBL9o4rg/UpiylNlgzLWSfD5B5KLINtd+bZFnXx1Oi7DQ3xhL1
 a5PjDLBFOhfK0iISivc4IvbpXpWcJqI47HKU2DjPTOD85UB+cMatBueoCCIqcJLtjCPr
 1oYc6KXbsPrLZQzmt85fQWTLoFOvjAQao7UwqqdcuqJFrYl/9ve5/RXUYP6Wh/GGUc/v
 IPqRDy9quMpxQ7gJ4eYHyhOjjK5upGEPknkH735mSLqX1BFW6HT02cyDz82XeQw/irk8
 SJiUIXix13QOM+Uz/zeL2mejrWvtafooNHkrf5cHMR577RLhvf3ZK0h/KofqMrGyrnU7
 WmSw==
X-Gm-Message-State: APjAAAWKPwsHx4r435EHAKjXVCIGVktJiNCqlcRMUud6Sk3RAbU4tC9L
 rXYt69PEUS2DUZWQVsPUBU/JJblPqB5Lwp4RuO803Q==
X-Google-Smtp-Source: APXvYqzho1aQjiD55p8b02iEZUMWaK2ziUolq3Hv3rxKQxcCGcorlndpV4DLGREBtkiJksTgNtR+B9Nfgl22uUMwmqs=
X-Received: by 2002:a2e:9348:: with SMTP id m8mr5186305ljh.23.1555765075777;
 Sat, 20 Apr 2019 05:57:55 -0700 (PDT)
MIME-Version: 1.0
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
In-Reply-To: <201904201251.x3KCp6it044898@repo.freebsd.org>
From: Justin Hibbits 
Date: Sat, 20 Apr 2019 07:57:44 -0500
Message-ID: 
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: Alan Somers 
Cc: src-committers ,
 svn-src-all , svn-src-head@freebsd.org
X-Rspamd-Queue-Id: E562490535
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.98 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.98)[-0.983,0]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 12:57:59 -0000

On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:

> Author: asomers
> Date: Sat Apr 20 12:51:05 2019
> New Revision: 346441
> URL: https://svnweb.freebsd.org/changeset/base/346441
>
> Log:
>   Use symlinks for kernel modules rather than hardlinks
>
>   When aliasing a kernel module to a different name (ie if_igb for if_em),
>   it's better to use symlinks than hard links. kldxref will omit entries
> for
>   the links, ensuring that the loaded module has the correct name.
>
>


Thanks! This should fix installkernel on my POWER9.

- Justin

>
>

From owner-svn-src-all@freebsd.org  Sat Apr 20 13:23:50 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 778FA158DE6C;
 Sat, 20 Apr 2019 13:23:50 +0000 (UTC)
 (envelope-from chmeeedalf@gmail.com)
Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com
 [IPv6:2a00:1450:4864:20::232])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 028C69114A;
 Sat, 20 Apr 2019 13:23:49 +0000 (UTC)
 (envelope-from chmeeedalf@gmail.com)
Received: by mail-lj1-x232.google.com with SMTP id l7so6737619ljg.6;
 Sat, 20 Apr 2019 06:23:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=OS6ze9oYRde0D2mDt4ZcAb/WZABZWtPWIix75g+U0fQ=;
 b=gL8RVA15KnYNiutU+hEEcorn2W+O8sdCpW4U8HzSKg8k7PWaqJeEzFrgLQ2f2Dg3KO
 +o5UHhGgxEB8/FG9+RYZQgCicCt8dYtvDChkunI3uVCe2Z6WTHQC2DWm91F/XmYGi2Sy
 pfXW6DTC0yHAkt88VH0Pxpj4QrFeIhZZMnVw+cDTh37xs3L27fZTTnhdTzdAKPIm0kvR
 0qKEAyU8lCZKbgnI4pnqKBW7DfY8+098/PddT3FkFSOWRSOyB1DxUQcHgIFI0K4+dzKX
 bYCYglnnrB3p7osadukGPEaIQKGnkngHGxInbcs4bFlvmjxLZzvXY9h0QTH1/BRb2Hwm
 Sp6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=OS6ze9oYRde0D2mDt4ZcAb/WZABZWtPWIix75g+U0fQ=;
 b=eW251VbrWPWsJWRHAfcIlPb52kxnZ/9bDKIdAM4saKB/VbSaNE74QZ9+iixstjTMoE
 JNGW5ubrOTC157QWUm+WaXnWNMtKhGUUo57ZAhMzfjX8cZMhOFHk0tB65Gov7yVYlanm
 IrpeKOTjiroK6Jvi18GanL2fibsDhygir7ImTapWunT7dxki9Qao9XZAAx5XY4IBgq60
 mft7E1lPs7pcJMzgAI5qZWHClWfv9/QfU1bFS7OMm61o4LDUf0lPWm/6e/htY4BArOUO
 HpbZw+0hzgqPnsSSE4cCglF/aYJ6wNch30nqh4b78eOtcM07S8izuGWKJEcOqAuIX/WQ
 nMgw==
X-Gm-Message-State: APjAAAW8YUfdhEArMcD82m548xi90RzH3gN/zfJzwY8lhNg9lbR6tRB4
 +xCJQgXV4+wFbUSEEoKO/f5aWum676z/u/eBsP7PkQ==
X-Google-Smtp-Source: APXvYqwLcQq0NSxM03QWMkfpui2n7z61O2pvSjcxa/G8gXFTLn8NDOFazWYZambnIRfeZWDUvPWHpJgSv0Cp/7evYIQ=
X-Received: by 2002:a2e:9348:: with SMTP id m8mr5237022ljh.23.1555766626965;
 Sat, 20 Apr 2019 06:23:46 -0700 (PDT)
MIME-Version: 1.0
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
In-Reply-To: 
From: Justin Hibbits 
Date: Sat, 20 Apr 2019 08:23:35 -0500
Message-ID: 
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: Alan Somers 
Cc: src-committers ,
 svn-src-all , 
 svn-src-head 
X-Rspamd-Queue-Id: 028C69114A
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=gL8RVA15;
 dmarc=pass (policy=none) header.from=gmail.com;
 spf=pass (mx1.freebsd.org: domain of chmeeedalf@gmail.com designates
 2a00:1450:4864:20::232 as permitted sender)
 smtp.mailfrom=chmeeedalf@gmail.com
X-Spamd-Result: default: False [-6.79 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[];
 RCPT_COUNT_THREE(0.00)[4];
 R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36];
 FREEMAIL_FROM(0.00)[gmail.com];
 MIME_GOOD(-0.10)[multipart/alternative,text/plain];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0];
 RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[];
 DKIM_TRACE(0.00)[gmail.com:+];
 DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
 RCVD_IN_DNSWL_NONE(0.00)[2.3.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org
 : 127.0.5.0]; 
 MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com];
 IP_SCORE(-2.79)[ip: (-9.24), ipnet: 2a00:1450::/32(-2.38), asn: 15169(-2.26),
 country: US(-0.06)]; NEURAL_HAM_SHORT(-0.99)[-0.989,0];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+];
 FREEMAIL_ENVFROM(0.00)[gmail.com];
 ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
 RCVD_COUNT_TWO(0.00)[2];
 DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 13:23:50 -0000

On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:

> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
> wrote:
> >
> >
> >
> > On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
> >>
> >> Author: asomers
> >> Date: Sat Apr 20 12:51:05 2019
> >> New Revision: 346441
> >> URL: https://svnweb.freebsd.org/changeset/base/346441
> >>
> >> Log:
> >>   Use symlinks for kernel modules rather than hardlinks
> >>
> >>   When aliasing a kernel module to a different name (ie if_igb for
> if_em),
> >>   it's better to use symlinks than hard links. kldxref will omit
> entries for
> >>   the links, ensuring that the loaded module has the correct name.
> >>
> >>
> >
> >
> > Thanks! This should fix installkernel on my POWER9.
> >
> > - Justin
>
> What's the problem with your POWER9?  Is that one of those msdosfs
> /boot systems?  If so, I don't think this will fix it.  msdosfs
> doesn't support either symlinks or hardlinks.  Or is there some other
> problem?
> -Alan
>

Yes it is.  Well that's a bummer then. I thought we faked symlinks on
msdosfs, but on second thought not sure how well would do that.

- Justin

>

From owner-svn-src-all@freebsd.org  Sat Apr 20 13:46:58 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AE13158E745;
 Sat, 20 Apr 2019 13:46:58 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com
 [209.85.208.195])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id CD74E91C7E;
 Sat, 20 Apr 2019 13:46:57 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-lj1-f195.google.com with SMTP id v22so6737870lje.9;
 Sat, 20 Apr 2019 06:46:57 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=Vp2yGWWjgC9e5YSIjEMA85cdmgBTGdRL9JCvKeMLHGg=;
 b=HF9O5FGB+F/LasmEuSv2IQHQKODNHdOKPAYDrjuwVMBatQdPb+6aokmuyGhJztV0Gu
 VZJujwgTITbTqYiW/Tdh+CQ1BuuyjcUEQbS3hTXbVIN45xUrgr4e5ZHEWiMEzyu9MmfU
 HBnI60fx3W6MNF8dA9ig0kcx4KwR22vsTIzK8S7MRH3Bc1QNCE6Fi3CRlOqKUdOc04k2
 b/Cz4wgr6KI5gA0rCFmA2Xb/9J5QO8n4wwmW8Iulr2ujEs3Cu20nTS1uzB62gqKvTM3G
 why0b9xYb9SCKPB9VXO5I6iLBE7LPw5KJQETJCjuv40ui29M8Teq1alpuD1a/KyvMl+H
 urZw==
X-Gm-Message-State: APjAAAWP+RHjiqolXFoQWylclgvrTh/sTX8Z4cSEZMfdciEJyb+h6Z0L
 27RfWDAZsVXOVPmKsGOzkkWXbLztimQjgniraFpOvzUS
X-Google-Smtp-Source: APXvYqwEBe5kRU97ZQGEtDLuMWFHGAmuHV0y+/91lTufLeWHMg1TxSD0xhveknKEZ0NeEIh/Bv8GgStNMiKCMGAxI3s=
X-Received: by 2002:a2e:9719:: with SMTP id r25mr4657397lji.29.1555768015730; 
 Sat, 20 Apr 2019 06:46:55 -0700 (PDT)
MIME-Version: 1.0
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
 
In-Reply-To: 
From: Alan Somers 
Date: Sat, 20 Apr 2019 07:46:44 -0600
Message-ID: 
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: Justin Hibbits 
Cc: src-committers ,
 svn-src-all , 
 svn-src-head 
Content-Type: text/plain; charset="UTF-8"
X-Rspamd-Queue-Id: CD74E91C7E
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.89 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.89)[-0.894,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 13:46:58 -0000

On Sat, Apr 20, 2019 at 7:23 AM Justin Hibbits  wrote:
>
>
>
> On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
>>
>> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits  wrote:
>> >
>> >
>> >
>> > On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
>> >>
>> >> Author: asomers
>> >> Date: Sat Apr 20 12:51:05 2019
>> >> New Revision: 346441
>> >> URL: https://svnweb.freebsd.org/changeset/base/346441
>> >>
>> >> Log:
>> >>   Use symlinks for kernel modules rather than hardlinks
>> >>
>> >>   When aliasing a kernel module to a different name (ie if_igb for if_em),
>> >>   it's better to use symlinks than hard links. kldxref will omit entries for
>> >>   the links, ensuring that the loaded module has the correct name.
>> >>
>> >>
>> >
>> >
>> > Thanks! This should fix installkernel on my POWER9.
>> >
>> > - Justin
>>
>> What's the problem with your POWER9?  Is that one of those msdosfs
>> /boot systems?  If so, I don't think this will fix it.  msdosfs
>> doesn't support either symlinks or hardlinks.  Or is there some other
>> problem?
>> -Alan
>
>
> Yes it is.  Well that's a bummer then. I thought we faked symlinks on msdosfs, but on second thought not sure how well would do that.
>
> - Justin

We should probably just remove the offending links on ppc, then.  The
only harm is that after upgrading, ppc users would have to replace
fuse_load="YES" with fusefs_load="YES".
-Alan

From owner-svn-src-all@freebsd.org  Sat Apr 20 13:54:05 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D105E158E971;
 Sat, 20 Apr 2019 13:54:05 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com
 [209.85.208.181])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 5CA10920C1;
 Sat, 20 Apr 2019 13:54:05 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-lj1-f181.google.com with SMTP id k8so6755339lja.8;
 Sat, 20 Apr 2019 06:54:05 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=31YLO0Kc7ytFbYRfrMgC6bw2WAYRkSRAwVIWS7UwwdM=;
 b=q+JLo9vpGfubW7Yl4ETPd4WJuQuuggwNqSjgMD35IlwON6gPiBDxeqQVvhLCRiVrjh
 2D2386oyGwXCQYj7F+40xLZI26Lx2wB2GtWHDjLrlRDnxcz8vELFm1fPkN3hu+2YICIj
 zKtoTwZl0/WLdcFQCDUOIamdYi3zatvv2h17ColAH//key4P7w9A+jvVBnsCZ+IdK0Gi
 7Xo1b57r0jS10e/9cCugVS+U9iLNv43sw9Vt6URJw5B/MeAs0yhZQhCKh9Ly3fTpLOH9
 48I4JRYiEjuuGaG4PSiayvdi9QGKp8DhNnlDUE3aVz2gmUTRw9LU999wPZCeMrUbdPDC
 siNA==
X-Gm-Message-State: APjAAAVtX2958uVkCIrh7Sp06Yo4U3YQX1D2AYTgQuiaEE4rijZs7sXQ
 e53NASMyIw20P6a3RFmIQmiqyUO4EF0EWaCT1Q2G7d2i
X-Google-Smtp-Source: APXvYqwuC6SBJbucfn7PoD111RAu3RvsAYquKTJzHFLs0Aa32Sx62vv/CN1tRE5TIwWGUk4a/LAm8zFXTwxNgyL5YZk=
X-Received: by 2002:a2e:9703:: with SMTP id r3mr4981998lji.88.1555766502377;
 Sat, 20 Apr 2019 06:21:42 -0700 (PDT)
MIME-Version: 1.0
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
In-Reply-To: 
From: Alan Somers 
Date: Sat, 20 Apr 2019 07:21:30 -0600
Message-ID: 
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: Justin Hibbits 
Cc: src-committers ,
 svn-src-all , 
 svn-src-head 
Content-Type: text/plain; charset="UTF-8"
X-Rspamd-Queue-Id: 5CA10920C1
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.89 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.89)[-0.894,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 13:54:06 -0000

On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits  wrote:
>
>
>
> On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
>>
>> Author: asomers
>> Date: Sat Apr 20 12:51:05 2019
>> New Revision: 346441
>> URL: https://svnweb.freebsd.org/changeset/base/346441
>>
>> Log:
>>   Use symlinks for kernel modules rather than hardlinks
>>
>>   When aliasing a kernel module to a different name (ie if_igb for if_em),
>>   it's better to use symlinks than hard links. kldxref will omit entries for
>>   the links, ensuring that the loaded module has the correct name.
>>
>>
>
>
> Thanks! This should fix installkernel on my POWER9.
>
> - Justin

What's the problem with your POWER9?  Is that one of those msdosfs
/boot systems?  If so, I don't think this will fix it.  msdosfs
doesn't support either symlinks or hardlinks.  Or is there some other
problem?
-Alan

From owner-svn-src-all@freebsd.org  Sat Apr 20 15:07:01 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4523158FCC0;
 Sat, 20 Apr 2019 15:07:00 +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 4DD5393F76;
 Sat, 20 Apr 2019 15:07:00 +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 3C5A1FC5D;
 Sat, 20 Apr 2019 15:07:00 +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 x3KF70DF016282;
 Sat, 20 Apr 2019 15:07:00 GMT (envelope-from cy@FreeBSD.org)
Received: (from cy@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KF6xGN016273;
 Sat, 20 Apr 2019 15:06:59 GMT (envelope-from cy@FreeBSD.org)
Message-Id: <201904201506.x3KF6xGN016273@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
 using -f
From: Cy Schubert 
Date: Sat, 20 Apr 2019 15:06:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r346442 - in stable: 11/contrib/sqlite3
 11/contrib/sqlite3/tea 11/contrib/sqlite3/tea/generic 12/contrib/sqlite3
 12/contrib/sqlite3/tea 12/contrib/sqlite3/tea/generic
X-SVN-Group: stable-11
X-SVN-Commit-Author: cy
X-SVN-Commit-Paths: in stable: 11/contrib/sqlite3 11/contrib/sqlite3/tea
 11/contrib/sqlite3/tea/generic 12/contrib/sqlite3 12/contrib/sqlite3/tea
 12/contrib/sqlite3/tea/generic
X-SVN-Commit-Revision: 346442
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 4DD5393F76
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.94 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.94)[-0.943,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 15:07:01 -0000

Author: cy
Date: Sat Apr 20 15:06:58 2019
New Revision: 346442
URL: https://svnweb.freebsd.org/changeset/base/346442

Log:
  MFC r345996:
  
  Update sqlite3-3.26.0 (3260000) --> sqlite3-3.27.1 (3270100)

Modified:
  stable/11/contrib/sqlite3/Makefile.in
  stable/11/contrib/sqlite3/Makefile.msc
  stable/11/contrib/sqlite3/aclocal.m4
  stable/11/contrib/sqlite3/config.guess
  stable/11/contrib/sqlite3/config.sub
  stable/11/contrib/sqlite3/configure
  stable/11/contrib/sqlite3/configure.ac
  stable/11/contrib/sqlite3/depcomp
  stable/11/contrib/sqlite3/install-sh
  stable/11/contrib/sqlite3/ltmain.sh
  stable/11/contrib/sqlite3/shell.c
  stable/11/contrib/sqlite3/sqlite3.c
  stable/11/contrib/sqlite3/sqlite3.h
  stable/11/contrib/sqlite3/tea/configure
  stable/11/contrib/sqlite3/tea/configure.ac
  stable/11/contrib/sqlite3/tea/generic/tclsqlite3.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/sqlite3/Makefile.in
  stable/12/contrib/sqlite3/Makefile.msc
  stable/12/contrib/sqlite3/aclocal.m4
  stable/12/contrib/sqlite3/config.guess
  stable/12/contrib/sqlite3/config.sub
  stable/12/contrib/sqlite3/configure
  stable/12/contrib/sqlite3/configure.ac
  stable/12/contrib/sqlite3/depcomp
  stable/12/contrib/sqlite3/install-sh
  stable/12/contrib/sqlite3/ltmain.sh
  stable/12/contrib/sqlite3/shell.c
  stable/12/contrib/sqlite3/sqlite3.c
  stable/12/contrib/sqlite3/sqlite3.h
  stable/12/contrib/sqlite3/tea/configure
  stable/12/contrib/sqlite3/tea/configure.ac
  stable/12/contrib/sqlite3/tea/generic/tclsqlite3.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/sqlite3/Makefile.in
==============================================================================
--- stable/11/contrib/sqlite3/Makefile.in	Sat Apr 20 12:51:05 2019	(r346441)
+++ stable/11/contrib/sqlite3/Makefile.in	Sat Apr 20 15:06:58 2019	(r346442)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -351,6 +351,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -756,7 +757,7 @@ distdir: $(DISTFILES)
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
 	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -782,7 +783,7 @@ dist-shar: distdir
 	@echo WARNING: "Support for shar distribution archives is" \
 	               "deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -800,7 +801,7 @@ dist dist-all:
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lz*) \
@@ -810,7 +811,7 @@ distcheck: dist
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac

Modified: stable/11/contrib/sqlite3/Makefile.msc
==============================================================================
--- stable/11/contrib/sqlite3/Makefile.msc	Sat Apr 20 12:51:05 2019	(r346441)
+++ stable/11/contrib/sqlite3/Makefile.msc	Sat Apr 20 15:06:58 2019	(r346442)
@@ -283,6 +283,7 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENAB
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_INTROSPECTION_PRAGMAS=1
+OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
 !ENDIF
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
 !ENDIF
@@ -937,6 +938,7 @@ LIBRESOBJS =
 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
+SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DESERIALIZE=1
 !ENDIF
 
 

Modified: stable/11/contrib/sqlite3/aclocal.m4
==============================================================================
--- stable/11/contrib/sqlite3/aclocal.m4	Sat Apr 20 12:51:05 2019	(r346441)
+++ stable/11/contrib/sqlite3/aclocal.m4	Sat Apr 20 15:06:58 2019	(r346442)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -744,7 +744,6 @@ _LT_CONFIG_SAVE_COMMANDS([
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
 # Generated automatically by $as_me ($PACKAGE) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
 # Provide generalized library-building support services.
@@ -2901,6 +2900,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -3560,7 +3571,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd*)
+netbsd* | netbsdelf*-gnu)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   else
@@ -4438,7 +4449,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      netbsd*)
+      netbsd* | netbsdelf*-gnu)
 	;;
       *qnx* | *nto*)
         # QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4950,6 +4961,9 @@ m4_if([$1], [CXX], [
       ;;
     esac
     ;;
+  linux* | k*bsd*-gnu | gnu*)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
     ;;
@@ -5012,6 +5026,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
   openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
+  linux* | k*bsd*-gnu | gnu*)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5266,7 +5283,7 @@ _LT_EOF
       fi
       ;;
 
-    netbsd*)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -5787,6 +5804,7 @@ _LT_EOF
 	if test yes = "$lt_cv_irix_exported_symbol"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
 	fi
+	_LT_TAGVAR(link_all_deplibs, $1)=no
       else
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
@@ -5808,7 +5826,7 @@ _LT_EOF
       esac
       ;;
 
-    netbsd*)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -9049,7 +9067,7 @@ m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
 m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
 m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9064,7 +9082,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.15.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -9080,14 +9098,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9139,7 +9157,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9170,7 +9188,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9361,7 +9379,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9437,7 +9455,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9634,7 +9652,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9655,7 +9673,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9676,7 +9694,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9726,7 +9744,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9765,7 +9783,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9794,7 +9812,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9841,7 +9859,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9860,7 +9878,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9941,7 +9959,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -10001,7 +10019,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -10029,7 +10047,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -10048,7 +10066,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,

Modified: stable/11/contrib/sqlite3/config.guess
==============================================================================
--- stable/11/contrib/sqlite3/config.guess	Sat Apr 20 12:51:05 2019	(r346441)
+++ stable/11/contrib/sqlite3/config.guess	Sat Apr 20 15:06:58 2019	(r346442)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2014 Free Software Foundation, Inc.
+#   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2014-11-04'
+timestamp='2018-02-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2014-11-04'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see .
+# along with this program; if not, see .
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2014-11-04'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
 # Please send patches to .
 
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
 
 Output the configuration name of the system \`$me' is run on.
 
-Operation modes:
+Options:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev
 dummy=$tmp/dummy ;
 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
+ ,,)    echo "int x;" > "$dummy.c" ;
 	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEAS
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
 Linux|GNU|GNU/*)
 	# If the system lacks a compiler, then just pick glibc.
 	# We could probably try harder.
 	LIBC=gnu
 
-	eval $set_cc_for_build
-	cat <<-EOF > $dummy.c
+	eval "$set_cc_for_build"
+	cat <<-EOF > "$dummy.c"
 	#include 
 	#if defined(__UCLIBC__)
 	LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
 	LIBC=gnu
 	#endif
 	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+	# If ldd exists, use it to detect musl libc.
+	if command -v ldd >/dev/null && \
+		ldd --version 2>&1 | grep -q ^musl
+	then
+	    LIBC=musl
+	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -168,21 +175,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    "/sbin/$sysctl" 2>/dev/null || \
+	    "/usr/sbin/$sysctl" 2>/dev/null || \
+	    echo unknown)`
+	case "$UNAME_MACHINE_ARCH" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	    earmv*)
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine="${arch}${endian}"-unknown
+		;;
+	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
+	# to ELF recently (or will in the future) and ABI.
+	case "$UNAME_MACHINE_ARCH" in
+	    earm*)
+		os=netbsdelf
+		;;
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
+		eval "$set_cc_for_build"
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
 		then
@@ -197,44 +214,67 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 		os=netbsd
 		;;
 	esac
+	# Determine ABI tags.
+	case "$UNAME_MACHINE_ARCH" in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+		;;
+	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
 	# kernel version information, so it can be replaced with a
 	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
+	case "$UNAME_VERSION" in
 	    Debian*)
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
+	echo "$machine-${os}${release}${abi}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
 	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
 	exit ;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+	exit ;;
+    *:MidnightBSD:*:*)
+	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+	exit ;;
     *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
 	exit ;;
     *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
 	exit ;;
     macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
     *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
+    *:Sortix:*:*)
+	echo "$UNAME_MACHINE"-unknown-sortix
+	exit ;;
+    *:Redox:*:*)
+	echo "$UNAME_MACHINE"-unknown-redox
+	exit ;;
+    mips:OSF1:*.*)
+        echo mips-dec-osf1
+        exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -251,63 +291,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 	case "$ALPHA_CPU_TYPE" in
 	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
+		UNAME_MACHINE=alphaev5 ;;
 	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
+		UNAME_MACHINE=alphaev56 ;;
 	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
+		UNAME_MACHINE=alphapca56 ;;
 	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
+		UNAME_MACHINE=alphapca57 ;;
 	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
+		UNAME_MACHINE=alphaev6 ;;
 	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
+		UNAME_MACHINE=alphaev67 ;;
 	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
+		UNAME_MACHINE=alphaev69 ;;
 	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
+		UNAME_MACHINE=alphaev7 ;;
 	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
+		UNAME_MACHINE=alphaev79 ;;
 	esac
 	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 	exitcode=$?
 	trap '' 0
 	exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
 	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
+	echo "$UNAME_MACHINE"-unknown-amigaos
 	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
+	echo "$UNAME_MACHINE"-unknown-morphos
 	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
@@ -319,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
+	echo arm-acorn-riscix"$UNAME_RELEASE"
 	exit ;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
@@ -346,38 +377,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     s390x:SunOS:*:*)
-	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux${UNAME_RELEASE}
+	echo i386-pc-auroraux"$UNAME_RELEASE"
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	eval $set_cc_for_build
-	SUN_ARCH="i386"
+	eval "$set_cc_for_build"
+	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
 	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		grep IS_64BIT_ARCH >/dev/null
 	    then
-		SUN_ARCH="x86_64"
+		SUN_ARCH=x86_64
 	    fi
 	fi
-	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
@@ -386,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 		;;
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
 	exit ;;
     sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
+	echo m68k-sun-sunos"$UNAME_RELEASE"
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
+		echo m68k-sun-sunos"$UNAME_RELEASE"
 		;;
 	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
+		echo sparc-sun-sunos"$UNAME_RELEASE"
 		;;
 	esac
 	exit ;;
     aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
+	echo sparc-auspex-sunos"$UNAME_RELEASE"
 	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
@@ -415,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint${UNAME_RELEASE}
+	echo m68k-milan-mint"$UNAME_RELEASE"
 	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint${UNAME_RELEASE}
+	echo m68k-hades-mint"$UNAME_RELEASE"
 	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint${UNAME_RELEASE}
+	echo m68k-unknown-mint"$UNAME_RELEASE"
 	exit ;;
     m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
+	echo m68k-apple-machten"$UNAME_RELEASE"
 	exit ;;
     powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
+	echo powerpc-apple-machten"$UNAME_RELEASE"
 	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
 	exit ;;
     RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
+	echo mips-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
+	echo vax-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
+	echo clipper-intergraph-clix"$UNAME_RELEASE"
 	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	eval "$set_cc_for_build"
+	sed 's/^	//' << EOF > "$dummy.c"
 #ifdef __cplusplus
 #include   /* for printf() prototype */
 	int main (int argc, char *argv[]) {
@@ -461,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 #endif
 	#if defined (host_mips) && defined (MIPSEB)
 	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
 	#endif
 	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
 	#endif
 	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
 	#endif
 	#endif
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
 	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
+	echo mips-mips-riscos"$UNAME_RELEASE"
 	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
@@ -503,17 +534,17 @@ EOF
     AViiON:dgux:*:*)
 	# DG/UX returns AViiON for all architectures
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
 	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+	       [ "$TARGET_BINARY_INTERFACE"x = x ]
 	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
+		echo m88k-dg-dgux"$UNAME_RELEASE"
 	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
 	    fi
 	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
+	    echo i586-dg-dgux"$UNAME_RELEASE"
 	fi
 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
@@ -530,7 +561,7 @@ EOF
 	echo m68k-tektronix-bsd
 	exit ;;
     *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
 	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
@@ -542,14 +573,14 @@ EOF
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
+		eval "$set_cc_for_build"
+		sed 's/^		//' << EOF > "$dummy.c"
 		#include 
 
 		main()
@@ -560,7 +591,7 @@ EOF
 			exit(0);
 			}
 EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
 		then
 			echo "$SYSTEM_NAME"
 		else
@@ -574,7 +605,7 @@ EOF
 	exit ;;
     *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
@@ -583,18 +614,18 @@ EOF
 		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
 	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
 	echo romp-ibm-bsd4.4
 	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
 	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
@@ -609,28 +640,28 @@ EOF
 	echo m68k-hp-bsd4.4
 	exit ;;
     9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
+	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+	case "$UNAME_MACHINE" in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "${sc_cpu_version}" in
-		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		    case "$sc_cpu_version" in
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
-			case "${sc_kernel_bits}" in
-			  32) HP_ARCH="hppa2.0n" ;;
-			  64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			case "$sc_kernel_bits" in
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^		//' << EOF >$dummy.c
+		if [ "$HP_ARCH" = "" ]; then
+		    eval "$set_cc_for_build"
+		    sed 's/^		//' << EOF > "$dummy.c"
 
 		#define _HPUX_SOURCE
 		#include 
@@ -663,13 +694,13 @@ EOF
 		    exit (0);
 		}
 EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
+	if [ "$HP_ARCH" = hppa2.0w ]
 	then
-	    eval $set_cc_for_build
+	    eval "$set_cc_for_build"
 
 	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
 	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
@@ -680,23 +711,23 @@ EOF
 	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
 	    # => hppa64-hp-hpux11.23
 
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
 		grep -q __LP64__
 	    then
-		HP_ARCH="hppa2.0w"
+		HP_ARCH=hppa2.0w
 	    else
-		HP_ARCH="hppa64"

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Sat Apr 20 15:07:01 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83D79158FCC5;
 Sat, 20 Apr 2019 15:07:01 +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 3164193F78;
 Sat, 20 Apr 2019 15:07:01 +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 0C2B4FC5E;
 Sat, 20 Apr 2019 15:07:01 +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 x3KF71tk016293;
 Sat, 20 Apr 2019 15:07:01 GMT (envelope-from cy@FreeBSD.org)
Received: (from cy@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KF70Tj016288;
 Sat, 20 Apr 2019 15:07:00 GMT (envelope-from cy@FreeBSD.org)
Message-Id: <201904201507.x3KF70Tj016288@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
 using -f
From: Cy Schubert 
Date: Sat, 20 Apr 2019 15:07:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r346442 - in stable: 11/contrib/sqlite3
 11/contrib/sqlite3/tea 11/contrib/sqlite3/tea/generic 12/contrib/sqlite3
 12/contrib/sqlite3/tea 12/contrib/sqlite3/tea/generic
X-SVN-Group: stable-12
X-SVN-Commit-Author: cy
X-SVN-Commit-Paths: in stable: 11/contrib/sqlite3 11/contrib/sqlite3/tea
 11/contrib/sqlite3/tea/generic 12/contrib/sqlite3 12/contrib/sqlite3/tea
 12/contrib/sqlite3/tea/generic
X-SVN-Commit-Revision: 346442
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 3164193F78
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.94 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.94)[-0.943,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 15:07:02 -0000

Author: cy
Date: Sat Apr 20 15:06:58 2019
New Revision: 346442
URL: https://svnweb.freebsd.org/changeset/base/346442

Log:
  MFC r345996:
  
  Update sqlite3-3.26.0 (3260000) --> sqlite3-3.27.1 (3270100)

Modified:
  stable/12/contrib/sqlite3/Makefile.in
  stable/12/contrib/sqlite3/Makefile.msc
  stable/12/contrib/sqlite3/aclocal.m4
  stable/12/contrib/sqlite3/config.guess
  stable/12/contrib/sqlite3/config.sub
  stable/12/contrib/sqlite3/configure
  stable/12/contrib/sqlite3/configure.ac
  stable/12/contrib/sqlite3/depcomp
  stable/12/contrib/sqlite3/install-sh
  stable/12/contrib/sqlite3/ltmain.sh
  stable/12/contrib/sqlite3/shell.c
  stable/12/contrib/sqlite3/sqlite3.c
  stable/12/contrib/sqlite3/sqlite3.h
  stable/12/contrib/sqlite3/tea/configure
  stable/12/contrib/sqlite3/tea/configure.ac
  stable/12/contrib/sqlite3/tea/generic/tclsqlite3.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/sqlite3/Makefile.in
  stable/11/contrib/sqlite3/Makefile.msc
  stable/11/contrib/sqlite3/aclocal.m4
  stable/11/contrib/sqlite3/config.guess
  stable/11/contrib/sqlite3/config.sub
  stable/11/contrib/sqlite3/configure
  stable/11/contrib/sqlite3/configure.ac
  stable/11/contrib/sqlite3/depcomp
  stable/11/contrib/sqlite3/install-sh
  stable/11/contrib/sqlite3/ltmain.sh
  stable/11/contrib/sqlite3/shell.c
  stable/11/contrib/sqlite3/sqlite3.c
  stable/11/contrib/sqlite3/sqlite3.h
  stable/11/contrib/sqlite3/tea/configure
  stable/11/contrib/sqlite3/tea/configure.ac
  stable/11/contrib/sqlite3/tea/generic/tclsqlite3.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/sqlite3/Makefile.in
==============================================================================
--- stable/12/contrib/sqlite3/Makefile.in	Sat Apr 20 12:51:05 2019	(r346441)
+++ stable/12/contrib/sqlite3/Makefile.in	Sat Apr 20 15:06:58 2019	(r346442)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -351,6 +351,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -756,7 +757,7 @@ distdir: $(DISTFILES)
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
 	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -782,7 +783,7 @@ dist-shar: distdir
 	@echo WARNING: "Support for shar distribution archives is" \
 	               "deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -800,7 +801,7 @@ dist dist-all:
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lz*) \
@@ -810,7 +811,7 @@ distcheck: dist
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac

Modified: stable/12/contrib/sqlite3/Makefile.msc
==============================================================================
--- stable/12/contrib/sqlite3/Makefile.msc	Sat Apr 20 12:51:05 2019	(r346441)
+++ stable/12/contrib/sqlite3/Makefile.msc	Sat Apr 20 15:06:58 2019	(r346442)
@@ -283,6 +283,7 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENAB
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_INTROSPECTION_PRAGMAS=1
+OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
 !ENDIF
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
 !ENDIF
@@ -937,6 +938,7 @@ LIBRESOBJS =
 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
+SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DESERIALIZE=1
 !ENDIF
 
 

Modified: stable/12/contrib/sqlite3/aclocal.m4
==============================================================================
--- stable/12/contrib/sqlite3/aclocal.m4	Sat Apr 20 12:51:05 2019	(r346441)
+++ stable/12/contrib/sqlite3/aclocal.m4	Sat Apr 20 15:06:58 2019	(r346442)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -744,7 +744,6 @@ _LT_CONFIG_SAVE_COMMANDS([
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
 # Generated automatically by $as_me ($PACKAGE) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
 # Provide generalized library-building support services.
@@ -2901,6 +2900,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -3560,7 +3571,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd*)
+netbsd* | netbsdelf*-gnu)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   else
@@ -4438,7 +4449,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      netbsd*)
+      netbsd* | netbsdelf*-gnu)
 	;;
       *qnx* | *nto*)
         # QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4950,6 +4961,9 @@ m4_if([$1], [CXX], [
       ;;
     esac
     ;;
+  linux* | k*bsd*-gnu | gnu*)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
     ;;
@@ -5012,6 +5026,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
   openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
+  linux* | k*bsd*-gnu | gnu*)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5266,7 +5283,7 @@ _LT_EOF
       fi
       ;;
 
-    netbsd*)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -5787,6 +5804,7 @@ _LT_EOF
 	if test yes = "$lt_cv_irix_exported_symbol"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
 	fi
+	_LT_TAGVAR(link_all_deplibs, $1)=no
       else
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
@@ -5808,7 +5826,7 @@ _LT_EOF
       esac
       ;;
 
-    netbsd*)
+    netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -9049,7 +9067,7 @@ m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
 m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
 m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9064,7 +9082,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.15.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -9080,14 +9098,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9139,7 +9157,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9170,7 +9188,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9361,7 +9379,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9437,7 +9455,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9634,7 +9652,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9655,7 +9673,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9676,7 +9694,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9726,7 +9744,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9765,7 +9783,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9794,7 +9812,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9841,7 +9859,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9860,7 +9878,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9941,7 +9959,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -10001,7 +10019,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -10029,7 +10047,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -10048,7 +10066,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,

Modified: stable/12/contrib/sqlite3/config.guess
==============================================================================
--- stable/12/contrib/sqlite3/config.guess	Sat Apr 20 12:51:05 2019	(r346441)
+++ stable/12/contrib/sqlite3/config.guess	Sat Apr 20 15:06:58 2019	(r346442)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2014 Free Software Foundation, Inc.
+#   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2014-11-04'
+timestamp='2018-02-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2014-11-04'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see .
+# along with this program; if not, see .
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2014-11-04'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
 # Please send patches to .
 
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
 
 Output the configuration name of the system \`$me' is run on.
 
-Operation modes:
+Options:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev
 dummy=$tmp/dummy ;
 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
+ ,,)    echo "int x;" > "$dummy.c" ;
 	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEAS
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
 Linux|GNU|GNU/*)
 	# If the system lacks a compiler, then just pick glibc.
 	# We could probably try harder.
 	LIBC=gnu
 
-	eval $set_cc_for_build
-	cat <<-EOF > $dummy.c
+	eval "$set_cc_for_build"
+	cat <<-EOF > "$dummy.c"
 	#include 
 	#if defined(__UCLIBC__)
 	LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
 	LIBC=gnu
 	#endif
 	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+	# If ldd exists, use it to detect musl libc.
+	if command -v ldd >/dev/null && \
+		ldd --version 2>&1 | grep -q ^musl
+	then
+	    LIBC=musl
+	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -168,21 +175,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    "/sbin/$sysctl" 2>/dev/null || \
+	    "/usr/sbin/$sysctl" 2>/dev/null || \
+	    echo unknown)`
+	case "$UNAME_MACHINE_ARCH" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	    earmv*)
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine="${arch}${endian}"-unknown
+		;;
+	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
+	# to ELF recently (or will in the future) and ABI.
+	case "$UNAME_MACHINE_ARCH" in
+	    earm*)
+		os=netbsdelf
+		;;
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
+		eval "$set_cc_for_build"
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
 		then
@@ -197,44 +214,67 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 		os=netbsd
 		;;
 	esac
+	# Determine ABI tags.
+	case "$UNAME_MACHINE_ARCH" in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+		;;
+	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
 	# kernel version information, so it can be replaced with a
 	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
+	case "$UNAME_VERSION" in
 	    Debian*)
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
+	echo "$machine-${os}${release}${abi}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
 	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
 	exit ;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+	exit ;;
+    *:MidnightBSD:*:*)
+	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+	exit ;;
     *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
 	exit ;;
     *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
 	exit ;;
     macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
     *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
+    *:Sortix:*:*)
+	echo "$UNAME_MACHINE"-unknown-sortix
+	exit ;;
+    *:Redox:*:*)
+	echo "$UNAME_MACHINE"-unknown-redox
+	exit ;;
+    mips:OSF1:*.*)
+        echo mips-dec-osf1
+        exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -251,63 +291,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 	case "$ALPHA_CPU_TYPE" in
 	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
+		UNAME_MACHINE=alphaev5 ;;
 	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
+		UNAME_MACHINE=alphaev56 ;;
 	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
+		UNAME_MACHINE=alphapca56 ;;
 	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
+		UNAME_MACHINE=alphapca57 ;;
 	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
+		UNAME_MACHINE=alphaev6 ;;
 	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
+		UNAME_MACHINE=alphaev67 ;;
 	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
+		UNAME_MACHINE=alphaev69 ;;
 	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
+		UNAME_MACHINE=alphaev7 ;;
 	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
+		UNAME_MACHINE=alphaev79 ;;
 	esac
 	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 	exitcode=$?
 	trap '' 0
 	exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
 	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
+	echo "$UNAME_MACHINE"-unknown-amigaos
 	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
+	echo "$UNAME_MACHINE"-unknown-morphos
 	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
@@ -319,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
+	echo arm-acorn-riscix"$UNAME_RELEASE"
 	exit ;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
@@ -346,38 +377,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     s390x:SunOS:*:*)
-	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux${UNAME_RELEASE}
+	echo i386-pc-auroraux"$UNAME_RELEASE"
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	eval $set_cc_for_build
-	SUN_ARCH="i386"
+	eval "$set_cc_for_build"
+	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
 	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		grep IS_64BIT_ARCH >/dev/null
 	    then
-		SUN_ARCH="x86_64"
+		SUN_ARCH=x86_64
 	    fi
 	fi
-	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
@@ -386,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 		;;
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
 	exit ;;
     sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
+	echo m68k-sun-sunos"$UNAME_RELEASE"
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
+		echo m68k-sun-sunos"$UNAME_RELEASE"
 		;;
 	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
+		echo sparc-sun-sunos"$UNAME_RELEASE"
 		;;
 	esac
 	exit ;;
     aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
+	echo sparc-auspex-sunos"$UNAME_RELEASE"
 	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
@@ -415,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint${UNAME_RELEASE}
+	echo m68k-milan-mint"$UNAME_RELEASE"
 	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint${UNAME_RELEASE}
+	echo m68k-hades-mint"$UNAME_RELEASE"
 	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint${UNAME_RELEASE}
+	echo m68k-unknown-mint"$UNAME_RELEASE"
 	exit ;;
     m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
+	echo m68k-apple-machten"$UNAME_RELEASE"
 	exit ;;
     powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
+	echo powerpc-apple-machten"$UNAME_RELEASE"
 	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
 	exit ;;
     RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
+	echo mips-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
+	echo vax-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
+	echo clipper-intergraph-clix"$UNAME_RELEASE"
 	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	eval "$set_cc_for_build"
+	sed 's/^	//' << EOF > "$dummy.c"
 #ifdef __cplusplus
 #include   /* for printf() prototype */
 	int main (int argc, char *argv[]) {
@@ -461,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 #endif
 	#if defined (host_mips) && defined (MIPSEB)
 	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
 	#endif
 	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
 	#endif
 	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
 	#endif
 	#endif
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
 	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
+	echo mips-mips-riscos"$UNAME_RELEASE"
 	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
@@ -503,17 +534,17 @@ EOF
     AViiON:dgux:*:*)
 	# DG/UX returns AViiON for all architectures
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
 	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+	       [ "$TARGET_BINARY_INTERFACE"x = x ]
 	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
+		echo m88k-dg-dgux"$UNAME_RELEASE"
 	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
 	    fi
 	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
+	    echo i586-dg-dgux"$UNAME_RELEASE"
 	fi
 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
@@ -530,7 +561,7 @@ EOF
 	echo m68k-tektronix-bsd
 	exit ;;
     *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
 	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
@@ -542,14 +573,14 @@ EOF
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
+		eval "$set_cc_for_build"
+		sed 's/^		//' << EOF > "$dummy.c"
 		#include 
 
 		main()
@@ -560,7 +591,7 @@ EOF
 			exit(0);
 			}
 EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
 		then
 			echo "$SYSTEM_NAME"
 		else
@@ -574,7 +605,7 @@ EOF
 	exit ;;
     *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
@@ -583,18 +614,18 @@ EOF
 		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
 	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
 	echo romp-ibm-bsd4.4
 	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
 	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
@@ -609,28 +640,28 @@ EOF
 	echo m68k-hp-bsd4.4
 	exit ;;
     9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
+	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+	case "$UNAME_MACHINE" in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "${sc_cpu_version}" in
-		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		    case "$sc_cpu_version" in
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
-			case "${sc_kernel_bits}" in
-			  32) HP_ARCH="hppa2.0n" ;;
-			  64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			case "$sc_kernel_bits" in
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^		//' << EOF >$dummy.c
+		if [ "$HP_ARCH" = "" ]; then
+		    eval "$set_cc_for_build"
+		    sed 's/^		//' << EOF > "$dummy.c"
 
 		#define _HPUX_SOURCE
 		#include 
@@ -663,13 +694,13 @@ EOF
 		    exit (0);
 		}
 EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
+	if [ "$HP_ARCH" = hppa2.0w ]
 	then
-	    eval $set_cc_for_build
+	    eval "$set_cc_for_build"
 
 	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
 	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
@@ -680,23 +711,23 @@ EOF
 	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
 	    # => hppa64-hp-hpux11.23
 
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
 		grep -q __LP64__
 	    then
-		HP_ARCH="hppa2.0w"
+		HP_ARCH=hppa2.0w
 	    else
-		HP_ARCH="hppa64"

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Sat Apr 20 15:15:37 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35023159009B
 for ;
 Sat, 20 Apr 2019 15:15:37 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com
 [IPv6:2607:f8b0:4864:20::844])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id BCCA994579
 for ; Sat, 20 Apr 2019 15:15:36 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: by mail-qt1-x844.google.com with SMTP id w26so1360793qto.13
 for ; Sat, 20 Apr 2019 08:15:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=bsdimp-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=HP5QqCrxgO/rEElo0iDGfWOcNg1kojxwJrv/Z2BRzvg=;
 b=GxsH4NFQrPzmt/3Np2V7xnRV5ofhpIqjiVLOyEZxoHKH7zFk1Cn3VU6Tf18sFgJG2s
 A2K+6ZzJpTMwbYO5sNhAJm8JZK/p+TP7/J6P1ZbZwA1JjD9SfwwFs9DLN0AjvyDw/OkR
 1WlR/1fE+rWUlS1jY6cXYm1oO18j+YuKfVGJz64eqYoy13v8sz4D2jPT2TzXOSqkK6Ar
 6oQYzLTO0lmmW2N3AR6O1mP1QPP19AnqZPbHdbe1kUOE79aKDQmEx5uUgRAIxS6M/cgz
 ZcsHI8g178PBV5mpohD5xENfO5mtLrroHFaenT92T17l45jVTs1GwZsy8RcCeat+M443
 Nfjw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=HP5QqCrxgO/rEElo0iDGfWOcNg1kojxwJrv/Z2BRzvg=;
 b=KERIwlnUBOGMO3vXaGDhuep3+DToFhHDbq5I5GvUm9fulBPJ1yTtsQfzSP5jD3dTbo
 k5xiqN4yHnMEzuEBbR9HH0y3YvxarltIAWrvLKQeRdmZxeNyNInw/Q3PA8X0ATuaPFQ+
 AWTaXW8dKqxGBom1yOGaWjkKbJBRGQi5y/GywSNSYGjKn1En2adEaGWPH3t8xubJK5B9
 hI6jy6IpKpcr3w64oJhbJOEddTkwfVGdgszLVyWuu/HFnQuDtij7egt80Yu4tIWvR0VE
 7eEalOPpFeROG78rYLHWXkR1lT//fql3zJNYPmVS7sBCfW1W9svyurNx9L87dbWUinRC
 U2lA==
X-Gm-Message-State: APjAAAUtwDRIdKDHRQiIKCD2FJ5hILjVolQqLa/tnlJX5yTi8BvuJKjk
 gqSVDcr4wJCJSjHGjsmixkwd2/hbxXRZDGpw2II7dA==
X-Google-Smtp-Source: APXvYqxeFpYHxxzNBSMlemNLAo/yjYvyqZM0YeHvXAqEY46ehWqMeD2bJ2aFf+vmNT/+56oJXW1CRILhs7JeZEXh7/c=
X-Received: by 2002:ac8:4685:: with SMTP id g5mr7979301qto.242.1555773335777; 
 Sat, 20 Apr 2019 08:15:35 -0700 (PDT)
MIME-Version: 1.0
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
 
 
In-Reply-To: 
From: Warner Losh 
Date: Sat, 20 Apr 2019 09:15:23 -0600
Message-ID: 
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: Alan Somers 
Cc: Justin Hibbits ,
 src-committers , 
 svn-src-all , svn-src-head 
X-Rspamd-Queue-Id: BCCA994579
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.96 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.96)[-0.960,0]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 15:15:37 -0000

On Sat, Apr 20, 2019, 7:47 AM Alan Somers  wrote:

> On Sat, Apr 20, 2019 at 7:23 AM Justin Hibbits 
> wrote:
> >
> >
> >
> > On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
> >>
> >> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
> wrote:
> >> >
> >> >
> >> >
> >> > On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
> >> >>
> >> >> Author: asomers
> >> >> Date: Sat Apr 20 12:51:05 2019
> >> >> New Revision: 346441
> >> >> URL: https://svnweb.freebsd.org/changeset/base/346441
> >> >>
> >> >> Log:
> >> >>   Use symlinks for kernel modules rather than hardlinks
> >> >>
> >> >>   When aliasing a kernel module to a different name (ie if_igb for
> if_em),
> >> >>   it's better to use symlinks than hard links. kldxref will omit
> entries for
> >> >>   the links, ensuring that the loaded module has the correct name.
> >> >>
> >> >>
> >> >
> >> >
> >> > Thanks! This should fix installkernel on my POWER9.
> >> >
> >> > - Justin
> >>
> >> What's the problem with your POWER9?  Is that one of those msdosfs
> >> /boot systems?  If so, I don't think this will fix it.  msdosfs
> >> doesn't support either symlinks or hardlinks.  Or is there some other
> >> problem?
> >> -Alan
> >
> >
> > Yes it is.  Well that's a bummer then. I thought we faked symlinks on
> msdosfs, but on second thought not sure how well would do that.
> >
> > - Justin
>
> We should probably just remove the offending links on ppc, then.  The
> only harm is that after upgrading, ppc users would have to replace
> fuse_load="YES" with fusefs_load="YES".
>

We should only do the Intel links on those platforms that have legacy users
that need the old names. We should also only support the old names for one
release or so.

Warner

>

From owner-svn-src-all@freebsd.org  Sat Apr 20 15:43:29 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 444571590B1F;
 Sat, 20 Apr 2019 15:43:29 +0000 (UTC)
 (envelope-from ngie@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 D1E5B9577A;
 Sat, 20 Apr 2019 15:43:28 +0000 (UTC)
 (envelope-from ngie@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 BFD7618315;
 Sat, 20 Apr 2019 15:43:28 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KFhSQh037970;
 Sat, 20 Apr 2019 15:43:28 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KFhSAl037969;
 Sat, 20 Apr 2019 15:43:28 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201904201543.x3KFhSAl037969@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Enji Cooper 
Date: Sat, 20 Apr 2019 15:43:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346443 - head/tests/sys/opencrypto
X-SVN-Group: head
X-SVN-Commit-Author: ngie
X-SVN-Commit-Paths: head/tests/sys/opencrypto
X-SVN-Commit-Revision: 346443
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: D1E5B9577A
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.978,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 15:43:29 -0000

Author: ngie
Date: Sat Apr 20 15:43:28 2019
New Revision: 346443
URL: https://svnweb.freebsd.org/changeset/base/346443

Log:
  tests/sys/opencrypto: fix whitespace per PEP8
  
  Replace hard tabs with four-character indentations, per PEP8.
  
  This is being done to separate stylistic changes from the tests from functional
  ones, as I accidentally introduced a bug to the tests when I used four-space
  indentation locally.
  
  No functional change.
  
  MFC after:	2 months
  Approved by:	emaste (mentor: implicit blanket approval for trivial fixes)

Modified:
  head/tests/sys/opencrypto/cryptodev.py
  head/tests/sys/opencrypto/cryptotest.py

Modified: head/tests/sys/opencrypto/cryptodev.py
==============================================================================
--- head/tests/sys/opencrypto/cryptodev.py	Sat Apr 20 15:06:58 2019	(r346442)
+++ head/tests/sys/opencrypto/cryptodev.py	Sat Apr 20 15:43:28 2019	(r346443)
@@ -43,65 +43,65 @@ from cryptodevh import *
 __all__ = [ 'Crypto', 'MismatchError', ]
 
 class FindOp(dpkt.Packet):
-	__byte_order__ = '@'
-	__hdr__ = ( ('crid', 'i', 0),
-		('name', '32s', 0),
-	)
+    __byte_order__ = '@'
+    __hdr__ = ( ('crid', 'i', 0),
+        ('name', '32s', 0),
+    )
 
 class SessionOp(dpkt.Packet):
-	__byte_order__ = '@'
-	__hdr__ = ( ('cipher', 'I', 0),
-		('mac', 'I', 0),
-		('keylen', 'I', 0),
-		('key', 'P', 0),
-		('mackeylen', 'i', 0),
-		('mackey', 'P', 0),
-		('ses', 'I', 0),
-	)
+    __byte_order__ = '@'
+    __hdr__ = ( ('cipher', 'I', 0),
+        ('mac', 'I', 0),
+        ('keylen', 'I', 0),
+        ('key', 'P', 0),
+        ('mackeylen', 'i', 0),
+        ('mackey', 'P', 0),
+        ('ses', 'I', 0),
+    )
 
 class SessionOp2(dpkt.Packet):
-	__byte_order__ = '@'
-	__hdr__ = ( ('cipher', 'I', 0),
-		('mac', 'I', 0),
-		('keylen', 'I', 0),
-		('key', 'P', 0),
-		('mackeylen', 'i', 0),
-		('mackey', 'P', 0),
-		('ses', 'I', 0),
-		('crid', 'i', 0),
-		('pad0', 'i', 0),
-		('pad1', 'i', 0),
-		('pad2', 'i', 0),
-		('pad3', 'i', 0),
-	)
+    __byte_order__ = '@'
+    __hdr__ = ( ('cipher', 'I', 0),
+        ('mac', 'I', 0),
+        ('keylen', 'I', 0),
+        ('key', 'P', 0),
+        ('mackeylen', 'i', 0),
+        ('mackey', 'P', 0),
+        ('ses', 'I', 0),
+        ('crid', 'i', 0),
+        ('pad0', 'i', 0),
+        ('pad1', 'i', 0),
+        ('pad2', 'i', 0),
+        ('pad3', 'i', 0),
+    )
 
 class CryptOp(dpkt.Packet):
-	__byte_order__ = '@'
-	__hdr__ = ( ('ses', 'I', 0),
-		('op', 'H', 0),
-		('flags', 'H', 0),
-		('len', 'I', 0),
-		('src', 'P', 0),
-		('dst', 'P', 0),
-		('mac', 'P', 0),
-		('iv', 'P', 0),
-	)
+    __byte_order__ = '@'
+    __hdr__ = ( ('ses', 'I', 0),
+        ('op', 'H', 0),
+        ('flags', 'H', 0),
+        ('len', 'I', 0),
+        ('src', 'P', 0),
+        ('dst', 'P', 0),
+        ('mac', 'P', 0),
+        ('iv', 'P', 0),
+    )
 
 class CryptAEAD(dpkt.Packet):
-	__byte_order__ = '@'
-	__hdr__ = (
-		('ses',		'I', 0),
-		('op',		'H', 0),
-		('flags',	'H', 0),
-		('len',		'I', 0),
-		('aadlen',	'I', 0),
-		('ivlen',	'I', 0),
-		('src',		'P', 0),
-		('dst',		'P', 0),
-		('aad',		'P', 0),
-		('tag',		'P', 0),
-		('iv',		'P', 0),
-	)
+    __byte_order__ = '@'
+    __hdr__ = (
+        ('ses',        'I', 0),
+        ('op',        'H', 0),
+        ('flags',    'H', 0),
+        ('len',        'I', 0),
+        ('aadlen',    'I', 0),
+        ('ivlen',    'I', 0),
+        ('src',        'P', 0),
+        ('dst',        'P', 0),
+        ('aad',        'P', 0),
+        ('tag',        'P', 0),
+        ('iv',        'P', 0),
+    )
 
 # h2py.py can't handle multiarg macros
 CRIOGET = 3221513060
@@ -116,445 +116,445 @@ CIOCFINDDEV = 3223610220
 CIOCCRYPTAEAD = 3225445229
 
 def _getdev():
-	fd = os.open('/dev/crypto', os.O_RDWR)
-	buf = array.array('I', [0])
-	ioctl(fd, CRIOGET, buf, 1)
-	os.close(fd)
+    fd = os.open('/dev/crypto', os.O_RDWR)
+    buf = array.array('I', [0])
+    ioctl(fd, CRIOGET, buf, 1)
+    os.close(fd)
 
-	return buf[0]
+    return buf[0]
 
 _cryptodev = _getdev()
 
 def _findop(crid, name):
-	fop = FindOp()
-	fop.crid = crid
-	fop.name = name
-	s = array.array('B', fop.pack_hdr())
-	ioctl(_cryptodev, CIOCFINDDEV, s, 1)
-	fop.unpack(s)
+    fop = FindOp()
+    fop.crid = crid
+    fop.name = name
+    s = array.array('B', fop.pack_hdr())
+    ioctl(_cryptodev, CIOCFINDDEV, s, 1)
+    fop.unpack(s)
 
-	try:
-		idx = fop.name.index('\x00')
-		name = fop.name[:idx]
-	except ValueError:
-		name = fop.name
+    try:
+        idx = fop.name.index('\x00')
+        name = fop.name[:idx]
+    except ValueError:
+        name = fop.name
 
-	return fop.crid, name
+    return fop.crid, name
 
 class Crypto:
-	@staticmethod
-	def findcrid(name):
-		return _findop(-1, name)[0]
+    @staticmethod
+    def findcrid(name):
+        return _findop(-1, name)[0]
 
-	@staticmethod
-	def getcridname(crid):
-		return _findop(crid, '')[1]
+    @staticmethod
+    def getcridname(crid):
+        return _findop(crid, '')[1]
 
-	def __init__(self, cipher=0, key=None, mac=0, mackey=None,
-	    crid=CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_HARDWARE):
-		self._ses = None
-		ses = SessionOp2()
-		ses.cipher = cipher
-		ses.mac = mac
+    def __init__(self, cipher=0, key=None, mac=0, mackey=None,
+        crid=CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_HARDWARE):
+        self._ses = None
+        ses = SessionOp2()
+        ses.cipher = cipher
+        ses.mac = mac
 
-		if key is not None:
-			ses.keylen = len(key)
-			k = array.array('B', key)
-			ses.key = k.buffer_info()[0]
-		else:
-			self.key = None
+        if key is not None:
+            ses.keylen = len(key)
+            k = array.array('B', key)
+            ses.key = k.buffer_info()[0]
+        else:
+            self.key = None
 
-		if mackey is not None:
-			ses.mackeylen = len(mackey)
-			mk = array.array('B', mackey)
-			ses.mackey = mk.buffer_info()[0]
-			self._maclen = 16	# parameterize?
-		else:
-			self._maclen = None
+        if mackey is not None:
+            ses.mackeylen = len(mackey)
+            mk = array.array('B', mackey)
+            ses.mackey = mk.buffer_info()[0]
+            self._maclen = 16    # parameterize?
+        else:
+            self._maclen = None
 
-		if not cipher and not mac:
-			raise ValueError('one of cipher or mac MUST be specified.')
-		ses.crid = crid
-		#print(ses)
-		s = array.array('B', ses.pack_hdr())
-		#print(s)
-		ioctl(_cryptodev, CIOCGSESSION2, s, 1)
-		ses.unpack(s)
+        if not cipher and not mac:
+            raise ValueError('one of cipher or mac MUST be specified.')
+        ses.crid = crid
+        #print(ses)
+        s = array.array('B', ses.pack_hdr())
+        #print(s)
+        ioctl(_cryptodev, CIOCGSESSION2, s, 1)
+        ses.unpack(s)
 
-		self._ses = ses.ses
+        self._ses = ses.ses
 
-	def __del__(self):
-		if self._ses is None:
-			return
+    def __del__(self):
+        if self._ses is None:
+            return
 
-		try:
-			ioctl(_cryptodev, CIOCFSESSION, _pack('I', self._ses))
-		except TypeError:
-			pass
-		self._ses = None
+        try:
+            ioctl(_cryptodev, CIOCFSESSION, _pack('I', self._ses))
+        except TypeError:
+            pass
+        self._ses = None
 
-	def _doop(self, op, src, iv):
-		cop = CryptOp()
-		cop.ses = self._ses
-		cop.op = op
-		cop.flags = 0
-		cop.len = len(src)
-		s = array.array('B', src)
-		cop.src = cop.dst = s.buffer_info()[0]
-		if self._maclen is not None:
-			m = array.array('B', [0] * self._maclen)
-			cop.mac = m.buffer_info()[0]
-		ivbuf = array.array('B', iv)
-		cop.iv = ivbuf.buffer_info()[0]
+    def _doop(self, op, src, iv):
+        cop = CryptOp()
+        cop.ses = self._ses
+        cop.op = op
+        cop.flags = 0
+        cop.len = len(src)
+        s = array.array('B', src)
+        cop.src = cop.dst = s.buffer_info()[0]
+        if self._maclen is not None:
+            m = array.array('B', [0] * self._maclen)
+            cop.mac = m.buffer_info()[0]
+        ivbuf = array.array('B', iv)
+        cop.iv = ivbuf.buffer_info()[0]
 
-		#print('cop:', cop)
-		ioctl(_cryptodev, CIOCCRYPT, str(cop))
+        #print('cop:', cop)
+        ioctl(_cryptodev, CIOCCRYPT, str(cop))
 
-		s = s.tostring()
-		if self._maclen is not None:
-			return s, m.tostring()
+        s = s.tostring()
+        if self._maclen is not None:
+            return s, m.tostring()
 
-		return s
+        return s
 
-	def _doaead(self, op, src, aad, iv, tag=None):
-		caead = CryptAEAD()
-		caead.ses = self._ses
-		caead.op = op
-		caead.flags = CRD_F_IV_EXPLICIT
-		caead.flags = 0
-		caead.len = len(src)
-		s = array.array('B', src)
-		caead.src = caead.dst = s.buffer_info()[0]
-		caead.aadlen = len(aad)
-		saad = array.array('B', aad)
-		caead.aad = saad.buffer_info()[0]
+    def _doaead(self, op, src, aad, iv, tag=None):
+        caead = CryptAEAD()
+        caead.ses = self._ses
+        caead.op = op
+        caead.flags = CRD_F_IV_EXPLICIT
+        caead.flags = 0
+        caead.len = len(src)
+        s = array.array('B', src)
+        caead.src = caead.dst = s.buffer_info()[0]
+        caead.aadlen = len(aad)
+        saad = array.array('B', aad)
+        caead.aad = saad.buffer_info()[0]
 
-		if self._maclen is None:
-			raise ValueError('must have a tag length')
+        if self._maclen is None:
+            raise ValueError('must have a tag length')
 
-		if tag is None:
-			tag = array.array('B', [0] * self._maclen)
-		else:
-			assert len(tag) == self._maclen, \
+        if tag is None:
+            tag = array.array('B', [0] * self._maclen)
+        else:
+            assert len(tag) == self._maclen, \
                 '%d != %d' % (len(tag), self._maclen)
-			tag = array.array('B', tag)
+            tag = array.array('B', tag)
 
-		caead.tag = tag.buffer_info()[0]
+        caead.tag = tag.buffer_info()[0]
 
-		ivbuf = array.array('B', iv)
-		caead.ivlen = len(iv)
-		caead.iv = ivbuf.buffer_info()[0]
+        ivbuf = array.array('B', iv)
+        caead.ivlen = len(iv)
+        caead.iv = ivbuf.buffer_info()[0]
 
-		ioctl(_cryptodev, CIOCCRYPTAEAD, str(caead))
+        ioctl(_cryptodev, CIOCCRYPTAEAD, str(caead))
 
-		s = s.tostring()
+        s = s.tostring()
 
-		return s, tag.tostring()
+        return s, tag.tostring()
 
-	def perftest(self, op, size, timeo=3):
-		import random
-		import time
+    def perftest(self, op, size, timeo=3):
+        import random
+        import time
 
-		inp = array.array('B', (random.randint(0, 255) for x in xrange(size)))
-		out = array.array('B', inp)
+        inp = array.array('B', (random.randint(0, 255) for x in xrange(size)))
+        out = array.array('B', inp)
 
-		# prep ioctl
-		cop = CryptOp()
-		cop.ses = self._ses
-		cop.op = op
-		cop.flags = 0
-		cop.len = len(inp)
-		s = array.array('B', inp)
-		cop.src = s.buffer_info()[0]
-		cop.dst = out.buffer_info()[0]
-		if self._maclen is not None:
-			m = array.array('B', [0] * self._maclen)
-			cop.mac = m.buffer_info()[0]
-		ivbuf = array.array('B', (random.randint(0, 255) for x in xrange(16)))
-		cop.iv = ivbuf.buffer_info()[0]
+        # prep ioctl
+        cop = CryptOp()
+        cop.ses = self._ses
+        cop.op = op
+        cop.flags = 0
+        cop.len = len(inp)
+        s = array.array('B', inp)
+        cop.src = s.buffer_info()[0]
+        cop.dst = out.buffer_info()[0]
+        if self._maclen is not None:
+            m = array.array('B', [0] * self._maclen)
+            cop.mac = m.buffer_info()[0]
+        ivbuf = array.array('B', (random.randint(0, 255) for x in xrange(16)))
+        cop.iv = ivbuf.buffer_info()[0]
 
-		exit = [ False ]
-		def alarmhandle(a, b, exit=exit):
-			exit[0] = True
+        exit = [ False ]
+        def alarmhandle(a, b, exit=exit):
+            exit[0] = True
 
-		oldalarm = signal.signal(signal.SIGALRM, alarmhandle)
-		signal.alarm(timeo)
+        oldalarm = signal.signal(signal.SIGALRM, alarmhandle)
+        signal.alarm(timeo)
 
-		start = time.time()
-		reps = 0
-		while not exit[0]:
-			ioctl(_cryptodev, CIOCCRYPT, str(cop))
-			reps += 1
+        start = time.time()
+        reps = 0
+        while not exit[0]:
+            ioctl(_cryptodev, CIOCCRYPT, str(cop))
+            reps += 1
 
-		end = time.time()
+        end = time.time()
 
-		signal.signal(signal.SIGALRM, oldalarm)
+        signal.signal(signal.SIGALRM, oldalarm)
 
-		print('time:', end - start)
-		print('perf MB/sec:', (reps * size) / (end - start) / 1024 / 1024)
+        print('time:', end - start)
+        print('perf MB/sec:', (reps * size) / (end - start) / 1024 / 1024)
 
-	def encrypt(self, data, iv, aad=None):
-		if aad is None:
-			return self._doop(COP_ENCRYPT, data, iv)
-		else:
-			return self._doaead(COP_ENCRYPT, data, aad,
-			    iv)
+    def encrypt(self, data, iv, aad=None):
+        if aad is None:
+            return self._doop(COP_ENCRYPT, data, iv)
+        else:
+            return self._doaead(COP_ENCRYPT, data, aad,
+                iv)
 
-	def decrypt(self, data, iv, aad=None, tag=None):
-		if aad is None:
-			return self._doop(COP_DECRYPT, data, iv)
-		else:
-			return self._doaead(COP_DECRYPT, data, aad,
-			    iv, tag=tag)
+    def decrypt(self, data, iv, aad=None, tag=None):
+        if aad is None:
+            return self._doop(COP_DECRYPT, data, iv)
+        else:
+            return self._doaead(COP_DECRYPT, data, aad,
+                iv, tag=tag)
 
 class MismatchError(Exception):
-	pass
+    pass
 
 class KATParser:
-	def __init__(self, fname, fields):
-		self.fp = open(fname)
-		self.fields = set(fields)
-		self._pending = None
+    def __init__(self, fname, fields):
+        self.fp = open(fname)
+        self.fields = set(fields)
+        self._pending = None
 
-	def __iter__(self):
-		while True:
-			didread = False
-			if self._pending is not None:
-				i = self._pending
-				self._pending = None
-			else:
-				i = self.fp.readline()
-				didread = True
+    def __iter__(self):
+        while True:
+            didread = False
+            if self._pending is not None:
+                i = self._pending
+                self._pending = None
+            else:
+                i = self.fp.readline()
+                didread = True
 
-			if didread and not i:
-				return
+            if didread and not i:
+                return
 
-			if (i and i[0] == '#') or not i.strip():
-				continue
-			if i[0] == '[':
-				yield i[1:].split(']', 1)[0], self.fielditer()
-			else:
-				raise ValueError('unknown line: %r' % repr(i))
+            if (i and i[0] == '#') or not i.strip():
+                continue
+            if i[0] == '[':
+                yield i[1:].split(']', 1)[0], self.fielditer()
+            else:
+                raise ValueError('unknown line: %r' % repr(i))
 
-	def eatblanks(self):
-		while True:
-			line = self.fp.readline()
-			if line == '':
-				break
+    def eatblanks(self):
+        while True:
+            line = self.fp.readline()
+            if line == '':
+                break
 
-			line = line.strip()
-			if line:
-				break
+            line = line.strip()
+            if line:
+                break
 
-		return line
+        return line
 
-	def fielditer(self):
-		while True:
-			values = {}
+    def fielditer(self):
+        while True:
+            values = {}
 
-			line = self.eatblanks()
-			if not line or line[0] == '[':
-				self._pending = line
-				return
+            line = self.eatblanks()
+            if not line or line[0] == '[':
+                self._pending = line
+                return
 
-			while True:
-				try:
-					f, v = line.split(' =')
-				except:
-					if line == 'FAIL':
-						f, v = 'FAIL', ''
-					else:
-						print('line:', repr(line))
-						raise
-				v = v.strip()
+            while True:
+                try:
+                    f, v = line.split(' =')
+                except:
+                    if line == 'FAIL':
+                        f, v = 'FAIL', ''
+                    else:
+                        print('line:', repr(line))
+                        raise
+                v = v.strip()
 
-				if f in values:
-					raise ValueError('already present: %r' % repr(f))
-				values[f] = v
-				line = self.fp.readline().strip()
-				if not line:
-					break
+                if f in values:
+                    raise ValueError('already present: %r' % repr(f))
+                values[f] = v
+                line = self.fp.readline().strip()
+                if not line:
+                    break
 
-			# we should have everything
-			remain = self.fields.copy() - set(values.keys())
-			# XXX - special case GCM decrypt
-			if remain and not ('FAIL' in values and 'PT' in remain):
-				raise ValueError('not all fields found: %r' % repr(remain))
+            # we should have everything
+            remain = self.fields.copy() - set(values.keys())
+            # XXX - special case GCM decrypt
+            if remain and not ('FAIL' in values and 'PT' in remain):
+                raise ValueError('not all fields found: %r' % repr(remain))
 
-			yield values
+            yield values
 
 def _spdechex(s):
-	return ''.join(s.split()).decode('hex')
+    return ''.join(s.split()).decode('hex')
 
 if __name__ == '__main__':
-	if True:
-		try:
-			crid = Crypto.findcrid('aesni0')
-			print('aesni:', crid)
-		except IOError:
-			print('aesni0 not found')
+    if True:
+        try:
+            crid = Crypto.findcrid('aesni0')
+            print('aesni:', crid)
+        except IOError:
+            print('aesni0 not found')
 
-		for i in xrange(10):
-			try:
-				name = Crypto.getcridname(i)
-				print('%2d: %r' % (i, repr(name)))
-			except IOError:
-				pass
-	elif False:
-		kp = KATParser('/usr/home/jmg/aesni.testing/format tweak value input - data unit seq no/XTSGenAES128.rsp', [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', 'CT' ])
-		for mode, ni in kp:
-			print(i, ni)
-			for j in ni:
-				print(j)
-	elif False:
-		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-		iv = _spdechex('00000000000000000000000000000001')
-		pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e')
-		#pt = _spdechex('00000000000000000000000000000000')
-		ct = _spdechex('f42c33853ecc5ce2949865fdb83de3bff1089e9360c94f830baebfaff72836ab5236f77212f1e7396c8c54ac73d81986375a6e9e299cfeca5ba051ed25e8d1affa5beaf6c1d2b45e90802408f2ced21663497e906de5f29341e5e52ddfea5363d628b3eb7806835e17bae051b3a6da3f8e2941fe44384eac17a9d298d2c331ca8320c775b5d53263a5e905059d891b21dede2d8110fd427c7bd5a9a274ddb47b1945ee79522203b6e297d0e399ef')
+        for i in xrange(10):
+            try:
+                name = Crypto.getcridname(i)
+                print('%2d: %r' % (i, repr(name)))
+            except IOError:
+                pass
+    elif False:
+        kp = KATParser('/usr/home/jmg/aesni.testing/format tweak value input - data unit seq no/XTSGenAES128.rsp', [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', 'CT' ])
+        for mode, ni in kp:
+            print(i, ni)
+            for j in ni:
+                print(j)
+    elif False:
+        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+        iv = _spdechex('00000000000000000000000000000001')
+        pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e')
+        #pt = _spdechex('00000000000000000000000000000000')
+        ct = _spdechex('f42c33853ecc5ce2949865fdb83de3bff1089e9360c94f830baebfaff72836ab5236f77212f1e7396c8c54ac73d81986375a6e9e299cfeca5ba051ed25e8d1affa5beaf6c1d2b45e90802408f2ced21663497e906de5f29341e5e52ddfea5363d628b3eb7806835e17bae051b3a6da3f8e2941fe44384eac17a9d298d2c331ca8320c775b5d53263a5e905059d891b21dede2d8110fd427c7bd5a9a274ddb47b1945ee79522203b6e297d0e399ef')
 
-		c = Crypto(CRYPTO_AES_ICM, key)
-		enc = c.encrypt(pt, iv)
+        c = Crypto(CRYPTO_AES_ICM, key)
+        enc = c.encrypt(pt, iv)
 
-		print('enc:', enc.encode('hex'))
-		print(' ct:', ct.encode('hex'))
+        print('enc:', enc.encode('hex'))
+        print(' ct:', ct.encode('hex'))
 
-		assert ct == enc
+        assert ct == enc
 
-		dec = c.decrypt(ct, iv)
+        dec = c.decrypt(ct, iv)
 
-		print('dec:', dec.encode('hex'))
-		print(' pt:', pt.encode('hex'))
+        print('dec:', dec.encode('hex'))
+        print(' pt:', pt.encode('hex'))
 
-		assert pt == dec
-	elif False:
-		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-		iv = _spdechex('00000000000000000000000000000001')
-		pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e0a3f')
-		#pt = _spdechex('00000000000000000000000000000000')
-		ct = _spdechex('f42c33853ecc5ce2949865fdb83de3bff1089e9360c94f830baebfaff72836ab5236f77212f1e7396c8c54ac73d81986375a6e9e299cfeca5ba051ed25e8d1affa5beaf6c1d2b45e90802408f2ced21663497e906de5f29341e5e52ddfea5363d628b3eb7806835e17bae051b3a6da3f8e2941fe44384eac17a9d298d2c331ca8320c775b5d53263a5e905059d891b21dede2d8110fd427c7bd5a9a274ddb47b1945ee79522203b6e297d0e399ef3768')
+        assert pt == dec
+    elif False:
+        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+        iv = _spdechex('00000000000000000000000000000001')
+        pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e0a3f')
+        #pt = _spdechex('00000000000000000000000000000000')
+        ct = _spdechex('f42c33853ecc5ce2949865fdb83de3bff1089e9360c94f830baebfaff72836ab5236f77212f1e7396c8c54ac73d81986375a6e9e299cfeca5ba051ed25e8d1affa5beaf6c1d2b45e90802408f2ced21663497e906de5f29341e5e52ddfea5363d628b3eb7806835e17bae051b3a6da3f8e2941fe44384eac17a9d298d2c331ca8320c775b5d53263a5e905059d891b21dede2d8110fd427c7bd5a9a274ddb47b1945ee79522203b6e297d0e399ef3768')
 
-		c = Crypto(CRYPTO_AES_ICM, key)
-		enc = c.encrypt(pt, iv)
+        c = Crypto(CRYPTO_AES_ICM, key)
+        enc = c.encrypt(pt, iv)
 
-		print('enc:', enc.encode('hex'))
-		print(' ct:', ct.encode('hex'))
+        print('enc:', enc.encode('hex'))
+        print(' ct:', ct.encode('hex'))
 
-		assert ct == enc
+        assert ct == enc
 
-		dec = c.decrypt(ct, iv)
+        dec = c.decrypt(ct, iv)
 
-		print('dec:', dec.encode('hex'))
-		print(' pt:', pt.encode('hex'))
+        print('dec:', dec.encode('hex'))
+        print(' pt:', pt.encode('hex'))
 
-		assert pt == dec
-	elif False:
-		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-		iv = _spdechex('6eba2716ec0bd6fa5cdef5e6d3a795bc')
-		pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e0a3f')
-		ct = _spdechex('f1f81f12e72e992dbdc304032705dc75dc3e4180eff8ee4819906af6aee876d5b00b7c36d282a445ce3620327be481e8e53a8e5a8e5ca9abfeb2281be88d12ffa8f46d958d8224738c1f7eea48bda03edbf9adeb900985f4fa25648b406d13a886c25e70cfdecdde0ad0f2991420eb48a61c64fd797237cf2798c2675b9bb744360b0a3f329ac53bbceb4e3e7456e6514f1a9d2f06c236c31d0f080b79c15dce1096357416602520daa098b17d1af427')
-		c = Crypto(CRYPTO_AES_CBC, key)
+        assert pt == dec
+    elif False:
+        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+        iv = _spdechex('6eba2716ec0bd6fa5cdef5e6d3a795bc')
+        pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e0a3f')
+        ct = _spdechex('f1f81f12e72e992dbdc304032705dc75dc3e4180eff8ee4819906af6aee876d5b00b7c36d282a445ce3620327be481e8e53a8e5a8e5ca9abfeb2281be88d12ffa8f46d958d8224738c1f7eea48bda03edbf9adeb900985f4fa25648b406d13a886c25e70cfdecdde0ad0f2991420eb48a61c64fd797237cf2798c2675b9bb744360b0a3f329ac53bbceb4e3e7456e6514f1a9d2f06c236c31d0f080b79c15dce1096357416602520daa098b17d1af427')
+        c = Crypto(CRYPTO_AES_CBC, key)
 
-		enc = c.encrypt(pt, iv)
+        enc = c.encrypt(pt, iv)
 
-		print('enc:', enc.encode('hex'))
-		print(' ct:', ct.encode('hex'))
+        print('enc:', enc.encode('hex'))
+        print(' ct:', ct.encode('hex'))
 
-		assert ct == enc
+        assert ct == enc
 
-		dec = c.decrypt(ct, iv)
+        dec = c.decrypt(ct, iv)
 
-		print('dec:', dec.encode('hex'))
-		print(' pt:', pt.encode('hex'))
+        print('dec:', dec.encode('hex'))
+        print(' pt:', pt.encode('hex'))
 
-		assert pt == dec
-	elif False:
-		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-		iv = _spdechex('b3d8cc017cbb89b39e0f67e2')
-		pt = _spdechex('c3b3c41f113a31b73d9a5cd4321030')
-		aad = _spdechex('24825602bd12a984e0092d3e448eda5f')
-		ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa7354')
-		ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa73')
-		tag = _spdechex('0032a1dc85f1c9786925a2e71d8272dd')
-		tag = _spdechex('8d11a0929cb3fbe1fef01a4a38d5f8ea')
+        assert pt == dec
+    elif False:
+        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+        iv = _spdechex('b3d8cc017cbb89b39e0f67e2')
+        pt = _spdechex('c3b3c41f113a31b73d9a5cd4321030')
+        aad = _spdechex('24825602bd12a984e0092d3e448eda5f')
+        ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa7354')
+        ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa73')
+        tag = _spdechex('0032a1dc85f1c9786925a2e71d8272dd')
+        tag = _spdechex('8d11a0929cb3fbe1fef01a4a38d5f8ea')
 
-		c = Crypto(CRYPTO_AES_NIST_GCM_16, key,
-		    mac=CRYPTO_AES_128_NIST_GMAC, mackey=key)
+        c = Crypto(CRYPTO_AES_NIST_GCM_16, key,
+            mac=CRYPTO_AES_128_NIST_GMAC, mackey=key)
 
-		enc, enctag = c.encrypt(pt, iv, aad=aad)
+        enc, enctag = c.encrypt(pt, iv, aad=aad)
 
-		print('enc:', enc.encode('hex'))
-		print(' ct:', ct.encode('hex'))
+        print('enc:', enc.encode('hex'))
+        print(' ct:', ct.encode('hex'))
 
-		assert enc == ct
+        assert enc == ct
 
-		print('etg:', enctag.encode('hex'))
-		print('tag:', tag.encode('hex'))
-		assert enctag == tag
+        print('etg:', enctag.encode('hex'))
+        print('tag:', tag.encode('hex'))
+        assert enctag == tag
 
-		# Make sure we get EBADMSG
-		#enctag = enctag[:-1] + 'a'
-		dec, dectag = c.decrypt(ct, iv, aad=aad, tag=enctag)
+        # Make sure we get EBADMSG
+        #enctag = enctag[:-1] + 'a'
+        dec, dectag = c.decrypt(ct, iv, aad=aad, tag=enctag)
 
-		print('dec:', dec.encode('hex'))
-		print(' pt:', pt.encode('hex'))
+        print('dec:', dec.encode('hex'))
+        print(' pt:', pt.encode('hex'))
 
-		assert dec == pt
+        assert dec == pt
 
-		print('dtg:', dectag.encode('hex'))
-		print('tag:', tag.encode('hex'))
+        print('dtg:', dectag.encode('hex'))
+        print('tag:', tag.encode('hex'))
 
-		assert dectag == tag
-	elif False:
-		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-		iv = _spdechex('b3d8cc017cbb89b39e0f67e2')
-		key = key + iv[:4]
-		iv = iv[4:]
-		pt = _spdechex('c3b3c41f113a31b73d9a5cd432103069')
-		aad = _spdechex('24825602bd12a984e0092d3e448eda5f')
-		ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa7354')
-		tag = _spdechex('0032a1dc85f1c9786925a2e71d8272dd')
+        assert dectag == tag
+    elif False:
+        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+        iv = _spdechex('b3d8cc017cbb89b39e0f67e2')
+        key = key + iv[:4]
+        iv = iv[4:]
+        pt = _spdechex('c3b3c41f113a31b73d9a5cd432103069')
+        aad = _spdechex('24825602bd12a984e0092d3e448eda5f')
+        ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa7354')
+        tag = _spdechex('0032a1dc85f1c9786925a2e71d8272dd')
 
-		c = Crypto(CRYPTO_AES_GCM_16, key, mac=CRYPTO_AES_128_GMAC, mackey=key)
+        c = Crypto(CRYPTO_AES_GCM_16, key, mac=CRYPTO_AES_128_GMAC, mackey=key)
 
-		enc, enctag = c.encrypt(pt, iv, aad=aad)
+        enc, enctag = c.encrypt(pt, iv, aad=aad)
 
-		print('enc:', enc.encode('hex'))
-		print(' ct:', ct.encode('hex'))
+        print('enc:', enc.encode('hex'))
+        print(' ct:', ct.encode('hex'))
 
-		assert enc == ct
+        assert enc == ct
 
-		print('etg:', enctag.encode('hex'))
-		print('tag:', tag.encode('hex'))
-		assert enctag == tag
-	elif False:
-		for i in xrange(100000):
-			c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
-			data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
-			ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')
-			iv = _pack('QQ', 71, 0)
+        print('etg:', enctag.encode('hex'))
+        print('tag:', tag.encode('hex'))
+        assert enctag == tag
+    elif False:
+        for i in xrange(100000):
+            c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
+            data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
+            ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')
+            iv = _pack('QQ', 71, 0)
 
-			enc = c.encrypt(data, iv)
-			assert enc == ct
-	elif True:
-		c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
-		data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
-		ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')
-		iv = _pack('QQ', 71, 0)
+            enc = c.encrypt(data, iv)
+            assert enc == ct
+    elif True:
+        c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
+        data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
+        ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')
+        iv = _pack('QQ', 71, 0)
 
-		enc = c.encrypt(data, iv)
-		assert enc == ct
+        enc = c.encrypt(data, iv)
+        assert enc == ct
 
-		dec = c.decrypt(enc, iv)
-		assert dec == data
+        dec = c.decrypt(enc, iv)
+        assert dec == data
 
-		#c.perftest(COP_ENCRYPT, 192*1024, reps=30000)
+        #c.perftest(COP_ENCRYPT, 192*1024, reps=30000)
 
-	else:
-		key = '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex')
-		print('XTS %d testing:' % (len(key) * 8))
-		c = Crypto(CRYPTO_AES_XTS, key)
-		for i in [ 8192, 192*1024]:
-			print('block size: %d' % i)
-			c.perftest(COP_ENCRYPT, i)
-			c.perftest(COP_DECRYPT, i)
+    else:
+        key = '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex')
+        print('XTS %d testing:' % (len(key) * 8))
+        c = Crypto(CRYPTO_AES_XTS, key)
+        for i in [ 8192, 192*1024]:
+            print('block size: %d' % i)
+            c.perftest(COP_ENCRYPT, i)
+            c.perftest(COP_DECRYPT, i)

Modified: head/tests/sys/opencrypto/cryptotest.py
==============================================================================
--- head/tests/sys/opencrypto/cryptotest.py	Sat Apr 20 15:06:58 2019	(r346442)
+++ head/tests/sys/opencrypto/cryptotest.py	Sat Apr 20 15:43:28 2019	(r346443)
@@ -42,290 +42,290 @@ from glob import iglob
 katdir = '/usr/local/share/nist-kat'
 
 def katg(base, glob):
-	assert os.path.exists(os.path.join(katdir, base)), "Please 'pkg install nist-kat'"
-	return iglob(os.path.join(katdir, base, glob))
+    assert os.path.exists(os.path.join(katdir, base)), "Please 'pkg install nist-kat'"
+    return iglob(os.path.join(katdir, base, glob))
 
 aesmodules = [ 'cryptosoft0', 'aesni0', 'ccr0', 'ccp0' ]
 desmodules = [ 'cryptosoft0', ]
 shamodules = [ 'cryptosoft0', 'aesni0', 'ccr0', 'ccp0' ]
 
 def GenTestCase(cname):
-	try:
-		crid = cryptodev.Crypto.findcrid(cname)
-	except IOError:
-		return None
+    try:
+        crid = cryptodev.Crypto.findcrid(cname)
+    except IOError:
+        return None
 
-	class GendCryptoTestCase(unittest.TestCase):
-		###############
-		##### AES #####
-		###############
-		@unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
-		def test_xts(self):
-			for i in katg('XTSTestVectors/format tweak value input - data unit seq no', '*.rsp'):
-				self.runXTS(i, cryptodev.CRYPTO_AES_XTS)
+    class GendCryptoTestCase(unittest.TestCase):
+        ###############
+        ##### AES #####
+        ###############
+        @unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
+        def test_xts(self):
+            for i in katg('XTSTestVectors/format tweak value input - data unit seq no', '*.rsp'):
+                self.runXTS(i, cryptodev.CRYPTO_AES_XTS)
 
-		@unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
-		def test_cbc(self):
-			for i in katg('KAT_AES', 'CBC[GKV]*.rsp'):
-				self.runCBC(i)
+        @unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
+        def test_cbc(self):
+            for i in katg('KAT_AES', 'CBC[GKV]*.rsp'):
+                self.runCBC(i)
 
-		@unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
-		def test_gcm(self):
-			for i in katg('gcmtestvectors', 'gcmEncrypt*'):
-				self.runGCM(i, 'ENCRYPT')
+        @unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
+        def test_gcm(self):
+            for i in katg('gcmtestvectors', 'gcmEncrypt*'):
+                self.runGCM(i, 'ENCRYPT')
 
-			for i in katg('gcmtestvectors', 'gcmDecrypt*'):
-				self.runGCM(i, 'DECRYPT')
+            for i in katg('gcmtestvectors', 'gcmDecrypt*'):
+                self.runGCM(i, 'DECRYPT')
 
-		_gmacsizes = { 32: cryptodev.CRYPTO_AES_256_NIST_GMAC,
-			24: cryptodev.CRYPTO_AES_192_NIST_GMAC,
-			16: cryptodev.CRYPTO_AES_128_NIST_GMAC,
-		}
-		def runGCM(self, fname, mode):
-			curfun = None
-			if mode == 'ENCRYPT':
-				swapptct = False
-				curfun = Crypto.encrypt
-			elif mode == 'DECRYPT':
-				swapptct = True
-				curfun = Crypto.decrypt
-			else:
-				raise RuntimeError('unknown mode: %r' % repr(mode))
+        _gmacsizes = { 32: cryptodev.CRYPTO_AES_256_NIST_GMAC,
+            24: cryptodev.CRYPTO_AES_192_NIST_GMAC,
+            16: cryptodev.CRYPTO_AES_128_NIST_GMAC,
+        }
+        def runGCM(self, fname, mode):
+            curfun = None
+            if mode == 'ENCRYPT':
+                swapptct = False
+                curfun = Crypto.encrypt
+            elif mode == 'DECRYPT':
+                swapptct = True
+                curfun = Crypto.decrypt
+            else:
+                raise RuntimeError('unknown mode: %r' % repr(mode))

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Sat Apr 20 15:57:06 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A839B156B448;
 Sat, 20 Apr 2019 15:57:06 +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 5036D96433;
 Sat, 20 Apr 2019 15:57:06 +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 26AFF184CC;
 Sat, 20 Apr 2019 15:57:06 +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 x3KFv5Fr043858;
 Sat, 20 Apr 2019 15:57:05 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KFv5QA043855;
 Sat, 20 Apr 2019 15:57:05 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201904201557.x3KFv5QA043855@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste 
Date: Sat, 20 Apr 2019 15:57:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346445 - in head/sys/compat/linuxkpi/common:
 include/linux src
X-SVN-Group: head
X-SVN-Commit-Author: emaste
X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src
X-SVN-Commit-Revision: 346445
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 5036D96433
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.973,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 15:57:07 -0000

Author: emaste
Date: Sat Apr 20 15:57:05 2019
New Revision: 346445
URL: https://svnweb.freebsd.org/changeset/base/346445

Log:
  Enable ioremap for aarch64 in the LinuxKPI
  
  Required for Mellanox drivers (e.g. on Ampere eMAG at Packet.com).
  
  PR:		237055
  Submitted by:	Greg V 
  Reviewed by:	hselasky
  Differential Revision:	https://reviews.freebsd.org/D19987

Modified:
  head/sys/compat/linuxkpi/common/include/linux/io.h
  head/sys/compat/linuxkpi/common/src/linux_compat.c

Modified: head/sys/compat/linuxkpi/common/include/linux/io.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/io.h	Sat Apr 20 15:47:57 2019	(r346444)
+++ head/sys/compat/linuxkpi/common/include/linux/io.h	Sat Apr 20 15:57:05 2019	(r346445)
@@ -350,7 +350,7 @@ _outb(u_char data, u_int port)
 }
 #endif
 
-#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
+#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__)
 void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr);
 #else
 #define	_ioremap_attr(...) NULL

Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c	Sat Apr 20 15:47:57 2019	(r346444)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c	Sat Apr 20 15:57:05 2019	(r346445)
@@ -1773,7 +1773,7 @@ vmmap_remove(void *addr)
 	return (vmmap);
 }
 
-#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
+#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__)
 void *
 _ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr)
 {
@@ -1796,7 +1796,7 @@ iounmap(void *addr)
 	vmmap = vmmap_remove(addr);
 	if (vmmap == NULL)
 		return;
-#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
+#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__)
 	pmap_unmapdev((vm_offset_t)addr, vmmap->vm_size);
 #endif
 	kfree(vmmap);

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:07:30 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D52E156BAB9;
 Sat, 20 Apr 2019 16:07:30 +0000 (UTC) (envelope-from cem@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 0B4D496DB8;
 Sat, 20 Apr 2019 16:07:30 +0000 (UTC) (envelope-from cem@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 D98E118683;
 Sat, 20 Apr 2019 16:07:29 +0000 (UTC) (envelope-from cem@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KG7Tcn051430;
 Sat, 20 Apr 2019 16:07:29 GMT (envelope-from cem@FreeBSD.org)
Received: (from cem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KG7TY1051429;
 Sat, 20 Apr 2019 16:07:29 GMT (envelope-from cem@FreeBSD.org)
Message-Id: <201904201607.x3KG7TY1051429@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org
 using -f
From: Conrad Meyer 
Date: Sat, 20 Apr 2019 16:07:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346448 - head/sys/netinet/netdump
X-SVN-Group: head
X-SVN-Commit-Author: cem
X-SVN-Commit-Paths: head/sys/netinet/netdump
X-SVN-Commit-Revision: 346448
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 0B4D496DB8
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.973,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:07:30 -0000

Author: cem
Date: Sat Apr 20 16:07:29 2019
New Revision: 346448
URL: https://svnweb.freebsd.org/changeset/base/346448

Log:
  netdump: Fix 11 compatibility DIOCSKERNELDUMP ioctl
  
  The logic was present for the 11 version of the DIOCSKERNELDUMP ioctl, but
  had not been updated for the 12 ABI.
  
  Reviewed by:	markj
  Differential Revision:	https://reviews.freebsd.org/D19980

Modified:
  head/sys/netinet/netdump/netdump_client.c

Modified: head/sys/netinet/netdump/netdump_client.c
==============================================================================
--- head/sys/netinet/netdump/netdump_client.c	Sat Apr 20 16:05:04 2019	(r346447)
+++ head/sys/netinet/netdump/netdump_client.c	Sat Apr 20 16:07:29 2019	(r346448)
@@ -1144,13 +1144,25 @@ netdump_ioctl(struct cdev *dev __unused, u_long cmd, c
 
 	error = 0;
 	switch (cmd) {
-	case DIOCSKERNELDUMP:
+#ifdef COMPAT_FREEBSD11
+	case DIOCSKERNELDUMP_FREEBSD11:
 		u = *(u_int *)addr;
 		if (u != 0) {
 			error = ENXIO;
 			break;
 		}
-
+		if (nd_enabled) {
+			nd_enabled = 0;
+			netdump_mbuf_drain();
+		}
+		break;
+#endif
+	case DIOCSKERNELDUMP:
+		kda = (void *)addr;
+		if (kda->kda_enable != 0) {
+			error = ENXIO;
+			break;
+		}
 		if (nd_enabled) {
 			nd_enabled = 0;
 			netdump_mbuf_drain();

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:21:14 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93E9A156C1A2;
 Sat, 20 Apr 2019 16:21:14 +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 4346197602;
 Sat, 20 Apr 2019 16:21:14 +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 D83FF1887B;
 Sat, 20 Apr 2019 16:21:13 +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 x3KGLDml056610;
 Sat, 20 Apr 2019 16:21:13 GMT (envelope-from cy@FreeBSD.org)
Received: (from cy@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KGKwlm056591;
 Sat, 20 Apr 2019 16:20:58 GMT (envelope-from cy@FreeBSD.org)
Message-Id: <201904201620.x3KGKwlm056591@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
 using -f
From: Cy Schubert 
Date: Sat, 20 Apr 2019 16:20:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r346450 - in vendor/sqlite3/dist: . tea
X-SVN-Group: vendor
X-SVN-Commit-Author: cy
X-SVN-Commit-Paths: in vendor/sqlite3/dist: . tea
X-SVN-Commit-Revision: 346450
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 4346197602
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.98)[-0.978,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:21:14 -0000

Author: cy
Date: Sat Apr 20 16:20:57 2019
New Revision: 346450
URL: https://svnweb.freebsd.org/changeset/base/346450

Log:
  Import sqlite3-3.27.2 (3270200)

Modified:
  vendor/sqlite3/dist/configure
  vendor/sqlite3/dist/configure.ac
  vendor/sqlite3/dist/sqlite3.c
  vendor/sqlite3/dist/sqlite3.h
  vendor/sqlite3/dist/tea/configure
  vendor/sqlite3/dist/tea/configure.ac

Modified: vendor/sqlite3/dist/configure
==============================================================================
--- vendor/sqlite3/dist/configure	Sat Apr 20 16:07:47 2019	(r346449)
+++ vendor/sqlite3/dist/configure	Sat Apr 20 16:20:57 2019	(r346450)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.27.1.
+# Generated by GNU Autoconf 2.69 for sqlite 3.27.2.
 #
 # Report bugs to .
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sqlite'
 PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.27.1'
-PACKAGE_STRING='sqlite 3.27.1'
+PACKAGE_VERSION='3.27.2'
+PACKAGE_STRING='sqlite 3.27.2'
 PACKAGE_BUGREPORT='http://www.sqlite.org'
 PACKAGE_URL=''
 
@@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sqlite 3.27.1 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.27.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1412,7 +1412,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sqlite 3.27.1:";;
+     short | recursive ) echo "Configuration of sqlite 3.27.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1537,7 +1537,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sqlite configure 3.27.1
+sqlite configure 3.27.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sqlite $as_me 3.27.1, which was
+It was created by sqlite $as_me 3.27.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2818,7 +2818,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='sqlite'
- VERSION='3.27.1'
+ VERSION='3.27.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sqlite $as_me 3.27.1, which was
+This file was extended by sqlite $as_me 3.27.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14495,7 +14495,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-sqlite config.status 3.27.1
+sqlite config.status 3.27.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: vendor/sqlite3/dist/configure.ac
==============================================================================
--- vendor/sqlite3/dist/configure.ac	Sat Apr 20 16:07:47 2019	(r346449)
+++ vendor/sqlite3/dist/configure.ac	Sat Apr 20 16:20:57 2019	(r346450)
@@ -10,7 +10,7 @@
 #
 
 AC_PREREQ(2.61)
-AC_INIT(sqlite, 3.27.1, http://www.sqlite.org)
+AC_INIT(sqlite, 3.27.2, http://www.sqlite.org)
 AC_CONFIG_SRCDIR([sqlite3.c])
 AC_CONFIG_AUX_DIR([.])
 

Modified: vendor/sqlite3/dist/sqlite3.c
==============================================================================
--- vendor/sqlite3/dist/sqlite3.c	Sat Apr 20 16:07:47 2019	(r346449)
+++ vendor/sqlite3/dist/sqlite3.c	Sat Apr 20 16:20:57 2019	(r346450)
@@ -1,6 +1,6 @@
 /******************************************************************************
 ** This file is an amalgamation of many separate C source files from SQLite
-** version 3.27.1.  By combining all the individual C code files into this
+** version 3.27.2.  By combining all the individual C code files into this
 ** single large file, the entire code can be compiled as a single translation
 ** unit.  This allows many compilers to do optimizations that would not be
 ** possible if the files were compiled separately.  Performance improvements
@@ -1162,9 +1162,9 @@ extern "C" {
 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
 ** [sqlite_version()] and [sqlite_source_id()].
 */
-#define SQLITE_VERSION        "3.27.1"
-#define SQLITE_VERSION_NUMBER 3027001
-#define SQLITE_SOURCE_ID      "2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd"
+#define SQLITE_VERSION        "3.27.2"
+#define SQLITE_VERSION_NUMBER 3027002
+#define SQLITE_SOURCE_ID      "2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7"
 
 /*
 ** CAPI3REF: Run-Time Library Version Numbers
@@ -3408,7 +3408,7 @@ SQLITE_API int sqlite3_changes(sqlite3*);
 ** not. ^Changes to a view that are intercepted by INSTEAD OF triggers 
 ** are not counted.
 **
-** This the [sqlite3_total_changes(D)] interface only reports the number
+** The [sqlite3_total_changes(D)] interface only reports the number
 ** of rows that changed due to SQL statement run against database
 ** connection D.  Any changes by other database connections are ignored.
 ** To detect changes against a database file from other database
@@ -14937,57 +14937,56 @@ typedef struct VdbeOpList VdbeOpList;
 #define OP_Sequence      120 /* synopsis: r[P2]=cursor[P1].ctr++           */
 #define OP_NewRowid      121 /* synopsis: r[P2]=rowid                      */
 #define OP_Insert        122 /* synopsis: intkey=r[P3] data=r[P2]          */
-#define OP_InsertInt     123 /* synopsis: intkey=P3 data=r[P2]             */
-#define OP_Delete        124
-#define OP_ResetCount    125
-#define OP_SorterCompare 126 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
-#define OP_SorterData    127 /* synopsis: r[P2]=data                       */
-#define OP_RowData       128 /* synopsis: r[P2]=data                       */
-#define OP_Rowid         129 /* synopsis: r[P2]=rowid                      */
-#define OP_NullRow       130
-#define OP_SeekEnd       131
-#define OP_SorterInsert  132 /* synopsis: key=r[P2]                        */
-#define OP_IdxInsert     133 /* synopsis: key=r[P2]                        */
-#define OP_IdxDelete     134 /* synopsis: key=r[P2@P3]                     */
-#define OP_DeferredSeek  135 /* synopsis: Move P3 to P1.rowid if needed    */
-#define OP_IdxRowid      136 /* synopsis: r[P2]=rowid                      */
-#define OP_Destroy       137
-#define OP_Clear         138
-#define OP_ResetSorter   139
-#define OP_CreateBtree   140 /* synopsis: r[P2]=root iDb=P1 flags=P3       */
+#define OP_Delete        123
+#define OP_ResetCount    124
+#define OP_SorterCompare 125 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
+#define OP_SorterData    126 /* synopsis: r[P2]=data                       */
+#define OP_RowData       127 /* synopsis: r[P2]=data                       */
+#define OP_Rowid         128 /* synopsis: r[P2]=rowid                      */
+#define OP_NullRow       129
+#define OP_SeekEnd       130
+#define OP_SorterInsert  131 /* synopsis: key=r[P2]                        */
+#define OP_IdxInsert     132 /* synopsis: key=r[P2]                        */
+#define OP_IdxDelete     133 /* synopsis: key=r[P2@P3]                     */
+#define OP_DeferredSeek  134 /* synopsis: Move P3 to P1.rowid if needed    */
+#define OP_IdxRowid      135 /* synopsis: r[P2]=rowid                      */
+#define OP_Destroy       136
+#define OP_Clear         137
+#define OP_ResetSorter   138
+#define OP_CreateBtree   139 /* synopsis: r[P2]=root iDb=P1 flags=P3       */
+#define OP_SqlExec       140
 #define OP_Real          141 /* same as TK_FLOAT, synopsis: r[P2]=P4       */
-#define OP_SqlExec       142
-#define OP_ParseSchema   143
-#define OP_LoadAnalysis  144
-#define OP_DropTable     145
-#define OP_DropIndex     146
-#define OP_DropTrigger   147
-#define OP_IntegrityCk   148
-#define OP_RowSetAdd     149 /* synopsis: rowset(P1)=r[P2]                 */
-#define OP_Param         150
-#define OP_FkCounter     151 /* synopsis: fkctr[P1]+=P2                    */
-#define OP_MemMax        152 /* synopsis: r[P1]=max(r[P1],r[P2])           */
-#define OP_OffsetLimit   153 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */
-#define OP_AggInverse    154 /* synopsis: accum=r[P3] inverse(r[P2@P5])    */
-#define OP_AggStep       155 /* synopsis: accum=r[P3] step(r[P2@P5])       */
-#define OP_AggStep1      156 /* synopsis: accum=r[P3] step(r[P2@P5])       */
-#define OP_AggValue      157 /* synopsis: r[P3]=value N=P2                 */
-#define OP_AggFinal      158 /* synopsis: accum=r[P1] N=P2                 */
-#define OP_Expire        159
-#define OP_TableLock     160 /* synopsis: iDb=P1 root=P2 write=P3          */
-#define OP_VBegin        161
-#define OP_VCreate       162
-#define OP_VDestroy      163
-#define OP_VOpen         164
-#define OP_VColumn       165 /* synopsis: r[P3]=vcolumn(P2)                */
-#define OP_VRename       166
-#define OP_Pagecount     167
-#define OP_MaxPgcnt      168
-#define OP_Trace         169
-#define OP_CursorHint    170
-#define OP_Noop          171
-#define OP_Explain       172
-#define OP_Abortable     173
+#define OP_ParseSchema   142
+#define OP_LoadAnalysis  143
+#define OP_DropTable     144
+#define OP_DropIndex     145
+#define OP_DropTrigger   146
+#define OP_IntegrityCk   147
+#define OP_RowSetAdd     148 /* synopsis: rowset(P1)=r[P2]                 */
+#define OP_Param         149
+#define OP_FkCounter     150 /* synopsis: fkctr[P1]+=P2                    */
+#define OP_MemMax        151 /* synopsis: r[P1]=max(r[P1],r[P2])           */
+#define OP_OffsetLimit   152 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */
+#define OP_AggInverse    153 /* synopsis: accum=r[P3] inverse(r[P2@P5])    */
+#define OP_AggStep       154 /* synopsis: accum=r[P3] step(r[P2@P5])       */
+#define OP_AggStep1      155 /* synopsis: accum=r[P3] step(r[P2@P5])       */
+#define OP_AggValue      156 /* synopsis: r[P3]=value N=P2                 */
+#define OP_AggFinal      157 /* synopsis: accum=r[P1] N=P2                 */
+#define OP_Expire        158
+#define OP_TableLock     159 /* synopsis: iDb=P1 root=P2 write=P3          */
+#define OP_VBegin        160
+#define OP_VCreate       161
+#define OP_VDestroy      162
+#define OP_VOpen         163
+#define OP_VColumn       164 /* synopsis: r[P3]=vcolumn(P2)                */
+#define OP_VRename       165
+#define OP_Pagecount     166
+#define OP_MaxPgcnt      167
+#define OP_Trace         168
+#define OP_CursorHint    169
+#define OP_Noop          170
+#define OP_Explain       171
+#define OP_Abortable     172
 
 /* Properties such as "out2" or "jump" that are specified in
 ** comments following the "case" for each opcode in the vdbe.c
@@ -15016,12 +15015,12 @@ typedef struct VdbeOpList VdbeOpList;
 /* 104 */ 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\
 /* 112 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
 /* 120 */ 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
-/* 128 */ 0x00, 0x10, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00,\
-/* 136 */ 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\
-/* 144 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00,\
-/* 152 */ 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
-/* 160 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,\
-/* 168 */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,}
+/* 128 */ 0x10, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x10,\
+/* 136 */ 0x10, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00,\
+/* 144 */ 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x04,\
+/* 152 */ 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+/* 160 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10,\
+/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00,}
 
 /* The sqlite3P2Values() routine is able to run faster if it knows
 ** the value of the largest JUMP opcode.  The smaller the maximum
@@ -19174,7 +19173,7 @@ SQLITE_PRIVATE void sqlite3AlterRenameColumn(Parse*, S
 SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
 SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*, int);
-SQLITE_PRIVATE void sqlite3CodeRhsOfIN(Parse*, Expr*, int, int);
+SQLITE_PRIVATE void sqlite3CodeRhsOfIN(Parse*, Expr*, int);
 SQLITE_PRIVATE int sqlite3CodeSubselect(Parse*, Expr*);
 SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
 SQLITE_PRIVATE void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p);
@@ -32139,57 +32138,56 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
     /* 120 */ "Sequence"         OpHelp("r[P2]=cursor[P1].ctr++"),
     /* 121 */ "NewRowid"         OpHelp("r[P2]=rowid"),
     /* 122 */ "Insert"           OpHelp("intkey=r[P3] data=r[P2]"),
-    /* 123 */ "InsertInt"        OpHelp("intkey=P3 data=r[P2]"),
-    /* 124 */ "Delete"           OpHelp(""),
-    /* 125 */ "ResetCount"       OpHelp(""),
-    /* 126 */ "SorterCompare"    OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
-    /* 127 */ "SorterData"       OpHelp("r[P2]=data"),
-    /* 128 */ "RowData"          OpHelp("r[P2]=data"),
-    /* 129 */ "Rowid"            OpHelp("r[P2]=rowid"),
-    /* 130 */ "NullRow"          OpHelp(""),
-    /* 131 */ "SeekEnd"          OpHelp(""),
-    /* 132 */ "SorterInsert"     OpHelp("key=r[P2]"),
-    /* 133 */ "IdxInsert"        OpHelp("key=r[P2]"),
-    /* 134 */ "IdxDelete"        OpHelp("key=r[P2@P3]"),
-    /* 135 */ "DeferredSeek"     OpHelp("Move P3 to P1.rowid if needed"),
-    /* 136 */ "IdxRowid"         OpHelp("r[P2]=rowid"),
-    /* 137 */ "Destroy"          OpHelp(""),
-    /* 138 */ "Clear"            OpHelp(""),
-    /* 139 */ "ResetSorter"      OpHelp(""),
-    /* 140 */ "CreateBtree"      OpHelp("r[P2]=root iDb=P1 flags=P3"),
+    /* 123 */ "Delete"           OpHelp(""),
+    /* 124 */ "ResetCount"       OpHelp(""),
+    /* 125 */ "SorterCompare"    OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
+    /* 126 */ "SorterData"       OpHelp("r[P2]=data"),
+    /* 127 */ "RowData"          OpHelp("r[P2]=data"),
+    /* 128 */ "Rowid"            OpHelp("r[P2]=rowid"),
+    /* 129 */ "NullRow"          OpHelp(""),
+    /* 130 */ "SeekEnd"          OpHelp(""),
+    /* 131 */ "SorterInsert"     OpHelp("key=r[P2]"),
+    /* 132 */ "IdxInsert"        OpHelp("key=r[P2]"),
+    /* 133 */ "IdxDelete"        OpHelp("key=r[P2@P3]"),
+    /* 134 */ "DeferredSeek"     OpHelp("Move P3 to P1.rowid if needed"),
+    /* 135 */ "IdxRowid"         OpHelp("r[P2]=rowid"),
+    /* 136 */ "Destroy"          OpHelp(""),
+    /* 137 */ "Clear"            OpHelp(""),
+    /* 138 */ "ResetSorter"      OpHelp(""),
+    /* 139 */ "CreateBtree"      OpHelp("r[P2]=root iDb=P1 flags=P3"),
+    /* 140 */ "SqlExec"          OpHelp(""),
     /* 141 */ "Real"             OpHelp("r[P2]=P4"),
-    /* 142 */ "SqlExec"          OpHelp(""),
-    /* 143 */ "ParseSchema"      OpHelp(""),
-    /* 144 */ "LoadAnalysis"     OpHelp(""),
-    /* 145 */ "DropTable"        OpHelp(""),
-    /* 146 */ "DropIndex"        OpHelp(""),
-    /* 147 */ "DropTrigger"      OpHelp(""),
-    /* 148 */ "IntegrityCk"      OpHelp(""),
-    /* 149 */ "RowSetAdd"        OpHelp("rowset(P1)=r[P2]"),
-    /* 150 */ "Param"            OpHelp(""),
-    /* 151 */ "FkCounter"        OpHelp("fkctr[P1]+=P2"),
-    /* 152 */ "MemMax"           OpHelp("r[P1]=max(r[P1],r[P2])"),
-    /* 153 */ "OffsetLimit"      OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"),
-    /* 154 */ "AggInverse"       OpHelp("accum=r[P3] inverse(r[P2@P5])"),
-    /* 155 */ "AggStep"          OpHelp("accum=r[P3] step(r[P2@P5])"),
-    /* 156 */ "AggStep1"         OpHelp("accum=r[P3] step(r[P2@P5])"),
-    /* 157 */ "AggValue"         OpHelp("r[P3]=value N=P2"),
-    /* 158 */ "AggFinal"         OpHelp("accum=r[P1] N=P2"),
-    /* 159 */ "Expire"           OpHelp(""),
-    /* 160 */ "TableLock"        OpHelp("iDb=P1 root=P2 write=P3"),
-    /* 161 */ "VBegin"           OpHelp(""),
-    /* 162 */ "VCreate"          OpHelp(""),
-    /* 163 */ "VDestroy"         OpHelp(""),
-    /* 164 */ "VOpen"            OpHelp(""),
-    /* 165 */ "VColumn"          OpHelp("r[P3]=vcolumn(P2)"),
-    /* 166 */ "VRename"          OpHelp(""),
-    /* 167 */ "Pagecount"        OpHelp(""),
-    /* 168 */ "MaxPgcnt"         OpHelp(""),
-    /* 169 */ "Trace"            OpHelp(""),
-    /* 170 */ "CursorHint"       OpHelp(""),
-    /* 171 */ "Noop"             OpHelp(""),
-    /* 172 */ "Explain"          OpHelp(""),
-    /* 173 */ "Abortable"        OpHelp(""),
+    /* 142 */ "ParseSchema"      OpHelp(""),
+    /* 143 */ "LoadAnalysis"     OpHelp(""),
+    /* 144 */ "DropTable"        OpHelp(""),
+    /* 145 */ "DropIndex"        OpHelp(""),
+    /* 146 */ "DropTrigger"      OpHelp(""),
+    /* 147 */ "IntegrityCk"      OpHelp(""),
+    /* 148 */ "RowSetAdd"        OpHelp("rowset(P1)=r[P2]"),
+    /* 149 */ "Param"            OpHelp(""),
+    /* 150 */ "FkCounter"        OpHelp("fkctr[P1]+=P2"),
+    /* 151 */ "MemMax"           OpHelp("r[P1]=max(r[P1],r[P2])"),
+    /* 152 */ "OffsetLimit"      OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"),
+    /* 153 */ "AggInverse"       OpHelp("accum=r[P3] inverse(r[P2@P5])"),
+    /* 154 */ "AggStep"          OpHelp("accum=r[P3] step(r[P2@P5])"),
+    /* 155 */ "AggStep1"         OpHelp("accum=r[P3] step(r[P2@P5])"),
+    /* 156 */ "AggValue"         OpHelp("r[P3]=value N=P2"),
+    /* 157 */ "AggFinal"         OpHelp("accum=r[P1] N=P2"),
+    /* 158 */ "Expire"           OpHelp(""),
+    /* 159 */ "TableLock"        OpHelp("iDb=P1 root=P2 write=P3"),
+    /* 160 */ "VBegin"           OpHelp(""),
+    /* 161 */ "VCreate"          OpHelp(""),
+    /* 162 */ "VDestroy"         OpHelp(""),
+    /* 163 */ "VOpen"            OpHelp(""),
+    /* 164 */ "VColumn"          OpHelp("r[P3]=vcolumn(P2)"),
+    /* 165 */ "VRename"          OpHelp(""),
+    /* 166 */ "Pagecount"        OpHelp(""),
+    /* 167 */ "MaxPgcnt"         OpHelp(""),
+    /* 168 */ "Trace"            OpHelp(""),
+    /* 169 */ "CursorHint"       OpHelp(""),
+    /* 170 */ "Noop"             OpHelp(""),
+    /* 171 */ "Explain"          OpHelp(""),
+    /* 172 */ "Abortable"        OpHelp(""),
   };
   return azName[i];
 }
@@ -87935,14 +87933,7 @@ case OP_NewRowid: {           /* out2 */
 ** This instruction only works on tables.  The equivalent instruction
 ** for indices is OP_IdxInsert.
 */
-/* Opcode: InsertInt P1 P2 P3 P4 P5
-** Synopsis: intkey=P3 data=r[P2]
-**
-** This works exactly like OP_Insert except that the key is the
-** integer value P3, not the value of the integer stored in register P3.
-*/
-case OP_Insert: 
-case OP_InsertInt: {
+case OP_Insert: {
   Mem *pData;       /* MEM cell holding data for the record to be inserted */
   Mem *pKey;        /* MEM cell holding key  for the record */
   VdbeCursor *pC;   /* Cursor to table into which insert is written */
@@ -87963,16 +87954,11 @@ case OP_InsertInt: {
   REGISTER_TRACE(pOp->p2, pData);
   sqlite3VdbeIncrWriteCounter(p, pC);
 
-  if( pOp->opcode==OP_Insert ){
-    pKey = &aMem[pOp->p3];
-    assert( pKey->flags & MEM_Int );
-    assert( memIsValid(pKey) );
-    REGISTER_TRACE(pOp->p3, pKey);
-    x.nKey = pKey->u.i;
-  }else{
-    assert( pOp->opcode==OP_InsertInt );
-    x.nKey = pOp->p3;
-  }
+  pKey = &aMem[pOp->p3];
+  assert( pKey->flags & MEM_Int );
+  assert( memIsValid(pKey) );
+  REGISTER_TRACE(pOp->p3, pKey);
+  x.nKey = pKey->u.i;
 
   if( pOp->p4type==P4_TABLE && HAS_UPDATE_HOOK(db) ){
     assert( pC->iDb>=0 );
@@ -96131,7 +96117,39 @@ SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(
   return 0;
 }
 
+#ifndef SQLITE_OMIT_WINDOWFUNC
 /*
+** Walker callback for resolveRemoveWindows().
+*/
+static int resolveRemoveWindowsCb(Walker *pWalker, Expr *pExpr){
+  if( ExprHasProperty(pExpr, EP_WinFunc) ){
+    Window **pp;
+    for(pp=&pWalker->u.pSelect->pWin; *pp; pp=&(*pp)->pNextWin){
+      if( *pp==pExpr->y.pWin ){
+        *pp = (*pp)->pNextWin;
+        break;
+      }    
+    }
+  }
+  return WRC_Continue;
+}
+
+/*
+** Remove any Window objects owned by the expression pExpr from the
+** Select.pWin list of Select object pSelect.
+*/
+static void resolveRemoveWindows(Select *pSelect, Expr *pExpr){
+  Walker sWalker;
+  memset(&sWalker, 0, sizeof(Walker));
+  sWalker.xExprCallback = resolveRemoveWindowsCb;
+  sWalker.u.pSelect = pSelect;
+  sqlite3WalkExpr(&sWalker, pExpr);
+}
+#else
+# define resolveRemoveWindows(x,y)
+#endif
+
+/*
 ** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.
 ** The Name context of the SELECT statement is pNC.  zType is either
 ** "ORDER" or "GROUP" depending on which type of clause pOrderBy is.
@@ -96197,19 +96215,10 @@ static int resolveOrderGroupBy(
     }
     for(j=0; jpEList->nExpr; j++){
       if( sqlite3ExprCompare(0, pE, pSelect->pEList->a[j].pExpr, -1)==0 ){
-#ifndef SQLITE_OMIT_WINDOWFUNC
-        if( ExprHasProperty(pE, EP_WinFunc) ){
-          /* Since this window function is being changed into a reference
-          ** to the same window function the result set, remove the instance
-          ** of this window function from the Select.pWin list. */
-          Window **pp;
-          for(pp=&pSelect->pWin; *pp; pp=&(*pp)->pNextWin){
-            if( *pp==pE->y.pWin ){
-              *pp = (*pp)->pNextWin;
-            }    
-          }
-        }
-#endif
+        /* Since this expresion is being changed into a reference
+        ** to an identical expression in the result set, remove all Window
+        ** objects belonging to the expression from the Select.pWin list. */
+        resolveRemoveWindows(pSelect, pE);
         pItem->u.x.iOrderByCol = j+1;
       }
     }
@@ -99181,14 +99190,11 @@ SQLITE_PRIVATE int sqlite3FindInIndex(
     eType = IN_INDEX_EPH;
     if( inFlags & IN_INDEX_LOOP ){
       pParse->nQueryLoop = 0;
-      if( pX->pLeft->iColumn<0 && !ExprHasProperty(pX, EP_xIsSelect) ){
-        eType = IN_INDEX_ROWID;
-      }
     }else if( prRhsHasNull ){
       *prRhsHasNull = rMayHaveNull = ++pParse->nMem;
     }
     assert( pX->op==TK_IN );
-    sqlite3CodeRhsOfIN(pParse, pX, iTab, eType==IN_INDEX_ROWID);
+    sqlite3CodeRhsOfIN(pParse, pX, iTab);
     if( rMayHaveNull ){
       sqlite3SetHasNullFlag(v, iTab, rMayHaveNull);
     }
@@ -99289,12 +99295,6 @@ SQLITE_PRIVATE void sqlite3VectorErrorMsg(Parse *pPars
 ** however the cursor number returned might not be the same, as it might
 ** have been duplicated using OP_OpenDup.
 **
-** If parameter isRowid is non-zero, then LHS of the IN operator is guaranteed
-** to be a non-null integer. In this case, the ephemeral table can be an
-** table B-Tree that keyed by only integers.  The more general cases uses
-** an index B-Tree which can have arbitrary keys, but is slower to both
-** read and write.
-**
 ** If the LHS expression ("x" in the examples) is a column value, or
 ** the SELECT statement returns a column value, then the affinity of that
 ** column is used to build the index keys. If both 'x' and the
@@ -99306,8 +99306,7 @@ SQLITE_PRIVATE void sqlite3VectorErrorMsg(Parse *pPars
 SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
   Parse *pParse,          /* Parsing context */
   Expr *pExpr,            /* The IN operator */
-  int iTab,               /* Use this cursor number */
-  int isRowid             /* If true, LHS is a rowid */
+  int iTab                /* Use this cursor number */
 ){
   int addrOnce = 0;           /* Address of the OP_Once instruction at top */
   int addr;                   /* Address of OP_OpenEphemeral instruction */
@@ -99360,14 +99359,12 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
   /* Check to see if this is a vector IN operator */
   pLeft = pExpr->pLeft;
   nVal = sqlite3ExprVectorSize(pLeft);
-  assert( !isRowid || nVal==1 );
 
   /* Construct the ephemeral table that will contain the content of
   ** RHS of the IN operator.
   */
   pExpr->iTable = iTab;
-  addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, 
-      pExpr->iTable, (isRowid?0:nVal));
+  addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, nVal);
 #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
   if( ExprHasProperty(pExpr, EP_xIsSelect) ){
     VdbeComment((v, "Result of SELECT %u", pExpr->x.pSelect->selId));
@@ -99375,7 +99372,7 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
     VdbeComment((v, "RHS of IN operator"));
   }
 #endif
-  pKeyInfo = isRowid ? 0 : sqlite3KeyInfoAlloc(pParse->db, nVal, 1);
+  pKeyInfo = sqlite3KeyInfoAlloc(pParse->db, nVal, 1);
 
   if( ExprHasProperty(pExpr, EP_xIsSelect) ){
     /* Case 1:     expr IN (SELECT ...)
@@ -99389,7 +99386,6 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
     ExplainQueryPlan((pParse, 1, "%sLIST SUBQUERY %d",
         addrOnce?"":"CORRELATED ", pSelect->selId
     ));
-    assert( !isRowid );
     /* If the LHS and RHS of the IN operator do not match, that
     ** error will have been caught long before we reach this point. */
     if( ALWAYS(pEList->nExpr==nVal) ){
@@ -99442,10 +99438,8 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
     /* Loop through each expression in . */
     r1 = sqlite3GetTempReg(pParse);
     r2 = sqlite3GetTempReg(pParse);
-    if( isRowid ) sqlite3VdbeAddOp4(v, OP_Blob, 0, r2, 0, "", P4_STATIC);
     for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
       Expr *pE2 = pItem->pExpr;
-      int iValToIns;
 
       /* If the expression is not constant then we will need to
       ** disable the test that was generated above that makes sure
@@ -99458,20 +99452,9 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
       }
 
       /* Evaluate the expression and insert it into the temp table */
-      if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
-        sqlite3VdbeAddOp3(v, OP_InsertInt, iTab, r2, iValToIns);
-      }else{
-        r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
-        if( isRowid ){
-          sqlite3VdbeAddOp2(v, OP_MustBeInt, r3,
-                            sqlite3VdbeCurrentAddr(v)+2);
-          VdbeCoverage(v);
-          sqlite3VdbeAddOp3(v, OP_Insert, iTab, r2, r3);
-        }else{
-          sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
-          sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r2, r3, 1);
-        }
-      }
+      r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
+      sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
+      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r2, r3, 1);
     }
     sqlite3ReleaseTempReg(pParse, r1);
     sqlite3ReleaseTempReg(pParse, r2);
@@ -118107,10 +118090,13 @@ SQLITE_PRIVATE void sqlite3CompleteInsertion(
       pik_flags |= (update_flags & OPFLAG_SAVEPOSITION);
 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
       if( update_flags==0 ){
-        sqlite3VdbeAddOp4(v, OP_InsertInt, 
-            iIdxCur+i, aRegIdx[i], 0, (char*)pTab, P4_TABLE
+        int r = sqlite3GetTempReg(pParse);
+        sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
+        sqlite3VdbeAddOp4(v, OP_Insert, 
+            iIdxCur+i, aRegIdx[i], r, (char*)pTab, P4_TABLE
         );
         sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
+        sqlite3ReleaseTempReg(pParse, r);
       }
 #endif
     }
@@ -136427,7 +136413,6 @@ static int codeEqualityTerm(
         if( pLoop->aLTerm[i]->pExpr==pX ){
           int iOut = iReg + i - iEq;
           if( eType==IN_INDEX_ROWID ){
-            testcase( nEq>1 );  /* Happens with a UNIQUE index on ROWID */
             pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iOut);
           }else{
             int iCol = aiMap ? aiMap[iMap++] : 0;
@@ -137189,6 +137174,9 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart(
     sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg);
     VdbeCoverage(v);
     pLevel->op = OP_Noop;
+    if( (pTerm->prereqAll & pLevel->notReady)==0 ){
+      pTerm->wtFlags |= TERM_CODED;
+    }
   }else if( (pLoop->wsFlags & WHERE_IPK)!=0
          && (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0
   ){
@@ -217076,7 +217064,7 @@ static void fts5SourceIdFunc(
 ){
   assert( nArg==0 );
   UNUSED_PARAM2(nArg, apUnused);
-  sqlite3_result_text(pCtx, "fts5: 2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd", -1, SQLITE_TRANSIENT);
+  sqlite3_result_text(pCtx, "fts5: 2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7", -1, SQLITE_TRANSIENT);
 }
 
 /*
@@ -221840,9 +221828,9 @@ SQLITE_API int sqlite3_stmt_init(
 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
 
 /************** End of stmt.c ************************************************/
-#if __LINE__!=221843
+#if __LINE__!=221831
 #undef SQLITE_SOURCE_ID
-#define SQLITE_SOURCE_ID      "2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959alt2"
+#define SQLITE_SOURCE_ID      "2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt2"
 #endif
 /* Return the source-id for this library */
 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }

Modified: vendor/sqlite3/dist/sqlite3.h
==============================================================================
--- vendor/sqlite3/dist/sqlite3.h	Sat Apr 20 16:07:47 2019	(r346449)
+++ vendor/sqlite3/dist/sqlite3.h	Sat Apr 20 16:20:57 2019	(r346450)
@@ -123,9 +123,9 @@ extern "C" {
 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
 ** [sqlite_version()] and [sqlite_source_id()].
 */
-#define SQLITE_VERSION        "3.27.1"
-#define SQLITE_VERSION_NUMBER 3027001
-#define SQLITE_SOURCE_ID      "2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd"
+#define SQLITE_VERSION        "3.27.2"
+#define SQLITE_VERSION_NUMBER 3027002
+#define SQLITE_SOURCE_ID      "2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7"
 
 /*
 ** CAPI3REF: Run-Time Library Version Numbers
@@ -2369,7 +2369,7 @@ SQLITE_API int sqlite3_changes(sqlite3*);
 ** not. ^Changes to a view that are intercepted by INSTEAD OF triggers 
 ** are not counted.
 **
-** This the [sqlite3_total_changes(D)] interface only reports the number
+** The [sqlite3_total_changes(D)] interface only reports the number
 ** of rows that changed due to SQL statement run against database
 ** connection D.  Any changes by other database connections are ignored.
 ** To detect changes against a database file from other database

Modified: vendor/sqlite3/dist/tea/configure
==============================================================================
--- vendor/sqlite3/dist/tea/configure	Sat Apr 20 16:07:47 2019	(r346449)
+++ vendor/sqlite3/dist/tea/configure	Sat Apr 20 16:20:57 2019	(r346450)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.27.1.
+# Generated by GNU Autoconf 2.69 for sqlite 3.27.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sqlite'
 PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.27.1'
-PACKAGE_STRING='sqlite 3.27.1'
+PACKAGE_VERSION='3.27.2'
+PACKAGE_STRING='sqlite 3.27.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sqlite 3.27.1 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.27.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1365,7 +1365,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sqlite 3.27.1:";;
+     short | recursive ) echo "Configuration of sqlite 3.27.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1467,7 +1467,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sqlite configure 3.27.1
+sqlite configure 3.27.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1878,7 +1878,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sqlite $as_me 3.27.1, which was
+It was created by sqlite $as_me 3.27.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -9373,7 +9373,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sqlite $as_me 3.27.1, which was
+This file was extended by sqlite $as_me 3.27.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9426,7 +9426,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-sqlite config.status 3.27.1
+sqlite config.status 3.27.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: vendor/sqlite3/dist/tea/configure.ac
==============================================================================
--- vendor/sqlite3/dist/tea/configure.ac	Sat Apr 20 16:07:47 2019	(r346449)
+++ vendor/sqlite3/dist/tea/configure.ac	Sat Apr 20 16:20:57 2019	(r346450)
@@ -19,7 +19,7 @@ dnl	to configure the system for the local environment.
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([sqlite], [3.27.1])
+AC_INIT([sqlite], [3.27.2])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:30:17 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EF28156C4FA;
 Sat, 20 Apr 2019 16:30:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org
 [IPv6:2610:1c1:1:606c::24b:4])
 (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 "smtp.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id E955497D18;
 Sat, 20 Apr 2019 16:30:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from John-Baldwins-MacBook-Pro-3.local (unknown
 [IPv6:2601:648:8880:1e30:fd9b:9ce6:c8c:cc0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate) (Authenticated sender: jhb)
 by smtp.freebsd.org (Postfix) with ESMTPSA id 521851CB61;
 Sat, 20 Apr 2019 16:30:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Subject: Re: svn commit: r346443 - head/tests/sys/opencrypto
To: Enji Cooper , src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
References: <201904201543.x3KFhSAl037969@repo.freebsd.org>
From: John Baldwin 
Openpgp: preference=signencrypt
Autocrypt: addr=jhb@FreeBSD.org; keydata=
 mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0
 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo
 /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD
 /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X
 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z
 pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1
 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k
 do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk
 d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID
 AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM
 jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3
 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj
 XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH
 YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO
 EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz
 hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX
 sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16
 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH
 aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx
 Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I
 SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf
 afMAg8QvmOWnHx3wl8WslCaXaE8=
Message-ID: 
Date: Sat, 20 Apr 2019 09:30:15 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0)
 Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <201904201543.x3KFhSAl037969@repo.freebsd.org>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Rspamd-Queue-Id: E955497D18
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.93 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.93)[-0.931,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:30:17 -0000

On 4/20/19 8:43 AM, Enji Cooper wrote:
> Author: ngie
> Date: Sat Apr 20 15:43:28 2019
> New Revision: 346443
> URL: https://svnweb.freebsd.org/changeset/base/346443
> 
> Log:
>   tests/sys/opencrypto: fix whitespace per PEP8
>   
>   Replace hard tabs with four-character indentations, per PEP8.
>   
>   This is being done to separate stylistic changes from the tests from functional
>   ones, as I accidentally introduced a bug to the tests when I used four-space
>   indentation locally.
>   
>   No functional change.

Wow, this is really painful for the 4-5 open reviews I have outstanding as it
makes a merge disaster.

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:31:09 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48BDE156C59E;
 Sat, 20 Apr 2019 16:31:09 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com
 [IPv6:2607:f8b0:4864:20::533])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id C0C8F97ED1;
 Sat, 20 Apr 2019 16:31:08 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pg1-x533.google.com with SMTP id v12so3975517pgq.1;
 Sat, 20 Apr 2019 09:31:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:message-id:mime-version:subject:date:in-reply-to:cc:to
 :references; bh=UYvm75R0Pr6fQNxpbXJF1vGOdRfmxIVW4rBCm6k5er4=;
 b=hWX4APdUs3HWUNtlEB6g5HOrLIT3zPJqGHjr8EsnLDLJI78Y/XCs8rX14LG6TFQLzg
 D8zy7m4UGwl7eVJMAf2INaa4s2NzQAcciuuRTLzScbixWWDZNoz40T1Lkm/Imy+aJSWH
 gQeLpFwPNdE4kJpMmguQna+Ov28byPrOHxt+DtBmHfaLL/lNqE7bT12bE8N9JSuf4fn7
 C+Intm3aU6sY6uzE7jhm6WmPRtYz78qlYrWbuk+gaCkmfcbrozvFw0L2w400x0p+4Y98
 huM0KYU3ZeIjidjXumD+pCBgxHg3d5h5QpZy8MMYgBRXAKcVSxsgaz1x3iY8FlrjhXIC
 ShCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:message-id:mime-version:subject:date
 :in-reply-to:cc:to:references;
 bh=UYvm75R0Pr6fQNxpbXJF1vGOdRfmxIVW4rBCm6k5er4=;
 b=IgDv01rROTFdhPM63WBRZXWjneeryg7rUt5mR3Vv42ccF1n310hZOckV6XTd0KTuHT
 M1dm+CHAB9BYNFJTB0CGReAw6yTzzy3/GmYzPeRffk+5+tV540GI0pMhkfQKOiuzKh/9
 iGz2+6fptzO8K38Jf11a+NACjcTFrhykyLZpAcWoqLpGFKS3wYlD2kEs+piDIoD0b5YI
 i6XnfOVFx/fi80WsYV4S6Z070qBi08qmUDHxVO2bisL7l6mIoocR51Cud0cOT6OMxzW+
 UivPpqbF2ofyTntemwksWrzKbpu/zFuKg/3CGaV+Qsj4MrXxjFu2Si424rqsPXgjnY2S
 BXCA==
X-Gm-Message-State: APjAAAWh3YWV3MpP3uLUhBO+ZAKNqTJ44Z5ZGPi7IRLnhgtkJPJhR3zm
 VazPg3jVn8WPm2KpNuW9jshhBhAFVU4=
X-Google-Smtp-Source: APXvYqxfgI1BR43NDM88BmpZFby3AeIv/SqWv1wP3oCNvYgGC84A8sYcaptzENWy6DCVLgum/RgCcg==
X-Received: by 2002:a63:ed4f:: with SMTP id m15mr10133531pgk.387.1555777867351; 
 Sat, 20 Apr 2019 09:31:07 -0700 (PDT)
Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id c22sm11905834pfn.136.2019.04.20.09.31.06
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 Apr 2019 09:31:06 -0700 (PDT)
From: Enji Cooper 
Message-Id: 
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Subject: Re: svn commit: r346443 - head/tests/sys/opencrypto
Date: Sat, 20 Apr 2019 09:31:06 -0700
In-Reply-To: 
Cc: Enji Cooper , src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
To: John Baldwin 
References: <201904201543.x3KFhSAl037969@repo.freebsd.org>
 
X-Mailer: Apple Mail (2.3445.102.3)
X-Rspamd-Queue-Id: C0C8F97ED1
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.97 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.972,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:31:09 -0000


> On Apr 20, 2019, at 9:30 AM, John Baldwin  wrote:
>=20
> On 4/20/19 8:43 AM, Enji Cooper wrote:
>> Author: ngie
>> Date: Sat Apr 20 15:43:28 2019
>> New Revision: 346443
>> URL: https://svnweb.freebsd.org/changeset/base/346443
>>=20
>> Log:
>>  tests/sys/opencrypto: fix whitespace per PEP8
>>=20
>>  Replace hard tabs with four-character indentations, per PEP8.
>>=20
>>  This is being done to separate stylistic changes from the tests from =
functional
>>  ones, as I accidentally introduced a bug to the tests when I used =
four-space
>>  indentation locally.
>>=20
>>  No functional change.
>=20
> Wow, this is really painful for the 4-5 open reviews I have =
outstanding as it
> makes a merge disaster.

Sorry ;_;=E2=80=A6
-Enji=

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:32:09 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1CD3156C814;
 Sat, 20 Apr 2019 16:32:08 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com
 [IPv6:2607:f8b0:4864:20::42d])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 5706668251;
 Sat, 20 Apr 2019 16:32:08 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pf1-x42d.google.com with SMTP id 10so3827801pfo.5;
 Sat, 20 Apr 2019 09:32:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:message-id:mime-version:subject:date:in-reply-to:cc:to
 :references; bh=KTxr2VsZqnsf1qxmwVfwHouB/j26wXP7KuXQ6a0VSfU=;
 b=VtqkxvuU9n0BVK9L7NAjLLgqQGujKxYYjetjhhuVvG61TfpDcPyqtB0hhEEvw9W2Bz
 THF69GBJJod/xUbO2OBLIr2xte2njiVDEsabn2WJZTnFKnbww4pYJc4bhRrErK7VoJM8
 GSz+t8nxC9XeT/8uPPRT+Z79Ua/evax3W3WsFse0XkVEuXRIC8+Kx6tH1GO3H7+UYRvq
 Z5H1YyEyDm1Ilm4nAL16j4K6keJ7gP3acs1ZhFRmPNI52YjKYlGGMCgoeilskZN2IZAg
 nJpy/Uk3xENAUbfhWAKvQUkWl5l5ggZvZErldaNaOMYc6U5gss0bUaMrHMBSTdHbwXWd
 zUOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:message-id:mime-version:subject:date
 :in-reply-to:cc:to:references;
 bh=KTxr2VsZqnsf1qxmwVfwHouB/j26wXP7KuXQ6a0VSfU=;
 b=WNaED4svCqVWDUoa/EZRGBqVSxho1HtTtF55IpxWdWjY7FeUCUClzv6Y8LIuoyKhd9
 8Ivp92+EwpkU6OZEn6usFhCaNjK1jHQgEwa6KPVsDp2/bXXcPemSe0kxPKNQryj8+OfP
 PveDqgekDiK63VVHk4LuRrx5xq2dkrhEh2QkA3nMxlQut9H6h8ed77rR0H5RGD/Cvh9O
 O3pnSr8oAy4ENvxrfPA6pBTulhOkAXlQ9GsMyw2cB7qJi9NuflNrTjMkImi3N3LzQTds
 z0AM0ZdIc40oFDgYEeBpk6+KD3Jjrw+NGtUCkNps/LVY2LCTcIe2ForXnxQv7f8pU/MZ
 +DnQ==
X-Gm-Message-State: APjAAAWyVPuN4vT9K/EZQ9SeeyVrLJHN35BAMS8AaaNZLPMtA1S2FNs+
 tKiEUZrILfJBIR43ppFd0un5Q0zlmvs=
X-Google-Smtp-Source: APXvYqzgWZ3oUgE7j6ylRVR9g2gzdIaA/cMptyW0CsLuhCIqR+0S+Akwo4V0rzH19OKdFanJQLtIWw==
X-Received: by 2002:a62:4ec8:: with SMTP id
 c191mr10771752pfb.138.1555777927164; 
 Sat, 20 Apr 2019 09:32:07 -0700 (PDT)
Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id c22sm11905834pfn.136.2019.04.20.09.32.06
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 Apr 2019 09:32:06 -0700 (PDT)
From: Enji Cooper 
Message-Id: 
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Subject: Re: svn commit: r346443 - head/tests/sys/opencrypto
Date: Sat, 20 Apr 2019 09:32:06 -0700
In-Reply-To: 
Cc: Enji Cooper , src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
To: John Baldwin 
References: <201904201543.x3KFhSAl037969@repo.freebsd.org>
 
 
X-Mailer: Apple Mail (2.3445.102.3)
X-Rspamd-Queue-Id: 5706668251
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.97 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.972,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:32:09 -0000


> On Apr 20, 2019, at 9:31 AM, Enji Cooper  =
wrote:
>=20
>=20
>> On Apr 20, 2019, at 9:30 AM, John Baldwin > wrote:
>>=20
>> On 4/20/19 8:43 AM, Enji Cooper wrote:
>>> Author: ngie
>>> Date: Sat Apr 20 15:43:28 2019
>>> New Revision: 346443
>>> URL: https://svnweb.freebsd.org/changeset/base/346443 =

>>>=20
>>> Log:
>>>  tests/sys/opencrypto: fix whitespace per PEP8
>>>=20
>>>  Replace hard tabs with four-character indentations, per PEP8.
>>>=20
>>>  This is being done to separate stylistic changes from the tests =
from functional
>>>  ones, as I accidentally introduced a bug to the tests when I used =
four-space
>>>  indentation locally.
>>>=20
>>>  No functional change.
>>=20
>> Wow, this is really painful for the 4-5 open reviews I have =
outstanding as it
>> makes a merge disaster.
>=20
> Sorry ;_;=E2=80=A6

	Being more constructive: I will back out the change, then =
reapply it later.
Thank you,
-Enji


From owner-svn-src-all@freebsd.org  Sat Apr 20 16:37:29 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CA1A156C9E6;
 Sat, 20 Apr 2019 16:37:29 +0000 (UTC)
 (envelope-from ngie@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 E1C4E6855D;
 Sat, 20 Apr 2019 16:37:28 +0000 (UTC)
 (envelope-from ngie@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 AEFA018BAF;
 Sat, 20 Apr 2019 16:37:28 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KGbS0C067414;
 Sat, 20 Apr 2019 16:37:28 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KGbSxi067413;
 Sat, 20 Apr 2019 16:37:28 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201904201637.x3KGbSxi067413@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Enji Cooper 
Date: Sat, 20 Apr 2019 16:37:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346452 - head/tests/sys/opencrypto
X-SVN-Group: head
X-SVN-Commit-Author: ngie
X-SVN-Commit-Paths: head/tests/sys/opencrypto
X-SVN-Commit-Revision: 346452
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: E1C4E6855D
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.97)[-0.967,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:37:29 -0000

Author: ngie
Date: Sat Apr 20 16:37:28 2019
New Revision: 346452
URL: https://svnweb.freebsd.org/changeset/base/346452

Log:
  Revert r346443
  
  My wide sweeping stylistic change (while well intended) is impeding others from
  working on `tests/sys/opencrypto`.
  
  The plan is to revert the change in ^/head, then reintroduce the changes after
  the other changes get merged into ^/head .
  
  Approved by:	emaste (mentor; implicit)
  Requested by:	jhb
  MFC after:	2 months

Modified:
  head/tests/sys/opencrypto/cryptodev.py
  head/tests/sys/opencrypto/cryptotest.py

Modified: head/tests/sys/opencrypto/cryptodev.py
==============================================================================
--- head/tests/sys/opencrypto/cryptodev.py	Sat Apr 20 16:28:06 2019	(r346451)
+++ head/tests/sys/opencrypto/cryptodev.py	Sat Apr 20 16:37:28 2019	(r346452)
@@ -43,65 +43,65 @@ from cryptodevh import *
 __all__ = [ 'Crypto', 'MismatchError', ]
 
 class FindOp(dpkt.Packet):
-    __byte_order__ = '@'
-    __hdr__ = ( ('crid', 'i', 0),
-        ('name', '32s', 0),
-    )
+	__byte_order__ = '@'
+	__hdr__ = ( ('crid', 'i', 0),
+		('name', '32s', 0),
+	)
 
 class SessionOp(dpkt.Packet):
-    __byte_order__ = '@'
-    __hdr__ = ( ('cipher', 'I', 0),
-        ('mac', 'I', 0),
-        ('keylen', 'I', 0),
-        ('key', 'P', 0),
-        ('mackeylen', 'i', 0),
-        ('mackey', 'P', 0),
-        ('ses', 'I', 0),
-    )
+	__byte_order__ = '@'
+	__hdr__ = ( ('cipher', 'I', 0),
+		('mac', 'I', 0),
+		('keylen', 'I', 0),
+		('key', 'P', 0),
+		('mackeylen', 'i', 0),
+		('mackey', 'P', 0),
+		('ses', 'I', 0),
+	)
 
 class SessionOp2(dpkt.Packet):
-    __byte_order__ = '@'
-    __hdr__ = ( ('cipher', 'I', 0),
-        ('mac', 'I', 0),
-        ('keylen', 'I', 0),
-        ('key', 'P', 0),
-        ('mackeylen', 'i', 0),
-        ('mackey', 'P', 0),
-        ('ses', 'I', 0),
-        ('crid', 'i', 0),
-        ('pad0', 'i', 0),
-        ('pad1', 'i', 0),
-        ('pad2', 'i', 0),
-        ('pad3', 'i', 0),
-    )
+	__byte_order__ = '@'
+	__hdr__ = ( ('cipher', 'I', 0),
+		('mac', 'I', 0),
+		('keylen', 'I', 0),
+		('key', 'P', 0),
+		('mackeylen', 'i', 0),
+		('mackey', 'P', 0),
+		('ses', 'I', 0),
+		('crid', 'i', 0),
+		('pad0', 'i', 0),
+		('pad1', 'i', 0),
+		('pad2', 'i', 0),
+		('pad3', 'i', 0),
+	)
 
 class CryptOp(dpkt.Packet):
-    __byte_order__ = '@'
-    __hdr__ = ( ('ses', 'I', 0),
-        ('op', 'H', 0),
-        ('flags', 'H', 0),
-        ('len', 'I', 0),
-        ('src', 'P', 0),
-        ('dst', 'P', 0),
-        ('mac', 'P', 0),
-        ('iv', 'P', 0),
-    )
+	__byte_order__ = '@'
+	__hdr__ = ( ('ses', 'I', 0),
+		('op', 'H', 0),
+		('flags', 'H', 0),
+		('len', 'I', 0),
+		('src', 'P', 0),
+		('dst', 'P', 0),
+		('mac', 'P', 0),
+		('iv', 'P', 0),
+	)
 
 class CryptAEAD(dpkt.Packet):
-    __byte_order__ = '@'
-    __hdr__ = (
-        ('ses',        'I', 0),
-        ('op',        'H', 0),
-        ('flags',    'H', 0),
-        ('len',        'I', 0),
-        ('aadlen',    'I', 0),
-        ('ivlen',    'I', 0),
-        ('src',        'P', 0),
-        ('dst',        'P', 0),
-        ('aad',        'P', 0),
-        ('tag',        'P', 0),
-        ('iv',        'P', 0),
-    )
+	__byte_order__ = '@'
+	__hdr__ = (
+		('ses',		'I', 0),
+		('op',		'H', 0),
+		('flags',	'H', 0),
+		('len',		'I', 0),
+		('aadlen',	'I', 0),
+		('ivlen',	'I', 0),
+		('src',		'P', 0),
+		('dst',		'P', 0),
+		('aad',		'P', 0),
+		('tag',		'P', 0),
+		('iv',		'P', 0),
+	)
 
 # h2py.py can't handle multiarg macros
 CRIOGET = 3221513060
@@ -116,445 +116,445 @@ CIOCFINDDEV = 3223610220
 CIOCCRYPTAEAD = 3225445229
 
 def _getdev():
-    fd = os.open('/dev/crypto', os.O_RDWR)
-    buf = array.array('I', [0])
-    ioctl(fd, CRIOGET, buf, 1)
-    os.close(fd)
+	fd = os.open('/dev/crypto', os.O_RDWR)
+	buf = array.array('I', [0])
+	ioctl(fd, CRIOGET, buf, 1)
+	os.close(fd)
 
-    return buf[0]
+	return buf[0]
 
 _cryptodev = _getdev()
 
 def _findop(crid, name):
-    fop = FindOp()
-    fop.crid = crid
-    fop.name = name
-    s = array.array('B', fop.pack_hdr())
-    ioctl(_cryptodev, CIOCFINDDEV, s, 1)
-    fop.unpack(s)
+	fop = FindOp()
+	fop.crid = crid
+	fop.name = name
+	s = array.array('B', fop.pack_hdr())
+	ioctl(_cryptodev, CIOCFINDDEV, s, 1)
+	fop.unpack(s)
 
-    try:
-        idx = fop.name.index('\x00')
-        name = fop.name[:idx]
-    except ValueError:
-        name = fop.name
+	try:
+		idx = fop.name.index('\x00')
+		name = fop.name[:idx]
+	except ValueError:
+		name = fop.name
 
-    return fop.crid, name
+	return fop.crid, name
 
 class Crypto:
-    @staticmethod
-    def findcrid(name):
-        return _findop(-1, name)[0]
+	@staticmethod
+	def findcrid(name):
+		return _findop(-1, name)[0]
 
-    @staticmethod
-    def getcridname(crid):
-        return _findop(crid, '')[1]
+	@staticmethod
+	def getcridname(crid):
+		return _findop(crid, '')[1]
 
-    def __init__(self, cipher=0, key=None, mac=0, mackey=None,
-        crid=CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_HARDWARE):
-        self._ses = None
-        ses = SessionOp2()
-        ses.cipher = cipher
-        ses.mac = mac
+	def __init__(self, cipher=0, key=None, mac=0, mackey=None,
+	    crid=CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_HARDWARE):
+		self._ses = None
+		ses = SessionOp2()
+		ses.cipher = cipher
+		ses.mac = mac
 
-        if key is not None:
-            ses.keylen = len(key)
-            k = array.array('B', key)
-            ses.key = k.buffer_info()[0]
-        else:
-            self.key = None
+		if key is not None:
+			ses.keylen = len(key)
+			k = array.array('B', key)
+			ses.key = k.buffer_info()[0]
+		else:
+			self.key = None
 
-        if mackey is not None:
-            ses.mackeylen = len(mackey)
-            mk = array.array('B', mackey)
-            ses.mackey = mk.buffer_info()[0]
-            self._maclen = 16    # parameterize?
-        else:
-            self._maclen = None
+		if mackey is not None:
+			ses.mackeylen = len(mackey)
+			mk = array.array('B', mackey)
+			ses.mackey = mk.buffer_info()[0]
+			self._maclen = 16	# parameterize?
+		else:
+			self._maclen = None
 
-        if not cipher and not mac:
-            raise ValueError('one of cipher or mac MUST be specified.')
-        ses.crid = crid
-        #print(ses)
-        s = array.array('B', ses.pack_hdr())
-        #print(s)
-        ioctl(_cryptodev, CIOCGSESSION2, s, 1)
-        ses.unpack(s)
+		if not cipher and not mac:
+			raise ValueError('one of cipher or mac MUST be specified.')
+		ses.crid = crid
+		#print(ses)
+		s = array.array('B', ses.pack_hdr())
+		#print(s)
+		ioctl(_cryptodev, CIOCGSESSION2, s, 1)
+		ses.unpack(s)
 
-        self._ses = ses.ses
+		self._ses = ses.ses
 
-    def __del__(self):
-        if self._ses is None:
-            return
+	def __del__(self):
+		if self._ses is None:
+			return
 
-        try:
-            ioctl(_cryptodev, CIOCFSESSION, _pack('I', self._ses))
-        except TypeError:
-            pass
-        self._ses = None
+		try:
+			ioctl(_cryptodev, CIOCFSESSION, _pack('I', self._ses))
+		except TypeError:
+			pass
+		self._ses = None
 
-    def _doop(self, op, src, iv):
-        cop = CryptOp()
-        cop.ses = self._ses
-        cop.op = op
-        cop.flags = 0
-        cop.len = len(src)
-        s = array.array('B', src)
-        cop.src = cop.dst = s.buffer_info()[0]
-        if self._maclen is not None:
-            m = array.array('B', [0] * self._maclen)
-            cop.mac = m.buffer_info()[0]
-        ivbuf = array.array('B', iv)
-        cop.iv = ivbuf.buffer_info()[0]
+	def _doop(self, op, src, iv):
+		cop = CryptOp()
+		cop.ses = self._ses
+		cop.op = op
+		cop.flags = 0
+		cop.len = len(src)
+		s = array.array('B', src)
+		cop.src = cop.dst = s.buffer_info()[0]
+		if self._maclen is not None:
+			m = array.array('B', [0] * self._maclen)
+			cop.mac = m.buffer_info()[0]
+		ivbuf = array.array('B', iv)
+		cop.iv = ivbuf.buffer_info()[0]
 
-        #print('cop:', cop)
-        ioctl(_cryptodev, CIOCCRYPT, str(cop))
+		#print('cop:', cop)
+		ioctl(_cryptodev, CIOCCRYPT, str(cop))
 
-        s = s.tostring()
-        if self._maclen is not None:
-            return s, m.tostring()
+		s = s.tostring()
+		if self._maclen is not None:
+			return s, m.tostring()
 
-        return s
+		return s
 
-    def _doaead(self, op, src, aad, iv, tag=None):
-        caead = CryptAEAD()
-        caead.ses = self._ses
-        caead.op = op
-        caead.flags = CRD_F_IV_EXPLICIT
-        caead.flags = 0
-        caead.len = len(src)
-        s = array.array('B', src)
-        caead.src = caead.dst = s.buffer_info()[0]
-        caead.aadlen = len(aad)
-        saad = array.array('B', aad)
-        caead.aad = saad.buffer_info()[0]
+	def _doaead(self, op, src, aad, iv, tag=None):
+		caead = CryptAEAD()
+		caead.ses = self._ses
+		caead.op = op
+		caead.flags = CRD_F_IV_EXPLICIT
+		caead.flags = 0
+		caead.len = len(src)
+		s = array.array('B', src)
+		caead.src = caead.dst = s.buffer_info()[0]
+		caead.aadlen = len(aad)
+		saad = array.array('B', aad)
+		caead.aad = saad.buffer_info()[0]
 
-        if self._maclen is None:
-            raise ValueError('must have a tag length')
+		if self._maclen is None:
+			raise ValueError('must have a tag length')
 
-        if tag is None:
-            tag = array.array('B', [0] * self._maclen)
-        else:
-            assert len(tag) == self._maclen, \
+		if tag is None:
+			tag = array.array('B', [0] * self._maclen)
+		else:
+			assert len(tag) == self._maclen, \
                 '%d != %d' % (len(tag), self._maclen)
-            tag = array.array('B', tag)
+			tag = array.array('B', tag)
 
-        caead.tag = tag.buffer_info()[0]
+		caead.tag = tag.buffer_info()[0]
 
-        ivbuf = array.array('B', iv)
-        caead.ivlen = len(iv)
-        caead.iv = ivbuf.buffer_info()[0]
+		ivbuf = array.array('B', iv)
+		caead.ivlen = len(iv)
+		caead.iv = ivbuf.buffer_info()[0]
 
-        ioctl(_cryptodev, CIOCCRYPTAEAD, str(caead))
+		ioctl(_cryptodev, CIOCCRYPTAEAD, str(caead))
 
-        s = s.tostring()
+		s = s.tostring()
 
-        return s, tag.tostring()
+		return s, tag.tostring()
 
-    def perftest(self, op, size, timeo=3):
-        import random
-        import time
+	def perftest(self, op, size, timeo=3):
+		import random
+		import time
 
-        inp = array.array('B', (random.randint(0, 255) for x in xrange(size)))
-        out = array.array('B', inp)
+		inp = array.array('B', (random.randint(0, 255) for x in xrange(size)))
+		out = array.array('B', inp)
 
-        # prep ioctl
-        cop = CryptOp()
-        cop.ses = self._ses
-        cop.op = op
-        cop.flags = 0
-        cop.len = len(inp)
-        s = array.array('B', inp)
-        cop.src = s.buffer_info()[0]
-        cop.dst = out.buffer_info()[0]
-        if self._maclen is not None:
-            m = array.array('B', [0] * self._maclen)
-            cop.mac = m.buffer_info()[0]
-        ivbuf = array.array('B', (random.randint(0, 255) for x in xrange(16)))
-        cop.iv = ivbuf.buffer_info()[0]
+		# prep ioctl
+		cop = CryptOp()
+		cop.ses = self._ses
+		cop.op = op
+		cop.flags = 0
+		cop.len = len(inp)
+		s = array.array('B', inp)
+		cop.src = s.buffer_info()[0]
+		cop.dst = out.buffer_info()[0]
+		if self._maclen is not None:
+			m = array.array('B', [0] * self._maclen)
+			cop.mac = m.buffer_info()[0]
+		ivbuf = array.array('B', (random.randint(0, 255) for x in xrange(16)))
+		cop.iv = ivbuf.buffer_info()[0]
 
-        exit = [ False ]
-        def alarmhandle(a, b, exit=exit):
-            exit[0] = True
+		exit = [ False ]
+		def alarmhandle(a, b, exit=exit):
+			exit[0] = True
 
-        oldalarm = signal.signal(signal.SIGALRM, alarmhandle)
-        signal.alarm(timeo)
+		oldalarm = signal.signal(signal.SIGALRM, alarmhandle)
+		signal.alarm(timeo)
 
-        start = time.time()
-        reps = 0
-        while not exit[0]:
-            ioctl(_cryptodev, CIOCCRYPT, str(cop))
-            reps += 1
+		start = time.time()
+		reps = 0
+		while not exit[0]:
+			ioctl(_cryptodev, CIOCCRYPT, str(cop))
+			reps += 1
 
-        end = time.time()
+		end = time.time()
 
-        signal.signal(signal.SIGALRM, oldalarm)
+		signal.signal(signal.SIGALRM, oldalarm)
 
-        print('time:', end - start)
-        print('perf MB/sec:', (reps * size) / (end - start) / 1024 / 1024)
+		print('time:', end - start)
+		print('perf MB/sec:', (reps * size) / (end - start) / 1024 / 1024)
 
-    def encrypt(self, data, iv, aad=None):
-        if aad is None:
-            return self._doop(COP_ENCRYPT, data, iv)
-        else:
-            return self._doaead(COP_ENCRYPT, data, aad,
-                iv)
+	def encrypt(self, data, iv, aad=None):
+		if aad is None:
+			return self._doop(COP_ENCRYPT, data, iv)
+		else:
+			return self._doaead(COP_ENCRYPT, data, aad,
+			    iv)
 
-    def decrypt(self, data, iv, aad=None, tag=None):
-        if aad is None:
-            return self._doop(COP_DECRYPT, data, iv)
-        else:
-            return self._doaead(COP_DECRYPT, data, aad,
-                iv, tag=tag)
+	def decrypt(self, data, iv, aad=None, tag=None):
+		if aad is None:
+			return self._doop(COP_DECRYPT, data, iv)
+		else:
+			return self._doaead(COP_DECRYPT, data, aad,
+			    iv, tag=tag)
 
 class MismatchError(Exception):
-    pass
+	pass
 
 class KATParser:
-    def __init__(self, fname, fields):
-        self.fp = open(fname)
-        self.fields = set(fields)
-        self._pending = None
+	def __init__(self, fname, fields):
+		self.fp = open(fname)
+		self.fields = set(fields)
+		self._pending = None
 
-    def __iter__(self):
-        while True:
-            didread = False
-            if self._pending is not None:
-                i = self._pending
-                self._pending = None
-            else:
-                i = self.fp.readline()
-                didread = True
+	def __iter__(self):
+		while True:
+			didread = False
+			if self._pending is not None:
+				i = self._pending
+				self._pending = None
+			else:
+				i = self.fp.readline()
+				didread = True
 
-            if didread and not i:
-                return
+			if didread and not i:
+				return
 
-            if (i and i[0] == '#') or not i.strip():
-                continue
-            if i[0] == '[':
-                yield i[1:].split(']', 1)[0], self.fielditer()
-            else:
-                raise ValueError('unknown line: %r' % repr(i))
+			if (i and i[0] == '#') or not i.strip():
+				continue
+			if i[0] == '[':
+				yield i[1:].split(']', 1)[0], self.fielditer()
+			else:
+				raise ValueError('unknown line: %r' % repr(i))
 
-    def eatblanks(self):
-        while True:
-            line = self.fp.readline()
-            if line == '':
-                break
+	def eatblanks(self):
+		while True:
+			line = self.fp.readline()
+			if line == '':
+				break
 
-            line = line.strip()
-            if line:
-                break
+			line = line.strip()
+			if line:
+				break
 
-        return line
+		return line
 
-    def fielditer(self):
-        while True:
-            values = {}
+	def fielditer(self):
+		while True:
+			values = {}
 
-            line = self.eatblanks()
-            if not line or line[0] == '[':
-                self._pending = line
-                return
+			line = self.eatblanks()
+			if not line or line[0] == '[':
+				self._pending = line
+				return
 
-            while True:
-                try:
-                    f, v = line.split(' =')
-                except:
-                    if line == 'FAIL':
-                        f, v = 'FAIL', ''
-                    else:
-                        print('line:', repr(line))
-                        raise
-                v = v.strip()
+			while True:
+				try:
+					f, v = line.split(' =')
+				except:
+					if line == 'FAIL':
+						f, v = 'FAIL', ''
+					else:
+						print('line:', repr(line))
+						raise
+				v = v.strip()
 
-                if f in values:
-                    raise ValueError('already present: %r' % repr(f))
-                values[f] = v
-                line = self.fp.readline().strip()
-                if not line:
-                    break
+				if f in values:
+					raise ValueError('already present: %r' % repr(f))
+				values[f] = v
+				line = self.fp.readline().strip()
+				if not line:
+					break
 
-            # we should have everything
-            remain = self.fields.copy() - set(values.keys())
-            # XXX - special case GCM decrypt
-            if remain and not ('FAIL' in values and 'PT' in remain):
-                raise ValueError('not all fields found: %r' % repr(remain))
+			# we should have everything
+			remain = self.fields.copy() - set(values.keys())
+			# XXX - special case GCM decrypt
+			if remain and not ('FAIL' in values and 'PT' in remain):
+				raise ValueError('not all fields found: %r' % repr(remain))
 
-            yield values
+			yield values
 
 def _spdechex(s):
-    return ''.join(s.split()).decode('hex')
+	return ''.join(s.split()).decode('hex')
 
 if __name__ == '__main__':
-    if True:
-        try:
-            crid = Crypto.findcrid('aesni0')
-            print('aesni:', crid)
-        except IOError:
-            print('aesni0 not found')
+	if True:
+		try:
+			crid = Crypto.findcrid('aesni0')
+			print('aesni:', crid)
+		except IOError:
+			print('aesni0 not found')
 
-        for i in xrange(10):
-            try:
-                name = Crypto.getcridname(i)
-                print('%2d: %r' % (i, repr(name)))
-            except IOError:
-                pass
-    elif False:
-        kp = KATParser('/usr/home/jmg/aesni.testing/format tweak value input - data unit seq no/XTSGenAES128.rsp', [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', 'CT' ])
-        for mode, ni in kp:
-            print(i, ni)
-            for j in ni:
-                print(j)
-    elif False:
-        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-        iv = _spdechex('00000000000000000000000000000001')
-        pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e')
-        #pt = _spdechex('00000000000000000000000000000000')
-        ct = _spdechex('f42c33853ecc5ce2949865fdb83de3bff1089e9360c94f830baebfaff72836ab5236f77212f1e7396c8c54ac73d81986375a6e9e299cfeca5ba051ed25e8d1affa5beaf6c1d2b45e90802408f2ced21663497e906de5f29341e5e52ddfea5363d628b3eb7806835e17bae051b3a6da3f8e2941fe44384eac17a9d298d2c331ca8320c775b5d53263a5e905059d891b21dede2d8110fd427c7bd5a9a274ddb47b1945ee79522203b6e297d0e399ef')
+		for i in xrange(10):
+			try:
+				name = Crypto.getcridname(i)
+				print('%2d: %r' % (i, repr(name)))
+			except IOError:
+				pass
+	elif False:
+		kp = KATParser('/usr/home/jmg/aesni.testing/format tweak value input - data unit seq no/XTSGenAES128.rsp', [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', 'CT' ])
+		for mode, ni in kp:
+			print(i, ni)
+			for j in ni:
+				print(j)
+	elif False:
+		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+		iv = _spdechex('00000000000000000000000000000001')
+		pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e')
+		#pt = _spdechex('00000000000000000000000000000000')
+		ct = _spdechex('f42c33853ecc5ce2949865fdb83de3bff1089e9360c94f830baebfaff72836ab5236f77212f1e7396c8c54ac73d81986375a6e9e299cfeca5ba051ed25e8d1affa5beaf6c1d2b45e90802408f2ced21663497e906de5f29341e5e52ddfea5363d628b3eb7806835e17bae051b3a6da3f8e2941fe44384eac17a9d298d2c331ca8320c775b5d53263a5e905059d891b21dede2d8110fd427c7bd5a9a274ddb47b1945ee79522203b6e297d0e399ef')
 
-        c = Crypto(CRYPTO_AES_ICM, key)
-        enc = c.encrypt(pt, iv)
+		c = Crypto(CRYPTO_AES_ICM, key)
+		enc = c.encrypt(pt, iv)
 
-        print('enc:', enc.encode('hex'))
-        print(' ct:', ct.encode('hex'))
+		print('enc:', enc.encode('hex'))
+		print(' ct:', ct.encode('hex'))
 
-        assert ct == enc
+		assert ct == enc
 
-        dec = c.decrypt(ct, iv)
+		dec = c.decrypt(ct, iv)
 
-        print('dec:', dec.encode('hex'))
-        print(' pt:', pt.encode('hex'))
+		print('dec:', dec.encode('hex'))
+		print(' pt:', pt.encode('hex'))
 
-        assert pt == dec
-    elif False:
-        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-        iv = _spdechex('00000000000000000000000000000001')
-        pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e0a3f')
-        #pt = _spdechex('00000000000000000000000000000000')
-        ct = _spdechex('f42c33853ecc5ce2949865fdb83de3bff1089e9360c94f830baebfaff72836ab5236f77212f1e7396c8c54ac73d81986375a6e9e299cfeca5ba051ed25e8d1affa5beaf6c1d2b45e90802408f2ced21663497e906de5f29341e5e52ddfea5363d628b3eb7806835e17bae051b3a6da3f8e2941fe44384eac17a9d298d2c331ca8320c775b5d53263a5e905059d891b21dede2d8110fd427c7bd5a9a274ddb47b1945ee79522203b6e297d0e399ef3768')
+		assert pt == dec
+	elif False:
+		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+		iv = _spdechex('00000000000000000000000000000001')
+		pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e0a3f')
+		#pt = _spdechex('00000000000000000000000000000000')
+		ct = _spdechex('f42c33853ecc5ce2949865fdb83de3bff1089e9360c94f830baebfaff72836ab5236f77212f1e7396c8c54ac73d81986375a6e9e299cfeca5ba051ed25e8d1affa5beaf6c1d2b45e90802408f2ced21663497e906de5f29341e5e52ddfea5363d628b3eb7806835e17bae051b3a6da3f8e2941fe44384eac17a9d298d2c331ca8320c775b5d53263a5e905059d891b21dede2d8110fd427c7bd5a9a274ddb47b1945ee79522203b6e297d0e399ef3768')
 
-        c = Crypto(CRYPTO_AES_ICM, key)
-        enc = c.encrypt(pt, iv)
+		c = Crypto(CRYPTO_AES_ICM, key)
+		enc = c.encrypt(pt, iv)
 
-        print('enc:', enc.encode('hex'))
-        print(' ct:', ct.encode('hex'))
+		print('enc:', enc.encode('hex'))
+		print(' ct:', ct.encode('hex'))
 
-        assert ct == enc
+		assert ct == enc
 
-        dec = c.decrypt(ct, iv)
+		dec = c.decrypt(ct, iv)
 
-        print('dec:', dec.encode('hex'))
-        print(' pt:', pt.encode('hex'))
+		print('dec:', dec.encode('hex'))
+		print(' pt:', pt.encode('hex'))
 
-        assert pt == dec
-    elif False:
-        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-        iv = _spdechex('6eba2716ec0bd6fa5cdef5e6d3a795bc')
-        pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e0a3f')
-        ct = _spdechex('f1f81f12e72e992dbdc304032705dc75dc3e4180eff8ee4819906af6aee876d5b00b7c36d282a445ce3620327be481e8e53a8e5a8e5ca9abfeb2281be88d12ffa8f46d958d8224738c1f7eea48bda03edbf9adeb900985f4fa25648b406d13a886c25e70cfdecdde0ad0f2991420eb48a61c64fd797237cf2798c2675b9bb744360b0a3f329ac53bbceb4e3e7456e6514f1a9d2f06c236c31d0f080b79c15dce1096357416602520daa098b17d1af427')
-        c = Crypto(CRYPTO_AES_CBC, key)
+		assert pt == dec
+	elif False:
+		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+		iv = _spdechex('6eba2716ec0bd6fa5cdef5e6d3a795bc')
+		pt = _spdechex('ab3cabed693a32946055524052afe3c9cb49664f09fc8b7da824d924006b7496353b8c1657c5dec564d8f38d7432e1de35aae9d95590e66278d4acce883e51abaf94977fcd3679660109a92bf7b2973ccd547f065ec6cee4cb4a72a5e9f45e615d920d76cb34cba482467b3e21422a7242e7d931330c0fbf465c3a3a46fae943029fd899626dda542750a1eee253df323c6ef1573f1c8c156613e2ea0a6cdbf2ae9701020be2d6a83ecb7f3f9d8e0a3f')
+		ct = _spdechex('f1f81f12e72e992dbdc304032705dc75dc3e4180eff8ee4819906af6aee876d5b00b7c36d282a445ce3620327be481e8e53a8e5a8e5ca9abfeb2281be88d12ffa8f46d958d8224738c1f7eea48bda03edbf9adeb900985f4fa25648b406d13a886c25e70cfdecdde0ad0f2991420eb48a61c64fd797237cf2798c2675b9bb744360b0a3f329ac53bbceb4e3e7456e6514f1a9d2f06c236c31d0f080b79c15dce1096357416602520daa098b17d1af427')
+		c = Crypto(CRYPTO_AES_CBC, key)
 
-        enc = c.encrypt(pt, iv)
+		enc = c.encrypt(pt, iv)
 
-        print('enc:', enc.encode('hex'))
-        print(' ct:', ct.encode('hex'))
+		print('enc:', enc.encode('hex'))
+		print(' ct:', ct.encode('hex'))
 
-        assert ct == enc
+		assert ct == enc
 
-        dec = c.decrypt(ct, iv)
+		dec = c.decrypt(ct, iv)
 
-        print('dec:', dec.encode('hex'))
-        print(' pt:', pt.encode('hex'))
+		print('dec:', dec.encode('hex'))
+		print(' pt:', pt.encode('hex'))
 
-        assert pt == dec
-    elif False:
-        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-        iv = _spdechex('b3d8cc017cbb89b39e0f67e2')
-        pt = _spdechex('c3b3c41f113a31b73d9a5cd4321030')
-        aad = _spdechex('24825602bd12a984e0092d3e448eda5f')
-        ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa7354')
-        ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa73')
-        tag = _spdechex('0032a1dc85f1c9786925a2e71d8272dd')
-        tag = _spdechex('8d11a0929cb3fbe1fef01a4a38d5f8ea')
+		assert pt == dec
+	elif False:
+		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+		iv = _spdechex('b3d8cc017cbb89b39e0f67e2')
+		pt = _spdechex('c3b3c41f113a31b73d9a5cd4321030')
+		aad = _spdechex('24825602bd12a984e0092d3e448eda5f')
+		ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa7354')
+		ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa73')
+		tag = _spdechex('0032a1dc85f1c9786925a2e71d8272dd')
+		tag = _spdechex('8d11a0929cb3fbe1fef01a4a38d5f8ea')
 
-        c = Crypto(CRYPTO_AES_NIST_GCM_16, key,
-            mac=CRYPTO_AES_128_NIST_GMAC, mackey=key)
+		c = Crypto(CRYPTO_AES_NIST_GCM_16, key,
+		    mac=CRYPTO_AES_128_NIST_GMAC, mackey=key)
 
-        enc, enctag = c.encrypt(pt, iv, aad=aad)
+		enc, enctag = c.encrypt(pt, iv, aad=aad)
 
-        print('enc:', enc.encode('hex'))
-        print(' ct:', ct.encode('hex'))
+		print('enc:', enc.encode('hex'))
+		print(' ct:', ct.encode('hex'))
 
-        assert enc == ct
+		assert enc == ct
 
-        print('etg:', enctag.encode('hex'))
-        print('tag:', tag.encode('hex'))
-        assert enctag == tag
+		print('etg:', enctag.encode('hex'))
+		print('tag:', tag.encode('hex'))
+		assert enctag == tag
 
-        # Make sure we get EBADMSG
-        #enctag = enctag[:-1] + 'a'
-        dec, dectag = c.decrypt(ct, iv, aad=aad, tag=enctag)
+		# Make sure we get EBADMSG
+		#enctag = enctag[:-1] + 'a'
+		dec, dectag = c.decrypt(ct, iv, aad=aad, tag=enctag)
 
-        print('dec:', dec.encode('hex'))
-        print(' pt:', pt.encode('hex'))
+		print('dec:', dec.encode('hex'))
+		print(' pt:', pt.encode('hex'))
 
-        assert dec == pt
+		assert dec == pt
 
-        print('dtg:', dectag.encode('hex'))
-        print('tag:', tag.encode('hex'))
+		print('dtg:', dectag.encode('hex'))
+		print('tag:', tag.encode('hex'))
 
-        assert dectag == tag
-    elif False:
-        key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
-        iv = _spdechex('b3d8cc017cbb89b39e0f67e2')
-        key = key + iv[:4]
-        iv = iv[4:]
-        pt = _spdechex('c3b3c41f113a31b73d9a5cd432103069')
-        aad = _spdechex('24825602bd12a984e0092d3e448eda5f')
-        ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa7354')
-        tag = _spdechex('0032a1dc85f1c9786925a2e71d8272dd')
+		assert dectag == tag
+	elif False:
+		key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c')
+		iv = _spdechex('b3d8cc017cbb89b39e0f67e2')
+		key = key + iv[:4]
+		iv = iv[4:]
+		pt = _spdechex('c3b3c41f113a31b73d9a5cd432103069')
+		aad = _spdechex('24825602bd12a984e0092d3e448eda5f')
+		ct = _spdechex('93fe7d9e9bfd10348a5606e5cafa7354')
+		tag = _spdechex('0032a1dc85f1c9786925a2e71d8272dd')
 
-        c = Crypto(CRYPTO_AES_GCM_16, key, mac=CRYPTO_AES_128_GMAC, mackey=key)
+		c = Crypto(CRYPTO_AES_GCM_16, key, mac=CRYPTO_AES_128_GMAC, mackey=key)
 
-        enc, enctag = c.encrypt(pt, iv, aad=aad)
+		enc, enctag = c.encrypt(pt, iv, aad=aad)
 
-        print('enc:', enc.encode('hex'))
-        print(' ct:', ct.encode('hex'))
+		print('enc:', enc.encode('hex'))
+		print(' ct:', ct.encode('hex'))
 
-        assert enc == ct
+		assert enc == ct
 
-        print('etg:', enctag.encode('hex'))
-        print('tag:', tag.encode('hex'))
-        assert enctag == tag
-    elif False:
-        for i in xrange(100000):
-            c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
-            data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
-            ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')
-            iv = _pack('QQ', 71, 0)
+		print('etg:', enctag.encode('hex'))
+		print('tag:', tag.encode('hex'))
+		assert enctag == tag
+	elif False:
+		for i in xrange(100000):
+			c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
+			data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
+			ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')
+			iv = _pack('QQ', 71, 0)
 
-            enc = c.encrypt(data, iv)
-            assert enc == ct
-    elif True:
-        c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
-        data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
-        ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')
-        iv = _pack('QQ', 71, 0)
+			enc = c.encrypt(data, iv)
+			assert enc == ct
+	elif True:
+		c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
+		data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
+		ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')
+		iv = _pack('QQ', 71, 0)
 
-        enc = c.encrypt(data, iv)
-        assert enc == ct
+		enc = c.encrypt(data, iv)
+		assert enc == ct
 
-        dec = c.decrypt(enc, iv)
-        assert dec == data
+		dec = c.decrypt(enc, iv)
+		assert dec == data
 
-        #c.perftest(COP_ENCRYPT, 192*1024, reps=30000)
+		#c.perftest(COP_ENCRYPT, 192*1024, reps=30000)
 
-    else:
-        key = '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex')
-        print('XTS %d testing:' % (len(key) * 8))
-        c = Crypto(CRYPTO_AES_XTS, key)
-        for i in [ 8192, 192*1024]:
-            print('block size: %d' % i)
-            c.perftest(COP_ENCRYPT, i)
-            c.perftest(COP_DECRYPT, i)
+	else:
+		key = '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex')
+		print('XTS %d testing:' % (len(key) * 8))
+		c = Crypto(CRYPTO_AES_XTS, key)
+		for i in [ 8192, 192*1024]:
+			print('block size: %d' % i)
+			c.perftest(COP_ENCRYPT, i)
+			c.perftest(COP_DECRYPT, i)

Modified: head/tests/sys/opencrypto/cryptotest.py
==============================================================================
--- head/tests/sys/opencrypto/cryptotest.py	Sat Apr 20 16:28:06 2019	(r346451)
+++ head/tests/sys/opencrypto/cryptotest.py	Sat Apr 20 16:37:28 2019	(r346452)
@@ -42,290 +42,290 @@ from glob import iglob
 katdir = '/usr/local/share/nist-kat'
 
 def katg(base, glob):
-    assert os.path.exists(os.path.join(katdir, base)), "Please 'pkg install nist-kat'"
-    return iglob(os.path.join(katdir, base, glob))
+	assert os.path.exists(os.path.join(katdir, base)), "Please 'pkg install nist-kat'"
+	return iglob(os.path.join(katdir, base, glob))
 
 aesmodules = [ 'cryptosoft0', 'aesni0', 'ccr0', 'ccp0' ]
 desmodules = [ 'cryptosoft0', ]
 shamodules = [ 'cryptosoft0', 'aesni0', 'ccr0', 'ccp0' ]
 
 def GenTestCase(cname):
-    try:
-        crid = cryptodev.Crypto.findcrid(cname)
-    except IOError:
-        return None
+	try:
+		crid = cryptodev.Crypto.findcrid(cname)
+	except IOError:
+		return None
 
-    class GendCryptoTestCase(unittest.TestCase):
-        ###############
-        ##### AES #####
-        ###############
-        @unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
-        def test_xts(self):
-            for i in katg('XTSTestVectors/format tweak value input - data unit seq no', '*.rsp'):
-                self.runXTS(i, cryptodev.CRYPTO_AES_XTS)
+	class GendCryptoTestCase(unittest.TestCase):
+		###############
+		##### AES #####
+		###############
+		@unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
+		def test_xts(self):
+			for i in katg('XTSTestVectors/format tweak value input - data unit seq no', '*.rsp'):
+				self.runXTS(i, cryptodev.CRYPTO_AES_XTS)
 
-        @unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
-        def test_cbc(self):
-            for i in katg('KAT_AES', 'CBC[GKV]*.rsp'):
-                self.runCBC(i)
+		@unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
+		def test_cbc(self):
+			for i in katg('KAT_AES', 'CBC[GKV]*.rsp'):
+				self.runCBC(i)
 
-        @unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
-        def test_gcm(self):
-            for i in katg('gcmtestvectors', 'gcmEncrypt*'):
-                self.runGCM(i, 'ENCRYPT')
+		@unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % (cname))
+		def test_gcm(self):
+			for i in katg('gcmtestvectors', 'gcmEncrypt*'):
+				self.runGCM(i, 'ENCRYPT')
 
-            for i in katg('gcmtestvectors', 'gcmDecrypt*'):
-                self.runGCM(i, 'DECRYPT')
+			for i in katg('gcmtestvectors', 'gcmDecrypt*'):
+				self.runGCM(i, 'DECRYPT')
 
-        _gmacsizes = { 32: cryptodev.CRYPTO_AES_256_NIST_GMAC,
-            24: cryptodev.CRYPTO_AES_192_NIST_GMAC,
-            16: cryptodev.CRYPTO_AES_128_NIST_GMAC,
-        }
-        def runGCM(self, fname, mode):
-            curfun = None
-            if mode == 'ENCRYPT':
-                swapptct = False
-                curfun = Crypto.encrypt
-            elif mode == 'DECRYPT':
-                swapptct = True
-                curfun = Crypto.decrypt
-            else:
-                raise RuntimeError('unknown mode: %r' % repr(mode))
+		_gmacsizes = { 32: cryptodev.CRYPTO_AES_256_NIST_GMAC,
+			24: cryptodev.CRYPTO_AES_192_NIST_GMAC,
+			16: cryptodev.CRYPTO_AES_128_NIST_GMAC,
+		}
+		def runGCM(self, fname, mode):
+			curfun = None
+			if mode == 'ENCRYPT':
+				swapptct = False
+				curfun = Crypto.encrypt
+			elif mode == 'DECRYPT':
+				swapptct = True
+				curfun = Crypto.decrypt
+			else:
+				raise RuntimeError('unknown mode: %r' % repr(mode))

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:38:45 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 528D6156CAA5;
 Sat, 20 Apr 2019 16:38:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org
 [IPv6:2610:1c1:1:606c::24b:4])
 (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 "smtp.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id E37F669A3E;
 Sat, 20 Apr 2019 16:38:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from John-Baldwins-MacBook-Pro-3.local (unknown
 [IPv6:2601:648:8880:1e30:fd9b:9ce6:c8c:cc0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate) (Authenticated sender: jhb)
 by smtp.freebsd.org (Postfix) with ESMTPSA id 1B7721CC76;
 Sat, 20 Apr 2019 16:38:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Subject: Re: svn commit: r346443 - head/tests/sys/opencrypto
To: Enji Cooper 
Cc: Enji Cooper , src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
References: <201904201543.x3KFhSAl037969@repo.freebsd.org>
 
 
 
From: John Baldwin 
Openpgp: preference=signencrypt
Autocrypt: addr=jhb@FreeBSD.org; keydata=
 mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0
 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo
 /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD
 /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X
 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z
 pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1
 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k
 do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk
 d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID
 AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM
 jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3
 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj
 XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH
 YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO
 EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz
 hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX
 sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16
 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH
 aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx
 Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I
 SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf
 afMAg8QvmOWnHx3wl8WslCaXaE8=
Message-ID: <3dc61795-3802-513e-93ff-3d6493eabe36@FreeBSD.org>
Date: Sat, 20 Apr 2019 09:38:42 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0)
 Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: 
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: E37F669A3E
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.92 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.92)[-0.919,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:38:45 -0000

On 4/20/19 9:32 AM, Enji Cooper wrote:
> 
>> On Apr 20, 2019, at 9:31 AM, Enji Cooper  wrote:
>>
>>
>>> On Apr 20, 2019, at 9:30 AM, John Baldwin > wrote:
>>>
>>> On 4/20/19 8:43 AM, Enji Cooper wrote:
>>>> Author: ngie
>>>> Date: Sat Apr 20 15:43:28 2019
>>>> New Revision: 346443
>>>> URL: https://svnweb.freebsd.org/changeset/base/346443 
>>>>
>>>> Log:
>>>>  tests/sys/opencrypto: fix whitespace per PEP8
>>>>
>>>>  Replace hard tabs with four-character indentations, per PEP8.
>>>>
>>>>  This is being done to separate stylistic changes from the tests from functional
>>>>  ones, as I accidentally introduced a bug to the tests when I used four-space
>>>>  indentation locally.
>>>>
>>>>  No functional change.
>>>
>>> Wow, this is really painful for the 4-5 open reviews I have outstanding as it
>>> makes a merge disaster.
>>
>> Sorry ;_;…
> 
> 	Being more constructive: I will back out the change, then reapply it later.
> Thank you,

Ok, is it easy to reapply using a script or some such?  Also, in general I do prefer
this indentation as 1) it works out of the box in emacs, and 2) many of the lines in
cryptotest.py especially are indented pretty far over making it hard to read.

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:43:25 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E823156CCFF;
 Sat, 20 Apr 2019 16:43:25 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com
 [IPv6:2607:f8b0:4864:20::536])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 0887169EC9;
 Sat, 20 Apr 2019 16:43:25 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pg1-x536.google.com with SMTP id v12so3982885pgq.1;
 Sat, 20 Apr 2019 09:43:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=Zeo3fBGcDlFI3oUoyUCfOyJD/qv5pHHbGK7uUVJlKiQ=;
 b=r5MaNvS9RPW2f/0DTnr+izQRESOnodE2nD80i7YWX5vNma/GvalO/gfSWgSKWb4lTS
 wwwI6Q7dKPBhpT2EZUVYzbls2VQXlzpv7XnqaoOz1d0TALbojP+L/mRkpk/W/HG/Qpnn
 5m/B/1FRNwe5VBi/QLgie9J2XOH1sk4mc10JzydyJ1Ezqp+3jhYNCLMbN3UyZC8g8xA7
 KThi3xBoNeC/YPS+PSvJdyw7GXeixY0jy50MEQdLYd98EsgwWwKHfIPbXowdQtJJaR0S
 hcC2F1QmtJ3DUTn76md9qru8ZVi3b92qjTiwFPNfN9Nh3eoe7cWIVKMGo31iyotWHIsy
 x1wA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=Zeo3fBGcDlFI3oUoyUCfOyJD/qv5pHHbGK7uUVJlKiQ=;
 b=pZFfEibt9N28Ubgrx9ibm4cDQVM62OhA8NqSUtp9JuzYFIbNUGUYbURt1PQlNnQpW3
 YHLEnkRAGsDHawxp4/NlIZAKdsBWt/L9XWzUnR2yEkxemU5ZsvImRu8NyFDBSA2gLT4O
 bAR6xgRJydXISqvNcRa20MyQNgi7w6ocX/X+s3Pb6kqDNsCCpy62UC/BTUd/IDyFvwqx
 HHEMtcsTjpX34PTVvAuzvl40wI6zcJ+gGrPAjkGFKa0JYNCocdcspaYEUkooH9slC/MW
 JYO+YrFx4GuofbdqtNRtbmgwTTKF9ZZT4u37Xj9gmXngDSbFR1tp+bJcjSTU6+sKgtck
 dJ1w==
X-Gm-Message-State: APjAAAX6wRMYlLvQjGgJWDZ56Pqwvzr/INDhxX8OUJnraf+3e3IuTin0
 BI/CQuYXTbPOjL93xWN5JizxwcIrivs=
X-Google-Smtp-Source: APXvYqzLlzG6dz3jNIoxYvhpX+lbv2DqSPt5KrBQ7MxMIK1WVlaDGHYZ6mc1bFKd0eqcz3AH0nxCRQ==
X-Received: by 2002:a63:28c:: with SMTP id 134mr10047079pgc.278.1555778603666; 
 Sat, 20 Apr 2019 09:43:23 -0700 (PDT)
Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id n20sm22534208pgd.92.2019.04.20.09.43.22
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 Apr 2019 09:43:22 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Subject: Re: svn commit: r346443 - head/tests/sys/opencrypto
From: Enji Cooper 
In-Reply-To: <3dc61795-3802-513e-93ff-3d6493eabe36@FreeBSD.org>
Date: Sat, 20 Apr 2019 09:43:22 -0700
Cc: Enji Cooper , src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201904201543.x3KFhSAl037969@repo.freebsd.org>
 
 
 
 <3dc61795-3802-513e-93ff-3d6493eabe36@FreeBSD.org>
To: John Baldwin 
X-Mailer: Apple Mail (2.3445.102.3)
X-Rspamd-Queue-Id: 0887169EC9
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.95 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.95)[-0.954,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:43:25 -0000


> On Apr 20, 2019, at 9:38 AM, John Baldwin  wrote:
>=20
> On 4/20/19 9:32 AM, Enji Cooper wrote:
>>=20
>>> On Apr 20, 2019, at 9:31 AM, Enji Cooper  =
wrote:
>>>=20
>>>=20
>>>> On Apr 20, 2019, at 9:30 AM, John Baldwin > wrote:
>>>>=20
>>>> On 4/20/19 8:43 AM, Enji Cooper wrote:
>>>>> Author: ngie
>>>>> Date: Sat Apr 20 15:43:28 2019
>>>>> New Revision: 346443
>>>>> URL: https://svnweb.freebsd.org/changeset/base/346443 =

>>>>>=20
>>>>> Log:
>>>>> tests/sys/opencrypto: fix whitespace per PEP8
>>>>>=20
>>>>> Replace hard tabs with four-character indentations, per PEP8.
>>>>>=20
>>>>> This is being done to separate stylistic changes from the tests =
from functional
>>>>> ones, as I accidentally introduced a bug to the tests when I used =
four-space
>>>>> indentation locally.
>>>>>=20
>>>>> No functional change.
>>>>=20
>>>> Wow, this is really painful for the 4-5 open reviews I have =
outstanding as it
>>>> makes a merge disaster.
>>>=20
>>> Sorry ;_;=E2=80=A6
>>=20
>> 	Being more constructive: I will back out the change, then =
reapply it later.
>> Thank you,
>=20
> Ok, is it easy to reapply using a script or some such?  Also, in =
general I do prefer
> this indentation as 1) it works out of the box in emacs, and 2) many =
of the lines in
> cryptotest.py especially are indented pretty far over making it hard =
to read.

	Yeah. I basically did `%s/	/.   /g` in vim :). Backed out =
via r346452.
	Using hard tabs in python should really be verboten, except when =
dealing with docstrings, etc. It=E2=80=99s so easy to screw up =
programs/introduce dead code by not indenting things consistently with =
four-space indents.
Thanks!
-Enji=

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:44:07 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE28C156CD4E;
 Sat, 20 Apr 2019 16:44:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "smtp.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4DDAB6A01D;
 Sat, 20 Apr 2019 16:44:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from John-Baldwins-MacBook-Pro-3.local (unknown
 [IPv6:2601:648:8880:1e30:fd9b:9ce6:c8c:cc0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate) (Authenticated sender: jhb)
 by smtp.freebsd.org (Postfix) with ESMTPSA id 979EB1CDA0;
 Sat, 20 Apr 2019 16:44:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: Justin Hibbits , Alan Somers 
Cc: src-committers ,
 svn-src-all ,
 svn-src-head 
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
 
From: John Baldwin 
Openpgp: preference=signencrypt
Autocrypt: addr=jhb@FreeBSD.org; keydata=
 mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0
 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo
 /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD
 /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X
 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z
 pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1
 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k
 do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk
 d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID
 AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM
 jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3
 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj
 XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH
 YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO
 EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz
 hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX
 sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16
 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH
 aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx
 Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I
 SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf
 afMAg8QvmOWnHx3wl8WslCaXaE8=
Message-ID: <5bf4a702-7df8-5597-25b0-55baa71d1d4f@FreeBSD.org>
Date: Sat, 20 Apr 2019 09:44:05 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0)
 Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: 
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Rspamd-Queue-Id: 4DDAB6A01D
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.92 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.92)[-0.919,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:44:07 -0000

On 4/20/19 6:23 AM, Justin Hibbits wrote:
> On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
> 
>> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
>> wrote:
>>>
>>>
>>>
>>> On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
>>>>
>>>> Author: asomers
>>>> Date: Sat Apr 20 12:51:05 2019
>>>> New Revision: 346441
>>>> URL: https://svnweb.freebsd.org/changeset/base/346441
>>>>
>>>> Log:
>>>>   Use symlinks for kernel modules rather than hardlinks
>>>>
>>>>   When aliasing a kernel module to a different name (ie if_igb for
>> if_em),
>>>>   it's better to use symlinks than hard links. kldxref will omit
>> entries for
>>>>   the links, ensuring that the loaded module has the correct name.
>>>>
>>>>
>>>
>>>
>>> Thanks! This should fix installkernel on my POWER9.
>>>
>>> - Justin
>>
>> What's the problem with your POWER9?  Is that one of those msdosfs
>> /boot systems?  If so, I don't think this will fix it.  msdosfs
>> doesn't support either symlinks or hardlinks.  Or is there some other
>> problem?
>> -Alan
>>
> 
> Yes it is.  Well that's a bummer then. I thought we faked symlinks on
> msdosfs, but on second thought not sure how well would do that.

You could just use cp instead of a link?

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:46:06 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2006156CE23;
 Sat, 20 Apr 2019 16:46:06 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com
 [IPv6:2607:f8b0:4864:20::644])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 12C9B6A1C3;
 Sat, 20 Apr 2019 16:46:06 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pl1-x644.google.com with SMTP id w24so3928400plp.2;
 Sat, 20 Apr 2019 09:46:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=et/WDaE9VejSd9fMpWofVO9JkylLNVoauPZuYRG8uuI=;
 b=tVNBxPmCK4dKoMspw8HV64F9CWiCnx0jcR5ptdaaEgn+EiTCa98PuBSwTvXheo0K0d
 KLwU1Q1LAdy1p6A9hCjthdU8xRQIVonDePP02RnnXwLNTsJh/tMtDboPQXGllek5kKgA
 k9kyCC+SOG+KerevRx2EXFctlbCzZoaxozDxQ0GulneKn8KNT5h17JlEiUmYe77y+4dy
 Jhp4ZAoN3dN/VDwdRKPrIRskjAiDOrhFgvDpySzaOzJq/e8xg0mmwqQZRScj9o65TY1K
 tK63g55UjqljgFBs2BFbazEucAuF61K2ZVWT0KZ+jQCLwBm6UC/jEs/YnOfOUI4kWDG/
 iZlw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=et/WDaE9VejSd9fMpWofVO9JkylLNVoauPZuYRG8uuI=;
 b=NkN/mpazK4bDpmHsnoSJKyF3p/f7iMYS4U8C4qZRiApgmGPXK4ND2CohjqEQmPBtoq
 lAbZIugntmgxpt0cLcpfQVlPO1JCO+YHngeDWOrsuDjaWy9fFNRslJDzR7LwdO7+ybDg
 8cmCohWDyQm86ltujl6AnNebxL+XTjSUxf4ODMgdh6UYYn0KYbhqLjyv/0/ukDB200uf
 SISh+vTqzMAGIuDu4DETe3XEYdoJapqkzfmJ0el27nf5YVC8JLinr61LM/zg1nkwxq15
 geF4nJ1mCfOn8+vBe86aO8rwBJM/XqIZwnKAIQN6wWazsHo/IdXO7uXx26BU/DH6raPy
 QP8g==
X-Gm-Message-State: APjAAAUlJ+phm2W5aIWGOIO5KA7fum/zOx/4gjuQIzkgSZHb5wzrDMG9
 pCGGtBFLJZE1mb2FXOQIEQQgufSU8yg=
X-Google-Smtp-Source: APXvYqwV2+WfRW/nR+bo9r9hi93KcxDvHNeFRJofVGr88zb907icFO96ol+hhm4EDaRCzbV7qXPfoQ==
X-Received: by 2002:a17:902:407:: with SMTP id 7mr10513321ple.62.1555778764819; 
 Sat, 20 Apr 2019 09:46:04 -0700 (PDT)
Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id a10sm10559468pfc.21.2019.04.20.09.46.04
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 Apr 2019 09:46:04 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
From: Enji Cooper 
In-Reply-To: <5bf4a702-7df8-5597-25b0-55baa71d1d4f@FreeBSD.org>
Date: Sat, 20 Apr 2019 09:46:03 -0700
Cc: Justin Hibbits , Alan Somers ,
 src-committers ,
 svn-src-all ,
 svn-src-head 
Content-Transfer-Encoding: 7bit
Message-Id: <16BC7A31-39F3-4CFE-A6DA-5187FB154FA4@gmail.com>
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
 
 <5bf4a702-7df8-5597-25b0-55baa71d1d4f@FreeBSD.org>
To: John Baldwin 
X-Mailer: Apple Mail (2.3445.102.3)
X-Rspamd-Queue-Id: 12C9B6A1C3
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.95 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.95)[-0.953,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:46:06 -0000



> On Apr 20, 2019, at 9:44 AM, John Baldwin  wrote:
> 
> On 4/20/19 6:23 AM, Justin Hibbits wrote:
>> On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
>> 
>>> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
>>> wrote:
>>>> 
>>>> 
>>>> 
>>>> On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
>>>>> 
>>>>> Author: asomers
>>>>> Date: Sat Apr 20 12:51:05 2019
>>>>> New Revision: 346441
>>>>> URL: https://svnweb.freebsd.org/changeset/base/346441
>>>>> 
>>>>> Log:
>>>>>  Use symlinks for kernel modules rather than hardlinks
>>>>> 
>>>>>  When aliasing a kernel module to a different name (ie if_igb for
>>> if_em),
>>>>>  it's better to use symlinks than hard links. kldxref will omit
>>> entries for
>>>>>  the links, ensuring that the loaded module has the correct name.
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> Thanks! This should fix installkernel on my POWER9.
>>>> 
>>>> - Justin
>>> 
>>> What's the problem with your POWER9?  Is that one of those msdosfs
>>> /boot systems?  If so, I don't think this will fix it.  msdosfs
>>> doesn't support either symlinks or hardlinks.  Or is there some other
>>> problem?
>>> -Alan
>>> 
>> 
>> Yes it is.  Well that's a bummer then. I thought we faked symlinks on
>> msdosfs, but on second thought not sure how well would do that.
> 
> You could just use cp instead of a link?

*eyes `install -l`*:

     -l linkflags
             Instead of copying the file make a link to the source.  The type
             of the link is determined by the linkflags argument.  Valid
             linkflags are: a (absolute), r (relative), h (hard), s
             (symbolic), m (mixed).  Absolute and relative have effect only
             for symbolic links.  Mixed links are hard links for files on the
             same filesystem, symbolic otherwise.

Cheers,
-Enji

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:54:32 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BAF71570116;
 Sat, 20 Apr 2019 16:54:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org
 [IPv6:2610:1c1:1:606c::24b:4])
 (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 "smtp.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 16C176A710;
 Sat, 20 Apr 2019 16:54:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from John-Baldwins-MacBook-Pro-3.local (unknown
 [IPv6:2601:648:8880:1e30:fd9b:9ce6:c8c:cc0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate) (Authenticated sender: jhb)
 by smtp.freebsd.org (Postfix) with ESMTPSA id 546EC1CEB4;
 Sat, 20 Apr 2019 16:54:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Subject: Re: svn commit: r346443 - head/tests/sys/opencrypto
To: Enji Cooper 
Cc: Enji Cooper , src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
References: <201904201543.x3KFhSAl037969@repo.freebsd.org>
 
 
 
 <3dc61795-3802-513e-93ff-3d6493eabe36@FreeBSD.org>
 
From: John Baldwin 
Openpgp: preference=signencrypt
Autocrypt: addr=jhb@FreeBSD.org; keydata=
 mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0
 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo
 /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD
 /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X
 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z
 pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1
 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k
 do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk
 d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID
 AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM
 jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3
 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj
 XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH
 YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO
 EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz
 hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX
 sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16
 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH
 aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx
 Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I
 SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf
 afMAg8QvmOWnHx3wl8WslCaXaE8=
Message-ID: 
Date: Sat, 20 Apr 2019 09:54:29 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0)
 Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: 
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 16C176A710
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.92 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.92)[-0.919,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:54:32 -0000

On 4/20/19 9:43 AM, Enji Cooper wrote:
> 
>> On Apr 20, 2019, at 9:38 AM, John Baldwin  wrote:
>>
>> On 4/20/19 9:32 AM, Enji Cooper wrote:
>>>
>>>> On Apr 20, 2019, at 9:31 AM, Enji Cooper  wrote:
>>>>
>>>>
>>>>> On Apr 20, 2019, at 9:30 AM, John Baldwin > wrote:
>>>>>
>>>>> On 4/20/19 8:43 AM, Enji Cooper wrote:
>>>>>> Author: ngie
>>>>>> Date: Sat Apr 20 15:43:28 2019
>>>>>> New Revision: 346443
>>>>>> URL: https://svnweb.freebsd.org/changeset/base/346443 
>>>>>>
>>>>>> Log:
>>>>>> tests/sys/opencrypto: fix whitespace per PEP8
>>>>>>
>>>>>> Replace hard tabs with four-character indentations, per PEP8.
>>>>>>
>>>>>> This is being done to separate stylistic changes from the tests from functional
>>>>>> ones, as I accidentally introduced a bug to the tests when I used four-space
>>>>>> indentation locally.
>>>>>>
>>>>>> No functional change.
>>>>>
>>>>> Wow, this is really painful for the 4-5 open reviews I have outstanding as it
>>>>> makes a merge disaster.
>>>>
>>>> Sorry ;_;…
>>>
>>> 	Being more constructive: I will back out the change, then reapply it later.
>>> Thank you,
>>
>> Ok, is it easy to reapply using a script or some such?  Also, in general I do prefer
>> this indentation as 1) it works out of the box in emacs, and 2) many of the lines in
>> cryptotest.py especially are indented pretty far over making it hard to read.
> 
> 	Yeah. I basically did `%s/	/.   /g` in vim :). Backed out via r346452.
> 	Using hard tabs in python should really be verboten, except when dealing with docstrings, etc. It’s so easy to screw up programs/introduce dead code by not indenting things consistently with four-space indents.

To be clear, I prefer the _new_ indentation.  I kept having to go back and manually
use tabify in emacs to work with the current scripts, so once my pending stuff is
drained I will appreciate having it converted.

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Sat Apr 20 16:55:28 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3526C15701A3;
 Sat, 20 Apr 2019 16:55:28 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com
 [IPv6:2607:f8b0:4864:20::529])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id A567C6A92A;
 Sat, 20 Apr 2019 16:55:27 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: by mail-pg1-x529.google.com with SMTP id z9so3962283pgu.10;
 Sat, 20 Apr 2019 09:55:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:message-id:mime-version:subject:date:in-reply-to:cc:to
 :references; bh=sASggUo89jBK+Eh6XGv/6wbM4wV35aDhJdVc+aX9NQo=;
 b=TYeT3q47n0b/iVdBg/x1knBb9bnXU797nBPS5zEFZ8qin8RoQbhc/DOwig6jsAkWxb
 /WCySk2seIp7ry6NY48947v1eVTTcDLoJlvxWhxLkfHsHJythFeKB4x8g325hKusN7+s
 mmE1i15uDnCyYbHDDZArJ6nK1Uu5ztOx1dlphn4TJ38CjC+fEHUi2WjNquvW5N1SkitD
 C8oZ5bYoOvizf6o32X4uOjGE0VaMuAvDUgbmhJBuxEfXEqK02PmJyXsKgWskERyKA6MY
 gDnzAT1zr+w290fTbWhBxLvHg/W7AqW5747k+5aBZ49grt6qhydf8Amr5aDmepONv8A/
 NDnQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:message-id:mime-version:subject:date
 :in-reply-to:cc:to:references;
 bh=sASggUo89jBK+Eh6XGv/6wbM4wV35aDhJdVc+aX9NQo=;
 b=ZefkI2PlmWUxaL0Xp2vqk12Be3p2l/Y0WpyMQi75Z9aSdrbOxRpcbL8qvtmv7sAupx
 1vY91fsxRrCswl8vEiK6HK0g2lPS+Ap6h2nJ4Iwv+s9fm273s+xsBsYFFwbwXoaR01eR
 sMJynBqqZvPB99k4W93GTMGMJbXFkhUdizf4ytf4YBivxbJIcgKYZGjG/mlxe0nkX+1H
 omB3IrB91xzUzQDra2w2ssFz0eE5ElXgag620DT268XFYvshnnmcOOSo9H/im8d8hYgx
 uCmFY9Cu979eNCzC59fDqWn933sLu+jW8lqy1U/3ces58xDHGCeLMZ0okngSIKCNZ3sZ
 BKLg==
X-Gm-Message-State: APjAAAWVRlaYuh9U0ns4L+DuDfWr3jDaoufYb2Kw02mPCIiR0UZVblnu
 hx7k/SBbzgPiDj5vR+HkvcbsGKJACJE=
X-Google-Smtp-Source: APXvYqwlT0cR75em8qcP2ZC1SoJL8WtgPdHN6PJAB+CBhLfoTmIA0ApJsVdYVtrgdz2Zl0ICv9I0nA==
X-Received: by 2002:a63:c54e:: with SMTP id g14mr9951534pgd.265.1555779326365; 
 Sat, 20 Apr 2019 09:55:26 -0700 (PDT)
Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net.
 [73.19.52.228])
 by smtp.gmail.com with ESMTPSA id l88sm13498323pfb.104.2019.04.20.09.55.25
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 Apr 2019 09:55:25 -0700 (PDT)
From: Enji Cooper 
Message-Id: 
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Subject: Re: svn commit: r346443 - head/tests/sys/opencrypto
Date: Sat, 20 Apr 2019 09:55:25 -0700
In-Reply-To: 
Cc: Enji Cooper , src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
To: John Baldwin 
References: <201904201543.x3KFhSAl037969@repo.freebsd.org>
 
 
 
 <3dc61795-3802-513e-93ff-3d6493eabe36@FreeBSD.org>
 
 
X-Mailer: Apple Mail (2.3445.102.3)
X-Rspamd-Queue-Id: A567C6A92A
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.95 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.95)[-0.954,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 16:55:28 -0000


> On Apr 20, 2019, at 9:54 AM, John Baldwin  wrote:

=E2=80=A6

> To be clear, I prefer the _new_ indentation.  I kept having to go back =
and manually
> use tabify in emacs to work with the current scripts, so once my =
pending stuff is
> drained I will appreciate having it converted.

I figured as much, but really appreciate the clarification <3!
-Enji=

From owner-svn-src-all@freebsd.org  Sat Apr 20 17:16:37 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32C9F1570CDB;
 Sat, 20 Apr 2019 17:16:37 +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 C8A486B471;
 Sat, 20 Apr 2019 17:16:36 +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 7CA0419276;
 Sat, 20 Apr 2019 17:16:36 +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 x3KHGaQA088162;
 Sat, 20 Apr 2019 17:16:36 GMT (envelope-from cy@FreeBSD.org)
Received: (from cy@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KHGaKj088161;
 Sat, 20 Apr 2019 17:16:36 GMT (envelope-from cy@FreeBSD.org)
Message-Id: <201904201716.x3KHGaKj088161@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
 using -f
From: Cy Schubert 
Date: Sat, 20 Apr 2019 17:16:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r346453 - vendor/sqlite3/sqlite-3270200
X-SVN-Group: vendor
X-SVN-Commit-Author: cy
X-SVN-Commit-Paths: vendor/sqlite3/sqlite-3270200
X-SVN-Commit-Revision: 346453
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: C8A486B471
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.957,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 17:16:37 -0000

Author: cy
Date: Sat Apr 20 17:16:36 2019
New Revision: 346453
URL: https://svnweb.freebsd.org/changeset/base/346453

Log:
  Tag import of sqlite3-3.27.2 (3270200)

Added:
  vendor/sqlite3/sqlite-3270200/
     - copied from r346452, vendor/sqlite3/dist/

From owner-svn-src-all@freebsd.org  Sat Apr 20 17:21:31 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 678851570F10
 for ;
 Sat, 20 Apr 2019 17:21:31 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com
 [IPv6:2607:f8b0:4864:20::842])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id F16D66B7D7
 for ; Sat, 20 Apr 2019 17:21:30 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: by mail-qt1-x842.google.com with SMTP id w26so1557961qto.13
 for ; Sat, 20 Apr 2019 10:21:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=bsdimp-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=IhcjqT7SeBivVK2akebdc9fY+WxgWpBHqy0jy3UIBCc=;
 b=SuvU5rItIQBQDA2j58az8IqN0cfidLmzeviZtvAdRRvPMPW5II1joSboboqW1pPAp2
 Lz2g2DqzDcxUv0qIa5aObIYj2Rydb8xUdcTvZFhsKFxaQXhiKYZQdW/Uzt8f9MpUwn9o
 KvGUL10/jKKuZDuKkrSrLbaMAuM+fUBYvjgwM9pSBxYrZ6vUmo0lELdZDDv8YJ4jSnip
 P23oI0shyDQvSNlijtsufeTraecBKnUzZAvD/2yDpZc0Nzo0v2Q53go3oCIxpAxWqGmr
 N50+Z78hxt0S8iAIu+QUrDI1wtPECPmC9xuYPNOj9k2IhjVeM3T0SKNjqKE3T7BMcJU3
 23Ag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=IhcjqT7SeBivVK2akebdc9fY+WxgWpBHqy0jy3UIBCc=;
 b=DG+Iza4u7fnxNGCkaW5hjwDD5fUHN9J5sKKcO5ZoNR2cvtxKRg+0xVkXUhS6b6Sh6k
 vghzPnVX+M3iSWjd6K/xwd1y7bxfjGHcZOl1xzf7i63NGfdBre7kQIVQNA36VnJbobK1
 FCC5tpqNl8YaTsV4dEIC1Hjv+a9sMZB8CuN6MzSIEPJoQseh8wC6Ulb0UzqwUW7/4BKj
 mzZxY3IBzm7rD3qer4OccEdxV2mtE+CnhFldHMkCAmL3ejxyaB1gkT4Iwv+bDzTv5b3z
 kWVzDzR1z96JSvbD/qsgvKEL7wG2e1tmWaOsvYsYynIzbYxXW1OYjJfzVh8q28kZXWaE
 Ey9g==
X-Gm-Message-State: APjAAAWvNP4Fb7sOS6QNKfB2kSkVf1XEQsxj/l+pWJjlDF14X3S1kGan
 zwOnKvefJtg6vVUVzhXpzoYPvbeKDIn5jxdRM8xzwQNx
X-Google-Smtp-Source: APXvYqwcG1IQcocCUU0X9YOV4lf67+WJ2qu066mYeEL3noE62fvJB5bMFxZ9XOpMGKwC7gYg+2qurC3+koJABilsGc0=
X-Received: by 2002:ac8:1aec:: with SMTP id h41mr8358308qtk.345.1555780890324; 
 Sat, 20 Apr 2019 10:21:30 -0700 (PDT)
MIME-Version: 1.0
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
 
 <5bf4a702-7df8-5597-25b0-55baa71d1d4f@FreeBSD.org>
In-Reply-To: <5bf4a702-7df8-5597-25b0-55baa71d1d4f@FreeBSD.org>
From: Warner Losh 
Date: Sat, 20 Apr 2019 11:21:16 -0600
Message-ID: 
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: John Baldwin 
Cc: Justin Hibbits , Alan Somers , 
 src-committers ,
 svn-src-all , 
 svn-src-head 
X-Rspamd-Queue-Id: F16D66B7D7
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.94 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.94)[-0.940,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 17:21:31 -0000

On Sat, Apr 20, 2019, 10:44 AM John Baldwin  wrote:

> On 4/20/19 6:23 AM, Justin Hibbits wrote:
> > On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
> >
> >> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
> >> wrote:
> >>>
> >>>
> >>>
> >>> On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
> >>>>
> >>>> Author: asomers
> >>>> Date: Sat Apr 20 12:51:05 2019
> >>>> New Revision: 346441
> >>>> URL: https://svnweb.freebsd.org/changeset/base/346441
> >>>>
> >>>> Log:
> >>>>   Use symlinks for kernel modules rather than hardlinks
> >>>>
> >>>>   When aliasing a kernel module to a different name (ie if_igb for
> >> if_em),
> >>>>   it's better to use symlinks than hard links. kldxref will omit
> >> entries for
> >>>>   the links, ensuring that the loaded module has the correct name.
> >>>>
> >>>>
> >>>
> >>>
> >>> Thanks! This should fix installkernel on my POWER9.
> >>>
> >>> - Justin
> >>
> >> What's the problem with your POWER9?  Is that one of those msdosfs
> >> /boot systems?  If so, I don't think this will fix it.  msdosfs
> >> doesn't support either symlinks or hardlinks.  Or is there some other
> >> problem?
> >> -Alan
> >>
> >
> > Yes it is.  Well that's a bummer then. I thought we faked symlinks on
> > msdosfs, but on second thought not sure how well would do that.
>
> You could just use cp instead of a link?
>

I don't think this solves the original issue.

Warner

-- 
> John Baldwin
>
>

From owner-svn-src-all@freebsd.org  Sat Apr 20 17:23:07 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A79181570F93
 for ;
 Sat, 20 Apr 2019 17:23:07 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com
 [IPv6:2607:f8b0:4864:20::82e])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 3FA126B9CD
 for ; Sat, 20 Apr 2019 17:23:07 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: by mail-qt1-x82e.google.com with SMTP id w5so8318164qtb.11
 for ; Sat, 20 Apr 2019 10:23:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=bsdimp-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=RkbNjvsXqcX+2/uBp8aX4R2YBGfjox9I/Og+lVXD4lM=;
 b=fWpdXHoLkkboTsd8Q7WTGvr0VPfr51bpV5jczFbM0WC6Ke5/hBH2XbD0tZiX9D7YCt
 0PlCKG1cRm1ODRaJeiAHbdsazX+Ez2I0g3nVWcTnhYpggn582Ib9iW5KWy1i6dcTqzJ+
 8sRuL7T9f69p/+/lC/YdieSiuyR+mvywimbAfXgWBZW903h23kZxuoEJhe5N34dL3WSp
 zCq+WPEeQJrcqaOz8POrFF+ESMLVkaXNjV/aUN6B15pnKVwr9QSEVqckqSDD+EM7HFDL
 1b8urznsp3Z1DrktniibBZMryk6afWnVeVCIKfG/eaNkz9XzL2MPiJIMr7Tycnz7W7Sz
 +2uA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=RkbNjvsXqcX+2/uBp8aX4R2YBGfjox9I/Og+lVXD4lM=;
 b=SfUj2EQUMz3HhelJU972z/aI9vuKYIz5+n6JA7Nl5jhWeo6cLIcjT2fhdFUQPoMVd/
 YR8xtlp1fR7TBUGO2ZHVe3xCXI6lZhQdZhAFItW+zK2JTjncJalHoTDWjcvmJTn/tPxR
 MisukqxSf7elSA0tJTr5dI4o33ZJvaoo9N1gDJ66W1Px6Fjbnj1i6W9Y0l5aDxiCCH55
 VDNWshakqSAxDrnCAhXGYVbaClqcOecckka4Z0ytSpzYX30kR6v6LCfPfEXdu1rpt+9V
 8il7Tyw3Adf4Ovo2S+SvALuX+QrW8wfIHWlEuaouGBWkPBo0ZG1xAWoq2W2bEZ2aJXmj
 26Vg==
X-Gm-Message-State: APjAAAXkdO/W73fFmDSdlc2SFbJ8/6n3AAE4c3RcqNOZoY0Pxv84bG91
 Wh0tZMGPN7761JNAZGOaT3OcVDq11gHnSKgQm3HKnw==
X-Google-Smtp-Source: APXvYqxE7L+RFUhuptMvfiINdkWNV6SYYi4JS35NAkCh1ssbKdTxorab3hwu1fjz4Sp6wIImO7A1pJ5joAJ91feWrh0=
X-Received: by 2002:ac8:1e0c:: with SMTP id n12mr2779062qtl.33.1555780986533; 
 Sat, 20 Apr 2019 10:23:06 -0700 (PDT)
MIME-Version: 1.0
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
 
 <5bf4a702-7df8-5597-25b0-55baa71d1d4f@FreeBSD.org>
 <16BC7A31-39F3-4CFE-A6DA-5187FB154FA4@gmail.com>
In-Reply-To: <16BC7A31-39F3-4CFE-A6DA-5187FB154FA4@gmail.com>
From: Warner Losh 
Date: Sat, 20 Apr 2019 11:22:54 -0600
Message-ID: 
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: Garrett Cooper 
Cc: John Baldwin , Justin Hibbits , 
 Alan Somers , src-committers ,
 svn-src-all , svn-src-head 
X-Rspamd-Queue-Id: 3FA126B9CD
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.94 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.94)[-0.940,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 17:23:08 -0000

On Sat, Apr 20, 2019, 10:46 AM Enji Cooper  wrote:

>
>
> > On Apr 20, 2019, at 9:44 AM, John Baldwin  wrote:
> >
> > On 4/20/19 6:23 AM, Justin Hibbits wrote:
> >> On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
> >>
> >>> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
> >>> wrote:
> >>>>
> >>>>
> >>>>
> >>>> On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
> >>>>>
> >>>>> Author: asomers
> >>>>> Date: Sat Apr 20 12:51:05 2019
> >>>>> New Revision: 346441
> >>>>> URL: https://svnweb.freebsd.org/changeset/base/346441
> >>>>>
> >>>>> Log:
> >>>>>  Use symlinks for kernel modules rather than hardlinks
> >>>>>
> >>>>>  When aliasing a kernel module to a different name (ie if_igb for
> >>> if_em),
> >>>>>  it's better to use symlinks than hard links. kldxref will omit
> >>> entries for
> >>>>>  the links, ensuring that the loaded module has the correct name.
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> Thanks! This should fix installkernel on my POWER9.
> >>>>
> >>>> - Justin
> >>>
> >>> What's the problem with your POWER9?  Is that one of those msdosfs
> >>> /boot systems?  If so, I don't think this will fix it.  msdosfs
> >>> doesn't support either symlinks or hardlinks.  Or is there some other
> >>> problem?
> >>> -Alan
> >>>
> >>
> >> Yes it is.  Well that's a bummer then. I thought we faked symlinks on
> >> msdosfs, but on second thought not sure how well would do that.
> >
> > You could just use cp instead of a link?
>
> *eyes `install -l`*:
>
>      -l linkflags
>              Instead of copying the file make a link to the source.  The
> type
>              of the link is determined by the linkflags argument.  Valid
>              linkflags are: a (absolute), r (relative), h (hard), s
>              (symbolic), m (mixed).  Absolute and relative have effect only
>              for symbolic links.  Mixed links are hard links for files on
> the
>              same filesystem, symbolic otherwise.
>

None of those are helpful. Better to just not do the link for a system we
don't the compat links for....

Warner

Cheers,
> -Enji
>
>

From owner-svn-src-all@freebsd.org  Sat Apr 20 18:12:41 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AE0A1571F52
 for ;
 Sat, 20 Apr 2019 18:12:41 +0000 (UTC) (envelope-from
 0100016a3bf34017-3ed4b61f-24af-4481-8288-2d95d7414fc7-000000@amazonses.com)
Received: from a8-176.smtp-out.amazonses.com (a8-176.smtp-out.amazonses.com
 [54.240.8.176])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E053E6CFFB
 for ; Sat, 20 Apr 2019 18:12:39 +0000 (UTC)
 (envelope-from
 0100016a3bf34017-3ed4b61f-24af-4481-8288-2d95d7414fc7-000000@amazonses.com)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple;
 s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1555783958;
 h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type;
 bh=vsEmpfbgpnePpFEnjMW68YEbS7xvLTOk75YrVb3iK1Q=;
 b=ZS1trQ1xbCbedyz6y0Vuj2ePAwu8MKQ3MPJcQWD76N7Upbx6OKvLN20dhzpXusEZ
 PRU3aoTM47myj8731ZuHvCUoawk237U4RsMSmW/ss9DYUmSmakEkXLxJ1YcAp7w5FZt
 WvPDbk0DRbg209khM9NGD51M1K50Rm1GIsfLFoe0=
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple;
 s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1555783958;
 h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Feedback-ID;
 bh=vsEmpfbgpnePpFEnjMW68YEbS7xvLTOk75YrVb3iK1Q=;
 b=eJnpXv4WvSrvepIhjqS8uvGZFqjAMTeDibK9eem2Lnz8N29sSP58+ywE0gcSC8eZ
 6GPptrTyvIey0h1WB0LFjQPoWdGGNzVHX/DnoxJn6OON4jIinZm7UUbRzYmuMYbOjyN
 GAZ1PJ38VANclDXJr83byFihHmQ9oALUKMY5FuJA=
Subject: Re: svn commit: r340905 - in stable/12: release/pkg_repos usr.sbin/pkg
To: Glen Barber 
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org,
 portmgr@freebsd.org
References: <201811241747.wAOHlr6W029937@repo.freebsd.org>
 <0100016a32795508-fd8bbc41-2b38-40ae-903a-e3ef3739dfd8-000000@email.amazonses.com>
 <20190419130522.GI39941@FreeBSD.org>
From: Colin Percival 
Openpgp: preference=signencrypt
Autocrypt: addr=cperciva@tarsnap.com; prefer-encrypt=mutual; keydata=
 mQGhBElrAAcRBACDfDys4ZtK+ErCJ1HAzYeteKpm3OEsvT/49AjUTLihkF79HhIKrCQU+1KC
 zv7BwHCMLb6hq30As9L7iFKG7n5QFLFC4Te/VcITUnWHMG/c3ViLOfJGvi+9/nOEHaM1dVJY
 D6tEp5yM1nHmVQpo9932j4KGuGFR0LhOK5IHXOSfGwCgxSFDPdgxe2OEjWxjGgY+oV3EafcD
 +JROXCTjlcQiG/OguQH4Vks3mhHfFnEppLxTkDuYgHZQiUtpcT9ssH5khgqoTyMar05OUdAj
 ZIhNbWDh4LgTj+7ZmvLhXT5Zxw8LX9d7T36aTB8XDQSenDqEtinMWOb0TCBBLbsB8EFG1WTT
 ESbZci9jJS5yhtktuZoY/eM8uXMD/3k4FWFO80VRRkELSp+XSy/VlSQjyi/rhl2nQq/oOA9F
 oJbDaB0yq9VNhxP+uFBzBWSqeIX0t1ZWLtNfVFr4TRP5hihI5ICrg/0OpqgisKsU2NFe9xyO
 hyJLYmfD8ebpDJ/9k30C7Iju9pVrwLm1QgS4S2fqJRcR+U4WbjvP7CgStCVDb2xpbiBQZXJj
 aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+iGEEExECACEFAklrALYCGwMHCwkIBwMCAQQV
 AggDBBYCAwECHgECF4AACgkQOM7KaQxqam6/igCgn+z2k3V5ggNppmWrZstt1U2lugsAoL7L
 wS9V9yLtil3oWmHtwpUqYruEuQINBElrAAcQCAD3ZLMIsP4CIDoJORg+YY0lqLVBgcnF7pFb
 4Uy2+KvdWofN+DKH61rZLjgXXkNE9M4EQC1B4lGttBP8IY2gs41y3AUogGdyFbidq99rCBz7
 LTsgARHwFxZoaHmXyiZLEU1QZuMqwPZV1mCviRhN5E3rRqYNXVcrnXAAuhBpvNyj/ntHvcDN
 2/m+ochiuBYueU4kX3lHya7sOj+mTsndcWmQ9soOUyr8O0r/BG088bMn4qqtUw4dl5/pglXk
 jbl7uOOPinKf0WVd2r6M0wLPJCD4NPHrCWRLLLAjwfjrtoSRvXxDbXhCdgGBa72+K8eYLzVs
 hgq7tJOoBWzjVK6XRxR7AAMGB/9Mo3iJ2DxqDecd02KCB5BsFDICbJGhPltU7FwrtbC7djSb
 XUrwsEVLHi4st4cbdGNCWCrp0BRezXZKohKnNAPFOTK++ZfgeKxrV2sJod+Q9RILF86tQ4XF
 7A7Yme5hy92t/WgiU4vc/fWbgP8gV/19f8nunaT2E9NSa70mZFjZNu4iuwThoUUO5CV3Wo0Y
 UISsnRK8XD1+LR3A2qVyLiFRwh/miC1hgLFCTGCQ3GLxZeZzIpYSlGdQJ0L5lixW5ZQD9r1I
 8i/8zhE6qRFAM0upUMI3Gt1Oq2w03DiXrZU0Fu/R8Rm8rlnkQKA+95mRTUq1xL5P5NZIi4gJ
 Z569OPMFiEkEGBECAAkFAklrAAcCGwwACgkQOM7KaQxqam41igCfbaldnFTu5uAdrnrghESv
 EI3CAo8AoLkNMks1pThl2BJNRm4CtTK9xZeH
Message-ID: <0100016a3bf34017-3ed4b61f-24af-4481-8288-2d95d7414fc7-000000@email.amazonses.com>
Date: Sat, 20 Apr 2019 18:12:38 +0000
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101
 Thunderbird/60.5.0
MIME-Version: 1.0
In-Reply-To: <20190419130522.GI39941@FreeBSD.org>
Content-Type: multipart/mixed; boundary="------------A0326B08556C6D6EF3308B02"
Content-Language: en-US
X-SES-Outgoing: 2019.04.20-54.240.8.176
Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES
X-Rspamd-Queue-Id: E053E6CFFB
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=tarsnap.com header.s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57
 header.b=ZS1trQ1x; 
 dkim=pass header.d=amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw
 header.b=eJnpXv4W; 
 spf=pass (mx1.freebsd.org: domain of
 0100016a3bf34017-3ed4b61f-24af-4481-8288-2d95d7414fc7-000000@amazonses.com
 designates 54.240.8.176 as permitted sender)
 smtp.mailfrom=0100016a3bf34017-3ed4b61f-24af-4481-8288-2d95d7414fc7-000000@amazonses.com
X-Spamd-Result: default: False [-2.59 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[tarsnap.com:s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57,amazonses.com:s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw];
 RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+ip4:54.240.0.0/18];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; HAS_ATTACHMENT(0.00)[];
 MIME_GOOD(-0.10)[multipart/mixed,text/plain];
 DMARC_NA(0.00)[tarsnap.com]; RCPT_COUNT_FIVE(0.00)[6];
 TO_MATCH_ENVRCPT_SOME(0.00)[];
 MX_GOOD(-0.01)[cached: feedback-smtp.us-east-1.amazonses.com];
 DKIM_TRACE(0.00)[tarsnap.com:+,amazonses.com:+];
 RCVD_IN_DNSWL_NONE(0.00)[176.8.240.54.list.dnswl.org : 127.0.15.0];
 NEURAL_HAM_SHORT(-0.98)[-0.978,0];
 FORGED_SENDER(0.30)[cperciva@tarsnap.com,0100016a3bf34017-3ed4b61f-24af-4481-8288-2d95d7414fc7-000000@amazonses.com];
 RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+,1:+,2:~];
 IP_SCORE(-2.01)[ip: (-2.30), ipnet: 54.240.8.0/21(-4.59), asn: 14618(-3.08),
 country: US(-0.06)]; 
 ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US];
 FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[];
 FROM_NEQ_ENVFROM(0.00)[cperciva@tarsnap.com,0100016a3bf34017-3ed4b61f-24af-4481-8288-2d95d7414fc7-000000@amazonses.com];
 MIME_UNKNOWN(0.10)[text/x-patch]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 18:12:41 -0000

This is a multi-part message in MIME format.
--------------A0326B08556C6D6EF3308B02
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit

On 4/19/19 6:05 AM, Glen Barber wrote:
> On Thu, Apr 18, 2019 at 10:02:53PM +0000, Colin Percival wrote:
>> On 11/24/18 9:47 AM, Glen Barber wrote:
>>> Log:
>>>   Revert r340161 in stable/12, setting the default pkg(8) repository back
>>>   to 'latest' from 'quarterly' prior to branching releng/12.0.
>> It looks like this is incorrect for non-x86 architectures.  Portmgr may
>> correct me here, but it looks like "latest" builds are only done on non-x86
>> architectures on HEAD.  (The same problem also applies on stable/11.)
>>
>> I'm guessing that the answer here is to have different package configurations
>> installed depending on the architecture; I knew how to do this with the old
>> style of src/etc but I'm not sure how to do it now that pkgbase has spread
>> configuration files all over the tree.
> 
> For 13.0-CURRENT, both latest and quarterly are updated.  For non-x86 on
> 12.0-STABLE and 11.2-STABLE, quarterly is updated (not latest), so from
> a general sense of this particular commit, it is correct.
> 
> But you are also correct in your assertion that the current default
> (latest) for non-x86 does appear to be incorrect.
I think this patch does what we need in stable/12 -- installing a different
FreeBSD.conf file depending on whether TARGET_ARCH is amd64/i386.  I'm not
sure if we should have anything similar in HEAD since we want to use "latest"
packages on all architectures there; we might want to have both configuration
files in HEAD but always install the same one there.

Let me know what you'd like done; this is the last issue (aside from MFCs)
blocking ARM64 AMIs from working on stable/12.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid

--------------A0326B08556C6D6EF3308B02
Content-Type: text/x-patch;
 name="FreeBSD-conf.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="FreeBSD-conf.diff"

Index: usr.sbin/pkg/FreeBSD.conf
===================================================================
--- usr.sbin/pkg/FreeBSD.conf	(revision 346346)
+++ usr.sbin/pkg/FreeBSD.conf	(nonexistent)
@@ -1,16 +0,0 @@
-# $FreeBSD$
-#
-# To disable this repository, instead of modifying or removing this file,
-# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
-#
-#   mkdir -p /usr/local/etc/pkg/repos
-#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
-#
-
-FreeBSD: {
-  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
-  mirror_type: "srv",
-  signature_type: "fingerprints",
-  fingerprints: "/usr/share/keys/pkg",
-  enabled: yes
-}

Property changes on: usr.sbin/pkg/FreeBSD.conf
___________________________________________________________________
Deleted: svn:keywords
## -1 +0,0 ##
-FreeBSD=%H
\ No newline at end of property
Index: usr.sbin/pkg/FreeBSD.conf.latest
===================================================================
--- usr.sbin/pkg/FreeBSD.conf.latest	(nonexistent)
+++ usr.sbin/pkg/FreeBSD.conf.latest	(working copy)
@@ -0,0 +1,16 @@
+# $FreeBSD: stable/12/usr.sbin/pkg/FreeBSD.conf 340905 2018-11-24 17:47:53Z gjb $
+#
+# To disable this repository, instead of modifying or removing this file,
+# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
+#
+#   mkdir -p /usr/local/etc/pkg/repos
+#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
+#
+
+FreeBSD: {
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
+  mirror_type: "srv",
+  signature_type: "fingerprints",
+  fingerprints: "/usr/share/keys/pkg",
+  enabled: yes
+}
Index: usr.sbin/pkg/FreeBSD.conf.quarterly
===================================================================
--- usr.sbin/pkg/FreeBSD.conf.quarterly	(nonexistent)
+++ usr.sbin/pkg/FreeBSD.conf.quarterly	(working copy)
@@ -0,0 +1,16 @@
+# $FreeBSD: stable/12/usr.sbin/pkg/FreeBSD.conf 340905 2018-11-24 17:47:53Z gjb $
+#
+# To disable this repository, instead of modifying or removing this file,
+# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
+#
+#   mkdir -p /usr/local/etc/pkg/repos
+#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
+#
+
+FreeBSD: {
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
+  mirror_type: "srv",
+  signature_type: "fingerprints",
+  fingerprints: "/usr/share/keys/pkg",
+  enabled: yes
+}
Index: usr.sbin/pkg/Makefile
===================================================================
--- usr.sbin/pkg/Makefile	(revision 346346)
+++ usr.sbin/pkg/Makefile	(working copy)
@@ -1,6 +1,12 @@
 # $FreeBSD$
 
-CONFS=	FreeBSD.conf
+.if ${TARGET_ARCH} != "amd64" && ${TARGET_ARCH} != "i386"
+CONFS=	FreeBSD.conf.quarterly
+.else
+CONFS=	FreeBSD.conf.latest
+.endif
+CONFSNAME= FreeBSD.conf
+
 CONFSDIR=	/etc/pkg
 CONFSMODE=	644
 PROG=	pkg

--------------A0326B08556C6D6EF3308B02--

From owner-svn-src-all@freebsd.org  Sat Apr 20 18:59:43 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A24861572E08;
 Sat, 20 Apr 2019 18:59:43 +0000 (UTC)
 (envelope-from freebsd@gndrsh.dnsmgr.net)
Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id EEF966E0CF;
 Sat, 20 Apr 2019 18:59:42 +0000 (UTC)
 (envelope-from freebsd@gndrsh.dnsmgr.net)
Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1])
 by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3KIxdwf023813;
 Sat, 20 Apr 2019 11:59:39 -0700 (PDT)
 (envelope-from freebsd@gndrsh.dnsmgr.net)
Received: (from freebsd@localhost)
 by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3KIxd9J023812;
 Sat, 20 Apr 2019 11:59:39 -0700 (PDT) (envelope-from freebsd)
From: "Rodney W. Grimes" 
Message-Id: <201904201859.x3KIxd9J023812@gndrsh.dnsmgr.net>
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
In-Reply-To: 
To: Warner Losh 
Date: Sat, 20 Apr 2019 11:59:39 -0700 (PDT)
CC: Alan Somers , Justin Hibbits , 
 src-committers ,
 svn-src-all ,
 svn-src-head 
Reply-To: rgrimes@freebsd.org
X-Mailer: ELM [version 2.4ME+ PL121h (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-Rspamd-Queue-Id: EEF966E0CF
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.85 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.85)[-0.847,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 18:59:43 -0000

> On Sat, Apr 20, 2019, 7:47 AM Alan Somers  wrote:
> 
> > On Sat, Apr 20, 2019 at 7:23 AM Justin Hibbits 
> > wrote:
> > >
> > >
> > >
> > > On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
> > >>
> > >> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
> > wrote:
> > >> >
> > >> >
> > >> >
> > >> > On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
> > >> >>
> > >> >> Author: asomers
> > >> >> Date: Sat Apr 20 12:51:05 2019
> > >> >> New Revision: 346441
> > >> >> URL: https://svnweb.freebsd.org/changeset/base/346441
> > >> >>
> > >> >> Log:
> > >> >>   Use symlinks for kernel modules rather than hardlinks
> > >> >>
> > >> >>   When aliasing a kernel module to a different name (ie if_igb for
> > if_em),
> > >> >>   it's better to use symlinks than hard links. kldxref will omit
> > entries for
> > >> >>   the links, ensuring that the loaded module has the correct name.
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >> > Thanks! This should fix installkernel on my POWER9.
> > >> >
> > >> > - Justin
> > >>
> > >> What's the problem with your POWER9?  Is that one of those msdosfs
> > >> /boot systems?  If so, I don't think this will fix it.  msdosfs
> > >> doesn't support either symlinks or hardlinks.  Or is there some other
> > >> problem?
> > >> -Alan
> > >
> > >
> > > Yes it is.  Well that's a bummer then. I thought we faked symlinks on
> > msdosfs, but on second thought not sure how well would do that.
> > >
> > > - Justin
> >
> > We should probably just remove the offending links on ppc, then.  The
> > only harm is that after upgrading, ppc users would have to replace
> > fuse_load="YES" with fusefs_load="YES".
> >
> 
> We should only do the Intel links on those platforms that have legacy users
> that need the old names. We should also only support the old names for one
> release or so.

IIRC this was done so that the dropping of one of the drivers in ^head
could be merged back to ^stable.  It probably should of been killed in
^head after that fact, but if I recall the values correctly it was
@head=12 and merged to @stable=11.  We would need to dig those facts
out, but yes, please, this link should be killed and cleaned up quickly as
it creates almost as many problems as it solved.
 
> Warner
-- 
Rod Grimes                                                 rgrimes@freebsd.org

From owner-svn-src-all@freebsd.org  Sat Apr 20 19:16:02 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28AA715732AF;
 Sat, 20 Apr 2019 19:16:02 +0000 (UTC)
 (envelope-from freebsd@gndrsh.dnsmgr.net)
Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 6694D6E7F7;
 Sat, 20 Apr 2019 19:16:01 +0000 (UTC)
 (envelope-from freebsd@gndrsh.dnsmgr.net)
Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1])
 by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3KJFxjD023900;
 Sat, 20 Apr 2019 12:15:59 -0700 (PDT)
 (envelope-from freebsd@gndrsh.dnsmgr.net)
Received: (from freebsd@localhost)
 by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3KJFxp3023899;
 Sat, 20 Apr 2019 12:15:59 -0700 (PDT) (envelope-from freebsd)
From: "Rodney W. Grimes" 
Message-Id: <201904201915.x3KJFxp3023899@gndrsh.dnsmgr.net>
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
In-Reply-To: <201904201859.x3KIxd9J023812@gndrsh.dnsmgr.net>
To: rgrimes@freebsd.org
Date: Sat, 20 Apr 2019 12:15:59 -0700 (PDT)
CC: Warner Losh , Alan Somers ,
 Justin Hibbits ,
 src-committers ,
 svn-src-all ,
 svn-src-head 
Reply-To: rgrimes@freebsd.org
X-Mailer: ELM [version 2.4ME+ PL121h (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-Rspamd-Queue-Id: 6694D6E7F7
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.86 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.86)[-0.863,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 19:16:02 -0000

> > On Sat, Apr 20, 2019, 7:47 AM Alan Somers  wrote:
> > 
> > > On Sat, Apr 20, 2019 at 7:23 AM Justin Hibbits 
> > > wrote:
> > > >
> > > >
> > > >
> > > > On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
> > > >>
> > > >> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
> > > wrote:
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
> > > >> >>
> > > >> >> Author: asomers
> > > >> >> Date: Sat Apr 20 12:51:05 2019
> > > >> >> New Revision: 346441
> > > >> >> URL: https://svnweb.freebsd.org/changeset/base/346441
> > > >> >>
> > > >> >> Log:
> > > >> >>   Use symlinks for kernel modules rather than hardlinks
> > > >> >>
> > > >> >>   When aliasing a kernel module to a different name (ie if_igb for
> > > if_em),
> > > >> >>   it's better to use symlinks than hard links. kldxref will omit
> > > entries for
> > > >> >>   the links, ensuring that the loaded module has the correct name.
> > > >> >>
> > > >> >>
> > > >> >
> > > >> >
> > > >> > Thanks! This should fix installkernel on my POWER9.
> > > >> >
> > > >> > - Justin
> > > >>
> > > >> What's the problem with your POWER9?  Is that one of those msdosfs
> > > >> /boot systems?  If so, I don't think this will fix it.  msdosfs
> > > >> doesn't support either symlinks or hardlinks.  Or is there some other
> > > >> problem?
> > > >> -Alan
> > > >
> > > >
> > > > Yes it is.  Well that's a bummer then. I thought we faked symlinks on
> > > msdosfs, but on second thought not sure how well would do that.
> > > >
> > > > - Justin
> > >
> > > We should probably just remove the offending links on ppc, then.  The
> > > only harm is that after upgrading, ppc users would have to replace
> > > fuse_load="YES" with fusefs_load="YES".
> > >
> > 
> > We should only do the Intel links on those platforms that have legacy users
> > that need the old names. We should also only support the old names for one
> > release or so.
> 
> IIRC this was done so that the dropping of one of the drivers in ^head
> could be merged back to ^stable.  It probably should of been killed in
> ^head after that fact, but if I recall the values correctly it was
> @head=12 and merged to @stable=11.  We would need to dig those facts
> out, but yes, please, this link should be killed and cleaned up quickly as
> it creates almost as many problems as it solved.

Ignore most of that I had mixed the other time we did kernel module
lnks (intel ethernet driver) with this insance for fuse.  Though the
principal idea of this should be a short lived compatibility hack still
applies.

> > Warner
> -- 
> Rod Grimes                                                 rgrimes@freebsd.org
-- 
Rod Grimes                                                 rgrimes@freebsd.org

From owner-svn-src-all@freebsd.org  Sat Apr 20 20:03:34 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEA781574989;
 Sat, 20 Apr 2019 20:03:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "smtp.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 62095700CF;
 Sat, 20 Apr 2019 20:03:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from John-Baldwins-MacBook-Pro-3.local (unknown
 [IPv6:2601:648:8880:1e30:9532:4c8d:399e:176b])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate) (Authenticated sender: jhb)
 by smtp.freebsd.org (Postfix) with ESMTPSA id 7353B1E3B1;
 Sat, 20 Apr 2019 20:03:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: Warner Losh 
Cc: Justin Hibbits , Alan Somers , 
 src-committers ,
 svn-src-all ,
 svn-src-head 
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
 
 <5bf4a702-7df8-5597-25b0-55baa71d1d4f@FreeBSD.org>
 
From: John Baldwin 
Openpgp: preference=signencrypt
Autocrypt: addr=jhb@FreeBSD.org; keydata=
 mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0
 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo
 /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD
 /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X
 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z
 pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1
 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k
 do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk
 d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID
 AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM
 jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3
 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj
 XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH
 YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO
 EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz
 hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX
 sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16
 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH
 aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx
 Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I
 SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf
 afMAg8QvmOWnHx3wl8WslCaXaE8=
Message-ID: 
Date: Sat, 20 Apr 2019 13:03:31 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0)
 Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: 
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Rspamd-Queue-Id: 62095700CF
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.96 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 20:03:35 -0000

On 4/20/19 10:21 AM, Warner Losh wrote:
> On Sat, Apr 20, 2019, 10:44 AM John Baldwin  wrote:
> 
>> On 4/20/19 6:23 AM, Justin Hibbits wrote:
>>> On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
>>>
>>>> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
>>>>>>
>>>>>> Author: asomers
>>>>>> Date: Sat Apr 20 12:51:05 2019
>>>>>> New Revision: 346441
>>>>>> URL: https://svnweb.freebsd.org/changeset/base/346441
>>>>>>
>>>>>> Log:
>>>>>>   Use symlinks for kernel modules rather than hardlinks
>>>>>>
>>>>>>   When aliasing a kernel module to a different name (ie if_igb for
>>>> if_em),
>>>>>>   it's better to use symlinks than hard links. kldxref will omit
>>>> entries for
>>>>>>   the links, ensuring that the loaded module has the correct name.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Thanks! This should fix installkernel on my POWER9.
>>>>>
>>>>> - Justin
>>>>
>>>> What's the problem with your POWER9?  Is that one of those msdosfs
>>>> /boot systems?  If so, I don't think this will fix it.  msdosfs
>>>> doesn't support either symlinks or hardlinks.  Or is there some other
>>>> problem?
>>>> -Alan
>>>>
>>>
>>> Yes it is.  Well that's a bummer then. I thought we faked symlinks on
>>> msdosfs, but on second thought not sure how well would do that.
>>
>> You could just use cp instead of a link?
>>
> 
> I don't think this solves the original issue.

FWIW, I think igb and em still use separate driver_t's with separate
probe tables, etc. to preserve POLA of existing device names, so in
theory there could still be two modules, it's just by choice that they
are both in the same C file and same kld.

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Sat Apr 20 20:29:04 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 847541574F15;
 Sat, 20 Apr 2019 20:29:04 +0000 (UTC) (envelope-from bde@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 22E5C70917;
 Sat, 20 Apr 2019 20:29:04 +0000 (UTC) (envelope-from bde@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 EABB81B24F;
 Sat, 20 Apr 2019 20:29:03 +0000 (UTC) (envelope-from bde@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KKT3bA086903;
 Sat, 20 Apr 2019 20:29:03 GMT (envelope-from bde@FreeBSD.org)
Received: (from bde@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KKT3pB086901;
 Sat, 20 Apr 2019 20:29:03 GMT (envelope-from bde@FreeBSD.org)
Message-Id: <201904202029.x3KKT3pB086901@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org
 using -f
From: Bruce Evans 
Date: Sat, 20 Apr 2019 20:29:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346454 - head/lib/libvgl
X-SVN-Group: head
X-SVN-Commit-Author: bde
X-SVN-Commit-Paths: head/lib/libvgl
X-SVN-Commit-Revision: 346454
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 22E5C70917
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.96)[-0.965,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 20:29:04 -0000

Author: bde
Date: Sat Apr 20 20:29:03 2019
New Revision: 346454
URL: https://svnweb.freebsd.org/changeset/base/346454

Log:
  Make libvgl mostly work without superuser privilege in direct modes by
  not doing any unnecessary PIO instructions or refusing to start when the
  i/o privilege needed for these instructions cannot be acquired.
  
  This turns off useless palette management in direct modes.  Palette
  management had no useful effect since the hardware palette is not used
  in these modes.
  
  This transiently acquires i/o privilege if possible as needed to give
  VGLSetBorder() and VGLBlankDisplay() a chance of working.  Neither has
  much chance of working.  I was going to drop support for them in direct
  modes, but found that VGLBlankDisplay() still works with an old graphics
  card on a not so old LCD monitor.
  
  This has some good side effects: reduce glitches for managing the palette
  for screen switches, and speed up and reduce async-signal-unsafeness in
  mouse cursor drawing.

Modified:
  head/lib/libvgl/main.c
  head/lib/libvgl/mouse.c
  head/lib/libvgl/simple.c

Modified: head/lib/libvgl/main.c
==============================================================================
--- head/lib/libvgl/main.c	Sat Apr 20 17:16:36 2019	(r346453)
+++ head/lib/libvgl/main.c	Sat Apr 20 20:29:03 2019	(r346454)
@@ -93,7 +93,8 @@ struct vt_mode smode;
     size[2] = VGLOldVInfo.font_size;;
     ioctl(0, KDRASTER, size);
   }
-  ioctl(0, KDDISABIO, 0);
+  if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT)
+    ioctl(0, KDDISABIO, 0);
   ioctl(0, KDSETMODE, KD_TEXT);
   smode.mode = VT_AUTO;
   ioctl(0, VT_SETMODE, &smode);
@@ -176,7 +177,7 @@ VGLInit(int mode)
   if (VGLDisplay == NULL)
     return -2;
 
-  if (ioctl(0, KDENABIO, 0)) {
+  if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT && ioctl(0, KDENABIO, 0)) {
     free(VGLDisplay);
     return -3;
   }
@@ -370,7 +371,8 @@ VGLCheckSwitch()
 
     VGLSwitchPending = 0;
     if (VGLOnDisplay) {
-      ioctl(0, KDENABIO, 0);
+      if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT)
+        ioctl(0, KDENABIO, 0);
       ioctl(0, KDSETMODE, KD_GRAPHICS);
       ioctl(0, VGLMode, 0);
       VGLCurWindow = 0;
@@ -531,7 +533,8 @@ VGLCheckSwitch()
       munmap(VGLDisplay->Bitmap, VGLAdpInfo.va_window_size);
       ioctl(0, VGLOldMode, 0);
       ioctl(0, KDSETMODE, KD_TEXT);
-      ioctl(0, KDDISABIO, 0);
+      if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT)
+        ioctl(0, KDDISABIO, 0);
       ioctl(0, VT_RELDISP, VT_TRUE);
       VGLDisplay->Bitmap = VGLBuf;
       VGLDisplay->Type = MEMBUF;

Modified: head/lib/libvgl/mouse.c
==============================================================================
--- head/lib/libvgl/mouse.c	Sat Apr 20 17:16:36 2019	(r346453)
+++ head/lib/libvgl/mouse.c	Sat Apr 20 20:29:03 2019	(r346454)
@@ -111,10 +111,12 @@ VGLMousePointerShow()
   if (!VGLMouseVisible) {
     INTOFF();
     VGLMouseVisible = 1;
-    crtcidx = inb(0x3c4);
-    crtcval = inb(0x3c5);
-    gdcidx = inb(0x3ce);
-    gdcval = inb(0x3cf);
+    if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
+      crtcidx = inb(0x3c4);
+      crtcval = inb(0x3c5);
+      gdcidx = inb(0x3ce);
+      gdcval = inb(0x3cf);
+    }
     __VGLBitmapCopy(VGLDisplay, VGLMouseXpos, VGLMouseYpos, 
 		  &VGLMouseSave, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
     bcopy(VGLMouseSave.Bitmap, buffer.Bitmap,
@@ -128,10 +130,12 @@ VGLMousePointerShow()
       }
     __VGLBitmapCopy(&buffer, 0, 0, VGLDisplay, 
 		  VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
-    outb(0x3c4, crtcidx);
-    outb(0x3c5, crtcval);
-    outb(0x3ce, gdcidx);
-    outb(0x3cf, gdcval);
+    if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
+      outb(0x3c4, crtcidx);
+      outb(0x3c5, crtcval);
+      outb(0x3ce, gdcidx);
+      outb(0x3cf, gdcval);
+    }
     INTON();
   }
 }
@@ -144,16 +148,20 @@ VGLMousePointerHide()
   if (VGLMouseVisible) {
     INTOFF();
     VGLMouseVisible = 0;
-    crtcidx = inb(0x3c4);
-    crtcval = inb(0x3c5);
-    gdcidx = inb(0x3ce);
-    gdcval = inb(0x3cf);
+    if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
+      crtcidx = inb(0x3c4);
+      crtcval = inb(0x3c5);
+      gdcidx = inb(0x3ce);
+      gdcval = inb(0x3cf);
+    }
     __VGLBitmapCopy(&VGLMouseSave, 0, 0, VGLDisplay, 
 		  VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
-    outb(0x3c4, crtcidx);
-    outb(0x3c5, crtcval);
-    outb(0x3ce, gdcidx);
-    outb(0x3cf, gdcval);
+    if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
+      outb(0x3c4, crtcidx);
+      outb(0x3c5, crtcval);
+      outb(0x3ce, gdcidx);
+      outb(0x3cf, gdcval);
+    }
     INTON();
   }
 }

Modified: head/lib/libvgl/simple.c
==============================================================================
--- head/lib/libvgl/simple.c	Sat Apr 20 17:16:36 2019	(r346453)
+++ head/lib/libvgl/simple.c	Sat Apr 20 20:29:03 2019	(r346454)
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include "vgl.h"
 
@@ -551,6 +552,8 @@ VGLRestorePalette()
 {
   int i;
 
+  if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT)
+    return;
   outb(0x3C6, 0xFF);
   inb(0x3DA); 
   outb(0x3C8, 0x00);
@@ -571,6 +574,8 @@ VGLSavePalette()
 {
   int i;
 
+  if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT)
+    return;
   outb(0x3C6, 0xFF);
   inb(0x3DA);
   outb(0x3C7, 0x00);
@@ -591,6 +596,8 @@ VGLSetPalette(byte *red, byte *green, byte *blue)
 {
   int i;
   
+  if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT)
+    return;
   for (i=0; i<256; i++) {
     VGLSavePaletteRed[i] = red[i];
     VGLSavePaletteGreen[i] = green[i];
@@ -615,6 +622,8 @@ VGLSetPalette(byte *red, byte *green, byte *blue)
 void
 VGLSetPaletteIndex(byte color, byte red, byte green, byte blue)
 {
+  if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT)
+    return;
   VGLSavePaletteRed[color] = red;
   VGLSavePaletteGreen[color] = green;
   VGLSavePaletteBlue[color] = blue;
@@ -630,11 +639,15 @@ VGLSetPaletteIndex(byte color, byte red, byte green, b
 void
 VGLSetBorder(byte color)
 {
+  if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT && ioctl(0, KDENABIO, 0))
+    return;
   VGLCheckSwitch();
   inb(0x3DA);
   outb(0x3C0,0x11); outb(0x3C0, color); 
   inb(0x3DA);
   outb(0x3C0, 0x20);
+  if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT)
+    ioctl(0, KDDISABIO, 0);
 }
 
 void
@@ -642,7 +655,11 @@ VGLBlankDisplay(int blank)
 {
   byte val;
 
+  if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT && ioctl(0, KDENABIO, 0))
+    return;
   VGLCheckSwitch();
   outb(0x3C4, 0x01); val = inb(0x3C5); outb(0x3C4, 0x01);
   outb(0x3C5, ((blank) ? (val |= 0x20) : (val &= 0xDF)));
+  if (VGLModeInfo.vi_mem_model == V_INFO_MM_DIRECT)
+    ioctl(0, KDDISABIO, 0);
 }

From owner-svn-src-all@freebsd.org  Sat Apr 20 21:00:45 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 086551575D29;
 Sat, 20 Apr 2019 21:00:45 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 A4BDE71AA1;
 Sat, 20 Apr 2019 21:00:44 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FB0A1B76B;
 Sat, 20 Apr 2019 21:00:44 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KL0ivg005060;
 Sat, 20 Apr 2019 21:00:44 GMT (envelope-from wulf@FreeBSD.org)
Received: (from wulf@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KL0ikO005059;
 Sat, 20 Apr 2019 21:00:44 GMT (envelope-from wulf@FreeBSD.org)
Message-Id: <201904202100.x3KL0ikO005059@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: wulf set sender to
 wulf@FreeBSD.org using -f
From: Vladimir Kondratyev 
Date: Sat, 20 Apr 2019 21:00:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346455 - head/sys/dev/atkbdc
X-SVN-Group: head
X-SVN-Commit-Author: wulf
X-SVN-Commit-Paths: head/sys/dev/atkbdc
X-SVN-Commit-Revision: 346455
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: A4BDE71AA1
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 21:00:45 -0000

Author: wulf
Date: Sat Apr 20 21:00:44 2019
New Revision: 346455
URL: https://svnweb.freebsd.org/changeset/base/346455

Log:
  psm(4): Add support for 4 and 5 finger touches in synaptics driver
  
  While 4-th and 5-th finger positions are not exported through PS/2
  interface, total number of touches is reported by MT trackpads.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c	Sat Apr 20 20:29:03 2019	(r346454)
+++ head/sys/dev/atkbdc/psm.c	Sat Apr 20 21:00:44 2019	(r346455)
@@ -1830,7 +1830,7 @@ psm_register_synaptics(device_t dev)
 	if (sc->synhw.capClickPad && sc->synhw.topButtonPad)
 		evdev_support_prop(evdev_a, INPUT_PROP_TOPBUTTONPAD);
 	evdev_support_key(evdev_a, BTN_TOUCH);
-	evdev_support_nfingers(evdev_a, 3);
+	evdev_support_nfingers(evdev_a, sc->synhw.capReportsV ? 5 : 3);
 	psm_support_abs_bulk(evdev_a, synaptics_absinfo_st);
 	if (sc->synhw.capAdvancedGestures || sc->synhw.capReportsV)
 		psm_support_abs_bulk(evdev_a, synaptics_absinfo_mt);
@@ -3212,6 +3212,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, 
 {
 	static int touchpad_buttons;
 	static int guest_buttons;
+	static int ew_finger_count;
 	static finger_t f[PSM_FINGERS];
 	int w, id, nfingers, ewcode, extended_buttons, clickpad_pressed;
 
@@ -3372,6 +3373,9 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, 
 					    (pb->ipacket[1] & 0x01)) + 8,
 					.flags = PSM_FINGER_FUZZY,
 				};
+			break;
+		case 2:
+			ew_finger_count = pb->ipacket[1] & 0x0f;
 		default:
 			break;
 		}
@@ -3379,6 +3383,11 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, 
 		goto SYNAPTICS_END;
 
 	case 1:
+		if (sc->synhw.capReportsV && ew_finger_count > 3) {
+			nfingers = ew_finger_count;
+			break;
+		}
+		/* FALLTHROUGH */
 	case 0:
 		nfingers = w + 2;
 		break;

From owner-svn-src-all@freebsd.org  Sat Apr 20 21:02:42 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF5931575F6D;
 Sat, 20 Apr 2019 21:02:42 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 7244671E9F;
 Sat, 20 Apr 2019 21:02:42 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25F421B902;
 Sat, 20 Apr 2019 21:02:42 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KL2gjP007689;
 Sat, 20 Apr 2019 21:02:42 GMT (envelope-from wulf@FreeBSD.org)
Received: (from wulf@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KL2fZD007688;
 Sat, 20 Apr 2019 21:02:41 GMT (envelope-from wulf@FreeBSD.org)
Message-Id: <201904202102.x3KL2fZD007688@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: wulf set sender to
 wulf@FreeBSD.org using -f
From: Vladimir Kondratyev 
Date: Sat, 20 Apr 2019 21:02:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346456 - head/sys/dev/atkbdc
X-SVN-Group: head
X-SVN-Commit-Author: wulf
X-SVN-Commit-Paths: head/sys/dev/atkbdc
X-SVN-Commit-Revision: 346456
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 7244671E9F
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.965,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 21:02:43 -0000

Author: wulf
Date: Sat Apr 20 21:02:41 2019
New Revision: 346456
URL: https://svnweb.freebsd.org/changeset/base/346456

Log:
  psm(4): do not process gestures when palm is present
  
  Ignoring of gesture processing when the palm is detected helps to reduce
  some of the erratic pointer behavior.
  
  This fixes regression introduced in r317814
  
  Reported by:	Ben LeMasurier 
  MFC after:	2 weeks

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c	Sat Apr 20 21:00:44 2019	(r346455)
+++ head/sys/dev/atkbdc/psm.c	Sat Apr 20 21:02:41 2019	(r346456)
@@ -3214,7 +3214,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, 
 	static int guest_buttons;
 	static int ew_finger_count;
 	static finger_t f[PSM_FINGERS];
-	int w, id, nfingers, ewcode, extended_buttons, clickpad_pressed;
+	int w, id, nfingers, palm, ewcode, extended_buttons, clickpad_pressed;
 
 	extended_buttons = 0;
 
@@ -3577,12 +3577,16 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, 
 
 	ms->button = touchpad_buttons;
 
-	psmgestures(sc, &f[0], nfingers, ms);
+	palm = psmpalmdetect(sc, &f[0], nfingers);
+
+	/* Palm detection doesn't terminate the current action. */
+	if (!palm)
+		psmgestures(sc, &f[0], nfingers, ms);
+
 	for (id = 0; id < PSM_FINGERS; id++)
 		psmsmoother(sc, &f[id], id, ms, x, y);
 
-	/* Palm detection doesn't terminate the current action. */
-	if (psmpalmdetect(sc, &f[0], nfingers)) {
+	if (palm) {
 		*x = *y = *z = 0;
 		ms->button = ms->obutton;
 		return (0);
@@ -4324,7 +4328,7 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m
 {
 	static int touchpad_button, trackpoint_button;
 	finger_t fn, f[ELANTECH_MAX_FINGERS];
-	int pkt, id, scale, i, nfingers, mask;
+	int pkt, id, scale, i, nfingers, mask, palm;
 
 	if (!elantech_support)
 		return (0);
@@ -4713,10 +4717,14 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m
 
 	ms->button = touchpad_button | trackpoint_button;
 
+	/* Palm detection doesn't terminate the current action. */
+	palm = psmpalmdetect(sc, &f[0], nfingers);
+
 	/* Send finger 1 position to gesture processor */
-	if (PSM_FINGER_IS_SET(f[0]) || PSM_FINGER_IS_SET(f[1]) ||
-	    nfingers == 0)
+	if ((PSM_FINGER_IS_SET(f[0]) || PSM_FINGER_IS_SET(f[1]) ||
+	    nfingers == 0) && !palm)
 		psmgestures(sc, &f[0], imin(nfingers, 3), ms);
+
 	/* Send fingers positions to movement smoothers */
 	for (id = 0; id < PSM_FINGERS; id++)
 		if (PSM_FINGER_IS_SET(f[id]) || !(mask & (1 << id)))
@@ -4731,8 +4739,7 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m
 	}
 	sc->elanaction.mask = mask;
 
-	/* Palm detection doesn't terminate the current action. */
-	if (psmpalmdetect(sc, &f[0], nfingers)) {
+	if (palm) {
 		*x = *y = *z = 0;
 		ms->button = ms->obutton;
 		return (0);

From owner-svn-src-all@freebsd.org  Sat Apr 20 21:04:58 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 117DE157603A;
 Sat, 20 Apr 2019 21:04:58 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 692867206B;
 Sat, 20 Apr 2019 21:04:57 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57DA41B903;
 Sat, 20 Apr 2019 21:04:57 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KL4vX9007826;
 Sat, 20 Apr 2019 21:04:57 GMT (envelope-from wulf@FreeBSD.org)
Received: (from wulf@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KL4uvl007824;
 Sat, 20 Apr 2019 21:04:56 GMT (envelope-from wulf@FreeBSD.org)
Message-Id: <201904202104.x3KL4uvl007824@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: wulf set sender to
 wulf@FreeBSD.org using -f
From: Vladimir Kondratyev 
Date: Sat, 20 Apr 2019 21:04:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346457 - in head: share/man/man4 sys/dev/atkbdc
X-SVN-Group: head
X-SVN-Commit-Author: wulf
X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/atkbdc
X-SVN-Commit-Revision: 346457
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 692867206B
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 21:04:58 -0000

Author: wulf
Date: Sat Apr 20 21:04:56 2019
New Revision: 346457
URL: https://svnweb.freebsd.org/changeset/base/346457

Log:
  psm(4): respect tap_disabled configuration with enabled Extended support
  
  This fixes a bug where, even when hw.psm.tap_enabled=0, touchpad taps
  were processed.
  tap_enabled has three states: unconfigured, disabled, and enabled (-1, 0, 1).
  To respect PR kern/139272, taps are ignored only when explicity disabled.
  
  Submitted by:	Ben LeMasurier  (initial version)
  MFC after:	2 weeks

Modified:
  head/share/man/man4/psm.4
  head/sys/dev/atkbdc/psm.c

Modified: head/share/man/man4/psm.4
==============================================================================
--- head/share/man/man4/psm.4	Sat Apr 20 21:02:41 2019	(r346456)
+++ head/share/man/man4/psm.4	Sat Apr 20 21:04:56 2019	(r346457)
@@ -354,8 +354,8 @@ Tap and drag gestures can be disabled by setting
 to
 .Em 0
 at boot-time.
-Currently, this is only supported on Synaptics touchpads with Extended
-support disabled.
+Currently, this is supported on Synaptics touchpads regardless of Extended
+support state and on Elantech touchpads with Extended support enabled.
 The behaviour may be changed after boot by setting
 the sysctl with the same name and by restarting
 .Xr moused 8

Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c	Sat Apr 20 21:02:41 2019	(r346456)
+++ head/sys/dev/atkbdc/psm.c	Sat Apr 20 21:04:56 2019	(r346457)
@@ -3820,9 +3820,15 @@ psmgestures(struct psm_softc *sc, finger_t *fingers, i
 			gest->in_vscroll = 0;
 
 			/* Compute tap timeout. */
-			gest->taptimeout.tv_sec  = tap_timeout / 1000000;
-			gest->taptimeout.tv_usec = tap_timeout % 1000000;
-			timevaladd(&gest->taptimeout, &sc->lastsoftintr);
+			if (tap_enabled != 0) {
+				gest->taptimeout = (struct timeval) {
+					.tv_sec  = tap_timeout / 1000000,
+					.tv_usec = tap_timeout % 1000000,
+				};
+				timevaladd(
+				    &gest->taptimeout, &sc->lastsoftintr);
+			} else
+				timevalclear(&gest->taptimeout);
 
 			sc->flags |= PSM_FLAGS_FINGERDOWN;
 

From owner-svn-src-all@freebsd.org  Sat Apr 20 21:06:13 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3605B1576118;
 Sat, 20 Apr 2019 21:06:13 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 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 D0BC0721D5;
 Sat, 20 Apr 2019 21:06:12 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABB0A1B905;
 Sat, 20 Apr 2019 21:06:12 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KL6CeM007932;
 Sat, 20 Apr 2019 21:06:12 GMT (envelope-from wulf@FreeBSD.org)
Received: (from wulf@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KL6CM0007931;
 Sat, 20 Apr 2019 21:06:12 GMT (envelope-from wulf@FreeBSD.org)
Message-Id: <201904202106.x3KL6CM0007931@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: wulf set sender to
 wulf@FreeBSD.org using -f
From: Vladimir Kondratyev 
Date: Sat, 20 Apr 2019 21:06:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346458 - head/sys/dev/atkbdc
X-SVN-Group: head
X-SVN-Commit-Author: wulf
X-SVN-Commit-Paths: head/sys/dev/atkbdc
X-SVN-Commit-Revision: 346458
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: D0BC0721D5
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.965,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 21:06:13 -0000

Author: wulf
Date: Sat Apr 20 21:06:12 2019
New Revision: 346458
URL: https://svnweb.freebsd.org/changeset/base/346458

Log:
  psm(4): give names to synaptics commands
  
  Submitted by:	Ben LeMasurier 
  MFC after:	2 weeks

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c	Sat Apr 20 21:04:56 2019	(r346457)
+++ head/sys/dev/atkbdc/psm.c	Sat Apr 20 21:06:12 2019	(r346458)
@@ -178,6 +178,22 @@ typedef struct packetbuf {
 #define	PSM_PACKETQUEUE	128
 #endif
 
+/*
+ * Synaptics command definitions.
+ */
+#define	SYNAPTICS_READ_IDENTITY			0x00
+#define	SYNAPTICS_READ_MODES			0x01
+#define	SYNAPTICS_READ_CAPABILITIES		0x02
+#define	SYNAPTICS_READ_MODEL_ID			0x03
+#define	SYNAPTICS_READ_SERIAL_PREFIX		0x06
+#define	SYNAPTICS_READ_SERIAL_SUFFIX		0x07
+#define	SYNAPTICS_READ_RESOLUTIONS		0x08
+#define	SYNAPTICS_READ_EXTENDED			0x09
+#define	SYNAPTICS_READ_CAPABILITIES_CONT	0x0c
+#define	SYNAPTICS_READ_MAX_COORDS		0x0d
+#define	SYNAPTICS_READ_DELUXE_LED		0x0e
+#define	SYNAPTICS_READ_MIN_COORDS		0x0f
+
 typedef struct synapticsinfo {
 	struct sysctl_ctx_list	 sysctl_ctx;
 	struct sysctl_oid	*sysctl_tree;
@@ -1119,7 +1135,7 @@ doopen(struct psm_softc *sc, int command_byte)
 				    "active multiplexing mode.\n",
 				    sc->unit);
 		}
-		mouse_ext_command(sc->kbdc, 1);
+		mouse_ext_command(sc->kbdc, SYNAPTICS_READ_MODES);
 		get_mouse_status(sc->kbdc, stat, 0, 3);
 		if ((SYNAPTICS_VERSION_GE(sc->synhw, 7, 5) ||
 		     stat[1] == 0x47) &&
@@ -6158,7 +6174,7 @@ synaptics_set_mode(struct psm_softc *sc, int mode_byte
 	 */
 	if ((sc->synhw.capAdvancedGestures || sc->synhw.capReportsV) &&
 	    sc->hw.model == MOUSE_MODEL_SYNAPTICS && !(mode_byte & (1 << 5))) {
-		mouse_ext_command(sc->kbdc, 3);
+		mouse_ext_command(sc->kbdc, SYNAPTICS_READ_MODEL_ID);
 		set_mouse_sampling_rate(sc->kbdc, 0xc8);
 	}
 }
@@ -6238,7 +6254,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 	set_mouse_scaling(kbdc, 1);
 
 	/* Identify the Touchpad version. */
-	if (mouse_ext_command(kbdc, 0) == 0)
+	if (mouse_ext_command(kbdc, SYNAPTICS_READ_IDENTITY) == 0)
 		return (FALSE);
 	if (get_mouse_status(kbdc, status, 0, 3) != 3)
 		return (FALSE);
@@ -6259,7 +6275,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 	}
 
 	/* Get the Touchpad model information. */
-	if (mouse_ext_command(kbdc, 3) == 0)
+	if (mouse_ext_command(kbdc, SYNAPTICS_READ_MODEL_ID) == 0)
 		return (FALSE);
 	if (get_mouse_status(kbdc, status, 0, 3) != 3)
 		return (FALSE);
@@ -6290,7 +6306,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 	}
 
 	/* Read the extended capability bits. */
-	if (mouse_ext_command(kbdc, 2) == 0)
+	if (mouse_ext_command(kbdc, SYNAPTICS_READ_CAPABILITIES) == 0)
 		return (FALSE);
 	if (get_mouse_status(kbdc, status, 0, 3) != 3)
 		return (FALSE);
@@ -6321,7 +6337,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 
 		if (!set_mouse_scaling(kbdc, 1))
 			return (FALSE);
-		if (mouse_ext_command(kbdc, 0x08) == 0)
+		if (mouse_ext_command(kbdc, SYNAPTICS_READ_RESOLUTIONS) == 0)
 			return (FALSE);
 		if (get_mouse_status(kbdc, status, 0, 3) != 3)
 			return (FALSE);
@@ -6358,7 +6374,8 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 		if (synhw.nExtendedQueries >= 1) {
 			if (!set_mouse_scaling(kbdc, 1))
 				return (FALSE);
-			if (mouse_ext_command(kbdc, 0x09) == 0)
+			if (mouse_ext_command(kbdc,
+			    SYNAPTICS_READ_EXTENDED) == 0)
 				return (FALSE);
 			if (get_mouse_status(kbdc, status, 0, 3) != 3)
 				return (FALSE);
@@ -6397,7 +6414,8 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 		if (synhw.nExtendedQueries >= 4) {
 			if (!set_mouse_scaling(kbdc, 1))
 				return (FALSE);
-			if (mouse_ext_command(kbdc, 0x0c) == 0)
+			if (mouse_ext_command(kbdc,
+			    SYNAPTICS_READ_CAPABILITIES_CONT) == 0)
 				return (FALSE);
 			if (get_mouse_status(kbdc, status, 0, 3) != 3)
 				return (FALSE);
@@ -6418,7 +6436,8 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 			if (synhw.capReportsMax) {
 				if (!set_mouse_scaling(kbdc, 1))
 					return (FALSE);
-				if (mouse_ext_command(kbdc, 0x0d) == 0)
+				if (mouse_ext_command(kbdc,
+				    SYNAPTICS_READ_MAX_COORDS) == 0)
 					return (FALSE);
 				if (get_mouse_status(kbdc, status, 0, 3) != 3)
 					return (FALSE);
@@ -6439,7 +6458,8 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 			if (synhw.capReportsMin) {
 				if (!set_mouse_scaling(kbdc, 1))
 					return (FALSE);
-				if (mouse_ext_command(kbdc, 0x0f) == 0)
+				if (mouse_ext_command(kbdc,
+				    SYNAPTICS_READ_MIN_COORDS) == 0)
 					return (FALSE);
 				if (get_mouse_status(kbdc, status, 0, 3) != 3)
 					return (FALSE);
@@ -6542,7 +6562,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a
 	 * byte of the response to this query to be a constant 0x3b, this
 	 * does not appear to be true for Touchpads with guest devices.
 	 */
-	if (mouse_ext_command(kbdc, 1) == 0)
+	if (mouse_ext_command(kbdc, SYNAPTICS_READ_MODES) == 0)
 		return (FALSE);
 	if (get_mouse_status(kbdc, status, 0, 3) != 3)
 		return (FALSE);

From owner-svn-src-all@freebsd.org  Sat Apr 20 22:31:56 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A5781577BFE
 for ;
 Sat, 20 Apr 2019 22:31:56 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com
 [IPv6:2607:f8b0:4864:20::741])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id AFBC774C06
 for ; Sat, 20 Apr 2019 22:31:55 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: by mail-qk1-x741.google.com with SMTP id m137so969236qke.3
 for ; Sat, 20 Apr 2019 15:31:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=bsdimp-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=1eRTts1CX+1nCVPz573K1PJVtZD+6kzsIl94YWGYO3U=;
 b=Vt2LhWaNGXtjn/m4tqnVkF1hAaAR6jlpqwO8yQewV7Ys1JD221Zk7RPFSP/18EnLuo
 CfXWeolrU1TRhAZ6PoQ3e11pDbjm4QrClIZK70ArsjfZGTkL6DqhGKKYOlB/FNgwMlWL
 o6tJmFUuxwYGHI5VoXfxhDVjUWDhzbupx9c4rou5/H6UpQZakQAJhSAwUcNOJXb53SAk
 MQuqowBRCXs6RWQWzYZBqvnjVtiCqWI5Z9o3T+KqYAbFDKQ7p1DxUQfR+RL2uUNYPnT+
 Js5R4nEdteVCS4TYdhhg4Pt4PGEbCyCY5PFdyjdBPiD6QQX8T8kUdu33KYTPDHzmfzm9
 v6Bw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=1eRTts1CX+1nCVPz573K1PJVtZD+6kzsIl94YWGYO3U=;
 b=HVImZNkPOhn4uWAgTjf3j/6L2LWQYw97K8opkROfcepSKeyt+HSdXSPNmJxEL9RCDN
 tniPlXH/DDYCTEZEOB/NG8HgQavIKPc3N3taF9PrCOAcQGgCiMVaZnlHRW/fvqVCEe4Z
 539KtPLtKpWpzURvJTSFP+XrwKKDxhMbr7yTVxW8PcklJX1MYojuWDjCPTTDvEPPXWOY
 g1+BD947QLYL1+iXlzQkQEjQM9tmONQzo6uQHg1TBH9y7Ty4atf+xot4OAE3msdOiVeV
 z+T8YnmFpiB8dOTuuhnBMpOaav8jJp19m4b6al3wB2zYQkn1oRCBUlVcqbX97Ev6BGPI
 zweA==
X-Gm-Message-State: APjAAAV1l74zLFWOJmILOZbjoKuJN9f359iMzumwY9EyYHaIzhv1pfUT
 3XFym6yltiVbPGQ/jY83BDKdRtGjryUNwnAwZxVvQw==
X-Google-Smtp-Source: APXvYqz17YYgFRB00jAEQbNcCdOGcAqOBpXd+8kLURMKAJvRmTEOy2vPOnTrn8y7Waysn0DhEPjc2YkL68XrZj/TCN4=
X-Received: by 2002:ae9:ee0c:: with SMTP id i12mr6954404qkg.46.1555799514909; 
 Sat, 20 Apr 2019 15:31:54 -0700 (PDT)
MIME-Version: 1.0
References: <201904201251.x3KCp6it044898@repo.freebsd.org>
 
 
 
 <5bf4a702-7df8-5597-25b0-55baa71d1d4f@FreeBSD.org>
 
 
In-Reply-To: 
From: Warner Losh 
Date: Sat, 20 Apr 2019 16:31:43 -0600
Message-ID: 
Subject: Re: svn commit: r346441 - in head/sys/modules: em fusefs iavf
To: John Baldwin 
Cc: Justin Hibbits , Alan Somers , 
 src-committers ,
 svn-src-all , 
 svn-src-head 
X-Rspamd-Queue-Id: AFBC774C06
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.91 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.91)[-0.909,0]; REPLY(-4.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 22:31:56 -0000

On Sat, Apr 20, 2019 at 2:03 PM John Baldwin  wrote:

> On 4/20/19 10:21 AM, Warner Losh wrote:
> > On Sat, Apr 20, 2019, 10:44 AM John Baldwin  wrote:
> >
> >> On 4/20/19 6:23 AM, Justin Hibbits wrote:
> >>> On Sat, Apr 20, 2019, 08:21 Alan Somers  wrote:
> >>>
> >>>> On Sat, Apr 20, 2019 at 6:58 AM Justin Hibbits 
> >>>> wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Sat, Apr 20, 2019, 07:51 Alan Somers  wrote:
> >>>>>>
> >>>>>> Author: asomers
> >>>>>> Date: Sat Apr 20 12:51:05 2019
> >>>>>> New Revision: 346441
> >>>>>> URL: https://svnweb.freebsd.org/changeset/base/346441
> >>>>>>
> >>>>>> Log:
> >>>>>>   Use symlinks for kernel modules rather than hardlinks
> >>>>>>
> >>>>>>   When aliasing a kernel module to a different name (ie if_igb for
> >>>> if_em),
> >>>>>>   it's better to use symlinks than hard links. kldxref will omit
> >>>> entries for
> >>>>>>   the links, ensuring that the loaded module has the correct name.
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>> Thanks! This should fix installkernel on my POWER9.
> >>>>>
> >>>>> - Justin
> >>>>
> >>>> What's the problem with your POWER9?  Is that one of those msdosfs
> >>>> /boot systems?  If so, I don't think this will fix it.  msdosfs
> >>>> doesn't support either symlinks or hardlinks.  Or is there some other
> >>>> problem?
> >>>> -Alan
> >>>>
> >>>
> >>> Yes it is.  Well that's a bummer then. I thought we faked symlinks on
> >>> msdosfs, but on second thought not sure how well would do that.
> >>
> >> You could just use cp instead of a link?
> >>
> >
> > I don't think this solves the original issue.
>
> FWIW, I think igb and em still use separate driver_t's with separate
> probe tables, etc. to preserve POLA of existing device names, so in
> theory there could still be two modules, it's just by choice that they
> are both in the same C file and same kld.
>

Yea, I sometimes wish they'd have if_em.ko that's just this table and a
dependency to igb.ko plus another if_igb.ko with the same dependency. That
would be cleaner than the hacky thing we're doing which forces us to have
other hacks in kldload, etc.

Warner

From owner-svn-src-all@freebsd.org  Sat Apr 20 23:18:36 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D38181578A7C;
 Sat, 20 Apr 2019 23:18:35 +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 825AD76D1F;
 Sat, 20 Apr 2019 23:18:35 +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 5B75A1CEF9;
 Sat, 20 Apr 2019 23:18:35 +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 x3KNIZj4078517;
 Sat, 20 Apr 2019 23:18:35 GMT (envelope-from cy@FreeBSD.org)
Received: (from cy@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KNIJWk078502;
 Sat, 20 Apr 2019 23:18:19 GMT (envelope-from cy@FreeBSD.org)
Message-Id: <201904202318.x3KNIJWk078502@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
 using -f
From: Cy Schubert 
Date: Sat, 20 Apr 2019 23:18:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r346459 - in head/contrib/sqlite3: . tea
X-SVN-Group: head
X-SVN-Commit-Author: cy
X-SVN-Commit-Paths: in head/contrib/sqlite3: . tea
X-SVN-Commit-Revision: 346459
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 825AD76D1F
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.972,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 23:18:36 -0000

Author: cy
Date: Sat Apr 20 23:18:19 2019
New Revision: 346459
URL: https://svnweb.freebsd.org/changeset/base/346459

Log:
  MFV r346450:
  
  Update sqlite3-3.27.1 (3270100) --> sqlite3-3.27.2 (3270200)
  
  MFC after:	11 days

Modified:
  head/contrib/sqlite3/configure
  head/contrib/sqlite3/configure.ac
  head/contrib/sqlite3/sqlite3.c
  head/contrib/sqlite3/sqlite3.h
  head/contrib/sqlite3/tea/configure
  head/contrib/sqlite3/tea/configure.ac
Directory Properties:
  head/contrib/sqlite3/   (props changed)

Modified: head/contrib/sqlite3/configure
==============================================================================
--- head/contrib/sqlite3/configure	Sat Apr 20 21:06:12 2019	(r346458)
+++ head/contrib/sqlite3/configure	Sat Apr 20 23:18:19 2019	(r346459)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.27.1.
+# Generated by GNU Autoconf 2.69 for sqlite 3.27.2.
 #
 # Report bugs to .
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sqlite'
 PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.27.1'
-PACKAGE_STRING='sqlite 3.27.1'
+PACKAGE_VERSION='3.27.2'
+PACKAGE_STRING='sqlite 3.27.2'
 PACKAGE_BUGREPORT='http://www.sqlite.org'
 PACKAGE_URL=''
 
@@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sqlite 3.27.1 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.27.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1412,7 +1412,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sqlite 3.27.1:";;
+     short | recursive ) echo "Configuration of sqlite 3.27.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1537,7 +1537,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sqlite configure 3.27.1
+sqlite configure 3.27.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sqlite $as_me 3.27.1, which was
+It was created by sqlite $as_me 3.27.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2818,7 +2818,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='sqlite'
- VERSION='3.27.1'
+ VERSION='3.27.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sqlite $as_me 3.27.1, which was
+This file was extended by sqlite $as_me 3.27.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14495,7 +14495,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-sqlite config.status 3.27.1
+sqlite config.status 3.27.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: head/contrib/sqlite3/configure.ac
==============================================================================
--- head/contrib/sqlite3/configure.ac	Sat Apr 20 21:06:12 2019	(r346458)
+++ head/contrib/sqlite3/configure.ac	Sat Apr 20 23:18:19 2019	(r346459)
@@ -10,7 +10,7 @@
 #
 
 AC_PREREQ(2.61)
-AC_INIT(sqlite, 3.27.1, http://www.sqlite.org)
+AC_INIT(sqlite, 3.27.2, http://www.sqlite.org)
 AC_CONFIG_SRCDIR([sqlite3.c])
 AC_CONFIG_AUX_DIR([.])
 

Modified: head/contrib/sqlite3/sqlite3.c
==============================================================================
--- head/contrib/sqlite3/sqlite3.c	Sat Apr 20 21:06:12 2019	(r346458)
+++ head/contrib/sqlite3/sqlite3.c	Sat Apr 20 23:18:19 2019	(r346459)
@@ -1,6 +1,6 @@
 /******************************************************************************
 ** This file is an amalgamation of many separate C source files from SQLite
-** version 3.27.1.  By combining all the individual C code files into this
+** version 3.27.2.  By combining all the individual C code files into this
 ** single large file, the entire code can be compiled as a single translation
 ** unit.  This allows many compilers to do optimizations that would not be
 ** possible if the files were compiled separately.  Performance improvements
@@ -1162,9 +1162,9 @@ extern "C" {
 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
 ** [sqlite_version()] and [sqlite_source_id()].
 */
-#define SQLITE_VERSION        "3.27.1"
-#define SQLITE_VERSION_NUMBER 3027001
-#define SQLITE_SOURCE_ID      "2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd"
+#define SQLITE_VERSION        "3.27.2"
+#define SQLITE_VERSION_NUMBER 3027002
+#define SQLITE_SOURCE_ID      "2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7"
 
 /*
 ** CAPI3REF: Run-Time Library Version Numbers
@@ -3408,7 +3408,7 @@ SQLITE_API int sqlite3_changes(sqlite3*);
 ** not. ^Changes to a view that are intercepted by INSTEAD OF triggers 
 ** are not counted.
 **
-** This the [sqlite3_total_changes(D)] interface only reports the number
+** The [sqlite3_total_changes(D)] interface only reports the number
 ** of rows that changed due to SQL statement run against database
 ** connection D.  Any changes by other database connections are ignored.
 ** To detect changes against a database file from other database
@@ -14937,57 +14937,56 @@ typedef struct VdbeOpList VdbeOpList;
 #define OP_Sequence      120 /* synopsis: r[P2]=cursor[P1].ctr++           */
 #define OP_NewRowid      121 /* synopsis: r[P2]=rowid                      */
 #define OP_Insert        122 /* synopsis: intkey=r[P3] data=r[P2]          */
-#define OP_InsertInt     123 /* synopsis: intkey=P3 data=r[P2]             */
-#define OP_Delete        124
-#define OP_ResetCount    125
-#define OP_SorterCompare 126 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
-#define OP_SorterData    127 /* synopsis: r[P2]=data                       */
-#define OP_RowData       128 /* synopsis: r[P2]=data                       */
-#define OP_Rowid         129 /* synopsis: r[P2]=rowid                      */
-#define OP_NullRow       130
-#define OP_SeekEnd       131
-#define OP_SorterInsert  132 /* synopsis: key=r[P2]                        */
-#define OP_IdxInsert     133 /* synopsis: key=r[P2]                        */
-#define OP_IdxDelete     134 /* synopsis: key=r[P2@P3]                     */
-#define OP_DeferredSeek  135 /* synopsis: Move P3 to P1.rowid if needed    */
-#define OP_IdxRowid      136 /* synopsis: r[P2]=rowid                      */
-#define OP_Destroy       137
-#define OP_Clear         138
-#define OP_ResetSorter   139
-#define OP_CreateBtree   140 /* synopsis: r[P2]=root iDb=P1 flags=P3       */
+#define OP_Delete        123
+#define OP_ResetCount    124
+#define OP_SorterCompare 125 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
+#define OP_SorterData    126 /* synopsis: r[P2]=data                       */
+#define OP_RowData       127 /* synopsis: r[P2]=data                       */
+#define OP_Rowid         128 /* synopsis: r[P2]=rowid                      */
+#define OP_NullRow       129
+#define OP_SeekEnd       130
+#define OP_SorterInsert  131 /* synopsis: key=r[P2]                        */
+#define OP_IdxInsert     132 /* synopsis: key=r[P2]                        */
+#define OP_IdxDelete     133 /* synopsis: key=r[P2@P3]                     */
+#define OP_DeferredSeek  134 /* synopsis: Move P3 to P1.rowid if needed    */
+#define OP_IdxRowid      135 /* synopsis: r[P2]=rowid                      */
+#define OP_Destroy       136
+#define OP_Clear         137
+#define OP_ResetSorter   138
+#define OP_CreateBtree   139 /* synopsis: r[P2]=root iDb=P1 flags=P3       */
+#define OP_SqlExec       140
 #define OP_Real          141 /* same as TK_FLOAT, synopsis: r[P2]=P4       */
-#define OP_SqlExec       142
-#define OP_ParseSchema   143
-#define OP_LoadAnalysis  144
-#define OP_DropTable     145
-#define OP_DropIndex     146
-#define OP_DropTrigger   147
-#define OP_IntegrityCk   148
-#define OP_RowSetAdd     149 /* synopsis: rowset(P1)=r[P2]                 */
-#define OP_Param         150
-#define OP_FkCounter     151 /* synopsis: fkctr[P1]+=P2                    */
-#define OP_MemMax        152 /* synopsis: r[P1]=max(r[P1],r[P2])           */
-#define OP_OffsetLimit   153 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */
-#define OP_AggInverse    154 /* synopsis: accum=r[P3] inverse(r[P2@P5])    */
-#define OP_AggStep       155 /* synopsis: accum=r[P3] step(r[P2@P5])       */
-#define OP_AggStep1      156 /* synopsis: accum=r[P3] step(r[P2@P5])       */
-#define OP_AggValue      157 /* synopsis: r[P3]=value N=P2                 */
-#define OP_AggFinal      158 /* synopsis: accum=r[P1] N=P2                 */
-#define OP_Expire        159
-#define OP_TableLock     160 /* synopsis: iDb=P1 root=P2 write=P3          */
-#define OP_VBegin        161
-#define OP_VCreate       162
-#define OP_VDestroy      163
-#define OP_VOpen         164
-#define OP_VColumn       165 /* synopsis: r[P3]=vcolumn(P2)                */
-#define OP_VRename       166
-#define OP_Pagecount     167
-#define OP_MaxPgcnt      168
-#define OP_Trace         169
-#define OP_CursorHint    170
-#define OP_Noop          171
-#define OP_Explain       172
-#define OP_Abortable     173
+#define OP_ParseSchema   142
+#define OP_LoadAnalysis  143
+#define OP_DropTable     144
+#define OP_DropIndex     145
+#define OP_DropTrigger   146
+#define OP_IntegrityCk   147
+#define OP_RowSetAdd     148 /* synopsis: rowset(P1)=r[P2]                 */
+#define OP_Param         149
+#define OP_FkCounter     150 /* synopsis: fkctr[P1]+=P2                    */
+#define OP_MemMax        151 /* synopsis: r[P1]=max(r[P1],r[P2])           */
+#define OP_OffsetLimit   152 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */
+#define OP_AggInverse    153 /* synopsis: accum=r[P3] inverse(r[P2@P5])    */
+#define OP_AggStep       154 /* synopsis: accum=r[P3] step(r[P2@P5])       */
+#define OP_AggStep1      155 /* synopsis: accum=r[P3] step(r[P2@P5])       */
+#define OP_AggValue      156 /* synopsis: r[P3]=value N=P2                 */
+#define OP_AggFinal      157 /* synopsis: accum=r[P1] N=P2                 */
+#define OP_Expire        158
+#define OP_TableLock     159 /* synopsis: iDb=P1 root=P2 write=P3          */
+#define OP_VBegin        160
+#define OP_VCreate       161
+#define OP_VDestroy      162
+#define OP_VOpen         163
+#define OP_VColumn       164 /* synopsis: r[P3]=vcolumn(P2)                */
+#define OP_VRename       165
+#define OP_Pagecount     166
+#define OP_MaxPgcnt      167
+#define OP_Trace         168
+#define OP_CursorHint    169
+#define OP_Noop          170
+#define OP_Explain       171
+#define OP_Abortable     172
 
 /* Properties such as "out2" or "jump" that are specified in
 ** comments following the "case" for each opcode in the vdbe.c
@@ -15016,12 +15015,12 @@ typedef struct VdbeOpList VdbeOpList;
 /* 104 */ 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\
 /* 112 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
 /* 120 */ 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
-/* 128 */ 0x00, 0x10, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00,\
-/* 136 */ 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\
-/* 144 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00,\
-/* 152 */ 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
-/* 160 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,\
-/* 168 */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,}
+/* 128 */ 0x10, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x10,\
+/* 136 */ 0x10, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00,\
+/* 144 */ 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x04,\
+/* 152 */ 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+/* 160 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10,\
+/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00,}
 
 /* The sqlite3P2Values() routine is able to run faster if it knows
 ** the value of the largest JUMP opcode.  The smaller the maximum
@@ -19174,7 +19173,7 @@ SQLITE_PRIVATE void sqlite3AlterRenameColumn(Parse*, S
 SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
 SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*, int);
-SQLITE_PRIVATE void sqlite3CodeRhsOfIN(Parse*, Expr*, int, int);
+SQLITE_PRIVATE void sqlite3CodeRhsOfIN(Parse*, Expr*, int);
 SQLITE_PRIVATE int sqlite3CodeSubselect(Parse*, Expr*);
 SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
 SQLITE_PRIVATE void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p);
@@ -32139,57 +32138,56 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
     /* 120 */ "Sequence"         OpHelp("r[P2]=cursor[P1].ctr++"),
     /* 121 */ "NewRowid"         OpHelp("r[P2]=rowid"),
     /* 122 */ "Insert"           OpHelp("intkey=r[P3] data=r[P2]"),
-    /* 123 */ "InsertInt"        OpHelp("intkey=P3 data=r[P2]"),
-    /* 124 */ "Delete"           OpHelp(""),
-    /* 125 */ "ResetCount"       OpHelp(""),
-    /* 126 */ "SorterCompare"    OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
-    /* 127 */ "SorterData"       OpHelp("r[P2]=data"),
-    /* 128 */ "RowData"          OpHelp("r[P2]=data"),
-    /* 129 */ "Rowid"            OpHelp("r[P2]=rowid"),
-    /* 130 */ "NullRow"          OpHelp(""),
-    /* 131 */ "SeekEnd"          OpHelp(""),
-    /* 132 */ "SorterInsert"     OpHelp("key=r[P2]"),
-    /* 133 */ "IdxInsert"        OpHelp("key=r[P2]"),
-    /* 134 */ "IdxDelete"        OpHelp("key=r[P2@P3]"),
-    /* 135 */ "DeferredSeek"     OpHelp("Move P3 to P1.rowid if needed"),
-    /* 136 */ "IdxRowid"         OpHelp("r[P2]=rowid"),
-    /* 137 */ "Destroy"          OpHelp(""),
-    /* 138 */ "Clear"            OpHelp(""),
-    /* 139 */ "ResetSorter"      OpHelp(""),
-    /* 140 */ "CreateBtree"      OpHelp("r[P2]=root iDb=P1 flags=P3"),
+    /* 123 */ "Delete"           OpHelp(""),
+    /* 124 */ "ResetCount"       OpHelp(""),
+    /* 125 */ "SorterCompare"    OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
+    /* 126 */ "SorterData"       OpHelp("r[P2]=data"),
+    /* 127 */ "RowData"          OpHelp("r[P2]=data"),
+    /* 128 */ "Rowid"            OpHelp("r[P2]=rowid"),
+    /* 129 */ "NullRow"          OpHelp(""),
+    /* 130 */ "SeekEnd"          OpHelp(""),
+    /* 131 */ "SorterInsert"     OpHelp("key=r[P2]"),
+    /* 132 */ "IdxInsert"        OpHelp("key=r[P2]"),
+    /* 133 */ "IdxDelete"        OpHelp("key=r[P2@P3]"),
+    /* 134 */ "DeferredSeek"     OpHelp("Move P3 to P1.rowid if needed"),
+    /* 135 */ "IdxRowid"         OpHelp("r[P2]=rowid"),
+    /* 136 */ "Destroy"          OpHelp(""),
+    /* 137 */ "Clear"            OpHelp(""),
+    /* 138 */ "ResetSorter"      OpHelp(""),
+    /* 139 */ "CreateBtree"      OpHelp("r[P2]=root iDb=P1 flags=P3"),
+    /* 140 */ "SqlExec"          OpHelp(""),
     /* 141 */ "Real"             OpHelp("r[P2]=P4"),
-    /* 142 */ "SqlExec"          OpHelp(""),
-    /* 143 */ "ParseSchema"      OpHelp(""),
-    /* 144 */ "LoadAnalysis"     OpHelp(""),
-    /* 145 */ "DropTable"        OpHelp(""),
-    /* 146 */ "DropIndex"        OpHelp(""),
-    /* 147 */ "DropTrigger"      OpHelp(""),
-    /* 148 */ "IntegrityCk"      OpHelp(""),
-    /* 149 */ "RowSetAdd"        OpHelp("rowset(P1)=r[P2]"),
-    /* 150 */ "Param"            OpHelp(""),
-    /* 151 */ "FkCounter"        OpHelp("fkctr[P1]+=P2"),
-    /* 152 */ "MemMax"           OpHelp("r[P1]=max(r[P1],r[P2])"),
-    /* 153 */ "OffsetLimit"      OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"),
-    /* 154 */ "AggInverse"       OpHelp("accum=r[P3] inverse(r[P2@P5])"),
-    /* 155 */ "AggStep"          OpHelp("accum=r[P3] step(r[P2@P5])"),
-    /* 156 */ "AggStep1"         OpHelp("accum=r[P3] step(r[P2@P5])"),
-    /* 157 */ "AggValue"         OpHelp("r[P3]=value N=P2"),
-    /* 158 */ "AggFinal"         OpHelp("accum=r[P1] N=P2"),
-    /* 159 */ "Expire"           OpHelp(""),
-    /* 160 */ "TableLock"        OpHelp("iDb=P1 root=P2 write=P3"),
-    /* 161 */ "VBegin"           OpHelp(""),
-    /* 162 */ "VCreate"          OpHelp(""),
-    /* 163 */ "VDestroy"         OpHelp(""),
-    /* 164 */ "VOpen"            OpHelp(""),
-    /* 165 */ "VColumn"          OpHelp("r[P3]=vcolumn(P2)"),
-    /* 166 */ "VRename"          OpHelp(""),
-    /* 167 */ "Pagecount"        OpHelp(""),
-    /* 168 */ "MaxPgcnt"         OpHelp(""),
-    /* 169 */ "Trace"            OpHelp(""),
-    /* 170 */ "CursorHint"       OpHelp(""),
-    /* 171 */ "Noop"             OpHelp(""),
-    /* 172 */ "Explain"          OpHelp(""),
-    /* 173 */ "Abortable"        OpHelp(""),
+    /* 142 */ "ParseSchema"      OpHelp(""),
+    /* 143 */ "LoadAnalysis"     OpHelp(""),
+    /* 144 */ "DropTable"        OpHelp(""),
+    /* 145 */ "DropIndex"        OpHelp(""),
+    /* 146 */ "DropTrigger"      OpHelp(""),
+    /* 147 */ "IntegrityCk"      OpHelp(""),
+    /* 148 */ "RowSetAdd"        OpHelp("rowset(P1)=r[P2]"),
+    /* 149 */ "Param"            OpHelp(""),
+    /* 150 */ "FkCounter"        OpHelp("fkctr[P1]+=P2"),
+    /* 151 */ "MemMax"           OpHelp("r[P1]=max(r[P1],r[P2])"),
+    /* 152 */ "OffsetLimit"      OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"),
+    /* 153 */ "AggInverse"       OpHelp("accum=r[P3] inverse(r[P2@P5])"),
+    /* 154 */ "AggStep"          OpHelp("accum=r[P3] step(r[P2@P5])"),
+    /* 155 */ "AggStep1"         OpHelp("accum=r[P3] step(r[P2@P5])"),
+    /* 156 */ "AggValue"         OpHelp("r[P3]=value N=P2"),
+    /* 157 */ "AggFinal"         OpHelp("accum=r[P1] N=P2"),
+    /* 158 */ "Expire"           OpHelp(""),
+    /* 159 */ "TableLock"        OpHelp("iDb=P1 root=P2 write=P3"),
+    /* 160 */ "VBegin"           OpHelp(""),
+    /* 161 */ "VCreate"          OpHelp(""),
+    /* 162 */ "VDestroy"         OpHelp(""),
+    /* 163 */ "VOpen"            OpHelp(""),
+    /* 164 */ "VColumn"          OpHelp("r[P3]=vcolumn(P2)"),
+    /* 165 */ "VRename"          OpHelp(""),
+    /* 166 */ "Pagecount"        OpHelp(""),
+    /* 167 */ "MaxPgcnt"         OpHelp(""),
+    /* 168 */ "Trace"            OpHelp(""),
+    /* 169 */ "CursorHint"       OpHelp(""),
+    /* 170 */ "Noop"             OpHelp(""),
+    /* 171 */ "Explain"          OpHelp(""),
+    /* 172 */ "Abortable"        OpHelp(""),
   };
   return azName[i];
 }
@@ -87935,14 +87933,7 @@ case OP_NewRowid: {           /* out2 */
 ** This instruction only works on tables.  The equivalent instruction
 ** for indices is OP_IdxInsert.
 */
-/* Opcode: InsertInt P1 P2 P3 P4 P5
-** Synopsis: intkey=P3 data=r[P2]
-**
-** This works exactly like OP_Insert except that the key is the
-** integer value P3, not the value of the integer stored in register P3.
-*/
-case OP_Insert: 
-case OP_InsertInt: {
+case OP_Insert: {
   Mem *pData;       /* MEM cell holding data for the record to be inserted */
   Mem *pKey;        /* MEM cell holding key  for the record */
   VdbeCursor *pC;   /* Cursor to table into which insert is written */
@@ -87963,16 +87954,11 @@ case OP_InsertInt: {
   REGISTER_TRACE(pOp->p2, pData);
   sqlite3VdbeIncrWriteCounter(p, pC);
 
-  if( pOp->opcode==OP_Insert ){
-    pKey = &aMem[pOp->p3];
-    assert( pKey->flags & MEM_Int );
-    assert( memIsValid(pKey) );
-    REGISTER_TRACE(pOp->p3, pKey);
-    x.nKey = pKey->u.i;
-  }else{
-    assert( pOp->opcode==OP_InsertInt );
-    x.nKey = pOp->p3;
-  }
+  pKey = &aMem[pOp->p3];
+  assert( pKey->flags & MEM_Int );
+  assert( memIsValid(pKey) );
+  REGISTER_TRACE(pOp->p3, pKey);
+  x.nKey = pKey->u.i;
 
   if( pOp->p4type==P4_TABLE && HAS_UPDATE_HOOK(db) ){
     assert( pC->iDb>=0 );
@@ -96131,7 +96117,39 @@ SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(
   return 0;
 }
 
+#ifndef SQLITE_OMIT_WINDOWFUNC
 /*
+** Walker callback for resolveRemoveWindows().
+*/
+static int resolveRemoveWindowsCb(Walker *pWalker, Expr *pExpr){
+  if( ExprHasProperty(pExpr, EP_WinFunc) ){
+    Window **pp;
+    for(pp=&pWalker->u.pSelect->pWin; *pp; pp=&(*pp)->pNextWin){
+      if( *pp==pExpr->y.pWin ){
+        *pp = (*pp)->pNextWin;
+        break;
+      }    
+    }
+  }
+  return WRC_Continue;
+}
+
+/*
+** Remove any Window objects owned by the expression pExpr from the
+** Select.pWin list of Select object pSelect.
+*/
+static void resolveRemoveWindows(Select *pSelect, Expr *pExpr){
+  Walker sWalker;
+  memset(&sWalker, 0, sizeof(Walker));
+  sWalker.xExprCallback = resolveRemoveWindowsCb;
+  sWalker.u.pSelect = pSelect;
+  sqlite3WalkExpr(&sWalker, pExpr);
+}
+#else
+# define resolveRemoveWindows(x,y)
+#endif
+
+/*
 ** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.
 ** The Name context of the SELECT statement is pNC.  zType is either
 ** "ORDER" or "GROUP" depending on which type of clause pOrderBy is.
@@ -96197,19 +96215,10 @@ static int resolveOrderGroupBy(
     }
     for(j=0; jpEList->nExpr; j++){
       if( sqlite3ExprCompare(0, pE, pSelect->pEList->a[j].pExpr, -1)==0 ){
-#ifndef SQLITE_OMIT_WINDOWFUNC
-        if( ExprHasProperty(pE, EP_WinFunc) ){
-          /* Since this window function is being changed into a reference
-          ** to the same window function the result set, remove the instance
-          ** of this window function from the Select.pWin list. */
-          Window **pp;
-          for(pp=&pSelect->pWin; *pp; pp=&(*pp)->pNextWin){
-            if( *pp==pE->y.pWin ){
-              *pp = (*pp)->pNextWin;
-            }    
-          }
-        }
-#endif
+        /* Since this expresion is being changed into a reference
+        ** to an identical expression in the result set, remove all Window
+        ** objects belonging to the expression from the Select.pWin list. */
+        resolveRemoveWindows(pSelect, pE);
         pItem->u.x.iOrderByCol = j+1;
       }
     }
@@ -99181,14 +99190,11 @@ SQLITE_PRIVATE int sqlite3FindInIndex(
     eType = IN_INDEX_EPH;
     if( inFlags & IN_INDEX_LOOP ){
       pParse->nQueryLoop = 0;
-      if( pX->pLeft->iColumn<0 && !ExprHasProperty(pX, EP_xIsSelect) ){
-        eType = IN_INDEX_ROWID;
-      }
     }else if( prRhsHasNull ){
       *prRhsHasNull = rMayHaveNull = ++pParse->nMem;
     }
     assert( pX->op==TK_IN );
-    sqlite3CodeRhsOfIN(pParse, pX, iTab, eType==IN_INDEX_ROWID);
+    sqlite3CodeRhsOfIN(pParse, pX, iTab);
     if( rMayHaveNull ){
       sqlite3SetHasNullFlag(v, iTab, rMayHaveNull);
     }
@@ -99289,12 +99295,6 @@ SQLITE_PRIVATE void sqlite3VectorErrorMsg(Parse *pPars
 ** however the cursor number returned might not be the same, as it might
 ** have been duplicated using OP_OpenDup.
 **
-** If parameter isRowid is non-zero, then LHS of the IN operator is guaranteed
-** to be a non-null integer. In this case, the ephemeral table can be an
-** table B-Tree that keyed by only integers.  The more general cases uses
-** an index B-Tree which can have arbitrary keys, but is slower to both
-** read and write.
-**
 ** If the LHS expression ("x" in the examples) is a column value, or
 ** the SELECT statement returns a column value, then the affinity of that
 ** column is used to build the index keys. If both 'x' and the
@@ -99306,8 +99306,7 @@ SQLITE_PRIVATE void sqlite3VectorErrorMsg(Parse *pPars
 SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
   Parse *pParse,          /* Parsing context */
   Expr *pExpr,            /* The IN operator */
-  int iTab,               /* Use this cursor number */
-  int isRowid             /* If true, LHS is a rowid */
+  int iTab                /* Use this cursor number */
 ){
   int addrOnce = 0;           /* Address of the OP_Once instruction at top */
   int addr;                   /* Address of OP_OpenEphemeral instruction */
@@ -99360,14 +99359,12 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
   /* Check to see if this is a vector IN operator */
   pLeft = pExpr->pLeft;
   nVal = sqlite3ExprVectorSize(pLeft);
-  assert( !isRowid || nVal==1 );
 
   /* Construct the ephemeral table that will contain the content of
   ** RHS of the IN operator.
   */
   pExpr->iTable = iTab;
-  addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, 
-      pExpr->iTable, (isRowid?0:nVal));
+  addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, nVal);
 #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
   if( ExprHasProperty(pExpr, EP_xIsSelect) ){
     VdbeComment((v, "Result of SELECT %u", pExpr->x.pSelect->selId));
@@ -99375,7 +99372,7 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
     VdbeComment((v, "RHS of IN operator"));
   }
 #endif
-  pKeyInfo = isRowid ? 0 : sqlite3KeyInfoAlloc(pParse->db, nVal, 1);
+  pKeyInfo = sqlite3KeyInfoAlloc(pParse->db, nVal, 1);
 
   if( ExprHasProperty(pExpr, EP_xIsSelect) ){
     /* Case 1:     expr IN (SELECT ...)
@@ -99389,7 +99386,6 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
     ExplainQueryPlan((pParse, 1, "%sLIST SUBQUERY %d",
         addrOnce?"":"CORRELATED ", pSelect->selId
     ));
-    assert( !isRowid );
     /* If the LHS and RHS of the IN operator do not match, that
     ** error will have been caught long before we reach this point. */
     if( ALWAYS(pEList->nExpr==nVal) ){
@@ -99442,10 +99438,8 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
     /* Loop through each expression in . */
     r1 = sqlite3GetTempReg(pParse);
     r2 = sqlite3GetTempReg(pParse);
-    if( isRowid ) sqlite3VdbeAddOp4(v, OP_Blob, 0, r2, 0, "", P4_STATIC);
     for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
       Expr *pE2 = pItem->pExpr;
-      int iValToIns;
 
       /* If the expression is not constant then we will need to
       ** disable the test that was generated above that makes sure
@@ -99458,20 +99452,9 @@ SQLITE_PRIVATE void sqlite3CodeRhsOfIN(
       }
 
       /* Evaluate the expression and insert it into the temp table */
-      if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
-        sqlite3VdbeAddOp3(v, OP_InsertInt, iTab, r2, iValToIns);
-      }else{
-        r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
-        if( isRowid ){
-          sqlite3VdbeAddOp2(v, OP_MustBeInt, r3,
-                            sqlite3VdbeCurrentAddr(v)+2);
-          VdbeCoverage(v);
-          sqlite3VdbeAddOp3(v, OP_Insert, iTab, r2, r3);
-        }else{
-          sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
-          sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r2, r3, 1);
-        }
-      }
+      r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
+      sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
+      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r2, r3, 1);
     }
     sqlite3ReleaseTempReg(pParse, r1);
     sqlite3ReleaseTempReg(pParse, r2);
@@ -118107,10 +118090,13 @@ SQLITE_PRIVATE void sqlite3CompleteInsertion(
       pik_flags |= (update_flags & OPFLAG_SAVEPOSITION);
 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
       if( update_flags==0 ){
-        sqlite3VdbeAddOp4(v, OP_InsertInt, 
-            iIdxCur+i, aRegIdx[i], 0, (char*)pTab, P4_TABLE
+        int r = sqlite3GetTempReg(pParse);
+        sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
+        sqlite3VdbeAddOp4(v, OP_Insert, 
+            iIdxCur+i, aRegIdx[i], r, (char*)pTab, P4_TABLE
         );
         sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
+        sqlite3ReleaseTempReg(pParse, r);
       }
 #endif
     }
@@ -136427,7 +136413,6 @@ static int codeEqualityTerm(
         if( pLoop->aLTerm[i]->pExpr==pX ){
           int iOut = iReg + i - iEq;
           if( eType==IN_INDEX_ROWID ){
-            testcase( nEq>1 );  /* Happens with a UNIQUE index on ROWID */
             pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iOut);
           }else{
             int iCol = aiMap ? aiMap[iMap++] : 0;
@@ -137189,6 +137174,9 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart(
     sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg);
     VdbeCoverage(v);
     pLevel->op = OP_Noop;
+    if( (pTerm->prereqAll & pLevel->notReady)==0 ){
+      pTerm->wtFlags |= TERM_CODED;
+    }
   }else if( (pLoop->wsFlags & WHERE_IPK)!=0
          && (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0
   ){
@@ -217076,7 +217064,7 @@ static void fts5SourceIdFunc(
 ){
   assert( nArg==0 );
   UNUSED_PARAM2(nArg, apUnused);
-  sqlite3_result_text(pCtx, "fts5: 2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd", -1, SQLITE_TRANSIENT);
+  sqlite3_result_text(pCtx, "fts5: 2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7", -1, SQLITE_TRANSIENT);
 }
 
 /*
@@ -221840,9 +221828,9 @@ SQLITE_API int sqlite3_stmt_init(
 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
 
 /************** End of stmt.c ************************************************/
-#if __LINE__!=221843
+#if __LINE__!=221831
 #undef SQLITE_SOURCE_ID
-#define SQLITE_SOURCE_ID      "2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959alt2"
+#define SQLITE_SOURCE_ID      "2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt2"
 #endif
 /* Return the source-id for this library */
 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }

Modified: head/contrib/sqlite3/sqlite3.h
==============================================================================
--- head/contrib/sqlite3/sqlite3.h	Sat Apr 20 21:06:12 2019	(r346458)
+++ head/contrib/sqlite3/sqlite3.h	Sat Apr 20 23:18:19 2019	(r346459)
@@ -123,9 +123,9 @@ extern "C" {
 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
 ** [sqlite_version()] and [sqlite_source_id()].
 */
-#define SQLITE_VERSION        "3.27.1"
-#define SQLITE_VERSION_NUMBER 3027001
-#define SQLITE_SOURCE_ID      "2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd"
+#define SQLITE_VERSION        "3.27.2"
+#define SQLITE_VERSION_NUMBER 3027002
+#define SQLITE_SOURCE_ID      "2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7"
 
 /*
 ** CAPI3REF: Run-Time Library Version Numbers
@@ -2369,7 +2369,7 @@ SQLITE_API int sqlite3_changes(sqlite3*);
 ** not. ^Changes to a view that are intercepted by INSTEAD OF triggers 
 ** are not counted.
 **
-** This the [sqlite3_total_changes(D)] interface only reports the number
+** The [sqlite3_total_changes(D)] interface only reports the number
 ** of rows that changed due to SQL statement run against database
 ** connection D.  Any changes by other database connections are ignored.
 ** To detect changes against a database file from other database

Modified: head/contrib/sqlite3/tea/configure
==============================================================================
--- head/contrib/sqlite3/tea/configure	Sat Apr 20 21:06:12 2019	(r346458)
+++ head/contrib/sqlite3/tea/configure	Sat Apr 20 23:18:19 2019	(r346459)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.27.1.
+# Generated by GNU Autoconf 2.69 for sqlite 3.27.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sqlite'
 PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.27.1'
-PACKAGE_STRING='sqlite 3.27.1'
+PACKAGE_VERSION='3.27.2'
+PACKAGE_STRING='sqlite 3.27.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sqlite 3.27.1 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.27.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1365,7 +1365,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sqlite 3.27.1:";;
+     short | recursive ) echo "Configuration of sqlite 3.27.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1467,7 +1467,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sqlite configure 3.27.1
+sqlite configure 3.27.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1878,7 +1878,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sqlite $as_me 3.27.1, which was
+It was created by sqlite $as_me 3.27.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -9373,7 +9373,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sqlite $as_me 3.27.1, which was
+This file was extended by sqlite $as_me 3.27.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9426,7 +9426,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-sqlite config.status 3.27.1
+sqlite config.status 3.27.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: head/contrib/sqlite3/tea/configure.ac
==============================================================================
--- head/contrib/sqlite3/tea/configure.ac	Sat Apr 20 21:06:12 2019	(r346458)
+++ head/contrib/sqlite3/tea/configure.ac	Sat Apr 20 23:18:19 2019	(r346459)
@@ -19,7 +19,7 @@ dnl	to configure the system for the local environment.
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([sqlite], [3.27.1])
+AC_INIT([sqlite], [3.27.2])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.

From owner-svn-src-all@freebsd.org  Sat Apr 20 23:46:08 2019
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E54B15794D8;
 Sat, 20 Apr 2019 23:46:08 +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 2DF7A77A3E;
 Sat, 20 Apr 2019 23:46:08 +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 EC49B1D408;
 Sat, 20 Apr 2019 23:46:07 +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 x3KNk7Hk094276;
 Sat, 20 Apr 2019 23:46:07 GMT (envelope-from rmacklem@FreeBSD.org)
Received: (from rmacklem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KNk6br094271;
 Sat, 20 Apr 2019 23:46:06 GMT (envelope-from rmacklem@FreeBSD.org)
Message-Id: <201904202346.x3KNk6br094271@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to
 rmacklem@FreeBSD.org using -f
From: Rick Macklem 
Date: Sat, 20 Apr 2019 23:46: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: r346460 - in stable/12/sys: fs/nfs modules/nfscommon
X-SVN-Group: stable-12
X-SVN-Commit-Author: rmacklem
X-SVN-Commit-Paths: in stable/12/sys: fs/nfs modules/nfscommon
X-SVN-Commit-Revision: 346460
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 2DF7A77A3E
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.96 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_SHORT(-0.96)[-0.963,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 20 Apr 2019 23:46:08 -0000

Author: rmacklem
Date: Sat Apr 20 23:46:06 2019
New Revision: 346460
URL: https://svnweb.freebsd.org/changeset/base/346460

Log:
  MFC: r345992, r346087
  Add INET6 support for the upcalls to the nfsuserd daemon.
  
  The kernel code uses UDP to do upcalls to the nfsuserd(8) daemon to get
  updates to the username<->uid and groupname<->gid mappings.
  A change to AF_LOCAL last year had to be reverted, since it could result
  in vnode locking issues on the AF_LOCAL socket.
  This patch adds INET6 support and the required #ifdef INET and INET6
  to the code.
  This patch also reverts the unused AF_LOCAL socket code.

Modified:
  stable/12/sys/fs/nfs/nfs.h
  stable/12/sys/fs/nfs/nfs_commonport.c
  stable/12/sys/fs/nfs/nfs_commonsubs.c
  stable/12/sys/fs/nfs/nfs_var.h
  stable/12/sys/modules/nfscommon/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/fs/nfs/nfs.h
==============================================================================
--- stable/12/sys/fs/nfs/nfs.h	Sat Apr 20 23:18:19 2019	(r346459)
+++ stable/12/sys/fs/nfs/nfs.h	Sat Apr 20 23:46:06 2019	(r346460)
@@ -252,6 +252,11 @@ struct nfsd_oidargs {
 	int		nid_namelen;	/* and its length */
 };
 
+struct nfsuserd_args {
+	sa_family_t	nuserd_family;	/* Address family to use */
+	u_short		nuserd_port;	/* Port# */
+};
+
 struct nfsd_clid {
 	int		nclid_idlen;	/* Length of client id */
 	u_char		nclid_id[NFSV4_OPAQUELIMIT]; /* and name */

Modified: stable/12/sys/fs/nfs/nfs_commonport.c
==============================================================================
--- stable/12/sys/fs/nfs/nfs_commonport.c	Sat Apr 20 23:18:19 2019	(r346459)
+++ stable/12/sys/fs/nfs/nfs_commonport.c	Sat Apr 20 23:46:06 2019	(r346460)
@@ -631,30 +631,24 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap,
 		goto out;
 	} else if (uap->flag & NFSSVC_NFSUSERDPORT) {
 		u_short sockport;
-		struct sockaddr *sad;
-		struct sockaddr_un *sun;
+		struct nfsuserd_args nargs;
 
-		if ((uap->flag & NFSSVC_NEWSTRUCT) != 0) {
-			/* New nfsuserd using an AF_LOCAL socket. */
-			sun = malloc(sizeof(struct sockaddr_un), M_SONAME,
-			    M_WAITOK | M_ZERO);
-			error = copyinstr(uap->argp, sun->sun_path,
-			    sizeof(sun->sun_path), NULL);
-			if (error != 0) {
-				free(sun, M_SONAME);
-				return (error);
-			}
-		        sun->sun_family = AF_LOCAL;
-		        sun->sun_len = SUN_LEN(sun);
-			sockport = 0;
-			sad = (struct sockaddr *)sun;
-		} else {
+		if ((uap->flag & NFSSVC_NEWSTRUCT) == 0) {
 			error = copyin(uap->argp, (caddr_t)&sockport,
 			    sizeof (u_short));
-			sad = NULL;
+			if (error == 0) {
+				nargs.nuserd_family = AF_INET;
+				nargs.nuserd_port = sockport;
+			}
+		} else {
+			/*
+			 * New nfsuserd_args structure, which indicates
+			 * which IP version to use along with the port#.
+			 */
+			error = copyin(uap->argp, &nargs, sizeof(nargs));
 		}
-		if (error == 0)
-			error = nfsrv_nfsuserdport(sad, sockport, p);
+		if (!error)
+			error = nfsrv_nfsuserdport(&nargs, p);
 	} else if (uap->flag & NFSSVC_NFSUSERDDELPORT) {
 		nfsrv_nfsuserddelport();
 		error = 0;

Modified: stable/12/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- stable/12/sys/fs/nfs/nfs_commonsubs.c	Sat Apr 20 23:18:19 2019	(r346459)
+++ stable/12/sys/fs/nfs/nfs_commonsubs.c	Sat Apr 20 23:46:06 2019	(r346460)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
  * copy data between mbuf chains and uio lists.
  */
 #ifndef APPLEKEXT
+#include "opt_inet.h"
 #include "opt_inet6.h"
 
 #include 
@@ -3510,17 +3511,22 @@ nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len)
  * Set the port for the nfsuserd.
  */
 APPLESTATIC int
-nfsrv_nfsuserdport(struct sockaddr *sad, u_short port, NFSPROC_T *p)
+nfsrv_nfsuserdport(struct nfsuserd_args *nargs, NFSPROC_T *p)
 {
 	struct nfssockreq *rp;
+#ifdef INET
 	struct sockaddr_in *ad;
+#endif
+#ifdef INET6
+	struct sockaddr_in6 *ad6;
+	const struct in6_addr in6loopback = IN6ADDR_LOOPBACK_INIT;
+#endif
 	int error;
 
 	NFSLOCKNAMEID();
 	if (nfsrv_nfsuserd) {
 		NFSUNLOCKNAMEID();
 		error = EPERM;
-		free(sad, M_SONAME);
 		goto out;
 	}
 	nfsrv_nfsuserd = 1;
@@ -3530,28 +3536,41 @@ nfsrv_nfsuserdport(struct sockaddr *sad, u_short port,
 	 */
 	rp = &nfsrv_nfsuserdsock;
 	rp->nr_client = NULL;
-	rp->nr_cred = NULL;
+	rp->nr_sotype = SOCK_DGRAM;
+	rp->nr_soproto = IPPROTO_UDP;
 	rp->nr_lock = (NFSR_RESERVEDPORT | NFSR_LOCALHOST);
-	if (sad != NULL) {
-		/* Use the AF_LOCAL socket address passed in. */
-		rp->nr_sotype = SOCK_STREAM;
-		rp->nr_soproto = 0;
-		rp->nr_nam = sad;
-	} else {
-		/* Use the port# for a UDP socket (old nfsuserd). */
-		rp->nr_sotype = SOCK_DGRAM;
-		rp->nr_soproto = IPPROTO_UDP;
-		rp->nr_nam = malloc(sizeof(*rp->nr_nam), M_SONAME, M_WAITOK |
-		    M_ZERO);
-		NFSSOCKADDRSIZE(rp->nr_nam, sizeof (struct sockaddr_in));
-		ad = NFSSOCKADDR(rp->nr_nam, struct sockaddr_in *);
-		ad->sin_family = AF_INET;
-		ad->sin_addr.s_addr = htonl((u_int32_t)0x7f000001);
-		ad->sin_port = port;
-	}
+	rp->nr_cred = NULL;
 	rp->nr_prog = RPCPROG_NFSUSERD;
+	error = 0;
+	switch (nargs->nuserd_family) {
+#ifdef INET
+	case AF_INET:
+		rp->nr_nam = malloc(sizeof(struct sockaddr_in), M_SONAME,
+		    M_WAITOK | M_ZERO);
+ 		ad = (struct sockaddr_in *)rp->nr_nam;
+		ad->sin_len = sizeof(struct sockaddr_in);
+ 		ad->sin_family = AF_INET;
+		ad->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+		ad->sin_port = nargs->nuserd_port;
+		break;
+#endif
+#ifdef INET6
+	case AF_INET6:
+		rp->nr_nam = malloc(sizeof(struct sockaddr_in6), M_SONAME,
+		    M_WAITOK | M_ZERO);
+		ad6 = (struct sockaddr_in6 *)rp->nr_nam;
+		ad6->sin6_len = sizeof(struct sockaddr_in6);
+		ad6->sin6_family = AF_INET6;
+		ad6->sin6_addr = in6loopback;
+		ad6->sin6_port = nargs->nuserd_port;
+		break;
+#endif
+	default:
+		error = ENXIO;
+ 	}
 	rp->nr_vers = RPCNFSUSERD_VERS;
-	error = newnfs_connect(NULL, rp, NFSPROCCRED(p), p, 0);
+	if (error == 0)
+		error = newnfs_connect(NULL, rp, NFSPROCCRED(p), p, 0);
 	if (error) {
 		free(rp->nr_nam, M_SONAME);
 		nfsrv_nfsuserd = 0;

Modified: stable/12/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/12/sys/fs/nfs/nfs_var.h	Sat Apr 20 23:18:19 2019	(r346459)
+++ stable/12/sys/fs/nfs/nfs_var.h	Sat Apr 20 23:46:06 2019	(r346460)
@@ -136,7 +136,7 @@ int nfsrv_checksetattr(vnode_t, struct nfsrv_descript 
     NFSPROC_T *);
 int nfsrv_checkgetattr(struct nfsrv_descript *, vnode_t,
     struct nfsvattr *, nfsattrbit_t *, NFSPROC_T *);
-int nfsrv_nfsuserdport(struct sockaddr *, u_short, NFSPROC_T *);
+int nfsrv_nfsuserdport(struct nfsuserd_args *, NFSPROC_T *);
 void nfsrv_nfsuserddelport(void);
 void nfsrv_throwawayallstate(NFSPROC_T *);
 int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *,

Modified: stable/12/sys/modules/nfscommon/Makefile
==============================================================================
--- stable/12/sys/modules/nfscommon/Makefile	Sat Apr 20 23:18:19 2019	(r346459)
+++ stable/12/sys/modules/nfscommon/Makefile	Sat Apr 20 23:46:06 2019	(r346460)
@@ -7,6 +7,7 @@ SRCS=	vnode_if.h \
 	nfs_commonkrpc.c \
 	nfs_commonport.c \
 	nfs_commonsubs.c \
+	opt_inet.h \
 	opt_inet6.h \
 	opt_kgssapi.h \
 	opt_nfs.h \