From owner-svn-src-all@freebsd.org Sun Apr 15 01:31:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABDC1F84DD5; Sun, 15 Apr 2018 01:31:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 416EB70C9D; Sun, 15 Apr 2018 01:31:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22a.google.com with SMTP id h9so630598iob.5; Sat, 14 Apr 2018 18:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=efd/wZu624ts3wSUjJ1tvDijWmJk1wXDx8O7YNzenmo=; b=LpkP+Iv9LhLgydlP7w9rdoLLkANJuea6HCaMAqzm6Xqb045M7yJf+xJu4RiB4pd6WW f0ZJ1sNLuJJWI6+nKo47N/LfZcoN9bG+72dnugZpEK3k/bDcCBcXZxwbCfkYJeXEeAkF SXYxhCTVaHzXvVrYw5nx/4K64/19z66uq5GW5oG/G5D/nh6lpAnSvWiFzjdF6VTrWgGk jUuv/aMxQUi6bpjKbLGH5crDiz/7hegtFw4JLwiCBYrleztyHLmzUnm7fsGnNjZuG1XZ qsskuSNu54edt9KaFiLUGQIuRDXE1mjUUarLpAna/M6pbKG66ff4IWNs36vDmQAbh/Fo B0XA== 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:in-reply-to:references:from :date:message-id:subject:to:cc; bh=efd/wZu624ts3wSUjJ1tvDijWmJk1wXDx8O7YNzenmo=; b=EycLuJAwLnvLlwYj6eq5Abm93lOYQVGH9APfnEmp2HojPuxs/a3PG4WbqvB/2ZdAmP JZaa827nCbbrRkoPvO1VS8iaq7FLKRXNUIBBe3dE90olrLLw+XSBw216DfvjE01V+RoP YF2ibCjckVfEMemfZpMmI0j4SnGlMQQSC/xN+qnvB/Go62FLMLsXrS+6nqOJZjbwiwAn VDEpyx2AoiToaugPD3Z/Psp4Ss1myQv6CNiwMCMpdvllt0hPa6tQYTPx9MuSeFete7uz jYmw9XHlZt5R8tWHUOMs43rFTTb/LXME9B5qDXirRaL9crz18iHGOuRbedpruYh6/jDL h5ew== X-Gm-Message-State: ALQs6tA+4p+0t7XBP2UZJDIEgkPi635qgyd6ZNh+7o/ZeIRKtEXwWl2X OHyqoeqBgw9ClPWhH+o5Skxl/7l/thBBSX5yR87OMQ== X-Google-Smtp-Source: AIpwx48p5uS7zhGkFnr93az2WQm7+UFhAI68Ap+DTvm9fbC6Z+LHodncZLOgKoUuCk1icRuPA0I0ELGilbyD33HUy0I= X-Received: by 10.107.134.85 with SMTP id i82mr18027091iod.210.1523755877579; Sat, 14 Apr 2018 18:31:17 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.130.197 with HTTP; Sat, 14 Apr 2018 18:30:57 -0700 (PDT) In-Reply-To: <201804142214.w3EMEIRu028631@repo.freebsd.org> References: <201804142214.w3EMEIRu028631@repo.freebsd.org> From: Ed Maste Date: Sat, 14 Apr 2018 21:30:57 -0400 X-Google-Sender-Auth: pP-AvvYIEgZQzWnLVGSVp0-9I1c Message-ID: Subject: Re: svn commit: r332509 - head/sys/i386/i386 To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 01:31:18 -0000 On 14 April 2018 at 18:14, Warner Losh wrote: > Author: imp > Date: Sat Apr 14 22:14:18 2018 > New Revision: 332509 > URL: https://svnweb.freebsd.org/changeset/base/332509 > > ... > even though we should eventually migrate to bool > and true/false (though the tables they are in are nicely packed with > short and wouldn't be so nicely packed with bool, another reason > to leave it alone for now). In practice it should be a no-op, replacing the 2-byte short i_has_modrm with the bool followed by a pad byte. From owner-svn-src-all@freebsd.org Sun Apr 15 08:34:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70FA7FA3C4B; Sun, 15 Apr 2018 08:34:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 228A76C350; Sun, 15 Apr 2018 08:34:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D55D49CC; Sun, 15 Apr 2018 08:34:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3F8YHSd038231; Sun, 15 Apr 2018 08:34:17 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3F8YGO3038226; Sun, 15 Apr 2018 08:34:16 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201804150834.w3F8YGO3038226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sun, 15 Apr 2018 08:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332510 - in head: usr.bin/wall usr.sbin/syslogd X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: in head: usr.bin/wall usr.sbin/syslogd X-SVN-Commit-Revision: 332510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 08:34:17 -0000 Author: ed Date: Sun Apr 15 08:34:16 2018 New Revision: 332510 URL: https://svnweb.freebsd.org/changeset/base/332510 Log: Add RFC 5424 syslog message output to syslogd. - Move all of the code responsible for transmitting log messages into a separate function, fprintlog_write(). - Instead of manually modifying a list of iovecs, add a structure iovlist with some helper functions. - Alter the F_FORW (UDP message forwarding) case to also use iovecs like the other cases. Use sendmsg() instead of sendto(). - In the case of F_FORW, truncate the message to a size dependent on the address family (AF_INET, AF_INET6), as proposed by RFC 5426. - Move all traditional message formatting into fprintlog_bsd(). Get rid of some of the string copying and snprintf()'ing. Simply emit more iovecs to get the job done. - Increase ttymsg()'s limit of 7 iovecs to 32. Add a definition for this limit, so it can be reused by iovlist. - Add fprintlog_rfc5424() to emit RFC 5424 formatted log entries. - Add a "-O" command line option to enable RFC 5424 formatting. It would have been nicer if we supported "-o rfc5424", just like on NetBSD. Unfortunately, the "-o" flag is already used for a different purpose on FreeBSD. - Don't truncate hostnames in the RFC 5424 case, as suggested by that specific RFC. For people interested in using this, this feature can be enabled by adding the following line to /etc/rc.conf: syslogd_flags="-s -O rfc5424" Differential Revision: https://reviews.freebsd.org/D15011 Modified: head/usr.bin/wall/ttymsg.c head/usr.bin/wall/ttymsg.h head/usr.sbin/syslogd/syslogd.8 head/usr.sbin/syslogd/syslogd.c Modified: head/usr.bin/wall/ttymsg.c ============================================================================== --- head/usr.bin/wall/ttymsg.c Sat Apr 14 22:14:18 2018 (r332509) +++ head/usr.bin/wall/ttymsg.c Sun Apr 15 08:34:16 2018 (r332510) @@ -61,7 +61,7 @@ static const char sccsid[] = "@(#)ttymsg.c 8.2 (Berkel const char * ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) { - struct iovec localiov[7]; + struct iovec localiov[TTYMSG_IOV_MAX]; ssize_t left, wret; int cnt, fd; char device[MAXNAMLEN] = _PATH_DEV; Modified: head/usr.bin/wall/ttymsg.h ============================================================================== --- head/usr.bin/wall/ttymsg.h Sat Apr 14 22:14:18 2018 (r332509) +++ head/usr.bin/wall/ttymsg.h Sun Apr 15 08:34:16 2018 (r332510) @@ -1,3 +1,5 @@ /* $FreeBSD$ */ +#define TTYMSG_IOV_MAX 32 + const char *ttymsg(struct iovec *, int, const char *, int); Modified: head/usr.sbin/syslogd/syslogd.8 ============================================================================== --- head/usr.sbin/syslogd/syslogd.8 Sat Apr 14 22:14:18 2018 (r332509) +++ head/usr.sbin/syslogd/syslogd.8 Sun Apr 15 08:34:16 2018 (r332510) @@ -28,7 +28,7 @@ .\" @(#)syslogd.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 28, 2017 +.Dd April 9, 2018 .Dt SYSLOGD 8 .Os .Sh NAME @@ -42,6 +42,7 @@ .Op Fl f Ar config_file .Op Fl l Oo Ar mode Ns \&: Oc Ns Ar path .Op Fl m Ar mark_interval +.Op Fl O Ar format .Op Fl P Ar pid_file .Op Fl p Ar log_socket .Op Fl S Ar logpriv_socket @@ -242,6 +243,20 @@ Usually the .Dq kern facility is reserved for messages read directly from .Pa /dev/klog . +.It Fl O Ar format +Select the output format of generated log messages. +The values +.Ar bsd +and +.Ar rfc3164 +are used to generate RFC 3164 log messages. +The values +.Ar syslog +and +.Ar rfc5424 +are used to generate RFC 5424 log messages, +having RFC 3339 timestamps with microsecond precision. +The default is to generate RFC 3164 log messages. .It Fl m Ar mark_interval Select the number of minutes between .Dq mark Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Sat Apr 14 22:14:18 2018 (r332509) +++ head/usr.sbin/syslogd/syslogd.c Sun Apr 15 08:34:16 2018 (r332510) @@ -136,6 +136,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -367,9 +368,12 @@ static int KeepKernFac; /* Keep remotely logged kernel static int needdofsync = 0; /* Are any file(s) waiting to be fsynced? */ static struct pidfh *pfh; static int sigpipe[2]; /* Pipe to catch a signal during select(). */ +static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ static volatile sig_atomic_t MarkSet, WantDie, WantInitialize, WantReapchild; +struct iovlist; + static int allowaddr(char *); static int addfile(struct filed *); static int addpeer(struct peer *); @@ -386,6 +390,7 @@ static void dofsync(void); static void domark(int); static void fprintlog_first(struct filed *, const char *, const char *, const char *, const char *, const char *, const char *, int); +static void fprintlog_write(struct filed *, struct iovlist *, int); static void fprintlog_successive(struct filed *, int); static void init(int); static void logerror(const char *); @@ -498,7 +503,7 @@ main(int argc, char *argv[]) if (madvise(NULL, 0, MADV_PROTECT) != 0) dprintf("madvise() failed: %s\n", strerror(errno)); - while ((ch = getopt(argc, argv, "468Aa:b:cCdf:FHkl:m:nNop:P:sS:Tuv")) + while ((ch = getopt(argc, argv, "468Aa:b:cCdf:FHkl:m:nNoO:p:P:sS:Tuv")) != -1) switch (ch) { #ifdef INET @@ -621,6 +626,16 @@ main(int argc, char *argv[]) case 'n': resolve = 0; break; + case 'O': + if (strcmp(optarg, "bsd") == 0 || + strcmp(optarg, "rfc3164") == 0) + RFC3164OutputFormat = true; + else if (strcmp(optarg, "syslog") == 0 || + strcmp(optarg, "rfc5424") == 0) + RFC3164OutputFormat = false; + else + usage(); + break; case 'o': use_bootfile = 1; break; @@ -880,12 +895,12 @@ static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", - "usage: syslogd [-468ACcdFHknosTuv] [-a allowed_peer]", - " [-b bind_address] [-f config_file]", - " [-l [mode:]path] [-m mark_interval]", - " [-P pid_file] [-p log_socket]", - " [-S logpriv_socket]"); + fprintf(stderr, + "usage: syslogd [-468ACcdFHknosTuv] [-a allowed_peer]\n" + " [-b bind_address] [-f config_file]\n" + " [-l [mode:]path] [-m mark_interval]\n" + " [-O format] [-P pid_file] [-p log_socket]\n" + " [-S logpriv_socket]\n"); exit(1); } @@ -1558,177 +1573,114 @@ dofsync(void) } } -#define IOV_SIZE 7 +/* + * List of iovecs to which entries can be appended. + * Used for constructing the message to be logged. + */ +struct iovlist { + struct iovec iov[TTYMSG_IOV_MAX]; + size_t iovcnt; + size_t totalsize; +}; + static void -fprintlog_first(struct filed *f, const char *hostname, const char *app_name, - const char *procid, const char *msgid __unused, - const char *structured_data __unused, const char *msg, int flags) +iovlist_init(struct iovlist *il) { - struct iovec iov[IOV_SIZE]; - struct addrinfo *r; - int l, lsent = 0; - char tagged_msg[MAXLINE + 1], line[MAXLINE + 1], greetings[200]; - char nul[] = "", space[] = " ", lf[] = "\n", crlf[] = "\r\n"; - char timebuf[RFC3164_DATELEN + 1]; - const char *msgret; - if (strftime(timebuf, sizeof(timebuf), RFC3164_DATEFMT, - &f->f_lasttime.tm) == 0) - timebuf[0] = '\0'; - if (f->f_type == F_WALL) { - /* The time displayed is not synchornized with the other log - * destinations (like messages). Following fragment was using - * ctime(&now), which was updating the time every 30 sec. - * With f_lasttime, time is synchronized correctly. - */ - iov[0] = (struct iovec){ - .iov_base = greetings, - .iov_len = snprintf(greetings, sizeof(greetings), - "\r\n\7Message from syslogd@%s " - "at %.24s ...\r\n", hostname, timebuf) + il->iovcnt = 0; + il->totalsize = 0; +} + +static void +iovlist_append(struct iovlist *il, const char *str) +{ + size_t size; + + /* Discard components if we've run out of iovecs. */ + if (il->iovcnt < nitems(il->iov)) { + size = strlen(str); + il->iov[il->iovcnt++] = (struct iovec){ + .iov_base = __DECONST(char *, str), + .iov_len = size, }; - if (iov[0].iov_len >= sizeof(greetings)) - iov[0].iov_len = sizeof(greetings) - 1; - iov[1] = (struct iovec){ - .iov_base = nul, - .iov_len = 0 - }; - } else { - iov[0] = (struct iovec){ - .iov_base = timebuf, - .iov_len = strlen(timebuf) - }; - iov[1] = (struct iovec){ - .iov_base = space, - .iov_len = 1 - }; + il->totalsize += size; } +} - if (LogFacPri) { - static char fp_buf[30]; /* Hollow laugh */ - int fac = f->f_prevpri & LOG_FACMASK; - int pri = LOG_PRI(f->f_prevpri); - const char *f_s = NULL; - char f_n[5]; /* Hollow laugh */ - const char *p_s = NULL; - char p_n[5]; /* Hollow laugh */ +static void +iovlist_truncate(struct iovlist *il, size_t size) +{ + struct iovec *last; + size_t diff; - if (LogFacPri > 1) { - const CODE *c; - - for (c = facilitynames; c->c_name; c++) { - if (c->c_val == fac) { - f_s = c->c_name; - break; - } - } - for (c = prioritynames; c->c_name; c++) { - if (c->c_val == pri) { - p_s = c->c_name; - break; - } - } + while (size > il->totalsize) { + diff = size - il->totalsize; + last = &il->iov[il->iovcnt - 1]; + if (diff >= last->iov_len) { + /* Remove the last iovec entirely. */ + --il->iovcnt; + il->totalsize -= last->iov_len; + } else { + /* Remove the last iovec partially. */ + last->iov_len -= diff; + il->totalsize -= diff; } - if (!f_s) { - snprintf(f_n, sizeof f_n, "%d", LOG_FAC(fac)); - f_s = f_n; - } - if (!p_s) { - snprintf(p_n, sizeof p_n, "%d", pri); - p_s = p_n; - } - snprintf(fp_buf, sizeof fp_buf, "<%s.%s> ", f_s, p_s); - iov[2] = (struct iovec){ - .iov_base = fp_buf, - .iov_len = strlen(fp_buf) - }; - } else { - iov[2] = (struct iovec){ - .iov_base = nul, - .iov_len = 0 - }; } - /* Prepend the application name to the message if provided. */ - if (app_name != NULL) { - if (procid != NULL) - snprintf(tagged_msg, sizeof(tagged_msg), - "%s[%s]: %s", app_name, procid, msg); - else - snprintf(tagged_msg, sizeof(tagged_msg), - "%s: %s", app_name, msg); - msg = tagged_msg; - } - iov[3] = (struct iovec){ - .iov_base = __DECONST(char *, hostname), - .iov_len = strlen(hostname) - }; - iov[4] = (struct iovec){ - .iov_base = space, - .iov_len = 1 - }; - iov[5] = (struct iovec){ - .iov_base = __DECONST(char *, msg), - .iov_len = strlen(msg) - }; - dprintf("Logging to %s", TypeNames[f->f_type]); - f->f_time = now; +} - switch (f->f_type) { - case F_UNUSED: - dprintf("\n"); - break; +static void +fprintlog_write(struct filed *f, struct iovlist *il, int flags) +{ + struct msghdr msghdr; + struct addrinfo *r; + struct socklist *sl; + const char *msgret; + ssize_t lsent; + switch (f->f_type) { case F_FORW: + /* Truncate messages to RFC 5426 recommended size. */ dprintf(" %s", f->fu_forw_hname); switch (f->fu_forw_addr->ai_addr->sa_family) { #ifdef INET case AF_INET: dprintf(":%d\n", ntohs(satosin(f->fu_forw_addr->ai_addr)->sin_port)); + iovlist_truncate(il, 480); break; #endif #ifdef INET6 case AF_INET6: dprintf(":%d\n", ntohs(satosin6(f->fu_forw_addr->ai_addr)->sin6_port)); + iovlist_truncate(il, 1180); break; #endif default: dprintf("\n"); } - /* check for local vs remote messages */ - if (strcasecmp(hostname, LocalHostName)) - l = snprintf(line, sizeof line - 1, - "<%d>%.15s Forwarded from %s: %s", - f->f_prevpri, (char *)iov[0].iov_base, - hostname, (char *)iov[5].iov_base); - else - l = snprintf(line, sizeof line - 1, "<%d>%.15s %s", - f->f_prevpri, (char *)iov[0].iov_base, - (char *)iov[5].iov_base); - if (l < 0) - l = 0; - else if (l > MAXLINE) - l = MAXLINE; + lsent = 0; for (r = f->fu_forw_addr; r; r = r->ai_next) { - struct socklist *sl; - + memset(&msghdr, 0, sizeof(msghdr)); + msghdr.msg_name = r->ai_addr; + msghdr.msg_namelen = r->ai_addrlen; + msghdr.msg_iov = il->iov; + msghdr.msg_iovlen = il->iovcnt; STAILQ_FOREACH(sl, &shead, next) { if (sl->sl_ss.ss_family == AF_LOCAL || sl->sl_ss.ss_family == AF_UNSPEC || sl->sl_socket < 0) continue; - lsent = sendto(sl->sl_socket, line, l, 0, - r->ai_addr, r->ai_addrlen); - if (lsent == l) + lsent = sendmsg(sl->sl_socket, &msghdr, 0); + if (lsent == (ssize_t)il->totalsize) break; } - if (lsent == l && !send_to_all) + if (lsent == (ssize_t)il->totalsize && !send_to_all) break; } - dprintf("lsent/l: %d/%d\n", lsent, l); - if (lsent != l) { + dprintf("lsent/totalsize: %zd/%zu\n", lsent, il->totalsize); + if (lsent != (ssize_t)il->totalsize) { int e = errno; logerror("sendto"); errno = e; @@ -1758,11 +1710,8 @@ fprintlog_first(struct filed *f, const char *hostname, case F_FILE: dprintf(" %s\n", f->fu_fname); - iov[6] = (struct iovec){ - .iov_base = lf, - .iov_len = 1 - }; - if (writev(f->f_file, iov, nitems(iov)) < 0) { + iovlist_append(il, "\n"); + if (writev(f->f_file, il->iov, il->iovcnt) < 0) { /* * If writev(2) fails for potentially transient errors * like the filesystem being full, ignore it. @@ -1782,10 +1731,7 @@ fprintlog_first(struct filed *f, const char *hostname, case F_PIPE: dprintf(" %s\n", f->fu_pipe_pname); - iov[6] = (struct iovec){ - .iov_base = lf, - .iov_len = 1 - }; + iovlist_append(il, "\n"); if (f->fu_pipe_pid == 0) { if ((f->f_file = p_open(f->fu_pipe_pname, &f->fu_pipe_pid)) < 0) { @@ -1793,7 +1739,7 @@ fprintlog_first(struct filed *f, const char *hostname, break; } } - if (writev(f->f_file, iov, nitems(iov)) < 0) { + if (writev(f->f_file, il->iov, il->iovcnt) < 0) { int e = errno; deadq_enter(f->fu_pipe_pid, f->fu_pipe_pname); @@ -1812,12 +1758,9 @@ fprintlog_first(struct filed *f, const char *hostname, case F_TTY: dprintf(" %s%s\n", _PATH_DEV, f->fu_fname); - iov[6] = (struct iovec){ - .iov_base = crlf, - .iov_len = 2 - }; + iovlist_append(il, "\r\n"); errno = 0; /* ttymsg() only sometimes returns an errno */ - if ((msgret = ttymsg(iov, nitems(iov), f->fu_fname, 10))) { + if ((msgret = ttymsg(il->iov, il->iovcnt, f->fu_fname, 10))) { f->f_type = F_UNUSED; logerror(msgret); } @@ -1826,14 +1769,190 @@ fprintlog_first(struct filed *f, const char *hostname, case F_USERS: case F_WALL: dprintf("\n"); - iov[6] = (struct iovec){ - .iov_base = crlf, - .iov_len = 2 - }; - wallmsg(f, iov, nitems(iov)); + iovlist_append(il, "\r\n"); + wallmsg(f, il->iov, il->iovcnt); break; } +} + +static void +fprintlog_rfc5424(struct filed *f, const char *hostname, const char *app_name, + const char *procid, const char *msgid, const char *structured_data, + const char *msg, int flags) +{ + struct iovlist il; + suseconds_t usec; + int i; + char timebuf[33], priority_number[5]; + + iovlist_init(&il); + if (f->f_type == F_WALL) + iovlist_append(&il, "\r\n\aMessage from syslogd ...\r\n"); + iovlist_append(&il, "<"); + snprintf(priority_number, sizeof(priority_number), "%d", f->f_prevpri); + iovlist_append(&il, priority_number); + iovlist_append(&il, ">1 "); + if (strftime(timebuf, sizeof(timebuf), "%FT%T.______%z", + &f->f_lasttime.tm) == sizeof(timebuf) - 2) { + /* Add colon to the time zone offset, which %z doesn't do. */ + timebuf[32] = '\0'; + timebuf[31] = timebuf[30]; + timebuf[30] = timebuf[29]; + timebuf[29] = ':'; + + /* Overwrite space for microseconds with actual value. */ + usec = f->f_lasttime.usec; + for (i = 25; i >= 20; --i) { + timebuf[i] = usec % 10 + '0'; + usec /= 10; + } + iovlist_append(&il, timebuf); + } else + iovlist_append(&il, "-"); + iovlist_append(&il, " "); + iovlist_append(&il, hostname); + iovlist_append(&il, " "); + iovlist_append(&il, app_name == NULL ? "-" : app_name); + iovlist_append(&il, " "); + iovlist_append(&il, procid == NULL ? "-" : procid); + iovlist_append(&il, " "); + iovlist_append(&il, msgid == NULL ? "-" : msgid); + iovlist_append(&il, " "); + iovlist_append(&il, structured_data == NULL ? "-" : structured_data); + iovlist_append(&il, " "); + iovlist_append(&il, msg); + + fprintlog_write(f, &il, flags); +} + +static void +fprintlog_rfc3164(struct filed *f, const char *hostname, const char *app_name, + const char *procid, const char *msg, int flags) +{ + struct iovlist il; + const CODE *c; + int facility, priority; + char timebuf[RFC3164_DATELEN + 1], facility_number[5], + priority_number[5]; + bool facility_found, priority_found; + + if (strftime(timebuf, sizeof(timebuf), RFC3164_DATEFMT, + &f->f_lasttime.tm) == 0) + timebuf[0] = '\0'; + + iovlist_init(&il); + switch (f->f_type) { + case F_FORW: + /* Message forwarded over the network. */ + iovlist_append(&il, "<"); + snprintf(priority_number, sizeof(priority_number), "%d", + f->f_prevpri); + iovlist_append(&il, priority_number); + iovlist_append(&il, ">"); + iovlist_append(&il, timebuf); + if (strcasecmp(hostname, LocalHostName) != 0) { + iovlist_append(&il, " Forwarded from "); + iovlist_append(&il, hostname); + iovlist_append(&il, ":"); + } + iovlist_append(&il, " "); + break; + + case F_WALL: + /* Message written to terminals. */ + iovlist_append(&il, "\r\n\aMessage from syslogd@"); + iovlist_append(&il, hostname); + iovlist_append(&il, " at "); + iovlist_append(&il, timebuf); + iovlist_append(&il, " ...\r\n"); + break; + + default: + /* Message written to files. */ + iovlist_append(&il, timebuf); + iovlist_append(&il, " "); + iovlist_append(&il, hostname); + iovlist_append(&il, " "); + + if (LogFacPri) { + iovlist_append(&il, "<"); + + facility = f->f_prevpri & LOG_FACMASK; + facility_found = false; + if (LogFacPri > 1) { + for (c = facilitynames; c->c_name; c++) { + if (c->c_val == facility) { + iovlist_append(&il, c->c_name); + facility_found = true; + break; + } + } + } + if (!facility_found) { + snprintf(facility_number, + sizeof(facility_number), "%d", + LOG_FAC(facility)); + iovlist_append(&il, facility_number); + } + + iovlist_append(&il, "."); + + priority = LOG_PRI(f->f_prevpri); + priority_found = false; + if (LogFacPri > 1) { + for (c = prioritynames; c->c_name; c++) { + if (c->c_val == priority) { + iovlist_append(&il, c->c_name); + priority_found = true; + break; + } + } + } + if (!priority_found) { + snprintf(priority_number, + sizeof(priority_number), "%d", priority); + iovlist_append(&il, priority_number); + } + + iovlist_append(&il, "> "); + } + break; + } + + /* Message body with application name and process ID prefixed. */ + if (app_name != NULL) { + iovlist_append(&il, app_name); + if (procid != NULL) { + iovlist_append(&il, "["); + iovlist_append(&il, procid); + iovlist_append(&il, "]"); + } + iovlist_append(&il, ": "); + } + iovlist_append(&il, msg); + + fprintlog_write(f, &il, flags); +} + +static void +fprintlog_first(struct filed *f, const char *hostname, const char *app_name, + const char *procid, const char *msgid __unused, + const char *structured_data __unused, const char *msg, int flags) +{ + + dprintf("Logging to %s", TypeNames[f->f_type]); + f->f_time = now; f->f_prevcount = 0; + if (f->f_type == F_UNUSED) { + dprintf("\n"); + return; + } + + if (RFC3164OutputFormat) + fprintlog_rfc3164(f, hostname, app_name, procid, msg, flags); + else + fprintlog_rfc5424(f, hostname, app_name, procid, msgid, + structured_data, msg, flags); } /* @@ -2229,8 +2348,10 @@ init(int signo) if (gethostname(LocalHostName, sizeof(LocalHostName))) err(EX_OSERR, "gethostname() failed"); if ((p = strchr(LocalHostName, '.')) != NULL) { - *p++ = '\0'; - LocalDomain = p; + /* RFC 5424 prefers logging FQDNs. */ + if (RFC3164OutputFormat) + *p = '\0'; + LocalDomain = p + 1; } else { LocalDomain = ""; } From owner-svn-src-all@freebsd.org Sun Apr 15 08:44:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01FCFFA468A; Sun, 15 Apr 2018 08:44:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5F016CF47; Sun, 15 Apr 2018 08:44:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0DB74B77; Sun, 15 Apr 2018 08:44:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3F8iQQY043393; Sun, 15 Apr 2018 08:44:26 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3F8iQwl043392; Sun, 15 Apr 2018 08:44:26 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201804150844.w3F8iQwl043392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sun, 15 Apr 2018 08:44:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332511 - head/usr.sbin/syslogd X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: head/usr.sbin/syslogd X-SVN-Commit-Revision: 332511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 08:44:27 -0000 Author: ed Date: Sun Apr 15 08:44:26 2018 New Revision: 332511 URL: https://svnweb.freebsd.org/changeset/base/332511 Log: Use proper alphabetic sorting of options. Modified: head/usr.sbin/syslogd/syslogd.8 Modified: head/usr.sbin/syslogd/syslogd.8 ============================================================================== --- head/usr.sbin/syslogd/syslogd.8 Sun Apr 15 08:34:16 2018 (r332510) +++ head/usr.sbin/syslogd/syslogd.8 Sun Apr 15 08:44:26 2018 (r332511) @@ -28,7 +28,7 @@ .\" @(#)syslogd.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 9, 2018 +.Dd April 15, 2018 .Dt SYSLOGD 8 .Os .Sh NAME @@ -243,20 +243,6 @@ Usually the .Dq kern facility is reserved for messages read directly from .Pa /dev/klog . -.It Fl O Ar format -Select the output format of generated log messages. -The values -.Ar bsd -and -.Ar rfc3164 -are used to generate RFC 3164 log messages. -The values -.Ar syslog -and -.Ar rfc5424 -are used to generate RFC 5424 log messages, -having RFC 3339 timestamps with microsecond precision. -The default is to generate RFC 3164 log messages. .It Fl m Ar mark_interval Select the number of minutes between .Dq mark @@ -274,6 +260,20 @@ This option inherits .Fl s . .It Fl n Disable DNS query for every request. +.It Fl O Ar format +Select the output format of generated log messages. +The values +.Ar bsd +and +.Ar rfc3164 +are used to generate RFC 3164 log messages. +The values +.Ar syslog +and +.Ar rfc5424 +are used to generate RFC 5424 log messages, +having RFC 3339 timestamps with microsecond precision. +The default is to generate RFC 3164 log messages. .It Fl o Prefix kernel messages with the full kernel boot file as determined by .Xr getbootfile 3 . From owner-svn-src-all@freebsd.org Sun Apr 15 13:38:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B178F936A6 for ; Sun, 15 Apr 2018 13:38:54 +0000 (UTC) (envelope-from blythemasters@digitalassetholding.com) Received: from st-server1.st-workshops.com (st-server1.st-workshops.com [42.61.87.201]) by mx1.freebsd.org (Postfix) with ESMTP id 5DF6C6D63F for ; Sun, 15 Apr 2018 13:38:53 +0000 (UTC) (envelope-from blythemasters@digitalassetholding.com) Received: from localhost (unknown [127.0.0.1]) by st-server1.st-workshops.com (Postfix) with ESMTP id E66F37A7E5A for ; Sun, 15 Apr 2018 09:38:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at st-server1.st-workshops.com Received: from st-server1.st-workshops.com ([127.0.0.1]) by localhost (st-server1.st-workshops.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GjKhpTrikkdP for ; Sun, 15 Apr 2018 17:38:34 +0800 (+08) Received: from [192.168.0.80] (o8ppry.static.otenet.gr [79.129.39.26]) (Authenticated sender: calvin@st-workshops.com) by st-server1.st-workshops.com (Postfix) with ESMTPA id 11EFE7A00D0 for ; Sun, 15 Apr 2018 09:43:57 +0800 (+08) MIME-Version: 1.0 Subject: Financial Market Investor To: svn-src-all@freebsd.org From: "Digital Asset Holdings, LLC " Date: Sun, 15 Apr 2018 04:54:25 +0300 Reply-To: blythemasters@digitalassetholding.org Message-Id: <20180415093835.E66F37A7E5A@st-server1.st-workshops.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Description: Mail message body X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 13:38:54 -0000 Digital Asset Holdings, LLC is an Investment Banking firm, business develop= er, Head of Global credit portfolio, Credit Policy and Strategy. We are in = search of an eligible business partner with credible business goals and per= ceptible business plan to invest Fifty Million United States Dollars; our m= ission is to promote trade association of public trust and confidence in th= e financial markets we need an associate with good accountability and exper= ienced training to handle the amount mentioned for proper investment to gen= erate good profitable return. = Kindly get back to us to discuss the details of this proposed business par= tnership. = = Thank you = = Digital Asset Holdings, LLC 96 Spring Street, 7th & 8th Floors New York, NY 10012 USA From owner-svn-src-all@freebsd.org Sun Apr 15 15:06:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BD38F9A0FD; Sun, 15 Apr 2018 15:06:08 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F92581E4F; Sun, 15 Apr 2018 15:06:08 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AA83107BD; Sun, 15 Apr 2018 15:06:08 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3FF67sf032679; Sun, 15 Apr 2018 15:06:07 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3FF67Q9032678; Sun, 15 Apr 2018 15:06:07 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804151506.w3FF67Q9032678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sun, 15 Apr 2018 15:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332512 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 332512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 15:06:08 -0000 Author: brooks Date: Sun Apr 15 15:06:07 2018 New Revision: 332512 URL: https://svnweb.freebsd.org/changeset/base/332512 Log: Remove device cm which was removed in r332490. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Apr 15 08:44:26 2018 (r332511) +++ head/sys/conf/NOTES Sun Apr 15 15:06:07 2018 (r332512) @@ -2066,11 +2066,6 @@ device xmphy # XaQti XMAC II # Order for ISA devices is important here -device cm -hint.cm.0.at="isa" -hint.cm.0.port="0x2e0" -hint.cm.0.irq="9" -hint.cm.0.maddr="0xdc000" device ep device ex device fe From owner-svn-src-all@freebsd.org Sun Apr 15 15:13:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5179CF9A94F; Sun, 15 Apr 2018 15:13:10 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 0130082374; Sun, 15 Apr 2018 15:13:09 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 2448F5A9F13; Sun, 15 Apr 2018 15:13:03 +0000 (UTC) Date: Sun, 15 Apr 2018 15:13:03 +0000 From: Brooks Davis To: Brooks Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332512 - head/sys/conf Message-ID: <20180415151303.GA99239@spindle.one-eyed-alien.net> References: <201804151506.w3FF67Q9032678@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <201804151506.w3FF67Q9032678@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 15:13:10 -0000 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 15, 2018 at 03:06:07PM +0000, Brooks Davis wrote: > Author: brooks > Date: Sun Apr 15 15:06:07 2018 > New Revision: 332512 > URL: https://svnweb.freebsd.org/changeset/base/332512 >=20 > Log: > Remove device cm which was removed in r332490. I'm quite confused by the fact that tinderbox didn't trip on this when I ran it. Are -DNO_CLEAN tinderbox builds insufficent for device removal? -- Brooks --azLHFNyN32YCQGCU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJa02v+AAoJEKzQXbSebgfAk2AIAIq9pGniyeE63HgTYsHnW0xQ LBFrb6Qeohhb0l5bmEtFkMRT00urJH8pTprgin3n5jLgO6CYuJjfCuPQ9EJOoz2i 6giGsr1480FR4DwRrtovRfZgTBFpphmaMMGctCkP0LX1iYb2brJ7ptx5zNOalGVz lubxUPLrX/IDIMCKUhWA2PW6EFAgRseqFz2WFifDsSPpnrrDaIQl5BT55pHhQ9vB xJX6HhcdFcJ5HsIWyb57ondXOzs7RChABEOMLfjLi2ckHWHY9owP17P/+VP8gadq f41SL+LA5mOAizhayHwopDYBm3T+ZxSng9sIFpiQwoama0bSTLN8COPTAD17E14= =MeWW -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU-- From owner-svn-src-all@freebsd.org Sun Apr 15 15:20:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DD43F9B219; Sun, 15 Apr 2018 15:20:36 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 86E7A8292B; Sun, 15 Apr 2018 15:20:35 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 9786D5A9F12; Sun, 15 Apr 2018 15:20:33 +0000 (UTC) Date: Sun, 15 Apr 2018 15:20:33 +0000 From: Brooks Davis To: Ed Maste Cc: Magnus Ringman , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, freebsd-stable stable Subject: Re: svn commit: r332493 - stable/11/sys/net Message-ID: <20180415152033.GB99239@spindle.one-eyed-alien.net> References: <201804132232.w3DMWSmI019256@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QTprm0S8XgL7H0Dt" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 15:20:36 -0000 --QTprm0S8XgL7H0Dt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 14, 2018 at 08:54:15AM -0400, Ed Maste wrote: > On 14 April 2018 at 07:31, Magnus Ringman wrote: > > Hi Brooks, this MFC missed your r331077 > > (https://reviews.freebsd.org/D14706) thus stable buildkernel currently > > breaks on missing those two macros. >=20 > Thanks for identifying the missing commit Magnus. I've now merged it in r= 332502. >=20 Sorry for the breakage and thanks for fixing this! -- Brooks --QTprm0S8XgL7H0Dt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJa023BAAoJEKzQXbSebgfAb5sH/3S7u5/I+ASEJpIpl+2FhDS7 yYQGyJGfxFpKwcBWjvJmnREIkXKkMNCM58uV+iIRAPwlABHJOg5ID1NqQd+6I+Iq dAFqlTTGdfhUq80KpfaiBV+3NgmCA1BjGnF0TwyPn5QJXntkjZyTE0YF+a1+D8GQ KzIjBeaHUjuSokfP2UlFFHVXIw7pL77TEqacep/qRi3ZAa/Aa7EuUOqgSBkmykXd ivMFUrIqjNxvX3hqrh3JRFaXC9DLw3Oi4qIQ47XbrsUfVUneQR3tmxfGwijqGY57 giKOU9q1W9bXXIpWbqBwMj8YJF9o49HGanehaFZEcgyq9C1t7gprFQq8pYJW2/U= =zOUg -----END PGP SIGNATURE----- --QTprm0S8XgL7H0Dt-- From owner-svn-src-all@freebsd.org Sun Apr 15 15:22:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0E7BF9B5F1; Sun, 15 Apr 2018 15:22:30 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89E7C83D1C; Sun, 15 Apr 2018 15:22:30 +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 8302C10AD4; Sun, 15 Apr 2018 15:22:30 +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 w3FFMUTH042627; Sun, 15 Apr 2018 15:22:30 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3FFMSft042609; Sun, 15 Apr 2018 15:22:28 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201804151522.w3FFMSft042609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 15 Apr 2018 15:22: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: r332513 - in stable/11: share/man/man9 sys/net sys/netinet sys/netinet6 sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/net sys/netinet sys/netinet6 sys/netpfil/pf X-SVN-Commit-Revision: 332513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 15:22:31 -0000 Author: kp Date: Sun Apr 15 15:22:28 2018 New Revision: 332513 URL: https://svnweb.freebsd.org/changeset/base/332513 Log: MFC r331436: netpfil: Introduce PFIL_FWD flag Forwarded packets passed through PFIL_OUT, which made it difficult for firewalls to figure out if they were forwarding or producing packets. This in turn is an issue for pf for IPv6 fragment handling: it needs to call ip6_output() or ip6_forward() to handle the fragments. Figuring out which was difficult (and until now, incorrect). Having pfil distinguish the two removes an ugly piece of code from pf. Introduce a new variant of the netpfil callbacks with a flags variable, which has PFIL_FWD set for forwarded packets. This allows pf to reliably work out if a packet is forwarded. Modified: stable/11/share/man/man9/pfil.9 stable/11/sys/net/if_bridge.c stable/11/sys/net/if_enc.c stable/11/sys/net/if_ethersubr.c stable/11/sys/net/pfil.c stable/11/sys/net/pfil.h stable/11/sys/net/pfvar.h stable/11/sys/netinet/ip_fastfwd.c stable/11/sys/netinet/ip_input.c stable/11/sys/netinet/ip_output.c stable/11/sys/netinet6/ip6_fastfwd.c stable/11/sys/netinet6/ip6_forward.c stable/11/sys/netinet6/ip6_input.c stable/11/sys/netinet6/ip6_output.c stable/11/sys/netpfil/pf/pf.c stable/11/sys/netpfil/pf/pf.h stable/11/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/pfil.9 ============================================================================== --- stable/11/share/man/man9/pfil.9 Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/share/man/man9/pfil.9 Sun Apr 15 15:22:28 2018 (r332513) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2013 +.Dd April 15, 2018 .Dt PFIL 9 .Os .Sh NAME @@ -37,7 +37,9 @@ .Nm pfil_head_unregister , .Nm pfil_head_get , .Nm pfil_add_hook , +.Nm pfil_add_hook_flags , .Nm pfil_remove_hook , +.Nm pfil_remove_hook_flags , .Nm pfil_run_hooks , .Nm pfil_rlock , .Nm pfil_runlock , @@ -51,6 +53,8 @@ .In net/pfil.h .Bd -literal typedef int (*pfil_func_t)(void *arg, struct mbuf **mp, struct ifnet *, int dir, struct inpcb); +.Bd -literal +typedef int (*pfil_func_flags_t)(void *arg, struct mbuf **mp, struct ifnet *, int dir, int flags, struct inpcb); .Ft int .Fn pfil_head_register "struct pfil_head *head" .Ft int @@ -58,11 +62,15 @@ typedef int (*pfil_func_t)(void *arg, struct mbuf **mp .Ft "struct pfil_head *" .Fn pfil_head_get "int af" "u_long dlt" .Ft void -.Fn pfil_add_hook "pfil_func_t" "void *arg" "int flags" "struct pfil_head *" +.Fn pfil_add_hook "pfil_func_t" "void *arg" "struct pfil_head *" .Ft void -.Fn pfil_remove_hook "pfil_func_t" "void *arg" "int flags" "struct pfil_head *" +.Fn pfil_add_hook_flags "pfil_func_flags_t" "void *arg" "int flags" "struct pfil_head *" .Ft int -.Fn pfil_run_hooks "struct pfil_head *head" "struct mbuf **mp" "struct ifnet *" "int dir" "struct inpcb *" +.Fn pfil_remove_hook "pfil_func_t" "void *arg" "struct pfil_head *" +.Ft int +.Fn pfil_remove_hook_flags "pfil_func_flags_t" "void *arg" "int flags" "struct pfil_head *" +.Ft int +.Fn pfil_run_hooks "struct pfil_head *head" "struct mbuf **mp" "struct ifnet *" "int dir" "int flags" "struct inpcb *" .Ft void .Fn pfil_rlock "struct pfil_head *" "struct rm_priotracker *" .Ft void @@ -116,6 +124,7 @@ with the and .Fn pfil_remove_hook functions, respectively. +.I The head is looked up using the .Fn pfil_head_get function, which takes the key and data link type that the packet filter @@ -135,6 +144,10 @@ interface that the packet is traversing, and the direc or .Dv PFIL_OUT ) that the packet is traveling. +The +.Vt flags +argument will indicate if an outgoing packet is simply being forwarded with the +value PFIL_FWD. The filter may change which mbuf the .Vt "mbuf\ **" argument references. Modified: stable/11/sys/net/if_bridge.c ============================================================================== --- stable/11/sys/net/if_bridge.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/net/if_bridge.c Sun Apr 15 15:22:28 2018 (r332513) @@ -3170,7 +3170,8 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, stru if (PFIL_HOOKED(&V_link_pfil_hook) && V_pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) { - error = pfil_run_hooks(&V_link_pfil_hook, mp, ifp, dir, NULL); + error = pfil_run_hooks(&V_link_pfil_hook, mp, ifp, dir, 0, + NULL); if (*mp == NULL || error != 0) /* packet consumed by filter */ return (error); @@ -3222,21 +3223,21 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, stru */ if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL) error = pfil_run_hooks(&V_inet_pfil_hook, mp, bifp, - dir, NULL); + dir, 0, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; if (V_pfil_member && ifp != NULL) error = pfil_run_hooks(&V_inet_pfil_hook, mp, ifp, - dir, NULL); + dir, 0, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; if (V_pfil_bridge && dir == PFIL_IN && bifp != NULL) error = pfil_run_hooks(&V_inet_pfil_hook, mp, bifp, - dir, NULL); + dir, 0, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; @@ -3276,21 +3277,21 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, stru case ETHERTYPE_IPV6: if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL) error = pfil_run_hooks(&V_inet6_pfil_hook, mp, bifp, - dir, NULL); + dir, 0, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; if (V_pfil_member && ifp != NULL) error = pfil_run_hooks(&V_inet6_pfil_hook, mp, ifp, - dir, NULL); + dir, 0, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; if (V_pfil_bridge && dir == PFIL_IN && bifp != NULL) error = pfil_run_hooks(&V_inet6_pfil_hook, mp, bifp, - dir, NULL); + dir, 0, NULL); break; #endif default: Modified: stable/11/sys/net/if_enc.c ============================================================================== --- stable/11/sys/net/if_enc.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/net/if_enc.c Sun Apr 15 15:22:28 2018 (r332513) @@ -299,7 +299,7 @@ enc_hhook(int32_t hhook_type, int32_t hhook_id, void * /* Make a packet looks like it was received on enc(4) */ rcvif = (*ctx->mp)->m_pkthdr.rcvif; (*ctx->mp)->m_pkthdr.rcvif = ifp; - if (pfil_run_hooks(ph, ctx->mp, ifp, pdir, ctx->inp) != 0 || + if (pfil_run_hooks(ph, ctx->mp, ifp, pdir, 0, ctx->inp) != 0 || *ctx->mp == NULL) { *ctx->mp = NULL; /* consumed by filter */ return (EACCES); Modified: stable/11/sys/net/if_ethersubr.c ============================================================================== --- stable/11/sys/net/if_ethersubr.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/net/if_ethersubr.c Sun Apr 15 15:22:28 2018 (r332513) @@ -445,7 +445,8 @@ ether_output_frame(struct ifnet *ifp, struct mbuf *m) int i; if (PFIL_HOOKED(&V_link_pfil_hook)) { - i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_OUT, NULL); + i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_OUT, 0, + NULL); if (i != 0) return (EACCES); @@ -778,7 +779,8 @@ ether_demux(struct ifnet *ifp, struct mbuf *m) /* Do not grab PROMISC frames in case we are re-entered. */ if (PFIL_HOOKED(&V_link_pfil_hook) && !(m->m_flags & M_PROMISC)) { - i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_IN, NULL); + i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_IN, 0, + NULL); if (i != 0 || m == NULL) return; Modified: stable/11/sys/net/pfil.c ============================================================================== --- stable/11/sys/net/pfil.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/net/pfil.c Sun Apr 15 15:22:28 2018 (r332513) @@ -55,7 +55,8 @@ MTX_SYSINIT(pfil_heads_lock, &pfil_global_lock, "pfil_ static struct packet_filter_hook *pfil_chain_get(int, struct pfil_head *); static int pfil_chain_add(pfil_chain_t *, struct packet_filter_hook *, int); -static int pfil_chain_remove(pfil_chain_t *, pfil_func_t, void *); +static int pfil_chain_remove(pfil_chain_t *, void *, void *); +static int pfil_add_hook_priv(void *, void *, int, struct pfil_head *, bool); LIST_HEAD(pfilheadhead, pfil_head); VNET_DEFINE(struct pfilheadhead, pfil_head_list); @@ -93,7 +94,7 @@ VNET_DEFINE(struct rmlock, pfil_lock); */ int pfil_run_hooks(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp, - int dir, struct inpcb *inp) + int dir, int flags, struct inpcb *inp) { struct rm_priotracker rmpt; struct packet_filter_hook *pfh; @@ -104,6 +105,12 @@ pfil_run_hooks(struct pfil_head *ph, struct mbuf **mp, KASSERT(ph->ph_nhooks >= 0, ("Pfil hook count dropped < 0")); for (pfh = pfil_chain_get(dir, ph); pfh != NULL; pfh = TAILQ_NEXT(pfh, pfil_chain)) { + if (pfh->pfil_func_flags != NULL) { + rv = (*pfh->pfil_func_flags)(pfh->pfil_arg, &m, ifp, + dir, flags, inp); + if (rv != 0 || m == NULL) + break; + } if (pfh->pfil_func != NULL) { rv = (*pfh->pfil_func)(pfh->pfil_arg, &m, ifp, dir, inp); @@ -254,6 +261,21 @@ pfil_head_get(int type, u_long val) } /* + * pfil_add_hook_flags() adds a function to the packet filter hook. the + * flags are: + * PFIL_IN call me on incoming packets + * PFIL_OUT call me on outgoing packets + * PFIL_ALL call me on all of the above + * PFIL_WAITOK OK to call malloc with M_WAITOK. + */ +int +pfil_add_hook_flags(pfil_func_flags_t func, void *arg, int flags, + struct pfil_head *ph) +{ + return (pfil_add_hook_priv(func, arg, flags, ph, true)); +} + +/* * pfil_add_hook() adds a function to the packet filter hook. the * flags are: * PFIL_IN call me on incoming packets @@ -264,6 +286,13 @@ pfil_head_get(int type, u_long val) int pfil_add_hook(pfil_func_t func, void *arg, int flags, struct pfil_head *ph) { + return (pfil_add_hook_priv(func, arg, flags, ph, false)); +} + +static int +pfil_add_hook_priv(void *func, void *arg, int flags, + struct pfil_head *ph, bool hasflags) +{ struct packet_filter_hook *pfh1 = NULL; struct packet_filter_hook *pfh2 = NULL; int err; @@ -286,7 +315,8 @@ pfil_add_hook(pfil_func_t func, void *arg, int flags, } PFIL_WLOCK(ph); if (flags & PFIL_IN) { - pfh1->pfil_func = func; + pfh1->pfil_func_flags = hasflags ? func : NULL; + pfh1->pfil_func = hasflags ? NULL : func; pfh1->pfil_arg = arg; err = pfil_chain_add(&ph->ph_in, pfh1, flags & ~PFIL_OUT); if (err) @@ -294,7 +324,8 @@ pfil_add_hook(pfil_func_t func, void *arg, int flags, ph->ph_nhooks++; } if (flags & PFIL_OUT) { - pfh2->pfil_func = func; + pfh2->pfil_func_flags = hasflags ? func : NULL; + pfh2->pfil_func = hasflags ? NULL : func; pfh2->pfil_arg = arg; err = pfil_chain_add(&ph->ph_out, pfh2, flags & ~PFIL_IN); if (err) { @@ -317,6 +348,17 @@ error: } /* + * pfil_remove_hook_flags removes a specific function from the packet filter hook + * chain. + */ +int +pfil_remove_hook_flags(pfil_func_flags_t func, void *arg, int flags, + struct pfil_head *ph) +{ + return (pfil_remove_hook((pfil_func_t)func, arg, flags, ph)); +} + +/* * pfil_remove_hook removes a specific function from the packet filter hook * chain. */ @@ -352,7 +394,9 @@ pfil_chain_add(pfil_chain_t *chain, struct packet_filt * First make sure the hook is not already there. */ TAILQ_FOREACH(pfh, chain, pfil_chain) - if (pfh->pfil_func == pfh1->pfil_func && + if (((pfh->pfil_func != NULL && pfh->pfil_func == pfh1->pfil_func) || + (pfh->pfil_func_flags != NULL && + pfh->pfil_func_flags == pfh1->pfil_func_flags)) && pfh->pfil_arg == pfh1->pfil_arg) return (EEXIST); @@ -371,12 +415,13 @@ pfil_chain_add(pfil_chain_t *chain, struct packet_filt * Internal: Remove a pfil hook from a hook chain. */ static int -pfil_chain_remove(pfil_chain_t *chain, pfil_func_t func, void *arg) +pfil_chain_remove(pfil_chain_t *chain, void *func, void *arg) { struct packet_filter_hook *pfh; TAILQ_FOREACH(pfh, chain, pfil_chain) - if (pfh->pfil_func == func && pfh->pfil_arg == arg) { + if ((pfh->pfil_func == func || pfh->pfil_func_flags == func) && + pfh->pfil_arg == arg) { TAILQ_REMOVE(chain, pfh, pfil_chain); free(pfh, M_IFADDR); return (0); Modified: stable/11/sys/net/pfil.h ============================================================================== --- stable/11/sys/net/pfil.h Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/net/pfil.h Sun Apr 15 15:22:28 2018 (r332513) @@ -46,6 +46,8 @@ struct inpcb; typedef int (*pfil_func_t)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *); +typedef int (*pfil_func_flags_t)(void *, struct mbuf **, struct ifnet *, + int, int, struct inpcb *); /* * The packet filter hooks are designed for anything to call them to @@ -54,13 +56,15 @@ typedef int (*pfil_func_t)(void *, struct mbuf **, str */ struct packet_filter_hook { TAILQ_ENTRY(packet_filter_hook) pfil_chain; - pfil_func_t pfil_func; - void *pfil_arg; + pfil_func_t pfil_func; + pfil_func_flags_t pfil_func_flags; + void *pfil_arg; }; #define PFIL_IN 0x00000001 #define PFIL_OUT 0x00000002 #define PFIL_WAITOK 0x00000004 +#define PFIL_FWD 0x00000008 #define PFIL_ALL (PFIL_IN|PFIL_OUT) typedef TAILQ_HEAD(pfil_chain, packet_filter_hook) pfil_chain_t; @@ -100,13 +104,15 @@ VNET_DECLARE(struct rmlock, pfil_lock); /* Public functions for pfil hook management by packet filters. */ struct pfil_head *pfil_head_get(int, u_long); +int pfil_add_hook_flags(pfil_func_flags_t, void *, int, struct pfil_head *); int pfil_add_hook(pfil_func_t, void *, int, struct pfil_head *); +int pfil_remove_hook_flags(pfil_func_flags_t, void *, int, struct pfil_head *); int pfil_remove_hook(pfil_func_t, void *, int, struct pfil_head *); #define PFIL_HOOKED(p) ((p)->ph_nhooks > 0) /* Public functions to run the packet inspection by protocols. */ -int pfil_run_hooks(struct pfil_head *, struct mbuf **, struct ifnet *, - int, struct inpcb *inp); +int pfil_run_hooks(struct pfil_head *, struct mbuf **, struct ifnet *, int, + int, struct inpcb *inp); /* Public functions for pfil head management by protocols. */ int pfil_head_register(struct pfil_head *); Modified: stable/11/sys/net/pfvar.h ============================================================================== --- stable/11/sys/net/pfvar.h Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/net/pfvar.h Sun Apr 15 15:22:28 2018 (r332513) @@ -1574,13 +1574,13 @@ extern void pf_addrcpy(struct pf_addr *, struct pf_ void pf_free_rule(struct pf_rule *); #ifdef INET -int pf_test(int, struct ifnet *, struct mbuf **, struct inpcb *); +int pf_test(int, int, struct ifnet *, struct mbuf **, struct inpcb *); int pf_normalize_ip(struct mbuf **, int, struct pfi_kif *, u_short *, struct pf_pdesc *); #endif /* INET */ #ifdef INET6 -int pf_test6(int, struct ifnet *, struct mbuf **, struct inpcb *); +int pf_test6(int, int, struct ifnet *, struct mbuf **, struct inpcb *); int pf_normalize_ip6(struct mbuf **, int, struct pfi_kif *, u_short *, struct pf_pdesc *); void pf_poolmask(struct pf_addr *, struct pf_addr*, Modified: stable/11/sys/netinet/ip_fastfwd.c ============================================================================== --- stable/11/sys/netinet/ip_fastfwd.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netinet/ip_fastfwd.c Sun Apr 15 15:22:28 2018 (r332513) @@ -230,7 +230,7 @@ ip_tryforward(struct mbuf *m) goto passin; if (pfil_run_hooks( - &V_inet_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN, NULL) || + &V_inet_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN, 0, NULL) || m == NULL) goto drop; @@ -303,8 +303,8 @@ passin: if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passout; - if (pfil_run_hooks(&V_inet_pfil_hook, &m, nh.nh_ifp, PFIL_OUT, NULL) || - m == NULL) { + if (pfil_run_hooks(&V_inet_pfil_hook, &m, nh.nh_ifp, PFIL_OUT, PFIL_FWD, + NULL) || m == NULL) { goto drop; } Modified: stable/11/sys/netinet/ip_input.c ============================================================================== --- stable/11/sys/netinet/ip_input.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netinet/ip_input.c Sun Apr 15 15:22:28 2018 (r332513) @@ -598,7 +598,7 @@ tooshort: goto passin; odst = ip->ip_dst; - if (pfil_run_hooks(&V_inet_pfil_hook, &m, ifp, PFIL_IN, NULL) != 0) + if (pfil_run_hooks(&V_inet_pfil_hook, &m, ifp, PFIL_IN, 0, NULL) != 0) return; if (m == NULL) /* consumed by filter */ return; Modified: stable/11/sys/netinet/ip_output.c ============================================================================== --- stable/11/sys/netinet/ip_output.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netinet/ip_output.c Sun Apr 15 15:22:28 2018 (r332513) @@ -115,7 +115,7 @@ ip_output_pfil(struct mbuf **mp, struct ifnet *ifp, st /* Run through list of hooks for output packets. */ odst.s_addr = ip->ip_dst.s_addr; - *error = pfil_run_hooks(&V_inet_pfil_hook, mp, ifp, PFIL_OUT, inp); + *error = pfil_run_hooks(&V_inet_pfil_hook, mp, ifp, PFIL_OUT, 0, inp); m = *mp; if ((*error) != 0 || m == NULL) return 1; /* Finished */ Modified: stable/11/sys/netinet6/ip6_fastfwd.c ============================================================================== --- stable/11/sys/netinet6/ip6_fastfwd.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netinet6/ip6_fastfwd.c Sun Apr 15 15:22:28 2018 (r332513) @@ -157,7 +157,7 @@ ip6_tryforward(struct mbuf *m) */ if (!PFIL_HOOKED(&V_inet6_pfil_hook)) goto passin; - if (pfil_run_hooks(&V_inet6_pfil_hook, &m, rcvif, PFIL_IN, + if (pfil_run_hooks(&V_inet6_pfil_hook, &m, rcvif, PFIL_IN, 0, NULL) != 0 || m == NULL) goto dropin; /* @@ -201,7 +201,7 @@ passin: if (!PFIL_HOOKED(&V_inet6_pfil_hook)) goto passout; if (pfil_run_hooks(&V_inet6_pfil_hook, &m, nh.nh_ifp, PFIL_OUT, - NULL) != 0 || m == NULL) + PFIL_FWD, NULL) != 0 || m == NULL) goto dropout; /* Modified: stable/11/sys/netinet6/ip6_forward.c ============================================================================== --- stable/11/sys/netinet6/ip6_forward.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netinet6/ip6_forward.c Sun Apr 15 15:22:28 2018 (r332513) @@ -324,8 +324,9 @@ again2: goto pass; odst = ip6->ip6_dst; - /* Run through list of hooks for output packets. */ - error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL); + /* Run through list of hooks for forwarded packets. */ + error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, + PFIL_FWD, NULL); if (error != 0 || m == NULL) goto freecopy; /* consumed by filter */ ip6 = mtod(m, struct ip6_hdr *); Modified: stable/11/sys/netinet6/ip6_input.c ============================================================================== --- stable/11/sys/netinet6/ip6_input.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netinet6/ip6_input.c Sun Apr 15 15:22:28 2018 (r332513) @@ -759,7 +759,7 @@ ip6_input(struct mbuf *m) odst = ip6->ip6_dst; if (pfil_run_hooks(&V_inet6_pfil_hook, &m, - m->m_pkthdr.rcvif, PFIL_IN, NULL)) + m->m_pkthdr.rcvif, PFIL_IN, 0, NULL)) return; if (m == NULL) /* consumed by filter */ return; Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netinet6/ip6_output.c Sun Apr 15 15:22:28 2018 (r332513) @@ -790,7 +790,7 @@ again: odst = ip6->ip6_dst; /* Run through list of hooks for output packets. */ - error = pfil_run_hooks(&V_inet6_pfil_hook, &m, ifp, PFIL_OUT, inp); + error = pfil_run_hooks(&V_inet6_pfil_hook, &m, ifp, PFIL_OUT, 0, inp); if (error != 0 || m == NULL) goto done; /* adjust pointer */ Modified: stable/11/sys/netpfil/pf/pf.c ============================================================================== --- stable/11/sys/netpfil/pf/pf.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netpfil/pf/pf.c Sun Apr 15 15:22:28 2018 (r332513) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -5512,7 +5513,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, goto bad; if (oifp != ifp) { - if (pf_test(PF_OUT, ifp, &m0, NULL) != PF_PASS) + if (pf_test(PF_OUT, 0, ifp, &m0, NULL) != PF_PASS) goto bad; else if (m0 == NULL) goto done; @@ -5684,7 +5685,7 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, goto bad; if (oifp != ifp) { - if (pf_test6(PF_FWD, ifp, &m0, NULL) != PF_PASS) + if (pf_test6(PF_OUT, PFIL_FWD, ifp, &m0, NULL) != PF_PASS) goto bad; else if (m0 == NULL) goto done; @@ -5874,7 +5875,7 @@ pf_check_proto_cksum(struct mbuf *m, int off, int len, #ifdef INET int -pf_test(int dir, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp) +pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp) { struct pfi_kif *kif; u_short action, reason = 0, log = 0; @@ -6261,7 +6262,7 @@ done: #ifdef INET6 int -pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp) +pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp) { struct pfi_kif *kif; u_short action, reason = 0, log = 0; @@ -6273,28 +6274,9 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0, struct pf_ruleset *ruleset = NULL; struct pf_pdesc pd; int off, terminal = 0, dirndx, rh_cnt = 0, pqid = 0; - int fwdir = dir; M_ASSERTPKTHDR(m); - /* Detect packet forwarding. - * If the input interface is different from the output interface we're - * forwarding. - * We do need to be careful about bridges. If the - * net.link.bridge.pfil_bridge sysctl is set we can be filtering on a - * bridge, so if the input interface is a bridge member and the output - * interface is its bridge or a member of the same bridge we're not - * actually forwarding but bridging. - */ - if (dir == PF_OUT && m->m_pkthdr.rcvif && ifp != m->m_pkthdr.rcvif && - (m->m_pkthdr.rcvif->if_bridge == NULL || - (m->m_pkthdr.rcvif->if_bridge != ifp->if_softc && - m->m_pkthdr.rcvif->if_bridge != ifp->if_bridge))) - fwdir = PF_FWD; - - if (dir == PF_FWD) - dir = PF_OUT; - if (!V_pf_status.running) return (PF_PASS); @@ -6672,7 +6654,7 @@ done: PF_STATE_UNLOCK(s); /* If reassembled packet passed, create new fragments. */ - if (action == PF_PASS && *m0 && fwdir == PF_FWD && + if (action == PF_PASS && *m0 && (pflags & PFIL_FWD) && (mtag = m_tag_find(m, PF_REASSEMBLED, NULL)) != NULL) action = pf_refragment6(ifp, m0, mtag); Modified: stable/11/sys/netpfil/pf/pf.h ============================================================================== --- stable/11/sys/netpfil/pf/pf.h Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netpfil/pf/pf.h Sun Apr 15 15:22:28 2018 (r332513) @@ -43,7 +43,7 @@ #endif #endif -enum { PF_INOUT, PF_IN, PF_OUT, PF_FWD }; +enum { PF_INOUT, PF_IN, PF_OUT }; enum { PF_PASS, PF_DROP, PF_SCRUB, PF_NOSCRUB, PF_NAT, PF_NONAT, PF_BINAT, PF_NOBINAT, PF_RDR, PF_NORDR, PF_SYNPROXY_DROP, PF_DEFER }; enum { PF_RULESET_SCRUB, PF_RULESET_FILTER, PF_RULESET_NAT, Modified: stable/11/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/11/sys/netpfil/pf/pf_ioctl.c Sun Apr 15 15:06:07 2018 (r332512) +++ stable/11/sys/netpfil/pf/pf_ioctl.c Sun Apr 15 15:22:28 2018 (r332513) @@ -165,15 +165,15 @@ static void pf_tbladdr_copyout(struct pf_addr_wrap * */ #ifdef INET static int pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp, - int dir, struct inpcb *inp); + int dir, int flags, struct inpcb *inp); static int pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp, - int dir, struct inpcb *inp); + int dir, int flags, struct inpcb *inp); #endif #ifdef INET6 static int pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp, - int dir, struct inpcb *inp); + int dir, int flags, struct inpcb *inp); static int pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp, - int dir, struct inpcb *inp); + int dir, int flags, struct inpcb *inp); #endif static int hook_pf(void); @@ -3736,12 +3736,12 @@ shutdown_pf(void) #ifdef INET static int -pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, +pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, int flags, struct inpcb *inp) { int chk; - chk = pf_test(PF_IN, ifp, m, inp); + chk = pf_test(PF_IN, flags, ifp, m, inp); if (chk && *m) { m_freem(*m); *m = NULL; @@ -3753,12 +3753,12 @@ pf_check_in(void *arg, struct mbuf **m, struct ifnet * } static int -pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, +pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, int flags, struct inpcb *inp) { int chk; - chk = pf_test(PF_OUT, ifp, m, inp); + chk = pf_test(PF_OUT, flags, ifp, m, inp); if (chk && *m) { m_freem(*m); *m = NULL; @@ -3772,7 +3772,7 @@ pf_check_out(void *arg, struct mbuf **m, struct ifnet #ifdef INET6 static int -pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, +pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, int flags, struct inpcb *inp) { int chk; @@ -3783,7 +3783,7 @@ pf_check6_in(void *arg, struct mbuf **m, struct ifnet * filtering we have change this to lo0 as it is the case in IPv4. */ CURVNET_SET(ifp->if_vnet); - chk = pf_test6(PF_IN, (*m)->m_flags & M_LOOP ? V_loif : ifp, m, inp); + chk = pf_test6(PF_IN, flags, (*m)->m_flags & M_LOOP ? V_loif : ifp, m, inp); CURVNET_RESTORE(); if (chk && *m) { m_freem(*m); @@ -3795,13 +3795,13 @@ pf_check6_in(void *arg, struct mbuf **m, struct ifnet } static int -pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, +pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, int flags, struct inpcb *inp) { int chk; CURVNET_SET(ifp->if_vnet); - chk = pf_test6(PF_OUT, ifp, m, inp); + chk = pf_test6(PF_OUT, flags, ifp, m, inp); CURVNET_RESTORE(); if (chk && *m) { m_freem(*m); @@ -3830,22 +3830,22 @@ hook_pf(void) pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET); if (pfh_inet == NULL) return (ESRCH); /* XXX */ - pfil_add_hook(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet); - pfil_add_hook(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet); + pfil_add_hook_flags(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet); + pfil_add_hook_flags(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet); #endif #ifdef INET6 pfh_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6); if (pfh_inet6 == NULL) { #ifdef INET - pfil_remove_hook(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK, + pfil_remove_hook_flags(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet); - pfil_remove_hook(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK, + pfil_remove_hook_flags(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet); #endif return (ESRCH); /* XXX */ } - pfil_add_hook(pf_check6_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet6); - pfil_add_hook(pf_check6_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet6); + pfil_add_hook_flags(pf_check6_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet6); + pfil_add_hook_flags(pf_check6_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet6); #endif V_pf_pfil_hooked = 1; @@ -3869,18 +3869,18 @@ dehook_pf(void) pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET); if (pfh_inet == NULL) return (ESRCH); /* XXX */ - pfil_remove_hook(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK, + pfil_remove_hook_flags(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet); - pfil_remove_hook(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK, + pfil_remove_hook_flags(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet); #endif #ifdef INET6 pfh_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6); if (pfh_inet6 == NULL) return (ESRCH); /* XXX */ - pfil_remove_hook(pf_check6_in, NULL, PFIL_IN | PFIL_WAITOK, + pfil_remove_hook_flags(pf_check6_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet6); - pfil_remove_hook(pf_check6_out, NULL, PFIL_OUT | PFIL_WAITOK, + pfil_remove_hook_flags(pf_check6_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet6); #endif From owner-svn-src-all@freebsd.org Sun Apr 15 15:23:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD828F9B7BD; Sun, 15 Apr 2018 15:23:48 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54A77849AB; Sun, 15 Apr 2018 15:23:48 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BAA710ADA; Sun, 15 Apr 2018 15:23:48 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3FFNmWL042709; Sun, 15 Apr 2018 15:23:48 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3FFNmxG042708; Sun, 15 Apr 2018 15:23:48 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804151523.w3FFNmxG042708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sun, 15 Apr 2018 15:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332514 - head X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 332514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 15:23:48 -0000 Author: brooks Date: Sun Apr 15 15:23:47 2018 New Revision: 332514 URL: https://svnweb.freebsd.org/changeset/base/332514 Log: Manpages are .gz files. Reported by: trasz Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Apr 15 15:22:28 2018 (r332513) +++ head/ObsoleteFiles.inc Sun Apr 15 15:23:47 2018 (r332514) @@ -40,7 +40,7 @@ # 20180413: remove Arcnet support OLD_FILES+=usr/include/net/if_arc.h -OLD_FILES+=usr/share/man/man4/cm.4 +OLD_FILES+=usr/share/man/man4/cm.4.gz # 20180409: remove FDDI support OLD_FILES+=usr/include/net/fddi.h OLD_FILES+=usr/share/man/man4/fpa.4.gz From owner-svn-src-all@freebsd.org Sun Apr 15 15:33:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C88F7F9C5D4; Sun, 15 Apr 2018 15:33:19 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x233.google.com (mail-ot0-x233.google.com [IPv6:2607:f8b0:4003:c0f::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5AA1A86FA6; Sun, 15 Apr 2018 15:33:19 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x233.google.com with SMTP id 23-v6so14773074otj.0; Sun, 15 Apr 2018 08:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ewb96LQ5Ta6eI2oVPrIC4+7x+yDeXc4YDGzZW872KGI=; b=QiJ8MX8d+9Yux26uXqR4eYzBy5BuOKn5VB06MuigmsLzklogOeytNSat2FZ4tQQIUK NZXUiUp64NBn3vo7hsxU519z1Q6Qm1uLAWCygw7XezsgSgqsW6fYG4Ktqdl9wsziEsvJ 8azphvxPpuwpvqLVk0R3KeFbnrr1Sq0V+l5esVm9X23RjLQhW5vMa8eE/UZ8zPiCRSWs AUPyeHX78jUbPuSmfNkMmHmk154hmkLm94XAE2TvWt6RS9REBt5fRhj8Noz5ZgvhwXwj YDgnZX9GO3F39BCeguUjbau0Zwu20ImhZ3Ga4sscc4EojlRjJ+n06Ubz4I7rUJrP4Dzv Zuxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ewb96LQ5Ta6eI2oVPrIC4+7x+yDeXc4YDGzZW872KGI=; b=dsXsI5AAnnPkmp9x/eE6ma3xKk3mnd0F9bOu3IOXzc0r1CaugVoPTQIZ684SP+Gv8Q 8dV7Nji9OOIQQU4WXhGgSOPcDNEfo0B6uCX9GA1oIJkwKijmMijw+sU2n37f2A6piae4 bc2AFXQCrMBA1B5ZPGOsGQYaLzpbsK+FrPBWmRX3c1/TBA0akhQYRVWisoqgGa14x1FN 2JVhOz85EdAWZOgcL9JM8J34vbBG9c2vTBFiu3Ib7oGKmumbf7WcDJVXDqiMiUDI8Ueh 4FGJW7JMydKRJkiUoVov8ND96xOyruvO7WRqKc/ulLLSPU9cY+ei2lnQMdKHplXzGxaF V4/g== X-Gm-Message-State: ALQs6tDjf77Rwv+fs5BYnFjDWf+uBX1BqX5FmUJnAYHsvC+gashKKGxx ZhMISxGzwSBxnt73nVeh2mWNC5s0h7wL8qZMz0I= X-Google-Smtp-Source: AIpwx498crAo49YR6baMSqSGLReOt6LoDEDHWINBqLxNCQce7eZE0T8sU80lyHwcplYf/mMi7sPX2MSk6xZvriNPdnM= X-Received: by 2002:a9d:400d:: with SMTP id m13-v6mr8749495ote.391.1523806398643; Sun, 15 Apr 2018 08:33:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:34b1:0:0:0:0:0 with HTTP; Sun, 15 Apr 2018 08:33:18 -0700 (PDT) In-Reply-To: <20180415151303.GA99239@spindle.one-eyed-alien.net> References: <201804151506.w3FF67Q9032678@repo.freebsd.org> <20180415151303.GA99239@spindle.one-eyed-alien.net> From: Benjamin Kaduk Date: Sun, 15 Apr 2018 10:33:18 -0500 Message-ID: Subject: Re: svn commit: r332512 - head/sys/conf To: Brooks Davis Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 15:33:20 -0000 On Sun, Apr 15, 2018 at 10:13 AM, Brooks Davis wrote: > On Sun, Apr 15, 2018 at 03:06:07PM +0000, Brooks Davis wrote: > > Author: brooks > > Date: Sun Apr 15 15:06:07 2018 > > New Revision: 332512 > > URL: https://svnweb.freebsd.org/changeset/base/332512 > > > > Log: > > Remove device cm which was removed in r332490. > > I'm quite confused by the fact that tinderbox didn't trip on this when I > ran it. Are -DNO_CLEAN tinderbox builds insufficent for device removal? > Given that they would leave around the old object files needed to resolve stale references to removed driver components, it seems likely. -Ben From owner-svn-src-all@freebsd.org Sun Apr 15 15:37:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD4AF9CAF0; Sun, 15 Apr 2018 15:37:24 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 52EE187221; Sun, 15 Apr 2018 15:37:24 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 615A85A9F12; Sun, 15 Apr 2018 15:37:23 +0000 (UTC) Date: Sun, 15 Apr 2018 15:37:23 +0000 From: Brooks Davis To: Benjamin Kaduk Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r332512 - head/sys/conf Message-ID: <20180415153723.GC99239@spindle.one-eyed-alien.net> References: <201804151506.w3FF67Q9032678@repo.freebsd.org> <20180415151303.GA99239@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oTHb8nViIGeoXxdp" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 15:37:24 -0000 --oTHb8nViIGeoXxdp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 15, 2018 at 10:33:18AM -0500, Benjamin Kaduk wrote: > On Sun, Apr 15, 2018 at 10:13 AM, Brooks Davis wrote: >=20 > > On Sun, Apr 15, 2018 at 03:06:07PM +0000, Brooks Davis wrote: > > > Author: brooks > > > Date: Sun Apr 15 15:06:07 2018 > > > New Revision: 332512 > > > URL: https://svnweb.freebsd.org/changeset/base/332512 > > > > > > Log: > > > Remove device cm which was removed in r332490. > > > > I'm quite confused by the fact that tinderbox didn't trip on this when I > > ran it. Are -DNO_CLEAN tinderbox builds insufficent for device removal? > > >=20 > Given that they would leave around the old object files needed to resolve > stale > references to removed driver components, it seems likely. The thing is, config should have failed and it always runs in -DNO_CLEAN buildkernel. I expected the same to hold for tinderbox, but apparently not. -- Brooks --oTHb8nViIGeoXxdp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJa03GxAAoJEKzQXbSebgfAylQH/3Cg4QjlC6UNJhfbDR61JgD5 to3kxdtuwsDmKHiySniMTghEFM9eVHP1g9JPU/6DRMNsBKCk5krolqDPJxFlZwQ5 7z6O/RIFWSumQzizwYOzKRWhcx+kKD4s2IUNAd5Egfi6c9URO+4OsoI8nUpRtAeV QrzxFvvZ6PD0KyZDS+e3wJf0UJWjhB49z/Fu19RkWgHuHM9OZDMdqA3FABf9Vbb2 7+nLuOmwLWoUoOzrJ6swcUNvY5KyXQRApuTM9Po0fBCUHCi5QwxrthpsBtg2E/pN QUNSeixYwSuMwEzOsn5QEWr1fy7VgfWGrZgLT7JhujglaXd2yPkdmulX0upkpFo= =4zSm -----END PGP SIGNATURE----- --oTHb8nViIGeoXxdp-- From owner-svn-src-all@freebsd.org Sun Apr 15 17:28:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF23FFA43AE; Sun, 15 Apr 2018 17:28:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AEF280F07; Sun, 15 Apr 2018 17:28:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1E97851151; Sun, 15 Apr 2018 19:28:37 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_8CD62151-45F0-4C82-B440-5407527962AD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r332512 - head/sys/conf Date: Sun, 15 Apr 2018 19:28:29 +0200 In-Reply-To: <20180415153723.GC99239@spindle.one-eyed-alien.net> Cc: Benjamin Kaduk , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers To: Brooks Davis References: <201804151506.w3FF67Q9032678@repo.freebsd.org> <20180415151303.GA99239@spindle.one-eyed-alien.net> <20180415153723.GC99239@spindle.one-eyed-alien.net> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 17:28:45 -0000 --Apple-Mail=_8CD62151-45F0-4C82-B440-5407527962AD Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 15 Apr 2018, at 17:37, Brooks Davis wrote: > > On Sun, Apr 15, 2018 at 10:33:18AM -0500, Benjamin Kaduk wrote: >> On Sun, Apr 15, 2018 at 10:13 AM, Brooks Davis wrote: >> >>> On Sun, Apr 15, 2018 at 03:06:07PM +0000, Brooks Davis wrote: >>>> Author: brooks >>>> Date: Sun Apr 15 15:06:07 2018 >>>> New Revision: 332512 >>>> URL: https://svnweb.freebsd.org/changeset/base/332512 >>>> >>>> Log: >>>> Remove device cm which was removed in r332490. >>> >>> I'm quite confused by the fact that tinderbox didn't trip on this when I >>> ran it. Are -DNO_CLEAN tinderbox builds insufficent for device removal? >>> >> >> Given that they would leave around the old object files needed to resolve >> stale >> references to removed driver components, it seems likely. > > The thing is, config should have failed and it always runs in > -DNO_CLEAN buildkernel. I expected the same to hold for tinderbox, but > apparently not. But were any of the LINT files updated? I guess not, if you didn't remove anything from NOTES. I think it is likely that config will *not* be run again if the LINT files are older than their respective targets? -Dimitry --Apple-Mail=_8CD62151-45F0-4C82-B440-5407527962AD Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWtOLvQAKCRCwXqMKLiCW oy6GAKCpJuC5MwauQfcb4Bg0qIVUUQa8KgCgkcs3xHEdZCOChsZLqn/uZOkwWP0= =WziM -----END PGP SIGNATURE----- --Apple-Mail=_8CD62151-45F0-4C82-B440-5407527962AD-- From owner-svn-src-all@freebsd.org Sun Apr 15 17:37:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E5B0FA4CA4; Sun, 15 Apr 2018 17:37:59 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 BD56383BB6; Sun, 15 Apr 2018 17:37:58 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D34CA5A9F13; Sun, 15 Apr 2018 17:37:57 +0000 (UTC) Date: Sun, 15 Apr 2018 17:37:57 +0000 From: Brooks Davis To: Dimitry Andric Cc: Benjamin Kaduk , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r332512 - head/sys/conf Message-ID: <20180415173757.GA28110@spindle.one-eyed-alien.net> References: <201804151506.w3FF67Q9032678@repo.freebsd.org> <20180415151303.GA99239@spindle.one-eyed-alien.net> <20180415153723.GC99239@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 17:37:59 -0000 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 15, 2018 at 07:28:29PM +0200, Dimitry Andric wrote: > On 15 Apr 2018, at 17:37, Brooks Davis wrote: > >=20 > > On Sun, Apr 15, 2018 at 10:33:18AM -0500, Benjamin Kaduk wrote: > >> On Sun, Apr 15, 2018 at 10:13 AM, Brooks Davis wr= ote: > >>=20 > >>> On Sun, Apr 15, 2018 at 03:06:07PM +0000, Brooks Davis wrote: > >>>> Author: brooks > >>>> Date: Sun Apr 15 15:06:07 2018 > >>>> New Revision: 332512 > >>>> URL: https://svnweb.freebsd.org/changeset/base/332512 > >>>>=20 > >>>> Log: > >>>> Remove device cm which was removed in r332490. > >>>=20 > >>> I'm quite confused by the fact that tinderbox didn't trip on this whe= n I > >>> ran it. Are -DNO_CLEAN tinderbox builds insufficent for device remov= al? > >>>=20 > >>=20 > >> Given that they would leave around the old object files needed to reso= lve > >> stale > >> references to removed driver components, it seems likely. > >=20 > > The thing is, config should have failed and it always runs in > > -DNO_CLEAN buildkernel. I expected the same to hold for tinderbox, but > > apparently not. >=20 > But were any of the LINT files updated? I guess not, if you didn't > remove anything from NOTES. I think it is likely that config will *not* > be run again if the LINT files are older than their respective targets? NOTES was updated because I did remove device arcnet, I just somehow failed to find the cm(4) entries. I'll just try to remember to do -DNO_CLEAN kernel builds for future removals. -- Brooks --gKMricLos+KVdGMg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJa0431AAoJEKzQXbSebgfADycH/1TNnShgGff4YjIcNquRGL40 bQuOe7f9BRtPzF8giDMQfbutz2WuQfVWjMr1zq15/CwnUh+2+JzGFZU99AAVcLzR m/3siMsLN7jrMRlBIjG99WIE2hqaUgpZPeYvCWcVxK1XVlSaJILHML/tVhffxqC3 qMWGi2uTgmPJNVsU5W678HI1gSprWnitCEve4VkaB2xvCg+7AzwmG3LV4pECheS6 ROqrDTQQTTxVQDyci2V23u9Klj398RD+XTXd31PJoFA3cPU5SernrW9JwdY/lDXc ESDlWfBZ1WE1lgHVbNdGYoZqOigs1q3dQZI+PPbk/1rNO7Epc8Jbt5PrJ/mpxvM= =FqS1 -----END PGP SIGNATURE----- --gKMricLos+KVdGMg-- From owner-svn-src-all@freebsd.org Sun Apr 15 19:23:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB3AFF84DA7; Sun, 15 Apr 2018 19:23:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D1F87ACE9; Sun, 15 Apr 2018 19:23:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 583521314F; Sun, 15 Apr 2018 19:23:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3FJNbof061984; Sun, 15 Apr 2018 19:23:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3FJNbxn061983; Sun, 15 Apr 2018 19:23:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201804151923.w3FJNbxn061983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 15 Apr 2018 19:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332515 - head/usr.sbin/cxgbetool X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/usr.sbin/cxgbetool X-SVN-Commit-Revision: 332515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 19:23:37 -0000 Author: np Date: Sun Apr 15 19:23:37 2018 New Revision: 332515 URL: https://svnweb.freebsd.org/changeset/base/332515 Log: Fix typo in cxgbetool.8. Modified: head/usr.sbin/cxgbetool/cxgbetool.8 Modified: head/usr.sbin/cxgbetool/cxgbetool.8 ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.8 Sun Apr 15 15:23:47 2018 (r332514) +++ head/usr.sbin/cxgbetool/cxgbetool.8 Sun Apr 15 19:23:37 2018 (r332515) @@ -562,7 +562,7 @@ Class Rate Limiting. .It Sy cl-wrr Class Weighted Round Robin. .Pp -.It Sy cl-wrr +.It Sy ch-rl Channel Rate Limiting. .El .It Sy mode Ar scheduler-mode From owner-svn-src-all@freebsd.org Sun Apr 15 20:20:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2213F89565; Sun, 15 Apr 2018 20:20:08 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A422486A46; Sun, 15 Apr 2018 20:20:08 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EF5813970; Sun, 15 Apr 2018 20:20:08 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3FKK8Su090603; Sun, 15 Apr 2018 20:20:08 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3FKK8ea090602; Sun, 15 Apr 2018 20:20:08 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201804152020.w3FKK8ea090602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 15 Apr 2018 20:20: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: r332516 - stable/11/sys/amd64/vmm X-SVN-Group: stable-11 X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: stable/11/sys/amd64/vmm X-SVN-Commit-Revision: 332516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 20:20:09 -0000 Author: grehan Date: Sun Apr 15 20:20:08 2018 New Revision: 332516 URL: https://svnweb.freebsd.org/changeset/base/332516 Log: MFC r325261 Emulate the "OR reg, r/m" instruction (opcode 0BH). This is needed for the HDA emulation with FreeBSD guests. Modified: stable/11/sys/amd64/vmm/vmm_instruction_emul.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- stable/11/sys/amd64/vmm/vmm_instruction_emul.c Sun Apr 15 19:23:37 2018 (r332515) +++ stable/11/sys/amd64/vmm/vmm_instruction_emul.c Sun Apr 15 20:20:08 2018 (r332516) @@ -109,6 +109,10 @@ static const struct vie_op one_byte_opcodes[256] = { .op_byte = 0x0F, .op_type = VIE_OP_TYPE_TWO_BYTE }, + [0x0B] = { + .op_byte = 0x0B, + .op_type = VIE_OP_TYPE_OR, + }, [0x2B] = { .op_byte = 0x2B, .op_type = VIE_OP_TYPE_SUB, @@ -992,12 +996,38 @@ emulate_or(void *vm, int vcpuid, uint64_t gpa, struct mem_region_read_t memread, mem_region_write_t memwrite, void *arg) { int error, size; - uint64_t val1, result, rflags, rflags2; + enum vm_reg_name reg; + uint64_t result, rflags, rflags2, val1, val2; size = vie->opsize; error = EINVAL; switch (vie->op.op_byte) { + case 0x0B: + /* + * OR reg (ModRM:reg) and mem (ModRM:r/m) and store the + * result in reg. + * + * 0b/r or r16, r/m16 + * 0b/r or r32, r/m32 + * REX.W + 0b/r or r64, r/m64 + */ + + /* get the first operand */ + reg = gpr_map[vie->reg]; + error = vie_read_register(vm, vcpuid, reg, &val1); + if (error) + break; + + /* get the second operand */ + error = memread(vm, vcpuid, gpa, &val2, size, arg); + if (error) + break; + + /* perform the operation and write the result */ + result = val1 | val2; + error = vie_update_register(vm, vcpuid, reg, result, size); + break; case 0x81: case 0x83: /* From owner-svn-src-all@freebsd.org Sun Apr 15 20:29:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7E68F8A2B2; Sun, 15 Apr 2018 20:29:38 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5AC2869973; Sun, 15 Apr 2018 20:29:38 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51A5413AFD; Sun, 15 Apr 2018 20:29:38 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3FKTcet095299; Sun, 15 Apr 2018 20:29:38 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3FKTcwt095298; Sun, 15 Apr 2018 20:29:38 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201804152029.w3FKTcwt095298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 15 Apr 2018 20:29:38 +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: r332517 - stable/11/usr.sbin/bhyvectl X-SVN-Group: stable-11 X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: stable/11/usr.sbin/bhyvectl X-SVN-Commit-Revision: 332517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 20:29:38 -0000 Author: grehan Date: Sun Apr 15 20:29:37 2018 New Revision: 332517 URL: https://svnweb.freebsd.org/changeset/base/332517 Log: MFC r330764 Add CR2 get/set support. Modified: stable/11/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- stable/11/usr.sbin/bhyvectl/bhyvectl.c Sun Apr 15 20:20:08 2018 (r332516) +++ stable/11/usr.sbin/bhyvectl/bhyvectl.c Sun Apr 15 20:29:37 2018 (r332517) @@ -109,6 +109,8 @@ usage(bool cpu_intel) " [--desc-access=]\n" " [--set-cr0=]\n" " [--get-cr0]\n" + " [--set-cr2=]\n" + " [--get-cr2]\n" " [--set-cr3=]\n" " [--get-cr3]\n" " [--set-cr4=]\n" @@ -254,7 +256,8 @@ static int create, destroy, get_memmap, get_memseg; static int get_intinfo; static int get_active_cpus, get_suspended_cpus; static uint64_t memsize; -static int set_cr0, get_cr0, set_cr3, get_cr3, set_cr4, get_cr4; +static int set_cr0, get_cr0, set_cr2, get_cr2, set_cr3, get_cr3; +static int set_cr4, get_cr4; static int set_efer, get_efer; static int set_dr0, get_dr0; static int set_dr1, get_dr1; @@ -551,6 +554,7 @@ enum { SET_MEM, SET_EFER, SET_CR0, + SET_CR2, SET_CR3, SET_CR4, SET_DR0, @@ -662,7 +666,7 @@ cpu_vendor_intel(void) static int get_all_registers(struct vmctx *ctx, int vcpu) { - uint64_t cr0, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; + uint64_t cr0, cr2, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; uint64_t rsp, rip, rflags, efer; uint64_t rax, rbx, rcx, rdx, rsi, rdi, rbp; uint64_t r8, r9, r10, r11, r12, r13, r14, r15; @@ -680,6 +684,12 @@ get_all_registers(struct vmctx *ctx, int vcpu) printf("cr0[%d]\t\t0x%016lx\n", vcpu, cr0); } + if (!error && (get_cr2 || get_all)) { + error = vm_get_register(ctx, vcpu, VM_REG_GUEST_CR2, &cr2); + if (error == 0) + printf("cr2[%d]\t\t0x%016lx\n", vcpu, cr2); + } + if (!error && (get_cr3 || get_all)) { error = vm_get_register(ctx, vcpu, VM_REG_GUEST_CR3, &cr3); if (error == 0) @@ -1322,6 +1332,7 @@ setup_options(bool cpu_intel) { "set-mem", REQ_ARG, 0, SET_MEM }, { "set-efer", REQ_ARG, 0, SET_EFER }, { "set-cr0", REQ_ARG, 0, SET_CR0 }, + { "set-cr2", REQ_ARG, 0, SET_CR2 }, { "set-cr3", REQ_ARG, 0, SET_CR3 }, { "set-cr4", REQ_ARG, 0, SET_CR4 }, { "set-dr0", REQ_ARG, 0, SET_DR0 }, @@ -1384,6 +1395,7 @@ setup_options(bool cpu_intel) { "get-memseg", NO_ARG, &get_memseg, 1 }, { "get-efer", NO_ARG, &get_efer, 1 }, { "get-cr0", NO_ARG, &get_cr0, 1 }, + { "get-cr2", NO_ARG, &get_cr2, 1 }, { "get-cr3", NO_ARG, &get_cr3, 1 }, { "get-cr4", NO_ARG, &get_cr4, 1 }, { "get-dr0", NO_ARG, &get_dr0, 1 }, @@ -1668,7 +1680,7 @@ main(int argc, char *argv[]) int error, ch, vcpu, ptenum; vm_paddr_t gpa_pmap; struct vm_exit vmexit; - uint64_t rax, cr0, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; + uint64_t rax, cr0, cr2, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; uint64_t rsp, rip, rflags, efer, pat; uint64_t eptp, bm, addr, u64, pteval[4], *pte, info[2]; struct vmctx *ctx; @@ -1708,6 +1720,10 @@ main(int argc, char *argv[]) cr0 = strtoul(optarg, NULL, 0); set_cr0 = 1; break; + case SET_CR2: + cr2 = strtoul(optarg, NULL, 0); + set_cr2 = 1; + break; case SET_CR3: cr3 = strtoul(optarg, NULL, 0); set_cr3 = 1; @@ -1870,6 +1886,9 @@ main(int argc, char *argv[]) if (!error && set_cr0) error = vm_set_register(ctx, vcpu, VM_REG_GUEST_CR0, cr0); + + if (!error && set_cr2) + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_CR2, cr2); if (!error && set_cr3) error = vm_set_register(ctx, vcpu, VM_REG_GUEST_CR3, cr3); From owner-svn-src-all@freebsd.org Sun Apr 15 21:46:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40DE1F90454; Sun, 15 Apr 2018 21:46:09 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E599179A6A; Sun, 15 Apr 2018 21:46:08 +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 C682D147D3; Sun, 15 Apr 2018 21:46:08 +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 w3FLk8hm034850; Sun, 15 Apr 2018 21:46:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3FLk85N034848; Sun, 15 Apr 2018 21:46:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201804152146.w3FLk85N034848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 15 Apr 2018 21:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332518 - head/usr.sbin/daemon X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/usr.sbin/daemon X-SVN-Commit-Revision: 332518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2018 21:46:09 -0000 Author: ian Date: Sun Apr 15 21:46:08 2018 New Revision: 332518 URL: https://svnweb.freebsd.org/changeset/base/332518 Log: Add an option to daemon(8) to specify a delay between restarts of a supervised program. The existing -r option has a hard-coded delay of one second. This change adds a -R option which takes a delay in seconds. This can be used to prevent log spam and rapid restarts, similar to init(8)'s behavior of adding a delay between rapid restarts when it's supervising a program. Modified: head/usr.sbin/daemon/daemon.8 head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.8 ============================================================================== --- head/usr.sbin/daemon/daemon.8 Sun Apr 15 20:29:37 2018 (r332517) +++ head/usr.sbin/daemon/daemon.8 Sun Apr 15 21:46:08 2018 (r332518) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2016 +.Dd April 14, 2018 .Dt DAEMON 8 .Os .Sh NAME @@ -44,6 +44,7 @@ .Op Fl s Ar syslog_priority .Op Fl T Ar syslog_tag .Op Fl l Ar syslog_facility +.Op Fl T Ar restart_delay_seconds .Ar command arguments ... .Sh DESCRIPTION The @@ -114,7 +115,11 @@ regardless of whether the .Fl u option is used or not. .It Fl r -Supervise and restart the program if it has been terminated. +Supervise and restart the program after a one-second delay if it has +been terminated. +.It Fl R restart_delay_seconds +Supervise and restart the program after the specified delay +if it has been terminated. .It Fl t Ar title Set the title for the daemon process. The default is the daemonized invocation. Modified: head/usr.sbin/daemon/daemon.c ============================================================================== --- head/usr.sbin/daemon/daemon.c Sun Apr 15 20:29:37 2018 (r332517) +++ head/usr.sbin/daemon/daemon.c Sun Apr 15 21:46:08 2018 (r332518) @@ -99,7 +99,7 @@ main(int argc, char *argv[]) dosyslog = 0; outfn = NULL; title = NULL; - while ((ch = getopt(argc, argv, "cfSp:P:ru:o:s:l:t:l:m:T:")) != -1) { + while ((ch = getopt(argc, argv, "cfSp:P:ru:o:s:l:t:l:m:R:T:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -130,6 +130,11 @@ main(int argc, char *argv[]) case 'r': restart = 1; break; + case 'R': + restart = strtol(optarg, &p, 0); + if (p == optarg || restart < 1) + errx(6, "invalid restart delay"); + break; case 's': logpri = get_log_mapping(optarg, prioritynames); if (logpri == -1) @@ -359,7 +364,7 @@ restart: goto exit; } if (restart && !terminate) { - daemon_sleep(1, 0); + daemon_sleep(restart, 0); close(pfd[0]); pfd[0] = -1; goto restart; @@ -558,7 +563,7 @@ usage(void) "usage: daemon [-cfrS] [-p child_pidfile] [-P supervisor_pidfile]\n" " [-u user] [-o output_file] [-t title]\n" " [-l syslog_facility] [-s syslog_priority]\n" - " [-T syslog_tag] [-m output_mask]\n" + " [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]\n" "command arguments ...\n"); exit(1); } From owner-svn-src-all@freebsd.org Mon Apr 16 00:12:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05DB5F99E31; Mon, 16 Apr 2018 00:12: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34D7A79221; Mon, 16 Apr 2018 00:12: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 0632415FBB; Mon, 16 Apr 2018 00:12:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3G0C47V008912; Mon, 16 Apr 2018 00:12:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G0C451008904; Mon, 16 Apr 2018 00:12:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804160012.w3G0C451008904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Apr 2018 00:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332519 - in stable/11: share/man/man4 sys/conf sys/geom X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/conf sys/geom X-SVN-Commit-Revision: 332519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 00:12:07 -0000 Author: kevans Date: Mon Apr 16 00:12:03 2018 New Revision: 332519 URL: https://svnweb.freebsd.org/changeset/base/332519 Log: MFC r322318-r322319 r322318: Mark geom classes as deprecated. geom_bsd, geom_mbr and geom_sunlabel have been obsolete since Marcel Moolenaar's geom_part was in FreeBSD 7. They haven't been in GENERIC since FreeBSD 8. Add warning when used. geom_vol_ffs has been obsolete since ufs support to geom_label was committed in FreeBSD 5. It hasn't been in GENERIC since FreeBSD 5. Add warning when used. geom_fox has been obsolete since gmultipath was committed in FreeBSD 7. (no warning added, since this is a very obscure class). These will all be removed in FreeBSD 12. r322319: Also provide a warning for geom_fox. Modified: stable/11/share/man/man4/geom.4 stable/11/share/man/man4/geom_fox.4 stable/11/sys/conf/NOTES stable/11/sys/geom/geom_bsd.c stable/11/sys/geom/geom_fox.c stable/11/sys/geom/geom_mbr.c stable/11/sys/geom/geom_sunlabel.c stable/11/sys/geom/geom_vol_ffs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/geom.4 ============================================================================== --- stable/11/share/man/man4/geom.4 Sun Apr 15 21:46:08 2018 (r332518) +++ stable/11/share/man/man4/geom.4 Mon Apr 16 00:12:03 2018 (r332519) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 20, 2017 +.Dd August 9, 2017 .Dt GEOM 4 .Os .Sh NAME @@ -43,17 +43,14 @@ .Sh SYNOPSIS .Cd options GEOM_AES .Cd options GEOM_BDE -.Cd options GEOM_BSD .Cd options GEOM_CACHE .Cd options GEOM_CONCAT .Cd options GEOM_ELI -.Cd options GEOM_FOX .Cd options GEOM_GATE .Cd options GEOM_JOURNAL .Cd options GEOM_LABEL .Cd options GEOM_LINUX_LVM .Cd options GEOM_MAP -.Cd options GEOM_MBR .Cd options GEOM_MIRROR .Cd options GEOM_MOUNTVER .Cd options GEOM_MULTIPATH @@ -73,10 +70,8 @@ .Cd options GEOM_RAID3 .Cd options GEOM_SHSEC .Cd options GEOM_STRIPE -.Cd options GEOM_SUNLABEL .Cd options GEOM_UZIP .Cd options GEOM_VIRSTOR -.Cd options GEOM_VOL .Cd options GEOM_ZERO .Sh DESCRIPTION The @@ -451,6 +446,24 @@ This is unused at this time. .It 0x80 Pq Dv G_F_CTLDUMP Dump contents of gctl requests. .El +.Sh OBSOLETE OPTIONS +.Pp +The following options have been deprecated and will be removed in +.Fx 12 : +.Cd GEOM_BSD , +.Cd GEOM_FOX , +.Cd GEOM_MBR , +.Cd GEOM_SUNLABEL , +and +.Cd GEOM_VOL . +.Pp +Use +.Cd GEOM_PART_BSD , +.Cd GEOM_MULTIPATH , +.Cd GEOM_PART_MBR , +.Cd GEOM_PART_VTOC8 , +.Cd GEOM_LABEL +options, respectively, instead. .Sh SEE ALSO .Xr libgeom 3 , .Xr DECLARE_GEOM_CLASS 9 , Modified: stable/11/share/man/man4/geom_fox.4 ============================================================================== --- stable/11/share/man/man4/geom_fox.4 Sun Apr 15 21:46:08 2018 (r332518) +++ stable/11/share/man/man4/geom_fox.4 Mon Apr 16 00:12:03 2018 (r332519) @@ -51,6 +51,8 @@ This driver is obsolete. Users are advised to use .Xr gmultipath 8 instead. +This driver will be removed in +.Fx 12 . .Ef .Pp The intent of the Modified: stable/11/sys/conf/NOTES ============================================================================== --- stable/11/sys/conf/NOTES Sun Apr 15 21:46:08 2018 (r332518) +++ stable/11/sys/conf/NOTES Mon Apr 16 00:12:03 2018 (r332519) @@ -147,17 +147,17 @@ options BOOTHOWTO=RB_MULTIPLE options GEOM_AES # Don't use, use GEOM_BDE options GEOM_BDE # Disk encryption. -options GEOM_BSD # BSD disklabels +options GEOM_BSD # BSD disklabels (obsolete, gone in 12) options GEOM_CACHE # Disk cache. options GEOM_CONCAT # Disk concatenation. options GEOM_ELI # Disk encryption. -options GEOM_FOX # Redundant path mitigation +options GEOM_FOX # Redundant path mitigation (obsolete, gone in 12) options GEOM_GATE # Userland services. options GEOM_JOURNAL # Journaling. options GEOM_LABEL # Providers labelization. options GEOM_LINUX_LVM # Linux LVM2 volumes options GEOM_MAP # Map based partitioning -options GEOM_MBR # DOS/MBR partitioning +options GEOM_MBR # DOS/MBR partitioning (obsolete, gone in 12) options GEOM_MIRROR # Disk mirroring. options GEOM_MULTIPATH # Disk multipath options GEOM_NOP # Test class. @@ -176,11 +176,11 @@ options GEOM_RAID # Soft RAID functionality. options GEOM_RAID3 # RAID3 functionality. options GEOM_SHSEC # Shared secret. options GEOM_STRIPE # Disk striping. -options GEOM_SUNLABEL # Sun/Solaris partitioning +options GEOM_SUNLABEL # Sun/Solaris partitioning (obsolete, gone in 12) options GEOM_UZIP # Read-only compressed disks options GEOM_VINUM # Vinum logical volume manager options GEOM_VIRSTOR # Virtual storage. -options GEOM_VOL # Volume names from UFS superblock +options GEOM_VOL # Volume names from UFS superblock (obsolete, gone in 12) options GEOM_ZERO # Performance testing helper. # Modified: stable/11/sys/geom/geom_bsd.c ============================================================================== --- stable/11/sys/geom/geom_bsd.c Sun Apr 15 21:46:08 2018 (r332518) +++ stable/11/sys/geom/geom_bsd.c Mon Apr 16 00:12:03 2018 (r332519) @@ -72,6 +72,8 @@ FEATURE(geom_bsd, "GEOM BSD disklabels support"); #define LABELSIZE (148 + 16 * MAXPARTITIONS) +static int g_bsd_once; + static void g_bsd_hotwrite(void *arg, int flag); /* * Our private data about one instance. All the rest is handled by the @@ -514,6 +516,12 @@ g_bsd_taste(struct g_class *mp, struct g_provider *pp, g_slice_conf_hot(gp, 0, ms->labeloffset, LABELSIZE, G_SLICE_HOT_ALLOW, G_SLICE_HOT_DENY, G_SLICE_HOT_CALL); gsp->hot = g_bsd_hotwrite; + if (!g_bsd_once) { + g_bsd_once = 1; + printf( + "WARNING: geom_bsd (geom %s) is deprecated, " + "use gpart instead.\n", gp->name); + } return (gp); } /* Modified: stable/11/sys/geom/geom_fox.c ============================================================================== --- stable/11/sys/geom/geom_fox.c Sun Apr 15 21:46:08 2018 (r332518) +++ stable/11/sys/geom/geom_fox.c Mon Apr 16 00:12:03 2018 (r332519) @@ -53,6 +53,8 @@ #define FOX_CLASS_NAME "FOX" #define FOX_MAGIC "GEOM::FOX" +static int g_fox_once; + FEATURE(geom_fox, "GEOM FOX redundant path mitigation support"); struct g_fox_softc { @@ -438,8 +440,15 @@ printf("fox %s lock %p\n", gp->name, &sc->lock); g_free(buf); g_access(cp, -1, 0, 0); - if (!LIST_EMPTY(&gp->provider)) + if (!LIST_EMPTY(&gp->provider)) { + if (!g_fox_once) { + g_fox_once = 1; + printf( + "WARNING: geom_fox (geom %s) is deprecated, " + "use gmultipath instead.\n", gp->name); + } return (gp); + } g_free(gp->softc); g_detach(cp); Modified: stable/11/sys/geom/geom_mbr.c ============================================================================== --- stable/11/sys/geom/geom_mbr.c Sun Apr 15 21:46:08 2018 (r332518) +++ stable/11/sys/geom/geom_mbr.c Mon Apr 16 00:12:03 2018 (r332519) @@ -57,6 +57,8 @@ FEATURE(geom_mbr, "GEOM DOS/MBR partitioning support") #define MBR_CLASS_NAME "MBR" #define MBREXT_CLASS_NAME "MBREXT" +static int g_mbr_once = 0; + static struct dos_partition historical_bogus_partition_table[NDOSPART] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, @@ -315,6 +317,12 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, if (LIST_EMPTY(&gp->provider)) { g_slice_spoiled(cp); return (NULL); + } + if (!g_mbr_once) { + g_mbr_once = 1; + printf( + "WARNING: geom_mbr (geom %s) is deprecated, " + "use gpart instead.\n", gp->name); } return (gp); } Modified: stable/11/sys/geom/geom_sunlabel.c ============================================================================== --- stable/11/sys/geom/geom_sunlabel.c Sun Apr 15 21:46:08 2018 (r332518) +++ stable/11/sys/geom/geom_sunlabel.c Mon Apr 16 00:12:03 2018 (r332519) @@ -65,6 +65,8 @@ struct g_sunlabel_softc { u_char labelsum[16]; }; +static int g_sunlabel_once = 0; + static int g_sunlabel_modify(struct g_geom *gp, struct g_sunlabel_softc *ms, u_char *sec0) { @@ -312,6 +314,12 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider g_slice_conf_hot(gp, 0, 0, SUN_SIZE, G_SLICE_HOT_ALLOW, G_SLICE_HOT_DENY, G_SLICE_HOT_CALL); gsp->hot = g_sunlabel_hotwrite; + if (!g_sunlabel_once) { + g_sunlabel_once = 1; + printf( + "WARNING: geom_sunlabel (geom %s) is deprecated, " + "use gpart instead.\n", gp->name); + } return (gp); } Modified: stable/11/sys/geom/geom_vol_ffs.c ============================================================================== --- stable/11/sys/geom/geom_vol_ffs.c Sun Apr 15 21:46:08 2018 (r332518) +++ stable/11/sys/geom/geom_vol_ffs.c Mon Apr 16 00:12:03 2018 (r332519) @@ -48,6 +48,7 @@ FEATURE(geom_vol, "GEOM support for volume names from #define VOL_FFS_CLASS_NAME "VOL_FFS" static int superblocks[] = SBLOCKSEARCH; +static int g_vol_ffs_once; struct g_vol_ffs_softc { char * vol; @@ -144,6 +145,12 @@ g_vol_ffs_taste(struct g_class *mp, struct g_provider if (LIST_EMPTY(&gp->provider)) { g_slice_spoiled(cp); return (NULL); + } + if (!g_vol_ffs_once) { + g_vol_ffs_once = 1; + printf( + "WARNING: geom_vol_Ffs (geom %s) is deprecated, " + "use glabel instead.\n", gp->name); } return (gp); } From owner-svn-src-all@freebsd.org Mon Apr 16 00:12:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42478F99EB6 for ; Mon, 16 Apr 2018 00:12:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 45195793A8 for ; Mon, 16 Apr 2018 00:12:27 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: b8d46174-410a-11e8-bb8e-b35b57339d60 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 outbound1.ore.mailhop.org (Halon) with ESMTPSA id b8d46174-410a-11e8-bb8e-b35b57339d60; Mon, 16 Apr 2018 00:11:34 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w3G0CNJ2015905; Sun, 15 Apr 2018 18:12:23 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1523837543.69449.8.camel@freebsd.org> Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... From: Ian Lepore To: rgrimes@freebsd.org, Glen Barber Cc: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Sun, 15 Apr 2018 18:12:23 -0600 In-Reply-To: <201803290317.w2T3Hic6060704@pdx.rh.CN85.dnsmgr.net> References: <201803290317.w2T3Hic6060704@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 00:12:28 -0000 On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: > -- Start of PGP signed section. > > > > On Thu, Mar 29, 2018 at 02:51:04AM +0000, Eitan Adler wrote: > > > > > > Author: eadler > > > Date: Thu Mar 29 02:50:57 2018 > > > New Revision: 331722 > > > URL: https://svnweb.freebsd.org/changeset/base/331722 > > > > > > Log: > > >   Revert r330897: > > >    > > >   This was intended to be a non-functional change. It wasn't. The commit > > >   message was thus wrong. In addition it broke arm, and merged crypto > > >   related code. > > >    > > >   Revert with prejudice. > > >    > > >   This revert skips files touched in r316370 since that commit was since > > >   MFCed. > Um, not sure that was the right way to revert :-(. > > > > > > > > >   This revert also skips files that require $FreeBSD$ property > > >   changes. > And more doubts that this is right to skip anything. > > > > > > > > >   Thank you to those who helped me get out of this mess including but not > > >   limited to gonzo, kevans, rgrimes. > > >    > > >   Requested by: gjb (re) > > > > > I did *not* request this, especially not on re@'s behalf.  I provided > > input on what I felt was the correct way to proceed in this situation, > > where a number of commits that were not related to the intent were > > included.  There is a difference. > I tried to get this slowed down until we could get to a concenses, > I think our mess is as big now as it was before. > Or bigger. I've just discovered this commit reverted stuff that wasn't part of the bad original MFC commit. Things I MFC'd to 11 before this revert are now missing changes and the symptoms don't show up until a module fails to load due to missing symbols. I guess every change on the stable-11 branch between r330897 and r331722 needs to be audited to see if MFC'd or changed code has been unintentionally reverted. Here's the example I've just run across... r330897 merged this: https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=302408&r2=330897 Then I did some MFCing, then r331722 "reverted" this: https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=331506&r2=331722 -- Ian From owner-svn-src-all@freebsd.org Mon Apr 16 00:18:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A67CF9A855; Mon, 16 Apr 2018 00:18: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17D6D797AA; Mon, 16 Apr 2018 00:18: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 EC86B15FEB; Mon, 16 Apr 2018 00:18:57 +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 w3G0Ivmb010057; Mon, 16 Apr 2018 00:18:57 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G0IvuL010054; Mon, 16 Apr 2018 00:18:57 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804160018.w3G0IvuL010054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Apr 2018 00:18: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: r332520 - in stable/11: share/man/man4 sys/conf sys/geom X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/conf sys/geom X-SVN-Commit-Revision: 332520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 00:18:58 -0000 Author: kevans Date: Mon Apr 16 00:18:57 2018 New Revision: 332520 URL: https://svnweb.freebsd.org/changeset/base/332520 Log: geom_aes: Provide some deprecation notices This is a direct commit to stable/11, due to having already been removed in head. Modified: stable/11/share/man/man4/geom.4 stable/11/sys/conf/NOTES stable/11/sys/geom/geom_aes.c Modified: stable/11/share/man/man4/geom.4 ============================================================================== --- stable/11/share/man/man4/geom.4 Mon Apr 16 00:12:03 2018 (r332519) +++ stable/11/share/man/man4/geom.4 Mon Apr 16 00:18:57 2018 (r332520) @@ -41,7 +41,6 @@ .Nm GEOM .Nd "modular disk I/O request transformation framework" .Sh SYNOPSIS -.Cd options GEOM_AES .Cd options GEOM_BDE .Cd options GEOM_CACHE .Cd options GEOM_CONCAT @@ -450,6 +449,7 @@ Dump contents of gctl requests. .Pp The following options have been deprecated and will be removed in .Fx 12 : +.Cd GEOM_AES , .Cd GEOM_BSD , .Cd GEOM_FOX , .Cd GEOM_MBR , Modified: stable/11/sys/conf/NOTES ============================================================================== --- stable/11/sys/conf/NOTES Mon Apr 16 00:12:03 2018 (r332519) +++ stable/11/sys/conf/NOTES Mon Apr 16 00:18:57 2018 (r332520) @@ -145,7 +145,7 @@ options INCLUDE_CONFIG_FILE # Include this file i options BOOTVERBOSE=1 options BOOTHOWTO=RB_MULTIPLE -options GEOM_AES # Don't use, use GEOM_BDE +options GEOM_AES # Don't use, use GEOM_BDE (obsolete, gone in 12) options GEOM_BDE # Disk encryption. options GEOM_BSD # BSD disklabels (obsolete, gone in 12) options GEOM_CACHE # Disk cache. Modified: stable/11/sys/geom/geom_aes.c ============================================================================== --- stable/11/sys/geom/geom_aes.c Mon Apr 16 00:12:03 2018 (r332519) +++ stable/11/sys/geom/geom_aes.c Mon Apr 16 00:18:57 2018 (r332520) @@ -67,6 +67,7 @@ static const u_char *aes_magic = "<> static const u_char *aes_magic_random = "<>"; static const u_char *aes_magic_test = "<>"; +static int g_aes_once; struct g_aes_softc { enum { @@ -352,8 +353,14 @@ g_aes_taste(struct g_class *mp, struct g_provider *pp, if (buf) g_free(buf); g_access(cp, -1, 0, 0); - if (gp->softc != NULL) + if (gp->softc != NULL) { + if (!g_aes_once) { + g_aes_once = 1; + printf("WARNING: geom_aes (geom %s) is deprecated.", + gp->name); + } return (gp); + } g_detach(cp); g_destroy_consumer(cp); g_destroy_geom(gp); From owner-svn-src-all@freebsd.org Mon Apr 16 00:29:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A7AFF9B385; Mon, 16 Apr 2018 00:29: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED9267C4F1; Mon, 16 Apr 2018 00:29:08 +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 E33C516177; Mon, 16 Apr 2018 00:29: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 w3G0T81a014960; Mon, 16 Apr 2018 00:29:08 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G0T8mC014953; Mon, 16 Apr 2018 00:29:08 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804160029.w3G0T8mC014953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Apr 2018 00:29: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: r332521 - stable/11/sys/geom/part X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/geom/part X-SVN-Commit-Revision: 332521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 00:29:09 -0000 Author: kevans Date: Mon Apr 16 00:29:07 2018 New Revision: 332521 URL: https://svnweb.freebsd.org/changeset/base/332521 Log: MFC r323108, r323125, r326047-r326049 r323108: Add efimedia attribute for all GPT partitions. r323125: The hard drive media device path contains the size of the partition, not its end. This makes the GEOM efimedia attribute match the FreeBSD:Boot1Device environment variable now. r326047: Implement efi media tagging for MBR partitioning types. r326048: Remove trailing whitespace (one I just introduced and a bunch of others in the same directory). r326049: While the EFI spec allows numbers to be in many forms, libefivar produces hex numbers for the dsn. Since that come is from EDK2, change this for symmetry, by generating the dsn as a hex number. [Missed as part of the efivar/efibootmgr MFCs] Reported by: Oliver Pinter Modified: stable/11/sys/geom/part/g_part.c stable/11/sys/geom/part/g_part_apm.c stable/11/sys/geom/part/g_part_bsd.c stable/11/sys/geom/part/g_part_bsd64.c stable/11/sys/geom/part/g_part_ebr.c stable/11/sys/geom/part/g_part_gpt.c stable/11/sys/geom/part/g_part_mbr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/part/g_part.c ============================================================================== --- stable/11/sys/geom/part/g_part.c Mon Apr 16 00:18:57 2018 (r332520) +++ stable/11/sys/geom/part/g_part.c Mon Apr 16 00:29:07 2018 (r332521) @@ -1363,7 +1363,7 @@ g_part_ctl_resize(struct gctl_req *req, struct g_part_ /* Deny shrinking of an opened partition. */ gctl_error(req, "%d", EBUSY); return (EBUSY); - } + } } error = G_PART_RESIZE(table, entry, gpp); Modified: stable/11/sys/geom/part/g_part_apm.c ============================================================================== --- stable/11/sys/geom/part/g_part_apm.c Mon Apr 16 00:18:57 2018 (r332520) +++ stable/11/sys/geom/part/g_part_apm.c Mon Apr 16 00:29:07 2018 (r332521) @@ -207,7 +207,7 @@ apm_read_ent(struct g_consumer *cp, uint32_t blk, stru } static int -g_part_apm_add(struct g_part_table *basetable, struct g_part_entry *baseentry, +g_part_apm_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_apm_entry *entry; Modified: stable/11/sys/geom/part/g_part_bsd.c ============================================================================== --- stable/11/sys/geom/part/g_part_bsd.c Mon Apr 16 00:18:57 2018 (r332520) +++ stable/11/sys/geom/part/g_part_bsd.c Mon Apr 16 00:29:07 2018 (r332521) @@ -72,7 +72,7 @@ static int g_part_bsd_destroy(struct g_part_table *, s static void g_part_bsd_dumpconf(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); static int g_part_bsd_dumpto(struct g_part_table *, struct g_part_entry *); -static int g_part_bsd_modify(struct g_part_table *, struct g_part_entry *, +static int g_part_bsd_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); static const char *g_part_bsd_name(struct g_part_table *, struct g_part_entry *, char *, size_t); @@ -256,7 +256,7 @@ g_part_bsd_destroy(struct g_part_table *basetable, str } static void -g_part_bsd_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, +g_part_bsd_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) { struct g_part_bsd_entry *entry; @@ -275,7 +275,7 @@ g_part_bsd_dumpconf(struct g_part_table *table, struct } static int -g_part_bsd_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) +g_part_bsd_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) { struct g_part_bsd_entry *entry; @@ -471,7 +471,7 @@ g_part_bsd_read(struct g_part_table *basetable, struct } static const char * -g_part_bsd_type(struct g_part_table *basetable, struct g_part_entry *baseentry, +g_part_bsd_type(struct g_part_table *basetable, struct g_part_entry *baseentry, char *buf, size_t bufsz) { struct g_part_bsd_entry *entry; Modified: stable/11/sys/geom/part/g_part_bsd64.c ============================================================================== --- stable/11/sys/geom/part/g_part_bsd64.c Mon Apr 16 00:18:57 2018 (r332520) +++ stable/11/sys/geom/part/g_part_bsd64.c Mon Apr 16 00:29:07 2018 (r332521) @@ -127,7 +127,7 @@ static int g_part_bsd64_destroy(struct g_part_table *, static void g_part_bsd64_dumpconf(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); static int g_part_bsd64_dumpto(struct g_part_table *, struct g_part_entry *); -static int g_part_bsd64_modify(struct g_part_table *, struct g_part_entry *, +static int g_part_bsd64_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); static const char *g_part_bsd64_name(struct g_part_table *, struct g_part_entry *, char *, size_t); @@ -409,7 +409,7 @@ g_part_bsd64_dumpconf(struct g_part_table *basetable, } static int -g_part_bsd64_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) +g_part_bsd64_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) { struct g_part_bsd64_entry *entry; @@ -577,7 +577,7 @@ invalid_label: } static const char * -g_part_bsd64_type(struct g_part_table *basetable, struct g_part_entry *baseentry, +g_part_bsd64_type(struct g_part_table *basetable, struct g_part_entry *baseentry, char *buf, size_t bufsz) { struct g_part_bsd64_entry *entry; Modified: stable/11/sys/geom/part/g_part_ebr.c ============================================================================== --- stable/11/sys/geom/part/g_part_ebr.c Mon Apr 16 00:18:57 2018 (r332520) +++ stable/11/sys/geom/part/g_part_ebr.c Mon Apr 16 00:29:07 2018 (r332521) @@ -80,7 +80,7 @@ static int g_part_ebr_dumpto(struct g_part_table *, st static void g_part_ebr_fullname(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); #endif -static int g_part_ebr_modify(struct g_part_table *, struct g_part_entry *, +static int g_part_ebr_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); static const char *g_part_ebr_name(struct g_part_table *, struct g_part_entry *, char *, size_t); @@ -322,11 +322,11 @@ g_part_ebr_destroy(struct g_part_table *basetable, str } static void -g_part_ebr_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, +g_part_ebr_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) { struct g_part_ebr_entry *entry; - + entry = (struct g_part_ebr_entry *)baseentry; if (indent == NULL) { /* conftxt: libdisk compatibility */ @@ -343,7 +343,7 @@ g_part_ebr_dumpconf(struct g_part_table *table, struct } static int -g_part_ebr_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) +g_part_ebr_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) { struct g_part_ebr_entry *entry; @@ -595,7 +595,7 @@ g_part_ebr_setunset(struct g_part_table *table, struct } static const char * -g_part_ebr_type(struct g_part_table *basetable, struct g_part_entry *baseentry, +g_part_ebr_type(struct g_part_table *basetable, struct g_part_entry *baseentry, char *buf, size_t bufsz) { struct g_part_ebr_entry *entry; @@ -667,7 +667,7 @@ g_part_ebr_write(struct g_part_table *basetable, struc p[7] = entry->ent.dp_ecyl; le32enc(p + 8, entry->ent.dp_start); le32enc(p + 12, entry->ent.dp_size); - + next = LIST_NEXT(baseentry, gpe_entry); while (next != NULL && next->gpe_deleted) next = LIST_NEXT(next, gpe_entry); Modified: stable/11/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/11/sys/geom/part/g_part_gpt.c Mon Apr 16 00:18:57 2018 (r332520) +++ stable/11/sys/geom/part/g_part_gpt.c Mon Apr 16 00:29:07 2018 (r332521) @@ -699,11 +699,11 @@ g_part_gpt_destroy(struct g_part_table *basetable, str } static void -g_part_gpt_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, +g_part_gpt_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) { struct g_part_gpt_entry *entry; - + entry = (struct g_part_gpt_entry *)baseentry; if (indent == NULL) { /* conftxt: libdisk compatibility */ @@ -731,13 +731,19 @@ g_part_gpt_dumpconf(struct g_part_table *table, struct sbuf_printf(sb, "%s", indent); sbuf_printf_uuid(sb, &entry->ent.ent_uuid); sbuf_printf(sb, "\n"); + sbuf_printf(sb, "%s", indent); + sbuf_printf(sb, "HD(%d,GPT,", entry->base.gpe_index); + sbuf_printf_uuid(sb, &entry->ent.ent_uuid); + sbuf_printf(sb, ",%#jx,%#jx)", (intmax_t)entry->base.gpe_start, + (intmax_t)(entry->base.gpe_end - entry->base.gpe_start + 1)); + sbuf_printf(sb, "\n"); } else { /* confxml: scheme information */ } } static int -g_part_gpt_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) +g_part_gpt_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) { struct g_part_gpt_entry *entry; @@ -860,7 +866,7 @@ g_part_gpt_probe(struct g_part_table *table, struct g_ &error); if (buf == NULL) return (error); - res = memcmp(buf, GPT_HDR_SIG, 8); + res = memcmp(buf, GPT_HDR_SIG, 8); g_free(buf); return ((res == 0) ? pri : ENXIO); } @@ -1102,13 +1108,13 @@ g_part_gpt_setunset(struct g_part_table *basetable, } static const char * -g_part_gpt_type(struct g_part_table *basetable, struct g_part_entry *baseentry, +g_part_gpt_type(struct g_part_table *basetable, struct g_part_entry *baseentry, char *buf, size_t bufsz) { struct g_part_gpt_entry *entry; struct uuid *type; struct g_part_uuid_alias *uap; - + entry = (struct g_part_gpt_entry *)baseentry; type = &entry->ent.ent_type; for (uap = &gpt_uuid_alias_match[0]; uap->uuid; uap++) Modified: stable/11/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/11/sys/geom/part/g_part_mbr.c Mon Apr 16 00:18:57 2018 (r332520) +++ stable/11/sys/geom/part/g_part_mbr.c Mon Apr 16 00:29:07 2018 (r332521) @@ -77,7 +77,7 @@ static int g_part_mbr_destroy(struct g_part_table *, s static void g_part_mbr_dumpconf(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); static int g_part_mbr_dumpto(struct g_part_table *, struct g_part_entry *); -static int g_part_mbr_modify(struct g_part_table *, struct g_part_entry *, +static int g_part_mbr_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); static const char *g_part_mbr_name(struct g_part_table *, struct g_part_entry *, char *, size_t); @@ -303,11 +303,14 @@ g_part_mbr_destroy(struct g_part_table *basetable, str } static void -g_part_mbr_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, +g_part_mbr_dumpconf(struct g_part_table *basetable, struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) { struct g_part_mbr_entry *entry; - + struct g_part_mbr_table *table; + uint32_t dsn; + + table = (struct g_part_mbr_table *)basetable; entry = (struct g_part_mbr_entry *)baseentry; if (indent == NULL) { /* conftxt: libdisk compatibility */ @@ -318,13 +321,18 @@ g_part_mbr_dumpconf(struct g_part_table *table, struct entry->ent.dp_typ); if (entry->ent.dp_flag & 0x80) sbuf_printf(sb, "%sactive\n", indent); + dsn = le32dec(table->mbr + DOSDSNOFF); + sbuf_printf(sb, "%sHD(%d,MBR,%#08x,%#jx,%#jx)", indent, + entry->base.gpe_index, dsn, (intmax_t)entry->base.gpe_start, + (intmax_t)(entry->base.gpe_end - entry->base.gpe_start + 1)); + sbuf_printf(sb, "\n"); } else { /* confxml: scheme information */ } } static int -g_part_mbr_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) +g_part_mbr_dumpto(struct g_part_table *table, struct g_part_entry *baseentry) { struct g_part_mbr_entry *entry; @@ -552,7 +560,7 @@ g_part_mbr_setunset(struct g_part_table *table, struct } static const char * -g_part_mbr_type(struct g_part_table *basetable, struct g_part_entry *baseentry, +g_part_mbr_type(struct g_part_table *basetable, struct g_part_entry *baseentry, char *buf, size_t bufsz) { struct g_part_mbr_entry *entry; From owner-svn-src-all@freebsd.org Mon Apr 16 00:41:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71BC0F9C20B; Mon, 16 Apr 2018 00:41:55 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 DB6AB7F5A9; Mon, 16 Apr 2018 00:41:54 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3G0S7oc048518; Sun, 15 Apr 2018 17:28:07 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3G0S58v048517; Sun, 15 Apr 2018 17:28:05 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804160028.w3G0S58v048517@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... In-Reply-To: <1523837543.69449.8.camel@freebsd.org> To: Ian Lepore Date: Sun, 15 Apr 2018 17:28:05 -0700 (PDT) CC: rgrimes@freebsd.org, Glen Barber , Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 00:41:55 -0000 > On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: > > -- Start of PGP signed section. > > > > > > On Thu, Mar 29, 2018 at 02:51:04AM +0000, Eitan Adler wrote: > > > > > > > > Author: eadler > > > > Date: Thu Mar 29 02:50:57 2018 > > > > New Revision: 331722 > > > > URL: https://svnweb.freebsd.org/changeset/base/331722 > > > > > > > > Log: > > > > ? Revert r330897: > > > > ?? > > > > ? This was intended to be a non-functional change. It wasn't. The commit > > > > ? message was thus wrong. In addition it broke arm, and merged crypto > > > > ? related code. > > > > ?? > > > > ? Revert with prejudice. > > > > ?? > > > > ? This revert skips files touched in r316370 since that commit was since > > > > ? MFCed. > > Um, not sure that was the right way to revert :-(. > > > > > > > > > > > > > ? This revert also skips files that require $FreeBSD$ property > > > > ? changes. > > And more doubts that this is right to skip anything. > > > > > > > > > > > > > ? Thank you to those who helped me get out of this mess including but not > > > > ? limited to gonzo, kevans, rgrimes. > > > > ?? > > > > ? Requested by: gjb (re) > > > > > > > I did *not* request this, especially not on re@'s behalf.??I provided > > > input on what I felt was the correct way to proceed in this situation, > > > where a number of commits that were not related to the intent were > > > included.??There is a difference. > > I tried to get this slowed down until we could get to a concenses, > > I think our mess is as big now as it was before. > > > > Or bigger. I've just discovered this commit reverted stuff that wasn't > part of the bad original MFC commit. Things I MFC'd to 11 before this > revert are now missing changes and the symptoms don't show up until a > module fails to load due to missing symbols. > > I guess every change on the stable-11 branch between r330897 and > r331722 needs to be audited to see if MFC'd or changed code has been > unintentionally reverted. > > Here's the example I've just run across... > > r330897 merged this: > > https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=302408&r2=330897 > > Then I did some MFCing, then r331722 "reverted" this: > > https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=331506&r2=331722 *sigh* Ok, I can at least do an audit of the r331722 that was suppose to be a revert and see what else I find. I'll start on this tomarrow and get the first pass audit out fairly early in the morning my time (PST) Do we revert the attempted revert, then properly revert the original? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Apr 16 00:42:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1057EF9C444; Mon, 16 Apr 2018 00:42:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B73A47F745; Mon, 16 Apr 2018 00:42: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 B22DA16491; Mon, 16 Apr 2018 00:42: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 w3G0gjwI024623; Mon, 16 Apr 2018 00:42:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G0gjmN024619; Mon, 16 Apr 2018 00:42:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804160042.w3G0gjmN024619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Apr 2018 00:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332522 - in stable/11: sbin/geom/class/eli sys/geom/eli X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11: sbin/geom/class/eli sys/geom/eli X-SVN-Commit-Revision: 332522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 00:42:46 -0000 Author: kevans Date: Mon Apr 16 00:42:45 2018 New Revision: 332522 URL: https://svnweb.freebsd.org/changeset/base/332522 Log: MFC r308137, r316312, r332361 r308137: Fix alignment issues on MIPS: align the pointers properly. All the 5520 GEOM_ELI tests passed successfully on MIPS64EB. r316312: sys/geom/eli: Switch bzero() to explicit_bzero() for sensitive data In GELI, anywhere we are zeroing out possibly sensitive data, like the metadata struct, the metadata sector (both contain the encrypted master key), the user key, or the master key, use explicit_bzero. Didn't touch the bzero() used to initialize structs. r332361: Introduce dry run option for attaching the device. This will allow us to verify if passphrase and key is valid without decrypting whole device. Modified: stable/11/sbin/geom/class/eli/geom_eli.c stable/11/sys/geom/eli/g_eli.h stable/11/sys/geom/eli/g_eli_integrity.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/geom/class/eli/geom_eli.c ============================================================================== --- stable/11/sbin/geom/class/eli/geom_eli.c Mon Apr 16 00:29:07 2018 (r332521) +++ stable/11/sbin/geom/class/eli/geom_eli.c Mon Apr 16 00:42:45 2018 (r332522) @@ -672,7 +672,7 @@ static void eli_init(struct gctl_req *req) { struct g_eli_metadata md; - unsigned char sector[sizeof(struct g_eli_metadata)]; + unsigned char sector[sizeof(struct g_eli_metadata)] __aligned(4); unsigned char key[G_ELI_USERKEYLEN]; char backfile[MAXPATHLEN]; const char *str, *prov; Modified: stable/11/sys/geom/eli/g_eli.h ============================================================================== --- stable/11/sys/geom/eli/g_eli.h Mon Apr 16 00:29:07 2018 (r332521) +++ stable/11/sys/geom/eli/g_eli.h Mon Apr 16 00:42:45 2018 (r332522) @@ -296,6 +296,7 @@ eli_metadata_encode_v1v2v3v4v5v6v7(struct g_eli_metada static __inline void eli_metadata_encode(struct g_eli_metadata *md, u_char *data) { + uint32_t hash[4]; MD5_CTX ctx; u_char *p; @@ -327,12 +328,14 @@ eli_metadata_encode(struct g_eli_metadata *md, u_char } MD5Init(&ctx); MD5Update(&ctx, data, p - data); - MD5Final(md->md_hash, &ctx); + MD5Final((void *)hash, &ctx); + bcopy(hash, md->md_hash, sizeof(md->md_hash)); bcopy(md->md_hash, p, sizeof(md->md_hash)); } static __inline int eli_metadata_decode_v0(const u_char *data, struct g_eli_metadata *md) { + uint32_t hash[4]; MD5_CTX ctx; const u_char *p; @@ -348,7 +351,8 @@ eli_metadata_decode_v0(const u_char *data, struct g_el bcopy(p, md->md_mkeys, sizeof(md->md_mkeys)); p += sizeof(md->md_mkeys); MD5Init(&ctx); MD5Update(&ctx, data, p - data); - MD5Final(md->md_hash, &ctx); + MD5Final((void *)hash, &ctx); + bcopy(hash, md->md_hash, sizeof(md->md_hash)); if (bcmp(md->md_hash, p, 16) != 0) return (EINVAL); return (0); @@ -357,6 +361,7 @@ eli_metadata_decode_v0(const u_char *data, struct g_el static __inline int eli_metadata_decode_v1v2v3v4v5v6v7(const u_char *data, struct g_eli_metadata *md) { + uint32_t hash[4]; MD5_CTX ctx; const u_char *p; @@ -373,7 +378,8 @@ eli_metadata_decode_v1v2v3v4v5v6v7(const u_char *data, bcopy(p, md->md_mkeys, sizeof(md->md_mkeys)); p += sizeof(md->md_mkeys); MD5Init(&ctx); MD5Update(&ctx, data, p - data); - MD5Final(md->md_hash, &ctx); + MD5Final((void *)hash, &ctx); + bcopy(hash, md->md_hash, sizeof(md->md_hash)); if (bcmp(md->md_hash, p, 16) != 0) return (EINVAL); return (0); Modified: stable/11/sys/geom/eli/g_eli_integrity.c ============================================================================== --- stable/11/sys/geom/eli/g_eli_integrity.c Mon Apr 16 00:29:07 2018 (r332521) +++ stable/11/sys/geom/eli/g_eli_integrity.c Mon Apr 16 00:42:45 2018 (r332522) @@ -444,12 +444,17 @@ g_eli_auth_run(struct g_eli_worker *wr, struct bio *bp size += sizeof(*crde) * nsec; size += sizeof(*crda) * nsec; size += G_ELI_AUTH_SECKEYLEN * nsec; + size += sizeof(uintptr_t); /* Space for alignment. */ data = malloc(size, M_ELI, M_WAITOK); bp->bio_driver2 = data; p = data + encr_secsize * nsec; } bp->bio_inbed = 0; bp->bio_children = nsec; + +#if defined(__mips_n64) || defined(__mips_o64) + p = (char *)roundup((uintptr_t)p, sizeof(uintptr_t)); +#endif for (i = 1; i <= nsec; i++, dstoff += encr_secsize) { crp = (struct cryptop *)p; p += sizeof(*crp); From owner-svn-src-all@freebsd.org Mon Apr 16 00:54:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30CCCF9D250; Mon, 16 Apr 2018 00:54:20 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1E6C820E9; Mon, 16 Apr 2018 00:54:19 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 884F920D80; Mon, 16 Apr 2018 00:54:19 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f46.google.com with SMTP id n14-v6so2020494lfe.5; Sun, 15 Apr 2018 17:54:19 -0700 (PDT) X-Gm-Message-State: ALQs6tB0uKQcVMGh52/ZWrjQ2pYDoxHI1q40XK3fqBZOpZ2gOeOsUYJY n2B01Ahjn/WqRbv/PeCoikdZebAC8ui+eWN4SuU= X-Google-Smtp-Source: AIpwx4/jMmVQdCP5N7fr4OLKu5M3/oq+mgS1KWCZozVjgTSjz1n2tFMdewbW2kPX+JZtvo7/sKi1VMKPk7ZSgiYuRzo= X-Received: by 10.46.155.202 with SMTP id w10mr1728200ljj.76.1523840057883; Sun, 15 Apr 2018 17:54:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.129.90 with HTTP; Sun, 15 Apr 2018 17:53:57 -0700 (PDT) In-Reply-To: <201804160028.w3G0S58v048517@pdx.rh.CN85.dnsmgr.net> References: <1523837543.69449.8.camel@freebsd.org> <201804160028.w3G0S58v048517@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Sun, 15 Apr 2018 19:53:57 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... To: "Rodney W. Grimes" Cc: Ian Lepore , Glen Barber , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 00:54:20 -0000 On Sun, Apr 15, 2018 at 7:28 PM, Rodney W. Grimes wrote: >> On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: >> > -- Start of PGP signed section. >> > > >> > > On Thu, Mar 29, 2018 at 02:51:04AM +0000, Eitan Adler wrote: >> > > > >> > > > Author: eadler >> > > > Date: Thu Mar 29 02:50:57 2018 >> > > > New Revision: 331722 >> > > > URL: https://svnweb.freebsd.org/changeset/base/331722 >> > > > >> > > > Log: >> > > > ? Revert r330897: >> > > > ?? >> > > > ? This was intended to be a non-functional change. It wasn't. The commit >> > > > ? message was thus wrong. In addition it broke arm, and merged crypto >> > > > ? related code. >> > > > ?? >> > > > ? Revert with prejudice. >> > > > ?? >> > > > ? This revert skips files touched in r316370 since that commit was since >> > > > ? MFCed. >> > Um, not sure that was the right way to revert :-(. >> > >> > > >> > > > >> > > > ? This revert also skips files that require $FreeBSD$ property >> > > > ? changes. >> > And more doubts that this is right to skip anything. >> > >> > > >> > > > >> > > > ? Thank you to those who helped me get out of this mess including but not >> > > > ? limited to gonzo, kevans, rgrimes. >> > > > ?? >> > > > ? Requested by: gjb (re) >> > > > >> > > I did *not* request this, especially not on re@'s behalf.??I provided >> > > input on what I felt was the correct way to proceed in this situation, >> > > where a number of commits that were not related to the intent were >> > > included.??There is a difference. >> > I tried to get this slowed down until we could get to a concenses, >> > I think our mess is as big now as it was before. >> > >> >> Or bigger. I've just discovered this commit reverted stuff that wasn't >> part of the bad original MFC commit. Things I MFC'd to 11 before this >> revert are now missing changes and the symptoms don't show up until a >> module fails to load due to missing symbols. >> >> I guess every change on the stable-11 branch between r330897 and >> r331722 needs to be audited to see if MFC'd or changed code has been >> unintentionally reverted. >> >> Here's the example I've just run across... >> >> r330897 merged this: >> >> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=302408&r2=330897 >> >> Then I did some MFCing, then r331722 "reverted" this: >> >> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=331506&r2=331722 > > *sigh* Ok, I can at least do an audit of the r331722 > that was suppose to be a revert and see what else I find. > > I'll start on this tomarrow and get the first pass audit out fairly early > in the morning my time (PST) > > Do we revert the attempted revert, then properly revert the original? I support this effort, as long as we either still don't revert anything touching the files that gonzo went through the trouble of getting back into shape or we also revert gonzo's follow-up MFCs and re-MFC those bits in particular for him. eadler's original commit had included an impartial MFC of some of gonzo's commits (somehow?), hence the follow-up that completed the MFC. From owner-svn-src-all@freebsd.org Mon Apr 16 00:54:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47E5FF9D393; Mon, 16 Apr 2018 00:54:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA2FB826ED; Mon, 16 Apr 2018 00:54: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 E50571663E; Mon, 16 Apr 2018 00:54:58 +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 w3G0swM6030061; Mon, 16 Apr 2018 00:54:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G0swF1030058; Mon, 16 Apr 2018 00:54:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160054.w3G0swF1030058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 00:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332523 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 332523 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 00:54:59 -0000 Author: mav Date: Mon Apr 16 00:54:58 2018 New Revision: 332523 URL: https://svnweb.freebsd.org/changeset/base/332523 Log: 9433 Fix ARC hit rate When the compressed ARC feature was added in commit d3c2ae1 the method of reference counting in the ARC was modified. As part of this accounting change the arc_buf_add_ref() function was removed entirely. This would have be fine but the arc_buf_add_ref() function served a second undocumented purpose of updating the ARC access information when taking a hold on a dbuf. Without this logic in place a cached dbuf would not migrate its associated arc_buf_hdr_t to the MFU list. This would negatively impact the ARC hit rate, particularly on systems with a small ARC. This change reinstates the missing call to arc_access() from dbuf_hold() by implementing a new arc_buf_access() function. Reviewed-by: Giuseppe Di Natale Reviewed-by: Tony Hutter Reviewed-by: Tim Chase Reviewed by: George Wilson Reviewed-by: George Melikov Signed-off-by: Brian Behlendorf Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 00:42:45 2018 (r332522) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 00:54:58 2018 (r332523) @@ -540,8 +540,13 @@ typedef struct arc_stats { */ kstat_named_t arcstat_mutex_miss; /* + * Number of buffers skipped when updating the access state due to the + * header having already been released after acquiring the hash lock. + */ + kstat_named_t arcstat_access_skip; + /* * Number of buffers skipped because they have I/O in progress, are - * indrect prefetch buffers that have not lived long enough, or are + * indirect prefetch buffers that have not lived long enough, or are * not from the spa we're trying to evict from. */ kstat_named_t arcstat_evict_skip; @@ -796,6 +801,7 @@ static arc_stats_t arc_stats = { { "allocated", KSTAT_DATA_UINT64 }, { "deleted", KSTAT_DATA_UINT64 }, { "mutex_miss", KSTAT_DATA_UINT64 }, + { "access_skip", KSTAT_DATA_UINT64 }, { "evict_skip", KSTAT_DATA_UINT64 }, { "evict_not_enough", KSTAT_DATA_UINT64 }, { "evict_l2_cached", KSTAT_DATA_UINT64 }, @@ -5063,6 +5069,51 @@ arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) } else { ASSERT(!"invalid arc state"); } +} + +/* + * This routine is called by dbuf_hold() to update the arc_access() state + * which otherwise would be skipped for entries in the dbuf cache. + */ +void +arc_buf_access(arc_buf_t *buf) +{ + mutex_enter(&buf->b_evict_lock); + arc_buf_hdr_t *hdr = buf->b_hdr; + + /* + * Avoid taking the hash_lock when possible as an optimization. + * The header must be checked again under the hash_lock in order + * to handle the case where it is concurrently being released. + */ + if (hdr->b_l1hdr.b_state == arc_anon || HDR_EMPTY(hdr)) { + mutex_exit(&buf->b_evict_lock); + ARCSTAT_BUMP(arcstat_access_skip); + return; + } + + kmutex_t *hash_lock = HDR_LOCK(hdr); + mutex_enter(hash_lock); + + if (hdr->b_l1hdr.b_state == arc_anon || HDR_EMPTY(hdr)) { + mutex_exit(hash_lock); + mutex_exit(&buf->b_evict_lock); + ARCSTAT_BUMP(arcstat_access_skip); + return; + } + + mutex_exit(&buf->b_evict_lock); + + ASSERT(hdr->b_l1hdr.b_state == arc_mru || + hdr->b_l1hdr.b_state == arc_mfu); + + DTRACE_PROBE1(arc__hit, arc_buf_hdr_t *, hdr); + arc_access(hdr, hash_lock); + mutex_exit(hash_lock); + + ARCSTAT_BUMP(arcstat_hits); + ARCSTAT_CONDSTAT(!HDR_PREFETCH(hdr), + demand, prefetch, !HDR_ISTYPE_METADATA(hdr), data, metadata, hits); } /* a generic arc_done_func_t which you can use */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 00:42:45 2018 (r332522) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 00:54:58 2018 (r332523) @@ -2579,8 +2579,10 @@ top: return (SET_ERROR(ENOENT)); } - if (db->db_buf != NULL) + if (db->db_buf != NULL) { + arc_buf_access(db->db_buf); ASSERT3P(db->db.db_data, ==, db->db_buf->b_data); + } ASSERT(db->db_buf == NULL || arc_referenced(db->db_buf)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Mon Apr 16 00:42:45 2018 (r332522) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Mon Apr 16 00:54:58 2018 (r332523) @@ -169,6 +169,7 @@ void arc_loan_inuse_buf(arc_buf_t *buf, void *tag); void arc_buf_destroy(arc_buf_t *buf, void *tag); int arc_buf_size(arc_buf_t *buf); int arc_buf_lsize(arc_buf_t *buf); +void arc_buf_access(arc_buf_t *buf); void arc_release(arc_buf_t *buf, void *tag); int arc_released(arc_buf_t *buf); void arc_buf_freeze(arc_buf_t *buf); From owner-svn-src-all@freebsd.org Mon Apr 16 01:08:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BDC6F9E379 for ; Mon, 16 Apr 2018 01:08:42 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x232.google.com (mail-yw0-x232.google.com [IPv6:2607:f8b0:4002:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF49484A95 for ; Mon, 16 Apr 2018 01:08:41 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x232.google.com with SMTP id h28so4981400ywk.5 for ; Sun, 15 Apr 2018 18:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fOgEzHPJFoNJkUqKNES08k44ZWa02dURnykPNVSMm7E=; b=h1AYAq1yyHE/DLvE5QhYH/n2C3u5AAWOdysSw25qVobqPDri5V93sQze/BB7zH3A7W goGsptpaCFMH0walTTPLwxJ7EJ7n9vWUUTB5zzdij74miUxU03dLMiF+knMssmOiocta 62etqhOvULSUq84jVgFPtmo5XGSt4IJfjEzhw= 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:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fOgEzHPJFoNJkUqKNES08k44ZWa02dURnykPNVSMm7E=; b=XfbP/oN5M1rrCcZeaEzBfCPu+YfJFAEfgbHEZA9PbN9wCv/BrFVvHaLYIHiyl1XiJE fYvJSKD6FD+eceZY+ha005Y4vuefnSrnWcl7RYLa/JEVkLO8wJ3KqIXPtIJIAQYBMd8P s2VfM4oBsEGn8kL/XXg++buaA+B1zh/BywKcikOEtQq43NRCC/dg0DSnk2gdHmHqWdeZ WZwAOQB197MxZm1+KYKayW2qJCrp5H7LJFWmK2nwZXc49okdiJM3mQkmygA+RUaRVvNZ bIEitGdf78os+54wtaYothazUT4s6M+6CPdF+zqdU0wJi5JlPKrep1H/Xz+lM4x3lN1N eV6A== X-Gm-Message-State: ALQs6tBATB3Q5c7vRtwqlnPYptY8syfkcIOsMMA18BDHpnPqbwv6eKLb hnYZGVil5kcBwCmPUbZT91gITdJbZEAIV2PriFTLGg== X-Google-Smtp-Source: AIpwx4//SKJOAsmQ4Qjvcm9dSVTGroBqWzLMrPw9j/4H3QZxJgExQtRJHC5WV9SLihDdJmhIEkJITR3fiTLQz4amiZs= X-Received: by 10.129.79.196 with SMTP id d187mr9186993ywb.162.1523840921095; Sun, 15 Apr 2018 18:08:41 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:98c3:0:0:0:0:0 with HTTP; Sun, 15 Apr 2018 18:08:10 -0700 (PDT) In-Reply-To: References: <1523837543.69449.8.camel@freebsd.org> <201804160028.w3G0S58v048517@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Sun, 15 Apr 2018 18:08:10 -0700 X-Google-Sender-Auth: y84VGf5VTSRR0Vlijm5XfS8dOXg Message-ID: Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... To: Kyle Evans Cc: "Rodney W. Grimes" , Ian Lepore , Glen Barber , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 01:08:42 -0000 On 15 April 2018 at 17:53, Kyle Evans wrote: > On Sun, Apr 15, 2018 at 7:28 PM, Rodney W. Grimes > wrote: >>> On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: >>> > -- Start of PGP signed section. >>> > > >>> > > On Thu, Mar 29, 2018 at 02:51:04AM +0000, Eitan Adler wrote: >>> > > > >>> > > > Author: eadler >>> > > > Date: Thu Mar 29 02:50:57 2018 >>> > > > New Revision: 331722 >>> > > > URL: https://svnweb.freebsd.org/changeset/base/331722 >>> > > > >>> > > > Log: >>> > > > ? Revert r330897: >>> > > > ?? >>> > > > ? This was intended to be a non-functional change. It wasn't. The commit >>> > > > ? message was thus wrong. In addition it broke arm, and merged crypto >>> > > > ? related code. >>> > > > ?? >>> > > > ? Revert with prejudice. >>> > > > ?? >>> > > > ? This revert skips files touched in r316370 since that commit was since >>> > > > ? MFCed. >>> > Um, not sure that was the right way to revert :-(. >>> > >>> > > >>> > > > >>> > > > ? This revert also skips files that require $FreeBSD$ property >>> > > > ? changes. >>> > And more doubts that this is right to skip anything. >>> > >>> > > >>> > > > >>> > > > ? Thank you to those who helped me get out of this mess including but not >>> > > > ? limited to gonzo, kevans, rgrimes. >>> > > > ?? >>> > > > ? Requested by: gjb (re) >>> > > > >>> > > I did *not* request this, especially not on re@'s behalf.??I provided >>> > > input on what I felt was the correct way to proceed in this situation, >>> > > where a number of commits that were not related to the intent were >>> > > included.??There is a difference. >>> > I tried to get this slowed down until we could get to a concenses, >>> > I think our mess is as big now as it was before. >>> > >>> >>> Or bigger. I've just discovered this commit reverted stuff that wasn't >>> part of the bad original MFC commit. Things I MFC'd to 11 before this >>> revert are now missing changes and the symptoms don't show up until a >>> module fails to load due to missing symbols. >>> >>> I guess every change on the stable-11 branch between r330897 and >>> r331722 needs to be audited to see if MFC'd or changed code has been >>> unintentionally reverted. >>> >>> Here's the example I've just run across... >>> >>> r330897 merged this: >>> >>> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=302408&r2=330897 >>> >>> Then I did some MFCing, then r331722 "reverted" this: >>> >>> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=331506&r2=331722 >> >> *sigh* Ok, I can at least do an audit of the r331722 >> that was suppose to be a revert and see what else I find. >> >> I'll start on this tomarrow and get the first pass audit out fairly early >> in the morning my time (PST) >> >> Do we revert the attempted revert, then properly revert the original? I am beyond confused. How did svn merge -c-r330897 . fail? At this point I am scared of touching subversion as I have no idea how what I do will interact with the repository, mergeinfo, etc. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Mon Apr 16 01:14:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E1F9F9EB00; Mon, 16 Apr 2018 01:14:44 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 9C09785AA0; Mon, 16 Apr 2018 01:14:43 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3G1EfCp048731; Sun, 15 Apr 2018 18:14:41 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3G1Efle048730; Sun, 15 Apr 2018 18:14:41 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804160114.w3G1Efle048730@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... In-Reply-To: To: Eitan Adler Date: Sun, 15 Apr 2018 18:14:41 -0700 (PDT) CC: Kyle Evans , "Rodney W. Grimes" , Ian Lepore , Glen Barber , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 01:14:44 -0000 > On 15 April 2018 at 17:53, Kyle Evans wrote: > > On Sun, Apr 15, 2018 at 7:28 PM, Rodney W. Grimes > > wrote: > >>> On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: > >>> > -- Start of PGP signed section. > >>> > > > >>> > > On Thu, Mar 29, 2018 at 02:51:04AM +0000, Eitan Adler wrote: > >>> > > > > >>> > > > Author: eadler > >>> > > > Date: Thu Mar 29 02:50:57 2018 > >>> > > > New Revision: 331722 > >>> > > > URL: https://svnweb.freebsd.org/changeset/base/331722 > >>> > > > > >>> > > > Log: > >>> > > > ? Revert r330897: > >>> > > > ?? > >>> > > > ? This was intended to be a non-functional change. It wasn't. The commit > >>> > > > ? message was thus wrong. In addition it broke arm, and merged crypto > >>> > > > ? related code. > >>> > > > ?? > >>> > > > ? Revert with prejudice. > >>> > > > ?? > >>> > > > ? This revert skips files touched in r316370 since that commit was since > >>> > > > ? MFCed. > >>> > Um, not sure that was the right way to revert :-(. > >>> > > >>> > > > >>> > > > > >>> > > > ? This revert also skips files that require $FreeBSD$ property > >>> > > > ? changes. > >>> > And more doubts that this is right to skip anything. > >>> > > >>> > > > >>> > > > > >>> > > > ? Thank you to those who helped me get out of this mess including but not > >>> > > > ? limited to gonzo, kevans, rgrimes. > >>> > > > ?? > >>> > > > ? Requested by: gjb (re) > >>> > > > > >>> > > I did *not* request this, especially not on re@'s behalf.??I provided > >>> > > input on what I felt was the correct way to proceed in this situation, > >>> > > where a number of commits that were not related to the intent were > >>> > > included.??There is a difference. > >>> > I tried to get this slowed down until we could get to a concenses, > >>> > I think our mess is as big now as it was before. > >>> > > >>> > >>> Or bigger. I've just discovered this commit reverted stuff that wasn't > >>> part of the bad original MFC commit. Things I MFC'd to 11 before this > >>> revert are now missing changes and the symptoms don't show up until a > >>> module fails to load due to missing symbols. > >>> > >>> I guess every change on the stable-11 branch between r330897 and > >>> r331722 needs to be audited to see if MFC'd or changed code has been > >>> unintentionally reverted. > >>> > >>> Here's the example I've just run across... > >>> > >>> r330897 merged this: > >>> > >>> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=302408&r2=330897 > >>> > >>> Then I did some MFCing, then r331722 "reverted" this: > >>> > >>> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=331506&r2=331722 > >> > >> *sigh* Ok, I can at least do an audit of the r331722 > >> that was suppose to be a revert and see what else I find. > >> > >> I'll start on this tomarrow and get the first pass audit out fairly early > >> in the morning my time (PST) > >> > >> Do we revert the attempted revert, then properly revert the original? > > I am beyond confused. How did > svn merge -c-r330897 . > fail? What was the state of .? > > At this point I am scared of touching subversion as I have no idea how > what I do will interact with the repository, mergeinfo, etc. svn diff tells you what it is going to do, and you can get the merginfo off the end of a huge diff with tail. Right now, pleaes do not do anything with this issue until an agreed on cource of remidiation is determined. Last time you jumped the gun before we had concluded discussions. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Apr 16 01:40:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C452FA05A9; Mon, 16 Apr 2018 01:40:13 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 8C13F6B464; Mon, 16 Apr 2018 01:40:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3G1e812048800; Sun, 15 Apr 2018 18:40:08 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3G1e7Vj048799; Sun, 15 Apr 2018 18:40:07 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804160140.w3G1e7Vj048799@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... In-Reply-To: To: Kyle Evans Date: Sun, 15 Apr 2018 18:40:06 -0700 (PDT) CC: "Rodney W. Grimes" , Ian Lepore , Glen Barber , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 01:40:13 -0000 > On Sun, Apr 15, 2018 at 7:28 PM, Rodney W. Grimes > wrote: > >> On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: > >> > -- Start of PGP signed section. > >> > > > >> > > On Thu, Mar 29, 2018 at 02:51:04AM +0000, Eitan Adler wrote: > >> > > > > >> > > > Author: eadler > >> > > > Date: Thu Mar 29 02:50:57 2018 > >> > > > New Revision: 331722 > >> > > > URL: https://svnweb.freebsd.org/changeset/base/331722 > >> > > > > >> > > > Log: > >> > > > ? Revert r330897: > >> > > > ?? > >> > > > ? This was intended to be a non-functional change. It wasn't. The commit > >> > > > ? message was thus wrong. In addition it broke arm, and merged crypto > >> > > > ? related code. > >> > > > ?? > >> > > > ? Revert with prejudice. > >> > > > ?? > >> > > > ? This revert skips files touched in r316370 since that commit was since > >> > > > ? MFCed. > >> > Um, not sure that was the right way to revert :-(. > >> > > >> > > > >> > > > > >> > > > ? This revert also skips files that require $FreeBSD$ property > >> > > > ? changes. > >> > And more doubts that this is right to skip anything. > >> > > >> > > > >> > > > > >> > > > ? Thank you to those who helped me get out of this mess including but not > >> > > > ? limited to gonzo, kevans, rgrimes. > >> > > > ?? > >> > > > ? Requested by: gjb (re) > >> > > > > >> > > I did *not* request this, especially not on re@'s behalf.??I provided > >> > > input on what I felt was the correct way to proceed in this situation, > >> > > where a number of commits that were not related to the intent were > >> > > included.??There is a difference. > >> > I tried to get this slowed down until we could get to a concenses, > >> > I think our mess is as big now as it was before. > >> > > >> > >> Or bigger. I've just discovered this commit reverted stuff that wasn't > >> part of the bad original MFC commit. Things I MFC'd to 11 before this > >> revert are now missing changes and the symptoms don't show up until a > >> module fails to load due to missing symbols. > >> > >> I guess every change on the stable-11 branch between r330897 and > >> r331722 needs to be audited to see if MFC'd or changed code has been > >> unintentionally reverted. > >> > >> Here's the example I've just run across... > >> > >> r330897 merged this: > >> > >> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=302408&r2=330897 > >> > >> Then I did some MFCing, then r331722 "reverted" this: > >> > >> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=331506&r2=331722 I have confirmed this in a first pass audit, there are changes to ofw_spibus.c that are not in the original r330897 commit, but are in the r331722 commit. > > *sigh* Ok, I can at least do an audit of the r331722 > > that was suppose to be a revert and see what else I find. > > > > I'll start on this tomarrow and get the first pass audit out fairly early > > in the morning my time (PST) > > > > Do we revert the attempted revert, then properly revert the original? > > I support this effort, as long as we either still don't revert > anything touching the files that gonzo went through the trouble of > getting back into shape or we also revert gonzo's follow-up MFCs and > re-MFC those bits in particular for him. eadler's original commit had > included an impartial MFC of some of gonzo's commits (somehow?), hence > the follow-up that completed the MFC. Can you help to identify what part or even just file paths, that gonzo is depending on having been merged by r330897, that would help me greatly. Right now I have the 80k line diffs down to the 8k or so "extra stuff", that should of not been commited in the first diff to try and audit against the second diff. The merginfo looks correct: Index: stable/11 =================================================================== --- stable/11 (revision 330896) +++ stable/11 (revision 330897) Property changes on: stable/11 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r325966,326022-326025,326027,326192-326193,326219,326255-326261 Index: stable/11 =================================================================== --- stable/11 (revision 331721) +++ stable/11 (revision 331722) Property changes on: stable/11 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,1 +0,0 ## Reverse-merged /head:r325966,326022-326025,326027,326192-326193,326219,326255-326261 -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Apr 16 01:44:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2698FA0B60; Mon, 16 Apr 2018 01:44:55 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 440506B8B9; Mon, 16 Apr 2018 01:44:55 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E396A21251; Mon, 16 Apr 2018 01:44:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f47.google.com with SMTP id i18-v6so4683831lfc.7; Sun, 15 Apr 2018 18:44:54 -0700 (PDT) X-Gm-Message-State: ALQs6tBFOcz528ov8YcPHUim1W9jmoFqwgRCEOjmq0Do6yeELtf/f9d6 KRAob5W8x4LLX8MXiVPc1B+gnupO6AJ9Dr0kIs8= X-Google-Smtp-Source: AIpwx48NuEtiNo2sdGdUgyycfT4+0la9QmX1x/Kgcl3lDWDWmNdoWs5uQcJmvpVw2RCQu8CNbf0R+4vWgx+pnCH5lYk= X-Received: by 10.46.68.14 with SMTP id r14mr8430133lja.44.1523843093373; Sun, 15 Apr 2018 18:44:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.129.90 with HTTP; Sun, 15 Apr 2018 18:44:32 -0700 (PDT) In-Reply-To: <201804160140.w3G1e7Vj048799@pdx.rh.CN85.dnsmgr.net> References: <201804160140.w3G1e7Vj048799@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Sun, 15 Apr 2018 20:44:32 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... To: "Rodney W. Grimes" Cc: Kyle Evans , Ian Lepore , Glen Barber , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 01:44:55 -0000 On Sun, Apr 15, 2018 at 8:40 PM, Rodney W. Grimes wrote: >> On Sun, Apr 15, 2018 at 7:28 PM, Rodney W. Grimes >> wrote: >> >> On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: >> >> > -- Start of PGP signed section. >> >> > > >> >> > > On Thu, Mar 29, 2018 at 02:51:04AM +0000, Eitan Adler wrote: >> >> > > > >> >> > > > Author: eadler >> >> > > > Date: Thu Mar 29 02:50:57 2018 >> >> > > > New Revision: 331722 >> >> > > > URL: https://svnweb.freebsd.org/changeset/base/331722 >> >> > > > >> >> > > > Log: >> >> > > > ? Revert r330897: >> >> > > > ?? >> >> > > > ? This was intended to be a non-functional change. It wasn't. The commit >> >> > > > ? message was thus wrong. In addition it broke arm, and merged crypto >> >> > > > ? related code. >> >> > > > ?? >> >> > > > ? Revert with prejudice. >> >> > > > ?? >> >> > > > ? This revert skips files touched in r316370 since that commit was since >> >> > > > ? MFCed. >> >> > Um, not sure that was the right way to revert :-(. >> >> > >> >> > > >> >> > > > >> >> > > > ? This revert also skips files that require $FreeBSD$ property >> >> > > > ? changes. >> >> > And more doubts that this is right to skip anything. >> >> > >> >> > > >> >> > > > >> >> > > > ? Thank you to those who helped me get out of this mess including but not >> >> > > > ? limited to gonzo, kevans, rgrimes. >> >> > > > ?? >> >> > > > ? Requested by: gjb (re) >> >> > > > >> >> > > I did *not* request this, especially not on re@'s behalf.??I provided >> >> > > input on what I felt was the correct way to proceed in this situation, >> >> > > where a number of commits that were not related to the intent were >> >> > > included.??There is a difference. >> >> > I tried to get this slowed down until we could get to a concenses, >> >> > I think our mess is as big now as it was before. >> >> > >> >> >> >> Or bigger. I've just discovered this commit reverted stuff that wasn't >> >> part of the bad original MFC commit. Things I MFC'd to 11 before this >> >> revert are now missing changes and the symptoms don't show up until a >> >> module fails to load due to missing symbols. >> >> >> >> I guess every change on the stable-11 branch between r330897 and >> >> r331722 needs to be audited to see if MFC'd or changed code has been >> >> unintentionally reverted. >> >> >> >> Here's the example I've just run across... >> >> >> >> r330897 merged this: >> >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=302408&r2=330897 >> >> >> >> Then I did some MFCing, then r331722 "reverted" this: >> >> >> >> https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=331506&r2=331722 > > I have confirmed this in a first pass audit, there are changes to ofw_spibus.c > that are not in the original r330897 commit, but are in the r331722 commit. > >> > *sigh* Ok, I can at least do an audit of the r331722 >> > that was suppose to be a revert and see what else I find. >> > >> > I'll start on this tomarrow and get the first pass audit out fairly early >> > in the morning my time (PST) >> > >> > Do we revert the attempted revert, then properly revert the original? >> >> I support this effort, as long as we either still don't revert >> anything touching the files that gonzo went through the trouble of >> getting back into shape or we also revert gonzo's follow-up MFCs and >> re-MFC those bits in particular for him. eadler's original commit had >> included an impartial MFC of some of gonzo's commits (somehow?), hence >> the follow-up that completed the MFC. > > Can you help to identify what part or even just file paths, that gonzo is > depending on having been merged by r330897, that would help me greatly. Those touched in r316370: sys/arm/arm/pl190.c sys/arm/conf/VERSATILEPB sys/arm/versatile/* > Right now I have the 80k line diffs down to the 8k or so "extra stuff", > that should of not been commited in the first diff to try and audit > against the second diff. > Excellent! Thanks for doing this. =) From owner-svn-src-all@freebsd.org Mon Apr 16 03:14:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4847FA62FF; Mon, 16 Apr 2018 03:14:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 820247E476; Mon, 16 Apr 2018 03:14:55 +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 7CF3617CEA; Mon, 16 Apr 2018 03:14:55 +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 w3G3EtTw000199; Mon, 16 Apr 2018 03:14:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3Etq6000195; Mon, 16 Apr 2018 03:14:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160314.w3G3Etq6000195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:14: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: r332524 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 332524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:14:56 -0000 Author: mav Date: Mon Apr 16 03:14:54 2018 New Revision: 332524 URL: https://svnweb.freebsd.org/changeset/base/332524 Log: MFC r307317: MFV r307313: 5120 zfs should allow large block/gzip/raidz boot pool (loader project) Reviewed by: George Wilson Reviewed by: Yuri Pankov Reviewed by: Andrew Stormont Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Toomas Soome openzfs/openzfs@c8811bd3e2427dddbac6c05a59cfe117d8fea370 FreeBSD still does not support booting from gzip-compressed datasets, so keep one chunk of this commit out. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 00:54:58 2018 (r332523) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:14:54 2018 (r332524) @@ -27,6 +27,7 @@ * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2016 Toomas Soome * Copyright 2017 Joyent, Inc. * Copyright (c) 2017 Datto Inc. * Copyright 2018 OmniOS Community Edition (OmniOSce) Association. @@ -539,12 +540,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *props) zfs_prop_to_name(ZFS_PROP_COMPRESSION), &propval)) == 0 && !BOOTFS_COMPRESS_VALID(propval)) { - error = SET_ERROR(ENOTSUP); - } else if ((error = - dsl_prop_get_int_ds(dmu_objset_ds(os), - zfs_prop_to_name(ZFS_PROP_RECORDSIZE), - &propval)) == 0 && - propval > SPA_OLD_MAXBLOCKSIZE) { error = SET_ERROR(ENOTSUP); } else { objnum = dmu_objset_id(os); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Mon Apr 16 00:54:58 2018 (r332523) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Mon Apr 16 03:14:54 2018 (r332524) @@ -24,6 +24,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright 2016 Toomas Soome */ #ifndef _ZIO_H Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 00:54:58 2018 (r332523) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 03:14:54 2018 (r332524) @@ -25,6 +25,7 @@ * Copyright 2017 Nexenta Systems, Inc. * Copyright 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2016 Toomas Soome * Copyright 2017 Joyent, Inc. */ @@ -3491,16 +3492,10 @@ vdev_set_state(vdev_t *vd, boolean_t isopen, vdev_stat /* * Check the vdev configuration to ensure that it's capable of supporting - * a root pool. + * a root pool. We do not support partial configuration. + * In addition, only a single top-level vdev is allowed. * - * On Solaris, we do not support RAID-Z or partial configuration. In - * addition, only a single top-level vdev is allowed and none of the - * leaves can be wholedisks. - * - * For FreeBSD, we can boot from any configuration. There is a - * limitation that the boot filesystem must be either uncompressed or - * compresses with lzjb compression but I'm not sure how to enforce - * that here. + * FreeBSD does not have above limitations. */ boolean_t vdev_is_bootable(vdev_t *vd) @@ -3512,8 +3507,7 @@ vdev_is_bootable(vdev_t *vd) if (strcmp(vdev_type, VDEV_TYPE_ROOT) == 0 && vd->vdev_children > 1) { return (B_FALSE); - } else if (strcmp(vdev_type, VDEV_TYPE_RAIDZ) == 0 || - strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) { + } else if (strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) { return (B_FALSE); } } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 16 00:54:58 2018 (r332523) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 16 03:14:54 2018 (r332524) @@ -31,8 +31,10 @@ * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2016 Toomas Soome * Copyright 2017 RackTop Systems. * Copyright (c) 2017 Datto Inc. + * Copyright 2016 Toomas Soome */ /* @@ -4048,16 +4050,6 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, if (nvpair_value_uint64(pair, &intval) == 0 && intval > SPA_OLD_MAXBLOCKSIZE) { spa_t *spa; - - /* - * If this is a bootable dataset then - * the we don't allow large (>128K) blocks, - * because GRUB doesn't support them. - */ - if (zfs_is_bootfs(dsname) && - intval > SPA_OLD_MAXBLOCKSIZE) { - return (SET_ERROR(ERANGE)); - } /* * We don't allow setting the property above 1MB, From owner-svn-src-all@freebsd.org Mon Apr 16 03:32:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B5BAF803A6; Mon, 16 Apr 2018 03:32: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AAAEF81652; Mon, 16 Apr 2018 03:32: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 A444418009; Mon, 16 Apr 2018 03:32: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 w3G3WfNL009846; Mon, 16 Apr 2018 03:32:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3WfEb009842; Mon, 16 Apr 2018 03:32:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160332.w3G3WfEb009842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:32: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: r332525 - in stable/11: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/... X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common cddl/co... X-SVN-Commit-Revision: 332525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:32:42 -0000 Author: mav Date: Mon Apr 16 03:32:41 2018 New Revision: 332525 URL: https://svnweb.freebsd.org/changeset/base/332525 Log: MFC r329732: MFV r329502: 7614 zfs device evacuation/removal illumos/illumos-gate@5cabbc6b49070407fb9610cfe73d4c0e0dea3e77 https://www.illumos.org/issues/7614: This project allows top-level vdevs to be removed from the storage pool with “zpool removeâ€, reducing the total amount of storage in the pool. This operation copies all allocated regions of the device to be removed onto other devices, recording the mapping from old to new location. After the removal is complete, read and free operations to the removed (now “indirectâ€) vdev must be remapped and performed at the new location on disk. The indirect mapping table is kept in memory whenever the pool is loaded, so there is minimal performance overhead when doing operations on the indirect vdev. The size of the in-memory mapping table will be reduced when its entries become “obsolete†because they are no longer used by any block pointers in the pool. An entry becomes obsolete when all the blocks that use it are freed. An entry can also become obsolete when all the snapshots that reference it are deleted, and the block pointers that reference it have been “remapped†in all filesystems/zvols (and clones). Whenever an indirect block is written, all the block pointers in it will be “remapped†to their new (concrete) locations if possible. This process can be accelerated by using the “zfs remap†command to proactively rewrite all indirect blocks that reference indirect (removed) vdevs. Note that when a device is removed, we do not verify the checksum of the data that is copied. This makes the process much faster, but if it were used on redundant vdevs (i.e. mirror or raidz vdevs), it would be possible to copy the wrong data, when we have the correct data on e.g. the other side of the mirror. Therefore, mirror and raidz devices can not be removed. Reviewed by: Alex Reece Reviewed by: George Wilson Reviewed by: John Kennedy Reviewed by: Prakash Surya Reviewed by: Matthew Ahrens Reviewed by: Richard Laager Reviewed by: Tim Chase Approved by: Garrett D'Amore Author: Prashanth Sreenivasa Added: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_indirect_births.h - copied unchanged from r329732, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_indirect_births.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_indirect_mapping.h - copied unchanged from r329732, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_indirect_mapping.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h - copied unchanged from r329732, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c - copied unchanged from r329732, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_births.c - copied unchanged from r329732, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_births.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c - copied unchanged from r329732, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c - copied unchanged from r329732, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.c stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bpobj.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deadlist.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_priority.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h stable/11/sys/conf/files Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 03:14:54 2018 (r332524) +++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 03:32:41 2018 (r332525) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 Nexenta Systems, Inc. */ @@ -77,8 +77,10 @@ dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \ dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN") #define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : \ - (((idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA) ? \ - DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES)) + (idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA ? \ + DMU_OT_ZAP_OTHER : \ + (idx) == DMU_OTN_UINT64_DATA || (idx) == DMU_OTN_UINT64_METADATA ? \ + DMU_OT_UINT64_OTHER : DMU_OT_NUMTYPES) #ifndef lint extern int reference_tracking_enable; @@ -667,8 +669,8 @@ get_metaslab_refcount(vdev_t *vd) { int refcount = 0; - if (vd->vdev_top == vd && !vd->vdev_removing) { - for (unsigned m = 0; m < vd->vdev_ms_count; m++) { + if (vd->vdev_top == vd) { + for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { space_map_t *sm = vd->vdev_ms[m]->ms_sm; if (sm != NULL && @@ -683,6 +685,45 @@ get_metaslab_refcount(vdev_t *vd) } static int +get_obsolete_refcount(vdev_t *vd) +{ + int refcount = 0; + + uint64_t obsolete_sm_obj = vdev_obsolete_sm_object(vd); + if (vd->vdev_top == vd && obsolete_sm_obj != 0) { + dmu_object_info_t doi; + VERIFY0(dmu_object_info(vd->vdev_spa->spa_meta_objset, + obsolete_sm_obj, &doi)); + if (doi.doi_bonus_size == sizeof (space_map_phys_t)) { + refcount++; + } + } else { + ASSERT3P(vd->vdev_obsolete_sm, ==, NULL); + ASSERT3U(obsolete_sm_obj, ==, 0); + } + for (unsigned c = 0; c < vd->vdev_children; c++) { + refcount += get_obsolete_refcount(vd->vdev_child[c]); + } + + return (refcount); +} + +static int +get_prev_obsolete_spacemap_refcount(spa_t *spa) +{ + uint64_t prev_obj = + spa->spa_condensing_indirect_phys.scip_prev_obsolete_sm_object; + if (prev_obj != 0) { + dmu_object_info_t doi; + VERIFY0(dmu_object_info(spa->spa_meta_objset, prev_obj, &doi)); + if (doi.doi_bonus_size == sizeof (space_map_phys_t)) { + return (1); + } + } + return (0); +} + +static int verify_spacemap_refcounts(spa_t *spa) { uint64_t expected_refcount = 0; @@ -693,6 +734,8 @@ verify_spacemap_refcounts(spa_t *spa) &expected_refcount); actual_refcount = get_dtl_refcount(spa->spa_root_vdev); actual_refcount += get_metaslab_refcount(spa->spa_root_vdev); + actual_refcount += get_obsolete_refcount(spa->spa_root_vdev); + actual_refcount += get_prev_obsolete_spacemap_refcount(spa); if (expected_refcount != actual_refcount) { (void) printf("space map refcount mismatch: expected %lld != " @@ -708,12 +751,19 @@ static void dump_spacemap(objset_t *os, space_map_t *sm) { uint64_t alloc, offset, entry; - const char *ddata[] = { "ALLOC", "FREE", "CONDENSE", "INVALID", - "INVALID", "INVALID", "INVALID", "INVALID" }; + char *ddata[] = { "ALLOC", "FREE", "CONDENSE", "INVALID", + "INVALID", "INVALID", "INVALID", "INVALID" }; if (sm == NULL) return; + (void) printf("space map object %llu:\n", + (longlong_t)sm->sm_phys->smp_object); + (void) printf(" smp_objsize = 0x%llx\n", + (longlong_t)sm->sm_phys->smp_objsize); + (void) printf(" smp_alloc = 0x%llx\n", + (longlong_t)sm->sm_phys->smp_alloc); + /* * Print out the freelist entries in both encoded and decoded form. */ @@ -818,9 +868,7 @@ dump_metaslab(metaslab_t *msp) if (dump_opt['d'] > 5 || dump_opt['m'] > 3) { ASSERT(msp->ms_size == (1ULL << vd->vdev_ms_shift)); - mutex_enter(&msp->ms_lock); dump_spacemap(spa->spa_meta_objset, msp->ms_sm); - mutex_exit(&msp->ms_lock); } } @@ -878,6 +926,78 @@ dump_metaslab_groups(spa_t *spa) } static void +print_vdev_indirect(vdev_t *vd) +{ + vdev_indirect_config_t *vic = &vd->vdev_indirect_config; + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + vdev_indirect_births_t *vib = vd->vdev_indirect_births; + + if (vim == NULL) { + ASSERT3P(vib, ==, NULL); + return; + } + + ASSERT3U(vdev_indirect_mapping_object(vim), ==, + vic->vic_mapping_object); + ASSERT3U(vdev_indirect_births_object(vib), ==, + vic->vic_births_object); + + (void) printf("indirect births obj %llu:\n", + (longlong_t)vic->vic_births_object); + (void) printf(" vib_count = %llu\n", + (longlong_t)vdev_indirect_births_count(vib)); + for (uint64_t i = 0; i < vdev_indirect_births_count(vib); i++) { + vdev_indirect_birth_entry_phys_t *cur_vibe = + &vib->vib_entries[i]; + (void) printf("\toffset %llx -> txg %llu\n", + (longlong_t)cur_vibe->vibe_offset, + (longlong_t)cur_vibe->vibe_phys_birth_txg); + } + (void) printf("\n"); + + (void) printf("indirect mapping obj %llu:\n", + (longlong_t)vic->vic_mapping_object); + (void) printf(" vim_max_offset = 0x%llx\n", + (longlong_t)vdev_indirect_mapping_max_offset(vim)); + (void) printf(" vim_bytes_mapped = 0x%llx\n", + (longlong_t)vdev_indirect_mapping_bytes_mapped(vim)); + (void) printf(" vim_count = %llu\n", + (longlong_t)vdev_indirect_mapping_num_entries(vim)); + + if (dump_opt['d'] <= 5 && dump_opt['m'] <= 3) + return; + + uint32_t *counts = vdev_indirect_mapping_load_obsolete_counts(vim); + + for (uint64_t i = 0; i < vdev_indirect_mapping_num_entries(vim); i++) { + vdev_indirect_mapping_entry_phys_t *vimep = + &vim->vim_entries[i]; + (void) printf("\t<%llx:%llx:%llx> -> " + "<%llx:%llx:%llx> (%x obsolete)\n", + (longlong_t)vd->vdev_id, + (longlong_t)DVA_MAPPING_GET_SRC_OFFSET(vimep), + (longlong_t)DVA_GET_ASIZE(&vimep->vimep_dst), + (longlong_t)DVA_GET_VDEV(&vimep->vimep_dst), + (longlong_t)DVA_GET_OFFSET(&vimep->vimep_dst), + (longlong_t)DVA_GET_ASIZE(&vimep->vimep_dst), + counts[i]); + } + (void) printf("\n"); + + uint64_t obsolete_sm_object = vdev_obsolete_sm_object(vd); + if (obsolete_sm_object != 0) { + objset_t *mos = vd->vdev_spa->spa_meta_objset; + (void) printf("obsolete space map object %llu:\n", + (u_longlong_t)obsolete_sm_object); + ASSERT(vd->vdev_obsolete_sm != NULL); + ASSERT3U(space_map_object(vd->vdev_obsolete_sm), ==, + obsolete_sm_object); + dump_spacemap(mos, vd->vdev_obsolete_sm); + (void) printf("\n"); + } +} + +static void dump_metaslabs(spa_t *spa) { vdev_t *vd, *rvd = spa->spa_root_vdev; @@ -913,6 +1033,8 @@ dump_metaslabs(spa_t *spa) vd = rvd->vdev_child[c]; print_vdev_metaslab_header(vd); + print_vdev_indirect(vd); + for (m = 0; m < vd->vdev_ms_count; m++) dump_metaslab(vd->vdev_ms[m]); (void) printf("\n"); @@ -1090,9 +1212,7 @@ dump_dtl(vdev_t *vd, int indent) continue; (void) snprintf(prefix, sizeof (prefix), "\t%*s%s", indent + 2, "", name[t]); - mutex_enter(rt->rt_lock); range_tree_walk(rt, dump_dtl_seg, prefix); - mutex_exit(rt->rt_lock); if (dump_opt['d'] > 5 && vd->vdev_children == 0) dump_spacemap(spa->spa_meta_objset, vd->vdev_dtl_sm); } @@ -2107,9 +2227,16 @@ dump_dir(objset_t *os) if (dump_opt['i'] != 0 || verbosity >= 2) dump_intent_log(dmu_objset_zil(os)); - if (dmu_objset_ds(os) != NULL) - dump_deadlist(&dmu_objset_ds(os)->ds_deadlist); + if (dmu_objset_ds(os) != NULL) { + dsl_dataset_t *ds = dmu_objset_ds(os); + dump_deadlist(&ds->ds_deadlist); + if (dsl_dataset_remap_deadlist_exists(ds)) { + (void) printf("ds_remap_deadlist:\n"); + dump_deadlist(&ds->ds_remap_deadlist); + } + } + if (verbosity < 2) return; @@ -2452,6 +2579,7 @@ dump_label(const char *dev) } static uint64_t dataset_feature_count[SPA_FEATURES]; +static uint64_t remap_deadlist_count = 0; /*ARGSUSED*/ static int @@ -2472,6 +2600,10 @@ dump_one_dir(const char *dsname, void *arg) dataset_feature_count[f]++; } + if (dsl_dataset_remap_deadlist_exists(dmu_objset_ds(os))) { + remap_deadlist_count++; + } + dump_dir(os); close_objset(os, FTAG); fuid_table_destroy(); @@ -2511,6 +2643,7 @@ static const char *zdb_ot_extname[] = { typedef struct zdb_cb { zdb_blkstats_t zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1]; + uint64_t zcb_removing_size; uint64_t zcb_dedup_asize; uint64_t zcb_dedup_blocks; uint64_t zcb_embedded_blocks[NUM_BP_EMBEDDED_TYPES]; @@ -2523,6 +2656,7 @@ typedef struct zdb_cb { int zcb_readfails; int zcb_haderrors; spa_t *zcb_spa; + uint32_t **zcb_vd_obsolete_counts; } zdb_cb_t; static void @@ -2797,12 +2931,208 @@ zdb_ddt_leak_init(spa_t *spa, zdb_cb_t *zcb) ASSERT(error == ENOENT); } +/* ARGSUSED */ static void +claim_segment_impl_cb(uint64_t inner_offset, vdev_t *vd, uint64_t offset, + uint64_t size, void *arg) +{ + /* + * This callback was called through a remap from + * a device being removed. Therefore, the vdev that + * this callback is applied to is a concrete + * vdev. + */ + ASSERT(vdev_is_concrete(vd)); + + VERIFY0(metaslab_claim_impl(vd, offset, size, + spa_first_txg(vd->vdev_spa))); +} + +static void +claim_segment_cb(void *arg, uint64_t offset, uint64_t size) +{ + vdev_t *vd = arg; + + vdev_indirect_ops.vdev_op_remap(vd, offset, size, + claim_segment_impl_cb, NULL); +} + +/* + * After accounting for all allocated blocks that are directly referenced, + * we might have missed a reference to a block from a partially complete + * (and thus unused) indirect mapping object. We perform a secondary pass + * through the metaslabs we have already mapped and claim the destination + * blocks. + */ +static void +zdb_claim_removing(spa_t *spa, zdb_cb_t *zcb) +{ + if (spa->spa_vdev_removal == NULL) + return; + + spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); + + spa_vdev_removal_t *svr = spa->spa_vdev_removal; + vdev_t *vd = svr->svr_vdev; + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + + for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) { + metaslab_t *msp = vd->vdev_ms[msi]; + + if (msp->ms_start >= vdev_indirect_mapping_max_offset(vim)) + break; + + ASSERT0(range_tree_space(svr->svr_allocd_segs)); + + if (msp->ms_sm != NULL) { + VERIFY0(space_map_load(msp->ms_sm, + svr->svr_allocd_segs, SM_ALLOC)); + + /* + * Clear everything past what has been synced, + * because we have not allocated mappings for it yet. + */ + range_tree_clear(svr->svr_allocd_segs, + vdev_indirect_mapping_max_offset(vim), + msp->ms_sm->sm_start + msp->ms_sm->sm_size - + vdev_indirect_mapping_max_offset(vim)); + } + + zcb->zcb_removing_size += + range_tree_space(svr->svr_allocd_segs); + range_tree_vacate(svr->svr_allocd_segs, claim_segment_cb, vd); + } + + spa_config_exit(spa, SCL_CONFIG, FTAG); +} + +/* + * vm_idxp is an in-out parameter which (for indirect vdevs) is the + * index in vim_entries that has the first entry in this metaslab. On + * return, it will be set to the first entry after this metaslab. + */ +static void +zdb_leak_init_ms(metaslab_t *msp, uint64_t *vim_idxp) +{ + metaslab_group_t *mg = msp->ms_group; + vdev_t *vd = mg->mg_vd; + vdev_t *rvd = vd->vdev_spa->spa_root_vdev; + + mutex_enter(&msp->ms_lock); + metaslab_unload(msp); + + /* + * We don't want to spend the CPU manipulating the size-ordered + * tree, so clear the range_tree ops. + */ + msp->ms_tree->rt_ops = NULL; + + (void) fprintf(stderr, + "\rloading vdev %llu of %llu, metaslab %llu of %llu ...", + (longlong_t)vd->vdev_id, + (longlong_t)rvd->vdev_children, + (longlong_t)msp->ms_id, + (longlong_t)vd->vdev_ms_count); + + /* + * For leak detection, we overload the metaslab ms_tree to + * contain allocated segments instead of free segments. As a + * result, we can't use the normal metaslab_load/unload + * interfaces. + */ + if (vd->vdev_ops == &vdev_indirect_ops) { + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + for (; *vim_idxp < vdev_indirect_mapping_num_entries(vim); + (*vim_idxp)++) { + vdev_indirect_mapping_entry_phys_t *vimep = + &vim->vim_entries[*vim_idxp]; + uint64_t ent_offset = DVA_MAPPING_GET_SRC_OFFSET(vimep); + uint64_t ent_len = DVA_GET_ASIZE(&vimep->vimep_dst); + ASSERT3U(ent_offset, >=, msp->ms_start); + if (ent_offset >= msp->ms_start + msp->ms_size) + break; + + /* + * Mappings do not cross metaslab boundaries, + * because we create them by walking the metaslabs. + */ + ASSERT3U(ent_offset + ent_len, <=, + msp->ms_start + msp->ms_size); + range_tree_add(msp->ms_tree, ent_offset, ent_len); + } + } else if (msp->ms_sm != NULL) { + VERIFY0(space_map_load(msp->ms_sm, msp->ms_tree, SM_ALLOC)); + } + + if (!msp->ms_loaded) { + msp->ms_loaded = B_TRUE; + } + mutex_exit(&msp->ms_lock); +} + +/* ARGSUSED */ +static int +increment_indirect_mapping_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx) +{ + zdb_cb_t *zcb = arg; + spa_t *spa = zcb->zcb_spa; + vdev_t *vd; + const dva_t *dva = &bp->blk_dva[0]; + + ASSERT(!dump_opt['L']); + ASSERT3U(BP_GET_NDVAS(bp), ==, 1); + + spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); + vd = vdev_lookup_top(zcb->zcb_spa, DVA_GET_VDEV(dva)); + ASSERT3P(vd, !=, NULL); + spa_config_exit(spa, SCL_VDEV, FTAG); + + ASSERT(vd->vdev_indirect_config.vic_mapping_object != 0); + ASSERT3P(zcb->zcb_vd_obsolete_counts[vd->vdev_id], !=, NULL); + + vdev_indirect_mapping_increment_obsolete_count( + vd->vdev_indirect_mapping, + DVA_GET_OFFSET(dva), DVA_GET_ASIZE(dva), + zcb->zcb_vd_obsolete_counts[vd->vdev_id]); + + return (0); +} + +static uint32_t * +zdb_load_obsolete_counts(vdev_t *vd) +{ + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + spa_t *spa = vd->vdev_spa; + spa_condensing_indirect_phys_t *scip = + &spa->spa_condensing_indirect_phys; + uint32_t *counts; + + EQUIV(vdev_obsolete_sm_object(vd) != 0, vd->vdev_obsolete_sm != NULL); + counts = vdev_indirect_mapping_load_obsolete_counts(vim); + if (vd->vdev_obsolete_sm != NULL) { + vdev_indirect_mapping_load_obsolete_spacemap(vim, counts, + vd->vdev_obsolete_sm); + } + if (scip->scip_vdev == vd->vdev_id && + scip->scip_prev_obsolete_sm_object != 0) { + space_map_t *prev_obsolete_sm = NULL; + VERIFY0(space_map_open(&prev_obsolete_sm, spa->spa_meta_objset, + scip->scip_prev_obsolete_sm_object, 0, vd->vdev_asize, 0)); + space_map_update(prev_obsolete_sm); + vdev_indirect_mapping_load_obsolete_spacemap(vim, counts, + prev_obsolete_sm); + space_map_close(prev_obsolete_sm); + } + return (counts); +} + +static void zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) { zcb->zcb_spa = spa; if (!dump_opt['L']) { + dsl_pool_t *dp = spa->spa_dsl_pool; vdev_t *rvd = spa->spa_root_vdev; /* @@ -2813,50 +3143,51 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) spa->spa_normal_class->mc_ops = &zdb_metaslab_ops; spa->spa_log_class->mc_ops = &zdb_metaslab_ops; + zcb->zcb_vd_obsolete_counts = + umem_zalloc(rvd->vdev_children * sizeof (uint32_t *), + UMEM_NOFAIL); + + for (uint64_t c = 0; c < rvd->vdev_children; c++) { vdev_t *vd = rvd->vdev_child[c]; - metaslab_group_t *mg = vd->vdev_mg; - for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { - metaslab_t *msp = vd->vdev_ms[m]; - ASSERT3P(msp->ms_group, ==, mg); - mutex_enter(&msp->ms_lock); - metaslab_unload(msp); + uint64_t vim_idx = 0; + ASSERT3U(c, ==, vd->vdev_id); + + /* + * Note: we don't check for mapping leaks on + * removing vdevs because their ms_tree's are + * used to look for leaks in allocated space. + */ + if (vd->vdev_ops == &vdev_indirect_ops) { + zcb->zcb_vd_obsolete_counts[c] = + zdb_load_obsolete_counts(vd); + /* - * For leak detection, we overload the metaslab - * ms_tree to contain allocated segments - * instead of free segments. As a result, - * we can't use the normal metaslab_load/unload - * interfaces. + * Normally, indirect vdevs don't have any + * metaslabs. We want to set them up for + * zio_claim(). */ - if (msp->ms_sm != NULL) { - (void) fprintf(stderr, - "\rloading space map for " - "vdev %llu of %llu, " - "metaslab %llu of %llu ...", - (longlong_t)c, - (longlong_t)rvd->vdev_children, - (longlong_t)m, - (longlong_t)vd->vdev_ms_count); + VERIFY0(vdev_metaslab_init(vd, 0)); + } - /* - * We don't want to spend the CPU - * manipulating the size-ordered - * tree, so clear the range_tree - * ops. - */ - msp->ms_tree->rt_ops = NULL; - VERIFY0(space_map_load(msp->ms_sm, - msp->ms_tree, SM_ALLOC)); - - if (!msp->ms_loaded) { - msp->ms_loaded = B_TRUE; - } - } - mutex_exit(&msp->ms_lock); + for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { + zdb_leak_init_ms(vd->vdev_ms[m], &vim_idx); } + if (vd->vdev_ops == &vdev_indirect_ops) { + ASSERT3U(vim_idx, ==, + vdev_indirect_mapping_num_entries( + vd->vdev_indirect_mapping)); + } } (void) fprintf(stderr, "\n"); + + if (bpobj_is_open(&dp->dp_obsolete_bpobj)) { + ASSERT(spa_feature_is_enabled(spa, + SPA_FEATURE_DEVICE_REMOVAL)); + (void) bpobj_iterate_nofree(&dp->dp_obsolete_bpobj, + increment_indirect_mapping_cb, zcb, NULL); + } } spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); @@ -2866,18 +3197,93 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) spa_config_exit(spa, SCL_CONFIG, FTAG); } -static void -zdb_leak_fini(spa_t *spa) +static boolean_t +zdb_check_for_obsolete_leaks(vdev_t *vd, zdb_cb_t *zcb) { + boolean_t leaks = B_FALSE; + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + uint64_t total_leaked = 0; + + ASSERT(vim != NULL); + + for (uint64_t i = 0; i < vdev_indirect_mapping_num_entries(vim); i++) { + vdev_indirect_mapping_entry_phys_t *vimep = + &vim->vim_entries[i]; + uint64_t obsolete_bytes = 0; + uint64_t offset = DVA_MAPPING_GET_SRC_OFFSET(vimep); + metaslab_t *msp = vd->vdev_ms[offset >> vd->vdev_ms_shift]; + + /* + * This is not very efficient but it's easy to + * verify correctness. + */ + for (uint64_t inner_offset = 0; + inner_offset < DVA_GET_ASIZE(&vimep->vimep_dst); + inner_offset += 1 << vd->vdev_ashift) { + if (range_tree_contains(msp->ms_tree, + offset + inner_offset, 1 << vd->vdev_ashift)) { + obsolete_bytes += 1 << vd->vdev_ashift; + } + } + + int64_t bytes_leaked = obsolete_bytes - + zcb->zcb_vd_obsolete_counts[vd->vdev_id][i]; + ASSERT3U(DVA_GET_ASIZE(&vimep->vimep_dst), >=, + zcb->zcb_vd_obsolete_counts[vd->vdev_id][i]); + if (bytes_leaked != 0 && + (vdev_obsolete_counts_are_precise(vd) || + dump_opt['d'] >= 5)) { + (void) printf("obsolete indirect mapping count " + "mismatch on %llu:%llx:%llx : %llx bytes leaked\n", + (u_longlong_t)vd->vdev_id, + (u_longlong_t)DVA_MAPPING_GET_SRC_OFFSET(vimep), + (u_longlong_t)DVA_GET_ASIZE(&vimep->vimep_dst), + (u_longlong_t)bytes_leaked); + } + total_leaked += ABS(bytes_leaked); + } + + if (!vdev_obsolete_counts_are_precise(vd) && total_leaked > 0) { + int pct_leaked = total_leaked * 100 / + vdev_indirect_mapping_bytes_mapped(vim); + (void) printf("cannot verify obsolete indirect mapping " + "counts of vdev %llu because precise feature was not " + "enabled when it was removed: %d%% (%llx bytes) of mapping" + "unreferenced\n", + (u_longlong_t)vd->vdev_id, pct_leaked, + (u_longlong_t)total_leaked); + } else if (total_leaked > 0) { + (void) printf("obsolete indirect mapping count mismatch " + "for vdev %llu -- %llx total bytes mismatched\n", + (u_longlong_t)vd->vdev_id, + (u_longlong_t)total_leaked); + leaks |= B_TRUE; + } + + vdev_indirect_mapping_free_obsolete_counts(vim, + zcb->zcb_vd_obsolete_counts[vd->vdev_id]); + zcb->zcb_vd_obsolete_counts[vd->vdev_id] = NULL; + + return (leaks); +} + +static boolean_t +zdb_leak_fini(spa_t *spa, zdb_cb_t *zcb) +{ + boolean_t leaks = B_FALSE; if (!dump_opt['L']) { vdev_t *rvd = spa->spa_root_vdev; for (unsigned c = 0; c < rvd->vdev_children; c++) { vdev_t *vd = rvd->vdev_child[c]; metaslab_group_t *mg = vd->vdev_mg; - for (unsigned m = 0; m < vd->vdev_ms_count; m++) { + + if (zcb->zcb_vd_obsolete_counts[c] != NULL) { + leaks |= zdb_check_for_obsolete_leaks(vd, zcb); + } + + for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; ASSERT3P(mg, ==, msp->ms_group); - mutex_enter(&msp->ms_lock); /* * The ms_tree has been overloaded to @@ -2887,18 +3293,30 @@ zdb_leak_fini(spa_t *spa) * represents an allocated block that we * did not claim during the traversal. * Claimed blocks would have been removed - * from the ms_tree. + * from the ms_tree. For indirect vdevs, + * space remaining in the tree represents + * parts of the mapping that are not + * referenced, which is not a bug. */ - range_tree_vacate(msp->ms_tree, zdb_leak, vd); + if (vd->vdev_ops == &vdev_indirect_ops) { + range_tree_vacate(msp->ms_tree, + NULL, NULL); + } else { + range_tree_vacate(msp->ms_tree, + zdb_leak, vd); + } if (msp->ms_loaded) { msp->ms_loaded = B_FALSE; } - - mutex_exit(&msp->ms_lock); } } + + umem_free(zcb->zcb_vd_obsolete_counts, + rvd->vdev_children * sizeof (uint32_t *)); + zcb->zcb_vd_obsolete_counts = NULL; } + return (leaks); } /* ARGSUSED */ @@ -2949,10 +3367,14 @@ dump_block_stats(spa_t *spa) */ (void) bpobj_iterate_nofree(&spa->spa_deferred_bpobj, count_block_cb, &zcb, NULL); + if (spa_version(spa) >= SPA_VERSION_DEADLISTS) { (void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj, count_block_cb, &zcb, NULL); } + + zdb_claim_removing(spa, &zcb); + if (spa_feature_is_active(spa, SPA_FEATURE_ASYNC_DESTROY)) { VERIFY3U(0, ==, bptree_iterate(spa->spa_meta_objset, spa->spa_dsl_pool->dp_bptree_obj, B_FALSE, count_block_cb, @@ -2994,7 +3416,7 @@ dump_block_stats(spa_t *spa) /* * Report any leaked segments. */ - zdb_leak_fini(spa); + leaks |= zdb_leak_fini(spa, &zcb); tzb = &zcb.zcb_type[ZB_TOTAL][ZDB_OT_TOTAL]; @@ -3002,7 +3424,8 @@ dump_block_stats(spa_t *spa) norm_space = metaslab_class_get_space(spa_normal_class(spa)); total_alloc = norm_alloc + metaslab_class_get_alloc(spa_log_class(spa)); - total_found = tzb->zb_asize - zcb.zcb_dedup_asize; + total_found = tzb->zb_asize - zcb.zcb_dedup_asize + + zcb.zcb_removing_size; if (total_found == total_alloc) { if (!dump_opt['L']) @@ -3069,6 +3492,24 @@ dump_block_stats(spa_t *spa) (longlong_t)tzb->zb_ditto_samevdev); } + for (uint64_t v = 0; v < spa->spa_root_vdev->vdev_children; v++) { + vdev_t *vd = spa->spa_root_vdev->vdev_child[v]; + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + + if (vim == NULL) { + continue; + } + + char mem[32]; + zdb_nicenum(vdev_indirect_mapping_num_entries(vim), + mem, vdev_indirect_mapping_size(vim)); + + (void) printf("\tindirect vdev id %llu has %llu segments " + "(%s in memory)\n", + (longlong_t)vd->vdev_id, + (longlong_t)vdev_indirect_mapping_num_entries(vim), mem); + } + if (dump_opt['b'] >= 2) { int l, t, level; (void) printf("\nBlocks\tLSIZE\tPSIZE\tASIZE" @@ -3275,6 +3716,124 @@ dump_simulated_ddt(spa_t *spa) dump_dedup_ratio(&dds_total); } +static int +verify_device_removal_feature_counts(spa_t *spa) +{ + uint64_t dr_feature_refcount = 0; + uint64_t oc_feature_refcount = 0; + uint64_t indirect_vdev_count = 0; + uint64_t precise_vdev_count = 0; + uint64_t obsolete_counts_object_count = 0; + uint64_t obsolete_sm_count = 0; + uint64_t obsolete_counts_count = 0; + uint64_t scip_count = 0; + uint64_t obsolete_bpobj_count = 0; + int ret = 0; + + spa_condensing_indirect_phys_t *scip = + &spa->spa_condensing_indirect_phys; + if (scip->scip_next_mapping_object != 0) { + vdev_t *vd = spa->spa_root_vdev->vdev_child[scip->scip_vdev]; + ASSERT(scip->scip_prev_obsolete_sm_object != 0); + ASSERT3P(vd->vdev_ops, ==, &vdev_indirect_ops); + + (void) printf("Condensing indirect vdev %llu: new mapping " + "object %llu, prev obsolete sm %llu\n", + (u_longlong_t)scip->scip_vdev, + (u_longlong_t)scip->scip_next_mapping_object, + (u_longlong_t)scip->scip_prev_obsolete_sm_object); + if (scip->scip_prev_obsolete_sm_object != 0) { + space_map_t *prev_obsolete_sm = NULL; + VERIFY0(space_map_open(&prev_obsolete_sm, + spa->spa_meta_objset, + scip->scip_prev_obsolete_sm_object, + 0, vd->vdev_asize, 0)); + space_map_update(prev_obsolete_sm); + dump_spacemap(spa->spa_meta_objset, prev_obsolete_sm); + (void) printf("\n"); + space_map_close(prev_obsolete_sm); + } + + scip_count += 2; + } + + for (uint64_t i = 0; i < spa->spa_root_vdev->vdev_children; i++) { + vdev_t *vd = spa->spa_root_vdev->vdev_child[i]; + vdev_indirect_config_t *vic = &vd->vdev_indirect_config; + + if (vic->vic_mapping_object != 0) { + ASSERT(vd->vdev_ops == &vdev_indirect_ops || + vd->vdev_removing); + indirect_vdev_count++; + + if (vd->vdev_indirect_mapping->vim_havecounts) { + obsolete_counts_count++; + } + } + if (vdev_obsolete_counts_are_precise(vd)) { + ASSERT(vic->vic_mapping_object != 0); + precise_vdev_count++; + } + if (vdev_obsolete_sm_object(vd) != 0) { + ASSERT(vic->vic_mapping_object != 0); + obsolete_sm_count++; + } + } + + (void) feature_get_refcount(spa, + &spa_feature_table[SPA_FEATURE_DEVICE_REMOVAL], + &dr_feature_refcount); + (void) feature_get_refcount(spa, + &spa_feature_table[SPA_FEATURE_OBSOLETE_COUNTS], + &oc_feature_refcount); + + if (dr_feature_refcount != indirect_vdev_count) { + ret = 1; + (void) printf("Number of indirect vdevs (%llu) " \ + "does not match feature count (%llu)\n", + (u_longlong_t)indirect_vdev_count, + (u_longlong_t)dr_feature_refcount); + } else { + (void) printf("Verified device_removal feature refcount " \ + "of %llu is correct\n", + (u_longlong_t)dr_feature_refcount); + } + + if (zap_contains(spa_meta_objset(spa), DMU_POOL_DIRECTORY_OBJECT, + DMU_POOL_OBSOLETE_BPOBJ) == 0) { + obsolete_bpobj_count++; + } + + + obsolete_counts_object_count = precise_vdev_count; + obsolete_counts_object_count += obsolete_sm_count; + obsolete_counts_object_count += obsolete_counts_count; + obsolete_counts_object_count += scip_count; + obsolete_counts_object_count += obsolete_bpobj_count; + obsolete_counts_object_count += remap_deadlist_count; + + if (oc_feature_refcount != obsolete_counts_object_count) { + ret = 1; + (void) printf("Number of obsolete counts objects (%llu) " \ + "does not match feature count (%llu)\n", + (u_longlong_t)obsolete_counts_object_count, + (u_longlong_t)oc_feature_refcount); + (void) printf("pv:%llu os:%llu oc:%llu sc:%llu " + "ob:%llu rd:%llu\n", + (u_longlong_t)precise_vdev_count, + (u_longlong_t)obsolete_sm_count, + (u_longlong_t)obsolete_counts_count, + (u_longlong_t)scip_count, + (u_longlong_t)obsolete_bpobj_count, + (u_longlong_t)remap_deadlist_count); + } else { + (void) printf("Verified indirect_refcount feature refcount " \ + "of %llu is correct\n", + (u_longlong_t)oc_feature_refcount); + } + return (ret); +} + static void dump_zpool(spa_t *spa) { @@ -3308,18 +3867,24 @@ dump_zpool(spa_t *spa) if (dump_opt['d'] || dump_opt['i']) { dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { + dsl_pool_t *dp = spa->spa_dsl_pool; dump_full_bpobj(&spa->spa_deferred_bpobj, "Deferred frees", 0); if (spa_version(spa) >= SPA_VERSION_DEADLISTS) { - dump_full_bpobj( - &spa->spa_dsl_pool->dp_free_bpobj, + dump_full_bpobj(&dp->dp_free_bpobj, "Pool snapshot frees", 0); } + if (bpobj_is_open(&dp->dp_obsolete_bpobj)) { + ASSERT(spa_feature_is_enabled(spa, + SPA_FEATURE_DEVICE_REMOVAL)); + dump_full_bpobj(&dp->dp_obsolete_bpobj, + "Pool obsolete blocks", 0); + } if (spa_feature_is_active(spa, SPA_FEATURE_ASYNC_DESTROY)) { dump_bptree(spa->spa_meta_objset, - spa->spa_dsl_pool->dp_bptree_obj, + dp->dp_bptree_obj, "Pool dataset frees"); } dump_dtl(spa->spa_root_vdev, 0); @@ -3351,6 +3916,10 @@ dump_zpool(spa_t *spa) (longlong_t)refcount); } } + + if (rc == 0) { + rc = verify_device_removal_feature_counts(spa); + } } if (rc == 0 && (dump_opt['b'] || dump_opt['c'])) rc = dump_block_stats(spa); @@ -3661,7 +4230,8 @@ zdb_read_block(char *thing, spa_t *spa) psize, ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE | ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY | - ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL, NULL)); + ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW | ZIO_FLAG_OPTIONAL, + NULL, NULL)); } error = zio_wait(zio); Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Apr 16 03:14:54 2018 (r332524) +++ stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Apr 16 03:32:41 2018 (r332525) @@ -112,6 +112,7 @@ static int zfs_do_diff(int argc, char **argv); static int zfs_do_jail(int argc, char **argv); static int zfs_do_unjail(int argc, char **argv); static int zfs_do_bookmark(int argc, char **argv); +static int zfs_do_remap(int argc, char **argv); static int zfs_do_channel_program(int argc, char **argv); /* @@ -161,6 +162,7 @@ typedef enum { HELP_HOLDS, HELP_RELEASE, HELP_DIFF, + HELP_REMAP, HELP_BOOKMARK, HELP_CHANNEL_PROGRAM, } zfs_help_t; @@ -220,6 +222,7 @@ static zfs_command_t command_table[] = { { NULL }, { "jail", zfs_do_jail, HELP_JAIL }, { "unjail", zfs_do_unjail, HELP_UNJAIL }, + { "remap", zfs_do_remap, HELP_REMAP }, }; #define NCOMMAND (sizeof (command_table) / sizeof (command_table[0])) @@ -342,6 +345,8 @@ get_usage(zfs_help_t idx) case HELP_DIFF: return (gettext("\tdiff [-FHt] " "[snapshot|filesystem]\n")); + case HELP_REMAP: + return (gettext("\tremap \n")); case HELP_BOOKMARK: return (gettext("\tbookmark \n")); case HELP_CHANNEL_PROGRAM: @@ -4170,6 +4175,7 @@ zfs_do_receive(int argc, char **argv) #define ZFS_DELEG_PERM_RELEASE "release" #define ZFS_DELEG_PERM_DIFF "diff" #define ZFS_DELEG_PERM_BOOKMARK "bookmark" +#define ZFS_DELEG_PERM_REMAP "remap" #define ZFS_NUM_DELEG_NOTES ZFS_DELEG_NOTE_NONE @@ -4190,6 +4196,7 @@ static zfs_deleg_perm_tab_t zfs_deleg_perm_tbl[] = { { ZFS_DELEG_PERM_SHARE, ZFS_DELEG_NOTE_SHARE }, { ZFS_DELEG_PERM_SNAPSHOT, ZFS_DELEG_NOTE_SNAPSHOT }, { ZFS_DELEG_PERM_BOOKMARK, ZFS_DELEG_NOTE_BOOKMARK }, + { ZFS_DELEG_PERM_REMAP, ZFS_DELEG_NOTE_REMAP }, { ZFS_DELEG_PERM_GROUPQUOTA, ZFS_DELEG_NOTE_GROUPQUOTA }, { ZFS_DELEG_PERM_GROUPUSED, ZFS_DELEG_NOTE_GROUPUSED }, @@ -6978,7 +6985,7 @@ zfs_do_diff(int argc, char **argv) if (argc < 1) { (void) fprintf(stderr, - gettext("must provide at least one snapshot name\n")); + gettext("must provide at least one snapshot name\n")); usage(B_FALSE); } @@ -7017,6 +7024,22 @@ zfs_do_diff(int argc, char **argv) zfs_close(zhp); return (err != 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Apr 16 03:35:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A67AFF80633; Mon, 16 Apr 2018 03:35:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5187D82A79; Mon, 16 Apr 2018 03:35: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 4C7D31800F; Mon, 16 Apr 2018 03:35: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 w3G3ZJxC010134; Mon, 16 Apr 2018 03:35:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3ZIHr010127; Mon, 16 Apr 2018 03:35:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160335.w3G3ZIHr010127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332526 - in stable/11/sys/cddl/contrib/opensolaris/uts/common: fs/zfs sys sys/fm X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common: fs/zfs sys sys/fm X-SVN-Commit-Revision: 332526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:35:19 -0000 Author: mav Date: Mon Apr 16 03:35:18 2018 New Revision: 332526 URL: https://svnweb.freebsd.org/changeset/base/332526 Log: MFC r329755: MFV r329753: 8809 libzpool should leverage work done in libfakekernel illumos/illumos-gate@f06dce2c1f0f3af78581e7574f65bfba843ddb6e Reviewed by: Sebastien Roy Reviewed by: Prakash Surya Reviewed by: Gordon Ross Approved by: Richard Lowe Author: Andrew Stormont Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/cpupart.h stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fm/util.h stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Apr 16 03:32:41 2018 (r332525) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Apr 16 03:35:18 2018 (r332526) @@ -23,6 +23,7 @@ * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 RackTop Systems. */ #include @@ -66,7 +67,9 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, default_ibs, CTLFLAG_RW &zfs_default_ibs, 0, "Default dnode indirect block shift"); #ifdef illumos +#ifdef _KERNEL static kmem_cbrc_t dnode_move(void *, void *, size_t, void *); +#endif /* _KERNEL */ #endif static int @@ -222,7 +225,9 @@ dnode_init(void) dnode_cache = kmem_cache_create("dnode_t", sizeof (dnode_t), 0, dnode_cons, dnode_dest, NULL, NULL, NULL, 0); +#ifdef _KERNEL kmem_cache_set_move(dnode_cache, dnode_move); +#endif /* _KERNEL */ } void @@ -414,7 +419,9 @@ dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_ dnode_t *dn; dn = kmem_cache_alloc(dnode_cache, KM_SLEEP); +#ifdef _KERNEL ASSERT(!POINTER_IS_VALID(dn->dn_objset)); +#endif /* _KERNEL */ dn->dn_moved = 0; /* @@ -706,6 +713,7 @@ static struct { } dnode_move_stats; #endif /* DNODE_STATS */ +#ifdef _KERNEL static void dnode_move_impl(dnode_t *odn, dnode_t *ndn) { @@ -843,7 +851,6 @@ dnode_move_impl(dnode_t *odn, dnode_t *ndn) } #ifdef illumos -#ifdef _KERNEL /*ARGSUSED*/ static kmem_cbrc_t dnode_move(void *buf, void *newbuf, size_t size, void *arg) @@ -984,8 +991,8 @@ dnode_move(void *buf, void *newbuf, size_t size, void return (KMEM_CBRC_YES); } -#endif /* _KERNEL */ #endif /* illumos */ +#endif /* _KERNEL */ void dnode_special_close(dnode_handle_t *dnh) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h Mon Apr 16 03:32:41 2018 (r332525) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h Mon Apr 16 03:35:18 2018 (r332526) @@ -23,6 +23,7 @@ * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2017 RackTop Systems. */ #ifndef _SYS_ACL_H @@ -130,7 +131,7 @@ typedef struct acl_info acl_t; #define ACL_FLAGS_ALL (ACL_AUTO_INHERIT|ACL_PROTECTED| \ ACL_DEFAULTED) -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) /* * These are only applicable in a CIFS context. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Mon Apr 16 03:32:41 2018 (r332525) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Mon Apr 16 03:35:18 2018 (r332526) @@ -26,6 +26,7 @@ /* * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright 2017 RackTop Systems. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -134,7 +135,7 @@ extern "C" { #define BIT_ONLYONESET(u) \ ((((u) == 0) ? 0 : ((u) & ((u) - 1)) == 0)) -#if defined(_KERNEL) && !defined(_ASM) +#if (defined(_KERNEL) || defined(_FAKE_KERNEL)) && !defined(_ASM) #include /* @@ -188,7 +189,7 @@ extern int odd_parity(ulong_t); */ #define BITX(u, h, l) (((u) >> (l)) & ((1LU << ((h) - (l) + 1LU)) - 1LU)) -#endif /* _KERNEL && !_ASM */ +#endif /* (_KERNEL || _FAKE_KERNEL) && !_ASM */ #ifdef __cplusplus } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/cpupart.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/cpupart.h Mon Apr 16 03:32:41 2018 (r332525) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/cpupart.h Mon Apr 16 03:35:18 2018 (r332526) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2017 RackTop Systems. */ #ifndef _SYS_CPUPART_H @@ -40,7 +41,7 @@ extern "C" { #endif -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) typedef int cpupartid_t; @@ -148,7 +149,7 @@ extern uint_t cpupart_list(psetid_t *, uint_t, int); extern int cpupart_setattr(psetid_t, uint_t); extern int cpupart_getattr(psetid_t, uint_t *); -#endif /* _KERNEL */ +#endif /* _KERNEL || _FAKE_KERNEL */ #ifdef __cplusplus } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Mon Apr 16 03:32:41 2018 (r332525) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Mon Apr 16 03:35:18 2018 (r332526) @@ -22,6 +22,7 @@ /* * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2014 Igor Kozhukhov . + * Copyright 2017 RackTop Systems. */ #ifndef _SYS_CPUVAR_H @@ -31,6 +32,7 @@ #include /* has cpu_stat_t definition */ #include #include +#include /* has kcpc_ctx_t definition */ #include #if (defined(_KERNEL) || defined(_KMEMUSER)) && defined(_MACHDEP) @@ -610,9 +612,9 @@ extern struct cpu *curcpup(void); #endif /* _KERNEL || _KMEMUSER */ /* - * CPU support routines. + * CPU support routines (not for genassym.c) */ -#if defined(_KERNEL) && defined(__STDC__) /* not for genassym.c */ +#if (defined(_KERNEL) || defined(_FAKE_KERNEL)) && defined(__STDC__) struct zone; @@ -819,7 +821,7 @@ extern void populate_idstr(struct cpu *); extern void cpu_vm_data_init(struct cpu *); extern void cpu_vm_data_destroy(struct cpu *); -#endif /* _KERNEL */ +#endif /* _KERNEL || _FAKE_KERNEL */ #ifdef __cplusplus } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fm/util.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fm/util.h Mon Apr 16 03:32:41 2018 (r332525) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fm/util.h Mon Apr 16 03:35:18 2018 (r332526) @@ -21,6 +21,7 @@ /* * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2017 RackTop Systems. */ #ifndef _SYS_FM_UTIL_H @@ -70,7 +71,7 @@ typedef struct erpt_dump { } ed_tod_base; } erpt_dump_t; -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) #include #define FM_STK_DEPTH 20 /* maximum stack depth */ @@ -92,7 +93,7 @@ extern void fm_ereport_dump(void); extern void fm_ereport_post(nvlist_t *, int); extern int is_fm_panic(); -#endif /* _KERNEL */ +#endif /* _KERNEL || _FAKE_KERNEL */ #ifdef __cplusplus } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Mon Apr 16 03:32:41 2018 (r332525) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Mon Apr 16 03:35:18 2018 (r332526) @@ -21,6 +21,7 @@ /* * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2017 RackTop Systems. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ From owner-svn-src-all@freebsd.org Mon Apr 16 03:35:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE2FAF80738; Mon, 16 Apr 2018 03:35:43 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 914E682B9F; Mon, 16 Apr 2018 03:35: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 8BFE418010; Mon, 16 Apr 2018 03:35: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 w3G3Zhuf010199; Mon, 16 Apr 2018 03:35:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3ZhlZ010198; Mon, 16 Apr 2018 03:35:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201804160335.w3G3ZhlZ010198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 16 Apr 2018 03:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332527 - head/usr.sbin/daemon X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/usr.sbin/daemon X-SVN-Commit-Revision: 332527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:35:44 -0000 Author: ian Date: Mon Apr 16 03:35:43 2018 New Revision: 332527 URL: https://svnweb.freebsd.org/changeset/base/332527 Log: Fix cut-and-pasted line to have the right option letter. Reported by: 0mp@ Pointy hat: ian@ Modified: head/usr.sbin/daemon/daemon.8 Modified: head/usr.sbin/daemon/daemon.8 ============================================================================== --- head/usr.sbin/daemon/daemon.8 Mon Apr 16 03:35:18 2018 (r332526) +++ head/usr.sbin/daemon/daemon.8 Mon Apr 16 03:35:43 2018 (r332527) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2018 +.Dd April 15, 2018 .Dt DAEMON 8 .Os .Sh NAME @@ -44,7 +44,7 @@ .Op Fl s Ar syslog_priority .Op Fl T Ar syslog_tag .Op Fl l Ar syslog_facility -.Op Fl T Ar restart_delay_seconds +.Op Fl R Ar restart_delay_seconds .Ar command arguments ... .Sh DESCRIPTION The From owner-svn-src-all@freebsd.org Mon Apr 16 03:38:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58E4BF80A31; Mon, 16 Apr 2018 03:38:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F107682E63; Mon, 16 Apr 2018 03:38:37 +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 E9B4218012; Mon, 16 Apr 2018 03:38:37 +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 w3G3cbQF010335; Mon, 16 Apr 2018 03:38:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3cbwM010331; Mon, 16 Apr 2018 03:38:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160338.w3G3cbwM010331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:38: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: r332528 - in stable/11: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:38:38 -0000 Author: mav Date: Mon Apr 16 03:38:37 2018 New Revision: 332528 URL: https://svnweb.freebsd.org/changeset/base/332528 Log: MFC r329759: 9018 Replace kmem_cache_reap_now() with kmem_cache_reap_soon() illumos/illumos-gate@36a64e62848b51ac5a9a5216e894ec723cfef14e To prevent kmem_cache reaping from blocking other system resources, turn kmem_cache_reap_now() (which blocks) into kmem_cache_reap_soon(). Callers to kmem_cache_reap_soon() should use kmem_cache_reap_active(), which exploits #9017's new taskq_empty(). Reviewed by: Bryan Cantrill Reviewed by: Dan McDonald Reviewed by: Matthew Ahrens Reviewed by: Yuri Pankov Author: Tim Kordas FreeBSD does not use taskqueue for kmem caches reaping, so this change is less dramatic then it is on Illumos, just limiting reaping to 1 time per second. It may possibly be improved later, if needed. Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c stable/11/sys/cddl/compat/opensolaris/sys/kmem.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Apr 16 03:35:43 2018 (r332527) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Apr 16 03:38:37 2018 (r332528) @@ -364,7 +364,8 @@ extern void cv_broadcast(kcondvar_t *cv); #define kmem_cache_alloc(_c, _f) umem_cache_alloc(_c, _f) #define kmem_cache_free(_c, _b) umem_cache_free(_c, _b) #define kmem_debugging() 0 -#define kmem_cache_reap_now(_c) /* nothing */ +#define kmem_cache_reap_active() (B_FALSE) +#define kmem_cache_reap_soon(_c) /* nothing */ #define kmem_cache_set_move(_c, _cb) /* nothing */ #define POINTER_INVALIDATE(_pp) /* nothing */ #define POINTER_IS_VALID(_p) 0 Modified: stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c ============================================================================== --- stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Mon Apr 16 03:35:43 2018 (r332527) +++ stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Mon Apr 16 03:38:37 2018 (r332528) @@ -212,9 +212,30 @@ kmem_cache_free(kmem_cache_t *cache, void *buf) #endif } +/* + * Allow our caller to determine if there are running reaps. + * + * This call is very conservative and may return B_TRUE even when + * reaping activity isn't active. If it returns B_FALSE, then reaping + * activity is definitely inactive. + */ +boolean_t +kmem_cache_reap_active(void) +{ + + return (B_FALSE); +} + +/* + * Reap (almost) everything soon. + * + * Note: this does not wait for the reap-tasks to complete. Caller + * should use kmem_cache_reap_active() (above) and/or moderation to + * avoid scheduling too many reap-tasks. + */ #ifdef _KERNEL void -kmem_cache_reap_now(kmem_cache_t *cache) +kmem_cache_reap_soon(kmem_cache_t *cache) { #ifndef KMEM_DEBUG zone_drain(cache->kc_zone); @@ -228,7 +249,7 @@ kmem_reap(void) } #else void -kmem_cache_reap_now(kmem_cache_t *cache __unused) +kmem_cache_reap_soon(kmem_cache_t *cache __unused) { } Modified: stable/11/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- stable/11/sys/cddl/compat/opensolaris/sys/kmem.h Mon Apr 16 03:35:43 2018 (r332527) +++ stable/11/sys/cddl/compat/opensolaris/sys/kmem.h Mon Apr 16 03:38:37 2018 (r332528) @@ -73,7 +73,8 @@ kmem_cache_t *kmem_cache_create(char *name, size_t buf void kmem_cache_destroy(kmem_cache_t *cache); void *kmem_cache_alloc(kmem_cache_t *cache, int flags); void kmem_cache_free(kmem_cache_t *cache, void *buf); -void kmem_cache_reap_now(kmem_cache_t *cache); +boolean_t kmem_cache_reap_active(void); +void kmem_cache_reap_soon(kmem_cache_t *); void kmem_reap(void); int kmem_debugging(void); void *calloc(size_t n, size_t s); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 03:35:43 2018 (r332527) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 03:38:37 2018 (r332528) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2018, Joyent, Inc. * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 by Saso Kiselkov. All rights reserved. * Copyright 2017 Nexenta Systems, Inc. All rights reserved. @@ -309,6 +309,9 @@ int zfs_arc_evict_batch_limit = 10; /* number of seconds before growing cache again */ static int arc_grow_retry = 60; +/* number of milliseconds before attempting a kmem-cache-reap */ +static int arc_kmem_cache_reap_retry_ms = 1000; + /* shift of arc_c for calculating overflow limit in arc_get_data_impl */ int zfs_arc_overflow_shift = 8; @@ -4414,21 +4417,31 @@ arc_kmem_reap_now(void) #endif #endif + /* + * If a kmem reap is already active, don't schedule more. We must + * check for this because kmem_cache_reap_soon() won't actually + * block on the cache being reaped (this is to prevent callers from + * becoming implicitly blocked by a system-wide kmem reap -- which, + * on a system with many, many full magazines, can take minutes). + */ + if (kmem_cache_reap_active()) + return; + for (i = 0; i < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT; i++) { if (zio_buf_cache[i] != prev_cache) { prev_cache = zio_buf_cache[i]; - kmem_cache_reap_now(zio_buf_cache[i]); + kmem_cache_reap_soon(zio_buf_cache[i]); } if (zio_data_buf_cache[i] != prev_data_cache) { prev_data_cache = zio_data_buf_cache[i]; - kmem_cache_reap_now(zio_data_buf_cache[i]); + kmem_cache_reap_soon(zio_data_buf_cache[i]); } } - kmem_cache_reap_now(abd_chunk_cache); - kmem_cache_reap_now(buf_cache); - kmem_cache_reap_now(hdr_full_cache); - kmem_cache_reap_now(hdr_l2only_cache); - kmem_cache_reap_now(range_seg_cache); + kmem_cache_reap_soon(abd_chunk_cache); + kmem_cache_reap_soon(buf_cache); + kmem_cache_reap_soon(hdr_full_cache); + kmem_cache_reap_soon(hdr_l2only_cache); + kmem_cache_reap_soon(range_seg_cache); #ifdef illumos if (zio_arena != NULL) { @@ -4463,6 +4476,7 @@ static void arc_reclaim_thread(void *unused __unused) { hrtime_t growtime = 0; + hrtime_t kmem_reap_time = 0; callb_cpr_t cpr; CALLB_CPR_INIT(&cpr, &arc_reclaim_lock, callb_generic_cpr, FTAG); @@ -4496,7 +4510,7 @@ arc_reclaim_thread(void *unused __unused) int64_t free_memory = arc_available_memory(); if (free_memory < 0) { - + hrtime_t curtime = gethrtime(); arc_no_grow = B_TRUE; arc_warm = B_TRUE; @@ -4504,9 +4518,20 @@ arc_reclaim_thread(void *unused __unused) * Wait at least zfs_grow_retry (default 60) seconds * before considering growing. */ - growtime = gethrtime() + SEC2NSEC(arc_grow_retry); + growtime = curtime + SEC2NSEC(arc_grow_retry); - arc_kmem_reap_now(); + /* + * Wait at least arc_kmem_cache_reap_retry_ms + * between arc_kmem_reap_now() calls. Without + * this check it is possible to end up in a + * situation where we spend lots of time + * reaping caches, while we're near arc_c_min. + */ + if (curtime >= kmem_reap_time) { + arc_kmem_reap_now(); + kmem_reap_time = gethrtime() + + MSEC2NSEC(arc_kmem_cache_reap_retry_ms); + } /* * If we are still low on memory, shrink the ARC From owner-svn-src-all@freebsd.org Mon Apr 16 03:39:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EC2DF80B21; Mon, 16 Apr 2018 03:39:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C008582FAF; Mon, 16 Apr 2018 03:39: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 BABF518014; Mon, 16 Apr 2018 03:39: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 w3G3dOke010416; Mon, 16 Apr 2018 03:39:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3dOPT010415; Mon, 16 Apr 2018 03:39:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160339.w3G3dOPT010415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:39: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: r332529 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:39:25 -0000 Author: mav Date: Mon Apr 16 03:39:24 2018 New Revision: 332529 URL: https://svnweb.freebsd.org/changeset/base/332529 Log: MFC r329761: MFV r329760: 7638 Refactor spa_load_impl into several functions illumos/illumos-gate@1fd3785ff6601d3e391378c2dcbf4c5f27e1fe32 spa_load_impl has grown out of proportions. It is currently over 700 lines long and makes it very hard to follow or debug the import process even for experienced ZFS developers. The objective is to split it up in a series of well commented functions. Reviewed by: Paul Dagnelie Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Andrew Stormont Approved by: Dan McDonald Author: Pavel Zakharov Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:38:37 2018 (r332528) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:39:24 2018 (r332529) @@ -2218,7 +2218,7 @@ spa_try_repair(spa_t *spa, nvlist_t *config) static int spa_load(spa_t *spa, spa_load_state_t state, spa_import_type_t type, - boolean_t mosconfig) + boolean_t trust_config) { nvlist_t *config = spa->spa_config; char *ereport = FM_EREPORT_ZFS_POOL; @@ -2262,7 +2262,7 @@ spa_load(spa_t *spa, spa_load_state_t state, spa_impor gethrestime(&spa->spa_loaded_ts); error = spa_load_impl(spa, pool_guid, config, state, type, - mosconfig, &ereport); + trust_config, &ereport); } /* @@ -2314,38 +2314,20 @@ vdev_count_verify_zaps(vdev_t *vd) return (total); } -/* - * Load an existing storage pool, using the pool's builtin spa_config as a - * source of configuration information. - */ static int -spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config, - spa_load_state_t state, spa_import_type_t type, boolean_t trust_config, - char **ereport) +spa_ld_parse_config(spa_t *spa, uint64_t pool_guid, nvlist_t *config, + spa_load_state_t state, spa_import_type_t type) { int error = 0; - nvlist_t *nvroot = NULL; - nvlist_t *label; - vdev_t *rvd; - uberblock_t *ub = &spa->spa_uberblock; - uint64_t children, config_cache_txg = spa->spa_config_txg; - int orig_mode = spa->spa_mode; + nvlist_t *nvtree = NULL; int parse; - uint64_t obj; - boolean_t missing_feat_write = B_FALSE; + vdev_t *rvd; - /* - * If this is an untrusted config, access the pool in read-only mode. - * This prevents things like resilvering recently removed devices. - */ - if (!trust_config) - spa->spa_mode = FREAD; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); spa->spa_load_state = state; - if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvroot)) + if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvtree)) return (SET_ERROR(EINVAL)); parse = (type == SPA_IMPORT_EXISTING ? @@ -2368,7 +2350,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t * configuration requires knowing the version number. */ spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); - error = spa_config_parse(spa, &rvd, nvroot, NULL, 0, parse); + error = spa_config_parse(spa, &rvd, nvtree, NULL, 0, parse); spa_config_exit(spa, SCL_ALL, FTAG); if (error != 0) @@ -2382,22 +2364,35 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t ASSERT(spa_guid(spa) == pool_guid); } - /* - * Try to open all vdevs, loading each label in the process. - */ + return (0); +} + +static int +spa_ld_open_vdevs(spa_t *spa) +{ + int error = 0; + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); - error = vdev_open(rvd); + error = vdev_open(spa->spa_root_vdev); spa_config_exit(spa, SCL_ALL, FTAG); - if (error != 0) - return (error); + return (error); +} + +static int +spa_ld_validate_vdevs(spa_t *spa, spa_import_type_t type, + boolean_t trust_config) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; + /* * We need to validate the vdev labels against the configuration that - * we have in hand, which is dependent on the setting of mosconfig. If - * mosconfig is true then we're validating the vdev labels based on - * that config. Otherwise, we're validating against the cached config - * (zpool.cache) that was read when we loaded the zfs module, and then - * later we will recursively call spa_load() and validate against + * we have in hand, which is dependent on the setting of trust_config. + * If trust_config is true then we're validating the vdev labels based + * on that config. Otherwise, we're validating against the cached + * config (zpool.cache) that was read when we loaded the zfs module, and + * then later we will recursively call spa_load() and validate against * the vdev config. * * If we're assembling a new pool that's been split off from an @@ -2416,6 +2411,18 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t return (SET_ERROR(ENXIO)); } + return (0); +} + +static int +spa_ld_select_uberblock(spa_t *spa, nvlist_t *config, spa_import_type_t type, + boolean_t trust_config) +{ + vdev_t *rvd = spa->spa_root_vdev; + nvlist_t *label; + uberblock_t *ub = &spa->spa_uberblock; + uint64_t children; + /* * Find the best uberblock. */ @@ -2524,18 +2531,28 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t spa->spa_claim_max_txg = spa->spa_first_txg; spa->spa_prev_software_version = ub->ub_software_version; - /* - * Everything that we read before we do spa_remove_init() must - * have been rewritten after the last device removal was initiated. - * Otherwise we could be reading from indirect vdevs before - * we have loaded their mappings. - */ + return (0); +} +static int +spa_ld_open_rootbp(spa_t *spa) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; + error = dsl_pool_init(spa, spa->spa_first_txg, &spa->spa_dsl_pool); if (error) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); spa->spa_meta_objset = spa->spa_dsl_pool->dp_meta_objset; + return (0); +} + +static int +spa_ld_validate_config(spa_t *spa, spa_import_type_t type) +{ + vdev_t *rvd = spa->spa_root_vdev; + if (spa_dir_prop(spa, DMU_POOL_CONFIG, &spa->spa_config_object) != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); @@ -2567,6 +2584,15 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t return (SET_ERROR(ENXIO)); } + return (0); +} + +static int +spa_ld_open_indirect_vdev_metadata(spa_t *spa) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; + /* * Everything that we read before spa_remove_init() must be stored * on concreted vdevs. Therefore we do this as early as possible. @@ -2574,6 +2600,24 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t if (spa_remove_init(spa) != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + /* + * Retrieve information needed to condense indirect vdev mappings. + */ + error = spa_condense_init(spa); + if (error != 0) { + return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, error)); + } + + return (0); +} + +static int +spa_ld_check_features(spa_t *spa, spa_load_state_t state, + boolean_t *missing_feat_writep) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; + if (spa_version(spa) >= SPA_VERSION_FEATURES) { boolean_t missing_feat_read = B_FALSE; nvlist_t *unsup_feat, *enabled_feat; @@ -2603,7 +2647,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t if (spa_writeable(spa) || state == SPA_LOAD_TRYIMPORT) { if (!spa_features_check(spa, B_TRUE, unsup_feat, enabled_feat)) { - missing_feat_write = B_TRUE; + *missing_feat_writep = B_TRUE; } } @@ -2642,7 +2686,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t * userland in order to know whether to display the * abovementioned note. */ - if (missing_feat_read || (missing_feat_write && + if (missing_feat_read || (*missing_feat_writep && spa_writeable(spa))) { return (spa_vdev_err(rvd, VDEV_AUX_UNSUP_FEAT, ENOTSUP)); @@ -2675,62 +2719,85 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } + return (0); +} + +static int +spa_ld_load_special_directories(spa_t *spa) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; + spa->spa_is_initializing = B_TRUE; error = dsl_pool_open(spa->spa_dsl_pool); spa->spa_is_initializing = B_FALSE; if (error != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); - if (!trust_config) { - uint64_t hostid; - nvlist_t *policy = NULL; - nvlist_t *mos_config; + return (0); +} - if (load_nvlist(spa, spa->spa_config_object, &mos_config) != 0) - return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); +static int +spa_ld_prepare_for_reload(spa_t *spa, int orig_mode) +{ + vdev_t *rvd = spa->spa_root_vdev; - if (!spa_is_root(spa) && nvlist_lookup_uint64(mos_config, - ZPOOL_CONFIG_HOSTID, &hostid) == 0) { - char *hostname; - unsigned long myhostid = 0; + uint64_t hostid; + nvlist_t *policy = NULL; + nvlist_t *mos_config; - VERIFY(nvlist_lookup_string(mos_config, - ZPOOL_CONFIG_HOSTNAME, &hostname) == 0); + if (load_nvlist(spa, spa->spa_config_object, &mos_config) != 0) + return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + if (!spa_is_root(spa) && nvlist_lookup_uint64(mos_config, + ZPOOL_CONFIG_HOSTID, &hostid) == 0) { + char *hostname; + unsigned long myhostid = 0; + + VERIFY(nvlist_lookup_string(mos_config, + ZPOOL_CONFIG_HOSTNAME, &hostname) == 0); + #ifdef _KERNEL - myhostid = zone_get_hostid(NULL); + myhostid = zone_get_hostid(NULL); #else /* _KERNEL */ - /* - * We're emulating the system's hostid in userland, so - * we can't use zone_get_hostid(). - */ - (void) ddi_strtoul(hw_serial, NULL, 10, &myhostid); + /* + * We're emulating the system's hostid in userland, so + * we can't use zone_get_hostid(). + */ + (void) ddi_strtoul(hw_serial, NULL, 10, &myhostid); #endif /* _KERNEL */ - if (check_hostid && hostid != 0 && myhostid != 0 && - hostid != myhostid) { - nvlist_free(mos_config); - cmn_err(CE_WARN, "pool '%s' could not be " - "loaded as it was last accessed by " - "another system (host: %s hostid: 0x%lx). " - "See: http://illumos.org/msg/ZFS-8000-EY", - spa_name(spa), hostname, - (unsigned long)hostid); - return (SET_ERROR(EBADF)); - } + if (check_hostid && hostid != 0 && myhostid != 0 && + hostid != myhostid) { + nvlist_free(mos_config); + cmn_err(CE_WARN, "pool '%s' could not be " + "loaded as it was last accessed by " + "another system (host: %s hostid: 0x%lx). " + "See: http://illumos.org/msg/ZFS-8000-EY", + spa_name(spa), hostname, + (unsigned long)hostid); + return (SET_ERROR(EBADF)); } - if (nvlist_lookup_nvlist(spa->spa_config, - ZPOOL_REWIND_POLICY, &policy) == 0) - VERIFY(nvlist_add_nvlist(mos_config, - ZPOOL_REWIND_POLICY, policy) == 0); + } + if (nvlist_lookup_nvlist(spa->spa_config, + ZPOOL_REWIND_POLICY, &policy) == 0) + VERIFY(nvlist_add_nvlist(mos_config, + ZPOOL_REWIND_POLICY, policy) == 0); - spa_config_set(spa, mos_config); - spa_unload(spa); - spa_deactivate(spa); - spa_activate(spa, orig_mode); + spa_config_set(spa, mos_config); + spa_unload(spa); + spa_deactivate(spa); + spa_activate(spa, orig_mode); - return (spa_load(spa, state, SPA_IMPORT_EXISTING, B_TRUE)); - } + return (0); +} +static int +spa_ld_get_props(spa_t *spa) +{ + int error = 0; + uint64_t obj; + vdev_t *rvd = spa->spa_root_vdev; + /* Grab the secret checksum salt from the MOS. */ error = zap_lookup(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT, DMU_POOL_CHECKSUM_SALT, 1, @@ -2822,6 +2889,35 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t } nvlist_free(mos_config); + spa->spa_delegation = zpool_prop_default_numeric(ZPOOL_PROP_DELEGATION); + + error = spa_dir_prop(spa, DMU_POOL_PROPS, &spa->spa_pool_props_object); + if (error && error != ENOENT) + return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + + if (error == 0) { + uint64_t autoreplace; + + spa_prop_find(spa, ZPOOL_PROP_BOOTFS, &spa->spa_bootfs); + spa_prop_find(spa, ZPOOL_PROP_AUTOREPLACE, &autoreplace); + spa_prop_find(spa, ZPOOL_PROP_DELEGATION, &spa->spa_delegation); + spa_prop_find(spa, ZPOOL_PROP_FAILUREMODE, &spa->spa_failmode); + spa_prop_find(spa, ZPOOL_PROP_AUTOEXPAND, &spa->spa_autoexpand); + spa_prop_find(spa, ZPOOL_PROP_DEDUPDITTO, + &spa->spa_dedup_ditto); + + spa->spa_autoreplace = (autoreplace != 0); + } + + return (0); +} + +static int +spa_ld_open_aux_vdevs(spa_t *spa, spa_import_type_t type) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; + /* * If we're assembling the pool from the split-off vdevs of * an existing pool, we don't want to attach the spares & cache @@ -2867,27 +2963,15 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t spa->spa_l2cache.sav_sync = B_TRUE; } - spa->spa_delegation = zpool_prop_default_numeric(ZPOOL_PROP_DELEGATION); + return (0); +} - error = spa_dir_prop(spa, DMU_POOL_PROPS, &spa->spa_pool_props_object); - if (error && error != ENOENT) - return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); +static int +spa_ld_load_vdev_metadata(spa_t *spa, spa_load_state_t state) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; - if (error == 0) { - uint64_t autoreplace; - - spa_prop_find(spa, ZPOOL_PROP_BOOTFS, &spa->spa_bootfs); - spa_prop_find(spa, ZPOOL_PROP_AUTOREPLACE, &autoreplace); - spa_prop_find(spa, ZPOOL_PROP_DELEGATION, &spa->spa_delegation); - spa_prop_find(spa, ZPOOL_PROP_FAILUREMODE, &spa->spa_failmode); - spa_prop_find(spa, ZPOOL_PROP_AUTOEXPAND, &spa->spa_autoexpand); - spa_prop_find(spa, ZPOOL_PROP_BOOTSIZE, &spa->spa_bootsize); - spa_prop_find(spa, ZPOOL_PROP_DEDUPDITTO, - &spa->spa_dedup_ditto); - - spa->spa_autoreplace = (autoreplace != 0); - } - /* * If the 'autoreplace' property is set, then post a resource notifying * the ZFS DE that it should not issue any faults for unopenable @@ -2909,40 +2993,281 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t } /* - * Load the vdev state for all toplevel vdevs. + * Load the vdev metadata such as metaslabs, DTLs, spacemap object, etc. */ error = vdev_load(rvd); if (error != 0) { return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, error)); } - error = spa_condense_init(spa); - if (error != 0) { - return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, error)); - } - /* - * Propagate the leaf DTLs we just loaded all the way up the tree. + * Propagate the leaf DTLs we just loaded all the way up the vdev tree. */ spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); vdev_dtl_reassess(rvd, 0, 0, B_FALSE); spa_config_exit(spa, SCL_ALL, FTAG); - /* - * Load the DDTs (dedup tables). - */ + return (0); +} + +static int +spa_ld_load_dedup_tables(spa_t *spa) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; + error = ddt_load(spa); if (error != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); - spa_update_dspace(spa); + return (0); +} +static int +spa_ld_verify_logs(spa_t *spa, spa_import_type_t type, char **ereport) +{ + vdev_t *rvd = spa->spa_root_vdev; + if (type != SPA_IMPORT_ASSEMBLE && spa_writeable(spa) && spa_check_logs(spa)) { *ereport = FM_EREPORT_ZFS_LOG_REPLAY; return (spa_vdev_err(rvd, VDEV_AUX_BAD_LOG, ENXIO)); } + return (0); +} + +static int +spa_ld_verify_pool_data(spa_t *spa, spa_load_state_t state) +{ + int error = 0; + vdev_t *rvd = spa->spa_root_vdev; + + /* + * We've successfully opened the pool, verify that we're ready + * to start pushing transactions. + */ + if (state != SPA_LOAD_TRYIMPORT) { + error = spa_load_verify(spa); + if (error != 0) { + return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, + error)); + } + } + + return (0); +} + +static void +spa_ld_claim_log_blocks(spa_t *spa) +{ + dmu_tx_t *tx; + dsl_pool_t *dp = spa_get_dsl(spa); + + /* + * Claim log blocks that haven't been committed yet. + * This must all happen in a single txg. + * Note: spa_claim_max_txg is updated by spa_claim_notify(), + * invoked from zil_claim_log_block()'s i/o done callback. + * Price of rollback is that we abandon the log. + */ + spa->spa_claiming = B_TRUE; + + tx = dmu_tx_create_assigned(dp, spa_first_txg(spa)); + (void) dmu_objset_find_dp(dp, dp->dp_root_dir_obj, + zil_claim, tx, DS_FIND_CHILDREN); + dmu_tx_commit(tx); + + spa->spa_claiming = B_FALSE; + + spa_set_log_state(spa, SPA_LOG_GOOD); +} + +static void +spa_ld_check_for_config_update(spa_t *spa, spa_load_state_t state, + int64_t config_cache_txg) +{ + vdev_t *rvd = spa->spa_root_vdev; + int need_update = B_FALSE; + + /* + * If the config cache is stale, or we have uninitialized + * metaslabs (see spa_vdev_add()), then update the config. + * + * If this is a verbatim import, trust the current + * in-core spa_config and update the disk labels. + */ + if (config_cache_txg != spa->spa_config_txg || + state == SPA_LOAD_IMPORT || + state == SPA_LOAD_RECOVER || + (spa->spa_import_flags & ZFS_IMPORT_VERBATIM)) + need_update = B_TRUE; + + for (int c = 0; c < rvd->vdev_children; c++) + if (rvd->vdev_child[c]->vdev_ms_array == 0) + need_update = B_TRUE; + + /* + * Update the config cache asychronously in case we're the + * root pool, in which case the config cache isn't writable yet. + */ + if (need_update) + spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); +} + +/* + * Load an existing storage pool, using the config provided. This config + * describes which vdevs are part of the pool and is later validated against + * partial configs present in each vdev's label and an entire copy of the + * config stored in the MOS. + */ +static int +spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config, + spa_load_state_t state, spa_import_type_t type, boolean_t trust_config, + char **ereport) +{ + int error = 0; + uint64_t config_cache_txg = spa->spa_config_txg; + int orig_mode = spa->spa_mode; + boolean_t missing_feat_write = B_FALSE; + + /* + * If this is an untrusted config, first access the pool in read-only + * mode. We will then retrieve a trusted copy of the config from the MOS + * and use it to reopen the pool in read-write mode. + */ + if (!trust_config) + spa->spa_mode = FREAD; + + /* + * Parse the config provided to create a vdev tree. + */ + error = spa_ld_parse_config(spa, pool_guid, config, state, type); + if (error != 0) + return (error); + + /* + * Now that we have the vdev tree, try to open each vdev. This involves + * opening the underlying physical device, retrieving its geometry and + * probing the vdev with a dummy I/O. The state of each vdev will be set + * based on the success of those operations. After this we'll be ready + * to read from the vdevs. + */ + error = spa_ld_open_vdevs(spa); + if (error != 0) + return (error); + + /* + * Read the label of each vdev and make sure that the GUIDs stored + * there match the GUIDs in the config provided. + */ + error = spa_ld_validate_vdevs(spa, type, trust_config); + if (error != 0) + return (error); + + /* + * Read vdev labels to find the best uberblock (i.e. latest, unless + * spa_load_max_txg is set) and store it in spa_uberblock. We get the + * list of features required to read blkptrs in the MOS from the vdev + * label with the best uberblock and verify that our version of zfs + * supports them all. + */ + error = spa_ld_select_uberblock(spa, config, type, trust_config); + if (error != 0) + return (error); + + /* + * Pass that uberblock to the dsl_pool layer which will open the root + * blkptr. This blkptr points to the latest version of the MOS and will + * allow us to read its contents. + */ + error = spa_ld_open_rootbp(spa); + if (error != 0) + return (error); + + /* + * Retrieve the config stored in the MOS and use it to validate the + * config provided. Also extract some information from the MOS config + * to update our vdev tree. + */ + error = spa_ld_validate_config(spa, type); + if (error != 0) + return (error); + + /* + * Retrieve the mapping of indirect vdevs. Those vdevs were removed + * from the pool and their contents were re-mapped to other vdevs. Note + * that everything that we read before this step must have been + * rewritten on concrete vdevs after the last device removal was + * initiated. Otherwise we could be reading from indirect vdevs before + * we have loaded their mappings. + */ + error = spa_ld_open_indirect_vdev_metadata(spa); + if (error != 0) + return (error); + + /* + * Retrieve the full list of active features from the MOS and check if + * they are all supported. + */ + error = spa_ld_check_features(spa, state, &missing_feat_write); + if (error != 0) + return (error); + + /* + * Load several special directories from the MOS needed by the dsl_pool + * layer. + */ + error = spa_ld_load_special_directories(spa); + if (error != 0) + return (error); + + /* + * If the config provided is not trusted, discard it and use the config + * from the MOS to reload the pool. + */ + if (!trust_config) { + error = spa_ld_prepare_for_reload(spa, orig_mode); + if (error != 0) + return (error); + return (spa_load(spa, state, SPA_IMPORT_EXISTING, B_TRUE)); + } + + /* + * Retrieve pool properties from the MOS. + */ + error = spa_ld_get_props(spa); + if (error != 0) + return (error); + + /* + * Retrieve the list of auxiliary devices - cache devices and spares - + * and open them. + */ + error = spa_ld_open_aux_vdevs(spa, type); + if (error != 0) + return (error); + + /* + * Load the metadata for all vdevs. Also check if unopenable devices + * should be autoreplaced. + */ + error = spa_ld_load_vdev_metadata(spa, state); + if (error != 0) + return (error); + + error = spa_ld_load_dedup_tables(spa); + if (error != 0) + return (error); + + /* + * Verify the logs now to make sure we don't have any unexpected errors + * when we claim log blocks later. + */ + error = spa_ld_verify_logs(spa, type, ereport); + if (error != 0) + return (error); + if (missing_feat_write) { ASSERT(state == SPA_LOAD_TRYIMPORT); @@ -2951,24 +3276,34 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t * read-only mode but not read-write mode. We now have enough * information and can return to userland. */ - return (spa_vdev_err(rvd, VDEV_AUX_UNSUP_FEAT, ENOTSUP)); + return (spa_vdev_err(spa->spa_root_vdev, VDEV_AUX_UNSUP_FEAT, + ENOTSUP)); } /* - * We've successfully opened the pool, verify that we're ready - * to start pushing transactions. + * Traverse the last txgs to make sure the pool was left off in a safe + * state. When performing an extreme rewind, we verify the whole pool, + * which can take a very long time. */ - if (state != SPA_LOAD_TRYIMPORT) { - if (error = spa_load_verify(spa)) - return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, - error)); - } + error = spa_ld_verify_pool_data(spa, state); + if (error != 0) + return (error); + /* + * Calculate the deflated space for the pool. This must be done before + * we write anything to the pool because we'd need to update the space + * accounting using the deflated sizes. + */ + spa_update_dspace(spa); + + /* + * We have now retrieved all the information we needed to open the + * pool. If we are importing the pool in read-write mode, a few + * additional steps must be performed to finish the import. + */ if (spa_writeable(spa) && (state == SPA_LOAD_RECOVER || spa->spa_load_max_txg == UINT64_MAX)) { - dmu_tx_t *tx; - int need_update = B_FALSE; - dsl_pool_t *dp = spa_get_dsl(spa); + ASSERT(state != SPA_LOAD_TRYIMPORT); /* * We must check this before we start the sync thread, because @@ -2982,25 +3317,14 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t boolean_t condense_in_progress = (spa->spa_condensing_indirect != NULL); - ASSERT(state != SPA_LOAD_TRYIMPORT); - /* - * Claim log blocks that haven't been committed yet. - * This must all happen in a single txg. - * Note: spa_claim_max_txg is updated by spa_claim_notify(), - * invoked from zil_claim_log_block()'s i/o done callback. - * Price of rollback is that we abandon the log. + * Traverse the ZIL and claim all blocks. */ - spa->spa_claiming = B_TRUE; + spa_ld_claim_log_blocks(spa); - tx = dmu_tx_create_assigned(dp, spa_first_txg(spa)); - (void) dmu_objset_find_dp(dp, dp->dp_root_dir_obj, - zil_claim, tx, DS_FIND_CHILDREN); - dmu_tx_commit(tx); - - spa->spa_claiming = B_FALSE; - - spa_set_log_state(spa, SPA_LOG_GOOD); + /* + * Kick-off the syncing thread. + */ spa->spa_sync_on = B_TRUE; txg_sync_start(spa->spa_dsl_pool); @@ -3008,40 +3332,23 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t * Wait for all claims to sync. We sync up to the highest * claimed log block birth time so that claimed log blocks * don't appear to be from the future. spa_claim_max_txg - * will have been set for us by either zil_check_log_chain() - * (invoked from spa_check_logs()) or zil_claim() above. + * will have been set for us by ZIL traversal operations + * performed above. */ txg_wait_synced(spa->spa_dsl_pool, spa->spa_claim_max_txg); /* - * If the config cache is stale, or we have uninitialized - * metaslabs (see spa_vdev_add()), then update the config. - * - * If this is a verbatim import, trust the current - * in-core spa_config and update the disk labels. + * Check if we need to request an update of the config. On the + * next sync, we would update the config stored in vdev labels + * and the cachefile (by default /etc/zfs/zpool.cache). */ - if (config_cache_txg != spa->spa_config_txg || - state == SPA_LOAD_IMPORT || - state == SPA_LOAD_RECOVER || - (spa->spa_import_flags & ZFS_IMPORT_VERBATIM)) - need_update = B_TRUE; + spa_ld_check_for_config_update(spa, state, config_cache_txg); - for (int c = 0; c < rvd->vdev_children; c++) - if (rvd->vdev_child[c]->vdev_ms_array == 0) - need_update = B_TRUE; - /* - * Update the config cache asychronously in case we're the - * root pool, in which case the config cache isn't writable yet. - */ - if (need_update) - spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); - - /* * Check all DTLs to see if anything needs resilvering. */ if (!dsl_scan_resilvering(spa->spa_dsl_pool) && - vdev_resilver_needed(rvd, NULL, NULL)) + vdev_resilver_needed(spa->spa_root_vdev, NULL, NULL)) spa_async_request(spa, SPA_ASYNC_RESILVER); /* @@ -3076,7 +3383,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t } static int -spa_load_retry(spa_t *spa, spa_load_state_t state, int mosconfig) +spa_load_retry(spa_t *spa, spa_load_state_t state, int trust_config) { int mode = spa->spa_mode; @@ -3088,7 +3395,7 @@ spa_load_retry(spa_t *spa, spa_load_state_t state, int spa_activate(spa, mode); spa_async_suspend(spa); - return (spa_load(spa, state, SPA_IMPORT_EXISTING, mosconfig)); + return (spa_load(spa, state, SPA_IMPORT_EXISTING, trust_config)); } /* @@ -3099,7 +3406,7 @@ spa_load_retry(spa_t *spa, spa_load_state_t state, int * spa_load(). */ static int -spa_load_best(spa_t *spa, spa_load_state_t state, int mosconfig, +spa_load_best(spa_t *spa, spa_load_state_t state, int trust_config, uint64_t max_request, int rewind_flags) { nvlist_t *loadinfo = NULL; @@ -3118,7 +3425,7 @@ spa_load_best(spa_t *spa, spa_load_state_t state, int } load_error = rewind_error = spa_load(spa, state, SPA_IMPORT_EXISTING, - mosconfig); + trust_config); if (load_error == 0) return (0); @@ -3159,7 +3466,7 @@ spa_load_best(spa_t *spa, spa_load_state_t state, int spa->spa_uberblock.ub_txg <= spa->spa_load_max_txg) { if (spa->spa_load_max_txg < safe_rewind_txg) spa->spa_extreme_rewind = B_TRUE; - rewind_error = spa_load_retry(spa, state, mosconfig); + rewind_error = spa_load_retry(spa, state, trust_config); } spa->spa_extreme_rewind = B_FALSE; @@ -4481,7 +4788,7 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ state = SPA_LOAD_RECOVER; /* - * Pass off the heavy lifting to spa_load(). Pass TRUE for mosconfig + * Pass off the heavy lifting to spa_load(). Pass TRUE for trust_config * because the user-supplied config is actually the one to trust when * doing an import. */ @@ -4632,7 +4939,7 @@ spa_tryimport(nvlist_t *tryconfig) /* * Pass off the heavy lifting to spa_load(). - * Pass TRUE for mosconfig because the user-supplied config + * Pass TRUE for trust_config because the user-supplied config * is actually the one to trust when doing an import. */ error = spa_load(spa, SPA_LOAD_TRYIMPORT, SPA_IMPORT_EXISTING, B_TRUE); From owner-svn-src-all@freebsd.org Mon Apr 16 03:40:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ACE7F80C38; Mon, 16 Apr 2018 03:40:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40ED2830FE; Mon, 16 Apr 2018 03:40:13 +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 39A8718018; Mon, 16 Apr 2018 03:40:13 +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 w3G3eDmu010532; Mon, 16 Apr 2018 03:40:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3eCLv010524; Mon, 16 Apr 2018 03:40:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160340.w3G3eCLv010524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:40: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: r332530 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 332530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:40:14 -0000 Author: mav Date: Mon Apr 16 03:40:12 2018 New Revision: 332530 URL: https://svnweb.freebsd.org/changeset/base/332530 Log: MFC r329765: MFV r329762: 8961 SPA load/import should tell us why it failed illumos/illumos-gate@3ee8c80c747c4aa3f83351a6920f30c411236e1b When we fail to open or import a storage pool, we typically don't get any additional diagnostic information, just "no pool found" or "can not import". While there may be no additional user-consumable information, we should at least make this situation easier to debug/diagnose for developers and support. For example, we could start by using `zfs_dbgmsg()` to log each thing that we try when importing, and which things failed. E.g. "tried uberblock of txg X from label Y of device Z". Also, we could log each of the stages that we go through in `spa_load_impl()`. Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Andrew Stormont Approved by: Dan McDonald Author: Pavel Zakharov Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:39:24 2018 (r332529) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:40:12 2018 (r332530) @@ -1296,6 +1296,8 @@ spa_unload(spa_t *spa) ASSERT(MUTEX_HELD(&spa_namespace_lock)); + spa_load_note(spa, "UNLOADING"); + /* * Stop TRIM thread. */ @@ -2069,6 +2071,13 @@ spa_load_verify(spa_t *spa) ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE); if (spa_load_verify_metadata) { + if (spa->spa_extreme_rewind) { + spa_load_note(spa, "performing a complete scan of the " + "pool since extreme rewind is on. This may take " + "a very long time.\n (spa_load_verify_data=%u, " + "spa_load_verify_metadata=%u)", + spa_load_verify_data, spa_load_verify_metadata); + } error = traverse_pool(spa, spa->spa_verify_min_txg, TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA, spa_load_verify_cb, rio); @@ -2121,10 +2130,17 @@ spa_prop_find(spa_t *spa, zpool_prop_t prop, uint64_t * Find a value in the pool directory object. */ static int -spa_dir_prop(spa_t *spa, const char *name, uint64_t *val) +spa_dir_prop(spa_t *spa, const char *name, uint64_t *val, boolean_t log_enoent) { - return (zap_lookup(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT, - name, sizeof (uint64_t), 1, val)); + int error = zap_lookup(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT, + name, sizeof (uint64_t), 1, val); + + if (error != 0 && (error != ENOENT || log_enoent)) { + spa_load_failed(spa, "couldn't get '%s' value in MOS directory " + "[error=%d]", name, error); + } + + return (error); } static int @@ -2316,19 +2332,18 @@ vdev_count_verify_zaps(vdev_t *vd) static int spa_ld_parse_config(spa_t *spa, uint64_t pool_guid, nvlist_t *config, - spa_load_state_t state, spa_import_type_t type) + spa_import_type_t type) { int error = 0; nvlist_t *nvtree = NULL; int parse; vdev_t *rvd; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); - - spa->spa_load_state = state; - - if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvtree)) + if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvtree)) { + spa_load_failed(spa, "invalid config provided: '%s' missing", + ZPOOL_CONFIG_VDEV_TREE); return (SET_ERROR(EINVAL)); + } parse = (type == SPA_IMPORT_EXISTING ? VDEV_ALLOC_LOAD : VDEV_ALLOC_SPLIT); @@ -2353,8 +2368,11 @@ spa_ld_parse_config(spa_t *spa, uint64_t pool_guid, nv error = spa_config_parse(spa, &rvd, nvtree, NULL, 0, parse); spa_config_exit(spa, SCL_ALL, FTAG); - if (error != 0) + if (error != 0) { + spa_load_failed(spa, "unable to parse config [error=%d]", + error); return (error); + } ASSERT(spa->spa_root_vdev == rvd); ASSERT3U(spa->spa_min_ashift, >=, SPA_MINBLOCKSHIFT); @@ -2375,6 +2393,10 @@ spa_ld_open_vdevs(spa_t *spa) spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); error = vdev_open(spa->spa_root_vdev); spa_config_exit(spa, SCL_ALL, FTAG); + if (error != 0) { + spa_load_failed(spa, "unable to open vdev tree [error=%d]", + error); + } return (error); } @@ -2404,11 +2426,17 @@ spa_ld_validate_vdevs(spa_t *spa, spa_import_type_t ty error = vdev_validate(rvd, trust_config); spa_config_exit(spa, SCL_ALL, FTAG); - if (error != 0) + if (error != 0) { + spa_load_failed(spa, "vdev_validate failed [error=%d]", + error); return (error); + } - if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) + if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) { + spa_load_failed(spa, "cannot open vdev tree after " + "invalidating some vdevs"); return (SET_ERROR(ENXIO)); + } } return (0); @@ -2433,14 +2461,20 @@ spa_ld_select_uberblock(spa_t *spa, nvlist_t *config, */ if (ub->ub_txg == 0) { nvlist_free(label); + spa_load_failed(spa, "no valid uberblock found"); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, ENXIO)); } + spa_load_note(spa, "using uberblock with txg=%llu", + (u_longlong_t)ub->ub_txg); + /* * If the pool has an unsupported version we can't open it. */ if (!SPA_VERSION_IS_SUPPORTED(ub->ub_version)) { nvlist_free(label); + spa_load_failed(spa, "version %llu is not supported", + (u_longlong_t)ub->ub_version); return (spa_vdev_err(rvd, VDEV_AUX_VERSION_NEWER, ENOTSUP)); } @@ -2451,9 +2485,17 @@ spa_ld_select_uberblock(spa_t *spa, nvlist_t *config, * If we weren't able to find what's necessary for reading the * MOS in the label, return failure. */ - if (label == NULL || nvlist_lookup_nvlist(label, - ZPOOL_CONFIG_FEATURES_FOR_READ, &features) != 0) { + if (label == NULL) { + spa_load_failed(spa, "label config unavailable"); + return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, + ENXIO)); + } + + if (nvlist_lookup_nvlist(label, ZPOOL_CONFIG_FEATURES_FOR_READ, + &features) != 0) { nvlist_free(label); + spa_load_failed(spa, "invalid label: '%s' missing", + ZPOOL_CONFIG_FEATURES_FOR_READ); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, ENXIO)); } @@ -2492,6 +2534,7 @@ spa_ld_select_uberblock(spa_t *spa, nvlist_t *config, VERIFY(nvlist_add_nvlist(spa->spa_load_info, ZPOOL_CONFIG_UNSUP_FEAT, unsup_feat) == 0); nvlist_free(unsup_feat); + spa_load_failed(spa, "some features are unsupported"); return (spa_vdev_err(rvd, VDEV_AUX_UNSUP_FEAT, ENOTSUP)); } @@ -2508,8 +2551,13 @@ spa_ld_select_uberblock(spa_t *spa, nvlist_t *config, */ if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_VDEV_CHILDREN, &children) != 0 && trust_config && type != SPA_IMPORT_ASSEMBLE && - rvd->vdev_guid_sum != ub->ub_guid_sum) + rvd->vdev_guid_sum != ub->ub_guid_sum) { + spa_load_failed(spa, "guid sum in config doesn't match guid " + "sum in uberblock (%llu != %llu)", + (u_longlong_t)rvd->vdev_guid_sum, + (u_longlong_t)ub->ub_guid_sum); return (spa_vdev_err(rvd, VDEV_AUX_BAD_GUID_SUM, ENXIO)); + } if (type != SPA_IMPORT_ASSEMBLE && spa->spa_config_splitting) { spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); @@ -2541,8 +2589,11 @@ spa_ld_open_rootbp(spa_t *spa) vdev_t *rvd = spa->spa_root_vdev; error = dsl_pool_init(spa, spa->spa_first_txg, &spa->spa_dsl_pool); - if (error) + if (error != 0) { + spa_load_failed(spa, "unable to open rootbp in dsl_pool_init " + "[error=%d]", error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } spa->spa_meta_objset = spa->spa_dsl_pool->dp_meta_objset; return (0); @@ -2553,7 +2604,8 @@ spa_ld_validate_config(spa_t *spa, spa_import_type_t t { vdev_t *rvd = spa->spa_root_vdev; - if (spa_dir_prop(spa, DMU_POOL_CONFIG, &spa->spa_config_object) != 0) + if (spa_dir_prop(spa, DMU_POOL_CONFIG, &spa->spa_config_object, B_TRUE) + != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); /* @@ -2565,11 +2617,16 @@ spa_ld_validate_config(spa_t *spa, spa_import_type_t t */ if (type != SPA_IMPORT_ASSEMBLE) { nvlist_t *mos_config; - if (load_nvlist(spa, spa->spa_config_object, &mos_config) != 0) + if (load_nvlist(spa, spa->spa_config_object, &mos_config) + != 0) { + spa_load_failed(spa, "unable to retrieve MOS config"); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } if (!spa_config_valid(spa, mos_config)) { nvlist_free(mos_config); + spa_load_failed(spa, "mismatch between config provided " + "and config stored in MOS"); return (spa_vdev_err(rvd, VDEV_AUX_BAD_GUID_SUM, ENXIO)); } @@ -2580,8 +2637,10 @@ spa_ld_validate_config(spa_t *spa, spa_import_type_t t * root vdev. If it can't be opened, it indicates one or * more toplevel vdevs are faulted. */ - if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) + if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) { + spa_load_failed(spa, "some top vdevs are unavailable"); return (SET_ERROR(ENXIO)); + } } return (0); @@ -2597,14 +2656,20 @@ spa_ld_open_indirect_vdev_metadata(spa_t *spa) * Everything that we read before spa_remove_init() must be stored * on concreted vdevs. Therefore we do this as early as possible. */ - if (spa_remove_init(spa) != 0) + error = spa_remove_init(spa); + if (error != 0) { + spa_load_failed(spa, "spa_remove_init failed [error=%d]", + error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } /* * Retrieve information needed to condense indirect vdev mappings. */ error = spa_condense_init(spa); if (error != 0) { + spa_load_failed(spa, "spa_condense_init failed [error=%d]", + error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, error)); } @@ -2612,8 +2677,7 @@ spa_ld_open_indirect_vdev_metadata(spa_t *spa) } static int -spa_ld_check_features(spa_t *spa, spa_load_state_t state, - boolean_t *missing_feat_writep) +spa_ld_check_features(spa_t *spa, boolean_t *missing_feat_writep) { int error = 0; vdev_t *rvd = spa->spa_root_vdev; @@ -2623,17 +2687,17 @@ spa_ld_check_features(spa_t *spa, spa_load_state_t sta nvlist_t *unsup_feat, *enabled_feat; if (spa_dir_prop(spa, DMU_POOL_FEATURES_FOR_READ, - &spa->spa_feat_for_read_obj) != 0) { + &spa->spa_feat_for_read_obj, B_TRUE) != 0) { return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } if (spa_dir_prop(spa, DMU_POOL_FEATURES_FOR_WRITE, - &spa->spa_feat_for_write_obj) != 0) { + &spa->spa_feat_for_write_obj, B_TRUE) != 0) { return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } if (spa_dir_prop(spa, DMU_POOL_FEATURE_DESCRIPTIONS, - &spa->spa_feat_desc_obj) != 0) { + &spa->spa_feat_desc_obj, B_TRUE) != 0) { return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } @@ -2644,7 +2708,8 @@ spa_ld_check_features(spa_t *spa, spa_load_state_t sta unsup_feat, enabled_feat)) missing_feat_read = B_TRUE; - if (spa_writeable(spa) || state == SPA_LOAD_TRYIMPORT) { + if (spa_writeable(spa) || + spa->spa_load_state == SPA_LOAD_TRYIMPORT) { if (!spa_features_check(spa, B_TRUE, unsup_feat, enabled_feat)) { *missing_feat_writep = B_TRUE; @@ -2688,6 +2753,7 @@ spa_ld_check_features(spa_t *spa, spa_load_state_t sta */ if (missing_feat_read || (*missing_feat_writep && spa_writeable(spa))) { + spa_load_failed(spa, "pool uses unsupported features"); return (spa_vdev_err(rvd, VDEV_AUX_UNSUP_FEAT, ENOTSUP)); } @@ -2707,6 +2773,9 @@ spa_ld_check_features(spa_t *spa, spa_load_state_t sta spa->spa_feat_refcount_cache[i] = SPA_FEATURE_DISABLED; } else { + spa_load_failed(spa, "error getting refcount " + "for feature %s [error=%d]", + spa_feature_table[i].fi_guid, error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } @@ -2715,7 +2784,7 @@ spa_ld_check_features(spa_t *spa, spa_load_state_t sta if (spa_feature_is_active(spa, SPA_FEATURE_ENABLED_TXG)) { if (spa_dir_prop(spa, DMU_POOL_FEATURE_ENABLED_TXG, - &spa->spa_feat_enabled_txg_obj) != 0) + &spa->spa_feat_enabled_txg_obj, B_TRUE) != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } @@ -2731,8 +2800,10 @@ spa_ld_load_special_directories(spa_t *spa) spa->spa_is_initializing = B_TRUE; error = dsl_pool_open(spa->spa_dsl_pool); spa->spa_is_initializing = B_FALSE; - if (error != 0) + if (error != 0) { + spa_load_failed(spa, "dsl_pool_open failed [error=%d]", error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } return (0); } @@ -2746,8 +2817,10 @@ spa_ld_prepare_for_reload(spa_t *spa, int orig_mode) nvlist_t *policy = NULL; nvlist_t *mos_config; - if (load_nvlist(spa, spa->spa_config_object, &mos_config) != 0) + if (load_nvlist(spa, spa->spa_config_object, &mos_config) != 0) { + spa_load_failed(spa, "unable to retrieve MOS config"); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } if (!spa_is_root(spa) && nvlist_lookup_uint64(mos_config, ZPOOL_CONFIG_HOSTID, &hostid) == 0) { @@ -2808,26 +2881,31 @@ spa_ld_get_props(spa_t *spa) (void) random_get_pseudo_bytes(spa->spa_cksum_salt.zcs_bytes, sizeof (spa->spa_cksum_salt.zcs_bytes)); } else if (error != 0) { + spa_load_failed(spa, "unable to retrieve checksum salt from " + "MOS [error=%d]", error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); } - if (spa_dir_prop(spa, DMU_POOL_SYNC_BPOBJ, &obj) != 0) + if (spa_dir_prop(spa, DMU_POOL_SYNC_BPOBJ, &obj, B_TRUE) != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); error = bpobj_open(&spa->spa_deferred_bpobj, spa->spa_meta_objset, obj); - if (error != 0) + if (error != 0) { + spa_load_failed(spa, "error opening deferred-frees bpobj " + "[error=%d]", error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } /* * Load the bit that tells us to use the new accounting function * (raid-z deflation). If we have an older pool, this will not * be present. */ - error = spa_dir_prop(spa, DMU_POOL_DEFLATE, &spa->spa_deflate); + error = spa_dir_prop(spa, DMU_POOL_DEFLATE, &spa->spa_deflate, B_FALSE); if (error != 0 && error != ENOENT) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); error = spa_dir_prop(spa, DMU_POOL_CREATION_VERSION, - &spa->spa_creation_version); + &spa->spa_creation_version, B_FALSE); if (error != 0 && error != ENOENT) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); @@ -2835,12 +2913,13 @@ spa_ld_get_props(spa_t *spa) * Load the persistent error log. If we have an older pool, this will * not be present. */ - error = spa_dir_prop(spa, DMU_POOL_ERRLOG_LAST, &spa->spa_errlog_last); + error = spa_dir_prop(spa, DMU_POOL_ERRLOG_LAST, &spa->spa_errlog_last, + B_FALSE); if (error != 0 && error != ENOENT) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); error = spa_dir_prop(spa, DMU_POOL_ERRLOG_SCRUB, - &spa->spa_errlog_scrub); + &spa->spa_errlog_scrub, B_FALSE); if (error != 0 && error != ENOENT) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); @@ -2848,7 +2927,7 @@ spa_ld_get_props(spa_t *spa) * Load the history object. If we have an older pool, this * will not be present. */ - error = spa_dir_prop(spa, DMU_POOL_HISTORY, &spa->spa_history); + error = spa_dir_prop(spa, DMU_POOL_HISTORY, &spa->spa_history, B_FALSE); if (error != 0 && error != ENOENT) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); @@ -2861,11 +2940,13 @@ spa_ld_get_props(spa_t *spa) /* The sentinel is only available in the MOS config. */ nvlist_t *mos_config; - if (load_nvlist(spa, spa->spa_config_object, &mos_config) != 0) + if (load_nvlist(spa, spa->spa_config_object, &mos_config) != 0) { + spa_load_failed(spa, "unable to retrieve MOS config"); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } error = spa_dir_prop(spa, DMU_POOL_VDEV_ZAP_MAP, - &spa->spa_all_vdev_zaps); + &spa->spa_all_vdev_zaps, B_FALSE); if (error == ENOENT) { VERIFY(!nvlist_exists(mos_config, @@ -2891,7 +2972,8 @@ spa_ld_get_props(spa_t *spa) spa->spa_delegation = zpool_prop_default_numeric(ZPOOL_PROP_DELEGATION); - error = spa_dir_prop(spa, DMU_POOL_PROPS, &spa->spa_pool_props_object); + error = spa_dir_prop(spa, DMU_POOL_PROPS, &spa->spa_pool_props_object, + B_FALSE); if (error && error != ENOENT) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); @@ -2927,14 +3009,17 @@ spa_ld_open_aux_vdevs(spa_t *spa, spa_import_type_t ty /* * Load any hot spares for this pool. */ - error = spa_dir_prop(spa, DMU_POOL_SPARES, &spa->spa_spares.sav_object); + error = spa_dir_prop(spa, DMU_POOL_SPARES, &spa->spa_spares.sav_object, + B_FALSE); if (error != 0 && error != ENOENT) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); if (error == 0 && type != SPA_IMPORT_ASSEMBLE) { ASSERT(spa_version(spa) >= SPA_VERSION_SPARES); if (load_nvlist(spa, spa->spa_spares.sav_object, - &spa->spa_spares.sav_config) != 0) + &spa->spa_spares.sav_config) != 0) { + spa_load_failed(spa, "error loading spares nvlist"); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); spa_load_spares(spa); @@ -2947,14 +3032,16 @@ spa_ld_open_aux_vdevs(spa_t *spa, spa_import_type_t ty * Load any level 2 ARC devices for this pool. */ error = spa_dir_prop(spa, DMU_POOL_L2CACHE, - &spa->spa_l2cache.sav_object); + &spa->spa_l2cache.sav_object, B_FALSE); if (error != 0 && error != ENOENT) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); if (error == 0 && type != SPA_IMPORT_ASSEMBLE) { ASSERT(spa_version(spa) >= SPA_VERSION_L2CACHE); if (load_nvlist(spa, spa->spa_l2cache.sav_object, - &spa->spa_l2cache.sav_config) != 0) + &spa->spa_l2cache.sav_config) != 0) { + spa_load_failed(spa, "error loading l2cache nvlist"); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); spa_load_l2cache(spa); @@ -2967,7 +3054,7 @@ spa_ld_open_aux_vdevs(spa_t *spa, spa_import_type_t ty } static int -spa_ld_load_vdev_metadata(spa_t *spa, spa_load_state_t state) +spa_ld_load_vdev_metadata(spa_t *spa) { int error = 0; vdev_t *rvd = spa->spa_root_vdev; @@ -2979,14 +3066,14 @@ spa_ld_load_vdev_metadata(spa_t *spa, spa_load_state_t * unopenable vdevs so that the normal autoreplace handler can take * over. */ - if (spa->spa_autoreplace && state != SPA_LOAD_TRYIMPORT) { + if (spa->spa_autoreplace && spa->spa_load_state != SPA_LOAD_TRYIMPORT) { spa_check_removed(spa->spa_root_vdev); /* * For the import case, this is done in spa_import(), because * at this point we're using the spare definitions from * the MOS config, not necessarily from the userland config. */ - if (state != SPA_LOAD_IMPORT) { + if (spa->spa_load_state != SPA_LOAD_IMPORT) { spa_aux_check_removed(&spa->spa_spares); spa_aux_check_removed(&spa->spa_l2cache); } @@ -2997,6 +3084,7 @@ spa_ld_load_vdev_metadata(spa_t *spa, spa_load_state_t */ error = vdev_load(rvd); if (error != 0) { + spa_load_failed(spa, "vdev_load failed [error=%d]", error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, error)); } @@ -3017,8 +3105,10 @@ spa_ld_load_dedup_tables(spa_t *spa) vdev_t *rvd = spa->spa_root_vdev; error = ddt_load(spa); - if (error != 0) + if (error != 0) { + spa_load_failed(spa, "ddt_load failed [error=%d]", error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } return (0); } @@ -3028,17 +3118,20 @@ spa_ld_verify_logs(spa_t *spa, spa_import_type_t type, { vdev_t *rvd = spa->spa_root_vdev; - if (type != SPA_IMPORT_ASSEMBLE && spa_writeable(spa) && - spa_check_logs(spa)) { - *ereport = FM_EREPORT_ZFS_LOG_REPLAY; - return (spa_vdev_err(rvd, VDEV_AUX_BAD_LOG, ENXIO)); + if (type != SPA_IMPORT_ASSEMBLE && spa_writeable(spa)) { + boolean_t missing = spa_check_logs(spa); + if (missing) { + *ereport = FM_EREPORT_ZFS_LOG_REPLAY; + spa_load_failed(spa, "spa_check_logs failed"); + return (spa_vdev_err(rvd, VDEV_AUX_BAD_LOG, ENXIO)); + } } return (0); } static int -spa_ld_verify_pool_data(spa_t *spa, spa_load_state_t state) +spa_ld_verify_pool_data(spa_t *spa) { int error = 0; vdev_t *rvd = spa->spa_root_vdev; @@ -3047,9 +3140,11 @@ spa_ld_verify_pool_data(spa_t *spa, spa_load_state_t s * We've successfully opened the pool, verify that we're ready * to start pushing transactions. */ - if (state != SPA_LOAD_TRYIMPORT) { + if (spa->spa_load_state != SPA_LOAD_TRYIMPORT) { error = spa_load_verify(spa); if (error != 0) { + spa_load_failed(spa, "spa_load_verify failed " + "[error=%d]", error); return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, error)); } @@ -3084,8 +3179,7 @@ spa_ld_claim_log_blocks(spa_t *spa) } static void -spa_ld_check_for_config_update(spa_t *spa, spa_load_state_t state, - int64_t config_cache_txg) +spa_ld_check_for_config_update(spa_t *spa, uint64_t config_cache_txg) { vdev_t *rvd = spa->spa_root_vdev; int need_update = B_FALSE; @@ -3098,8 +3192,8 @@ spa_ld_check_for_config_update(spa_t *spa, spa_load_st * in-core spa_config and update the disk labels. */ if (config_cache_txg != spa->spa_config_txg || - state == SPA_LOAD_IMPORT || - state == SPA_LOAD_RECOVER || + spa->spa_load_state == SPA_LOAD_IMPORT || + spa->spa_load_state == SPA_LOAD_RECOVER || (spa->spa_import_flags & ZFS_IMPORT_VERBATIM)) need_update = B_TRUE; @@ -3131,6 +3225,11 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t int orig_mode = spa->spa_mode; boolean_t missing_feat_write = B_FALSE; + ASSERT(MUTEX_HELD(&spa_namespace_lock)); + + spa->spa_load_state = state; + spa_load_note(spa, "LOADING"); + /* * If this is an untrusted config, first access the pool in read-only * mode. We will then retrieve a trusted copy of the config from the MOS @@ -3142,7 +3241,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t /* * Parse the config provided to create a vdev tree. */ - error = spa_ld_parse_config(spa, pool_guid, config, state, type); + error = spa_ld_parse_config(spa, pool_guid, config, type); if (error != 0) return (error); @@ -3210,7 +3309,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t * Retrieve the full list of active features from the MOS and check if * they are all supported. */ - error = spa_ld_check_features(spa, state, &missing_feat_write); + error = spa_ld_check_features(spa, &missing_feat_write); if (error != 0) return (error); @@ -3230,6 +3329,8 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t error = spa_ld_prepare_for_reload(spa, orig_mode); if (error != 0) return (error); + + spa_load_note(spa, "RELOADING"); return (spa_load(spa, state, SPA_IMPORT_EXISTING, B_TRUE)); } @@ -3252,7 +3353,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t * Load the metadata for all vdevs. Also check if unopenable devices * should be autoreplaced. */ - error = spa_ld_load_vdev_metadata(spa, state); + error = spa_ld_load_vdev_metadata(spa); if (error != 0) return (error); @@ -3285,7 +3386,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t * state. When performing an extreme rewind, we verify the whole pool, * which can take a very long time. */ - error = spa_ld_verify_pool_data(spa, state); + error = spa_ld_verify_pool_data(spa); if (error != 0) return (error); @@ -3342,7 +3443,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t * next sync, we would update the config stored in vdev labels * and the cachefile (by default /etc/zfs/zpool.cache). */ - spa_ld_check_for_config_update(spa, state, config_cache_txg); + spa_ld_check_for_config_update(spa, config_cache_txg); /* * Check all DTLs to see if anything needs resilvering. @@ -3379,6 +3480,8 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t spa_condense_indirect_restart(spa); } + spa_load_note(spa, "LOADED"); + return (0); } @@ -3395,6 +3498,9 @@ spa_load_retry(spa_t *spa, spa_load_state_t state, int spa_activate(spa, mode); spa_async_suspend(spa); + spa_load_note(spa, "spa_load_retry: rewind, max txg: %llu", + (u_longlong_t)spa->spa_load_max_txg); + return (spa_load(spa, state, SPA_IMPORT_EXISTING, trust_config)); } @@ -3549,6 +3655,7 @@ spa_open_common(const char *pool, spa_t **spapp, void if (state != SPA_LOAD_RECOVER) spa->spa_last_ubsync_txg = spa->spa_load_txg = 0; + zfs_dbgmsg("spa_open_common: opening %s", pool); error = spa_load_best(spa, state, B_FALSE, policy.zrp_txg, policy.zrp_request); @@ -4771,7 +4878,7 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ spa_write_cachefile(spa, B_FALSE, B_TRUE); spa_event_notify(spa, NULL, NULL, ESC_ZFS_POOL_IMPORT); - + zfs_dbgmsg("spa_import: verbatim import of %s", pool); mutex_exit(&spa_namespace_lock); return (0); } @@ -4795,6 +4902,8 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ if (state != SPA_LOAD_RECOVER) spa->spa_last_ubsync_txg = spa->spa_load_txg = 0; + zfs_dbgmsg("spa_import: importing %s%s", pool, + (state == SPA_LOAD_RECOVER) ? " (RECOVERY MODE)" : ""); error = spa_load_best(spa, state, B_TRUE, policy.zrp_txg, policy.zrp_request); @@ -4936,6 +5045,8 @@ spa_tryimport(nvlist_t *tryconfig) mutex_enter(&spa_namespace_lock); spa = spa_add(TRYIMPORT_NAME, tryconfig, NULL); spa_activate(spa, FREAD); + + zfs_dbgmsg("spa_tryimport: importing %s", poolname); /* * Pass off the heavy lifting to spa_load(). Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Mon Apr 16 03:39:24 2018 (r332529) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Mon Apr 16 03:40:12 2018 (r332530) @@ -435,6 +435,34 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, spa_min_slop, CTLFLAG &spa_min_slop, 0, "Minimal value of reserved space"); +/*PRINTFLIKE2*/ +void +spa_load_failed(spa_t *spa, const char *fmt, ...) +{ + va_list adx; + char buf[256]; + + va_start(adx, fmt); + (void) vsnprintf(buf, sizeof (buf), fmt, adx); + va_end(adx); + + zfs_dbgmsg("spa_load(%s): FAILED: %s", spa->spa_name, buf); +} + +/*PRINTFLIKE2*/ +void +spa_load_note(spa_t *spa, const char *fmt, ...) +{ + va_list adx; + char buf[256]; + + va_start(adx, fmt); + (void) vsnprintf(buf, sizeof (buf), fmt, adx); + va_end(adx); + + zfs_dbgmsg("spa_load(%s): %s", spa->spa_name, buf); +} + /* * ========================================================================== * SPA config locking Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Mon Apr 16 03:39:24 2018 (r332529) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Mon Apr 16 03:40:12 2018 (r332530) @@ -827,6 +827,8 @@ extern objset_t *spa_meta_objset(spa_t *spa); extern uint64_t spa_deadman_synctime(spa_t *spa); /* Miscellaneous support routines */ +extern void spa_load_failed(spa_t *spa, const char *fmt, ...); +extern void spa_load_note(spa_t *spa, const char *fmt, ...); extern void spa_activate_mos_feature(spa_t *spa, const char *feature, dmu_tx_t *tx); extern void spa_deactivate_mos_feature(spa_t *spa, const char *feature); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h Mon Apr 16 03:39:24 2018 (r332529) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h Mon Apr 16 03:40:12 2018 (r332530) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright (c) 2011, 2016 by Delphix. All rights reserved. */ #ifndef _SYS_VDEV_H @@ -48,6 +48,7 @@ typedef enum vdev_dtl_type { extern boolean_t zfs_nocacheflush; extern boolean_t zfs_trim_enabled; +extern void vdev_dbgmsg(vdev_t *vd, const char *fmt, ...); extern int vdev_open(vdev_t *); extern void vdev_open_children(vdev_t *); extern boolean_t vdev_uses_zvols(vdev_t *); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 03:39:24 2018 (r332529) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 03:40:12 2018 (r332530) @@ -171,6 +171,28 @@ SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, metaslabs_per_vdev &metaslabs_per_vdev, 0, "When a vdev is added, how many metaslabs the vdev should be divided into"); +/*PRINTFLIKE2*/ +void +vdev_dbgmsg(vdev_t *vd, const char *fmt, ...) +{ + va_list adx; + char buf[256]; + + va_start(adx, fmt); + (void) vsnprintf(buf, sizeof (buf), fmt, adx); + va_end(adx); + + if (vd->vdev_path != NULL) { + zfs_dbgmsg("%s vdev '%s': %s", vd->vdev_ops->vdev_op_type, + vd->vdev_path, buf); + } else { + zfs_dbgmsg("%s-%llu vdev (guid %llu): %s", + vd->vdev_ops->vdev_op_type, + (u_longlong_t)vd->vdev_id, + (u_longlong_t)vd->vdev_guid, buf); + } +} + /* * Given a vdev type, return the appropriate ops vector. */ @@ -1030,14 +1052,20 @@ vdev_metaslab_init(vdev_t *vd, uint64_t txg) error = dmu_read(mos, vd->vdev_ms_array, m * sizeof (uint64_t), sizeof (uint64_t), &object, DMU_READ_PREFETCH); - if (error) + if (error != 0) { + vdev_dbgmsg(vd, "unable to read the metaslab " + "array [error=%d]", error); return (error); + } } error = metaslab_init(vd->vdev_mg, m, object, txg, &(vd->vdev_ms[m])); - if (error) + if (error != 0) { + vdev_dbgmsg(vd, "metaslab_init failed [error=%d]", + error); return (error); + } } if (txg == 0) @@ -1119,8 +1147,7 @@ vdev_probe_done(zio_t *zio) zio->io_error = 0; } else { ASSERT(zio->io_error != 0); - zfs_dbgmsg("failed probe on vdev %llu", - (longlong_t)vd->vdev_id); + vdev_dbgmsg(vd, "failed probe"); zfs_ereport_post(FM_EREPORT_ZFS_PROBE_FAILURE, spa, vd, NULL, 0, 0); zio->io_error = SET_ERROR(ENXIO); @@ -1576,6 +1603,7 @@ vdev_validate(vdev_t *vd, boolean_t strict) if ((label = vdev_label_read_config(vd, txg)) == NULL) { vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN, VDEV_AUX_BAD_LABEL); + vdev_dbgmsg(vd, "vdev_validate: failed reading config"); return (0); } @@ -1588,6 +1616,8 @@ vdev_validate(vdev_t *vd, boolean_t strict) vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, VDEV_AUX_SPLIT_POOL); nvlist_free(label); + vdev_dbgmsg(vd, "vdev_validate: vdev split into other " + "pool"); return (0); } @@ -1597,6 +1627,10 @@ vdev_validate(vdev_t *vd, boolean_t strict) vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, VDEV_AUX_CORRUPT_DATA); nvlist_free(label); + vdev_dbgmsg(vd, "vdev_validate: vdev label pool_guid " + "doesn't match config (%llu != %llu)", + (u_longlong_t)guid, + (u_longlong_t)spa_guid(spa)); return (0); } @@ -1626,6 +1660,9 @@ vdev_validate(vdev_t *vd, boolean_t strict) vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, VDEV_AUX_CORRUPT_DATA); nvlist_free(label); + vdev_dbgmsg(vd, "vdev_validate: config guid doesn't " + "match label guid (%llu != %llu)", + (u_longlong_t)vd->vdev_guid, (u_longlong_t)guid); return (0); } @@ -1634,6 +1671,8 @@ vdev_validate(vdev_t *vd, boolean_t strict) vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, VDEV_AUX_CORRUPT_DATA); nvlist_free(label); + vdev_dbgmsg(vd, "vdev_validate: '%s' missing", + ZPOOL_CONFIG_POOL_STATE); return (0); } @@ -1645,8 +1684,12 @@ vdev_validate(vdev_t *vd, boolean_t strict) */ if (!(spa->spa_import_flags & ZFS_IMPORT_VERBATIM) && spa_load_state(spa) == SPA_LOAD_OPEN && - state != POOL_STATE_ACTIVE) + state != POOL_STATE_ACTIVE) { + vdev_dbgmsg(vd, "vdev_validate: invalid pool state " + "(%llu) for spa %s", (u_longlong_t)state, + spa->spa_name); return (SET_ERROR(EBADF)); + } /* * If we were able to open and validate a vdev that was @@ -2294,9 +2337,10 @@ vdev_dtl_sync(vdev_t *vd, uint64_t txg) * the top level so that we update the config. */ if (object != space_map_object(vd->vdev_dtl_sm)) { - zfs_dbgmsg("txg %llu, spa %s, DTL old object %llu, " - "new object %llu", txg, spa_name(spa), object, - space_map_object(vd->vdev_dtl_sm)); + vdev_dbgmsg(vd, "txg %llu, spa %s, DTL old object %llu, " + "new object %llu", (u_longlong_t)txg, spa_name(spa), + (u_longlong_t)object, + (u_longlong_t)space_map_object(vd->vdev_dtl_sm)); vdev_config_dirty(vd->vdev_top); } @@ -2404,8 +2448,13 @@ vdev_load(vdev_t *vd) if (vd->vdev_ashift == 0 || vd->vdev_asize == 0) { vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, VDEV_AUX_CORRUPT_DATA); + vdev_dbgmsg(vd, "vdev_load: invalid size. ashift=%llu, " + "asize=%llu", (u_longlong_t)vd->vdev_ashift, + (u_longlong_t)vd->vdev_asize); return (SET_ERROR(ENXIO)); } else if ((error = vdev_metaslab_init(vd, 0)) != 0) { + vdev_dbgmsg(vd, "vdev_load: metaslab_init failed " + "[error=%d]", error); vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, VDEV_AUX_CORRUPT_DATA); return (error); @@ -2418,6 +2467,8 @@ vdev_load(vdev_t *vd) if (vd->vdev_ops->vdev_op_leaf && (error = vdev_dtl_load(vd)) != 0) { vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, VDEV_AUX_CORRUPT_DATA); + vdev_dbgmsg(vd, "vdev_load: vdev_dtl_load failed " + "[error=%d]", error); return (error); } @@ -2431,6 +2482,9 @@ vdev_load(vdev_t *vd) obsolete_sm_object, 0, vd->vdev_asize, 0))) { vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN, VDEV_AUX_CORRUPT_DATA); + vdev_dbgmsg(vd, "vdev_load: space_map_open failed for " + "obsolete spacemap (obj %llu) [error=%d]", + (u_longlong_t)obsolete_sm_object, error); return (error); } space_map_update(vd->vdev_obsolete_sm); @@ -3805,9 +3859,9 @@ vdev_deadman(vdev_t *vd) fio = avl_first(&vq->vq_active_tree); delta = gethrtime() - fio->io_timestamp; if (delta > spa_deadman_synctime(spa)) { - zfs_dbgmsg("SLOW IO: zio timestamp %lluns, " - "delta %lluns, last io %lluns", - fio->io_timestamp, delta, + vdev_dbgmsg(vd, "SLOW IO: zio timestamp " + "%lluns, delta %lluns, last io %lluns", + fio->io_timestamp, (u_longlong_t)delta, vq->vq_io_complete_ts); fm_panic("I/O to pool '%s' appears to be " "hung on vdev guid %llu at '%s'.", Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Mon Apr 16 03:39:24 2018 (r332529) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Mon Apr 16 03:40:12 2018 (r332530) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright 2016 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Joyent, Inc. All rights reserved. */ @@ -325,6 +325,8 @@ vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t * if (ddi_devid_str_decode(vd->vdev_devid, &dvd->vd_devid, &dvd->vd_minor) != 0) { vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL; + vdev_dbgmsg(vd, "vdev_disk_open: invalid " + "vdev_devid '%s'", vd->vdev_devid); return (SET_ERROR(EINVAL)); } } @@ -417,6 +419,8 @@ vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t * if (error) { vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; + vdev_dbgmsg(vd, "vdev_disk_open: failed to open [error=%d]", + error); return (error); } @@ -430,8 +434,8 @@ vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t * char *vd_devid; vd_devid = ddi_devid_str_encode(devid, dvd->vd_minor); - zfs_dbgmsg("vdev %s: update devid from %s, " - "to %s", vd->vdev_path, vd->vdev_devid, vd_devid); + vdev_dbgmsg(vd, "vdev_disk_open: update devid from " + "'%s' to '%s'", vd->vdev_devid, vd_devid); spa_strfree(vd->vdev_devid); vd->vdev_devid = spa_strdup(vd_devid); ddi_devid_str_free(vd_devid); @@ -491,6 +495,7 @@ skip_open: */ if (ldi_get_size(dvd->vd_lh, psize) != 0) { vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; + vdev_dbgmsg(vd, "vdev_disk_open: failed to get size"); return (SET_ERROR(EINVAL)); } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Apr 16 03:39:24 2018 (r332529) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Apr 16 03:40:12 2018 (r332530) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Apr 16 03:41:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40F69F80E02; Mon, 16 Apr 2018 03:41:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E42AE832F3; Mon, 16 Apr 2018 03:41:21 +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 DF03B18057; Mon, 16 Apr 2018 03:41:21 +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 w3G3fLmK014582; Mon, 16 Apr 2018 03:41:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3fLqe014580; Mon, 16 Apr 2018 03:41:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160341.w3G3fLqe014580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:41: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: r332531 - in stable/11: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:41:22 -0000 Author: mav Date: Mon Apr 16 03:41:21 2018 New Revision: 332531 URL: https://svnweb.freebsd.org/changeset/base/332531 Log: MFC r329769: MFV r329766: 8962 zdb should work on non-idle pools illumos/illumos-gate@e144c4e6c90e7d4dccaad6db660ee42b6e7ba04f Currently `zdb` consistently fails to examine non-idle pools as it fails during the `spa_load()` process. The main problem seems to be that `spa_load_verify()` fails as can be seen below: $ sudo zdb -d -G dcenter zdb: can't open 'dcenter': I/O error ZFS_DBGMSG(zdb): spa_open_common: opening dcenter spa_load(dcenter): LOADING disk vdev '/dev/dsk/c4t11d0s0': best uberblock found for spa dcenter. txg 40824950 spa_load(dcenter): using uberblock with txg=40824950 spa_load(dcenter): UNLOADING spa_load(dcenter): RELOADING spa_load(dcenter): LOADING disk vdev '/dev/dsk/c3t10d0s0': best uberblock found for spa dcenter. txg 40824952 spa_load(dcenter): using uberblock with txg=40824952 spa_load(dcenter): FAILED: spa_load_verify failed [error=5] spa_load(dcenter): UNLOADING This change makes `spa_load_verify()` a dryrun when ran from `zdb`. This is done by creating a global flag in zfs and then setting it in `zdb`. Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Andy Stormont Approved by: Dan McDonald Author: Pavel Zakharov Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 03:40:12 2018 (r332530) +++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 03:41:21 2018 (r332531) @@ -87,11 +87,13 @@ extern int reference_tracking_enable; extern boolean_t zfs_recover; extern uint64_t zfs_arc_max, zfs_arc_meta_limit; extern int zfs_vdev_async_read_max_active; +extern boolean_t spa_load_verify_dryrun; #else int reference_tracking_enable; boolean_t zfs_recover; uint64_t zfs_arc_max, zfs_arc_meta_limit; int zfs_vdev_async_read_max_active; +boolean_t spa_load_verify_dryrun; #endif static const char cmdname[] = "zdb"; @@ -4577,6 +4579,12 @@ main(int argc, char **argv) * Disable reference tracking for better performance. */ reference_tracking_enable = B_FALSE; + + /* + * Do not fail spa_load when spa_load_verify fails. This is needed + * to load non-idle pools. + */ + spa_load_verify_dryrun = B_TRUE; kernel_init(FREAD); g_zfs = libzfs_init(); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:40:12 2018 (r332530) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:41:21 2018 (r332531) @@ -181,6 +181,12 @@ boolean_t spa_create_process = B_TRUE; /* no process = extern int zfs_sync_pass_deferred_free; /* + * Report any spa_load_verify errors found, but do not fail spa_load. + * This is used by zdb to analyze non-idle pools. + */ +boolean_t spa_load_verify_dryrun = B_FALSE; + +/* * This (illegal) pool name is used when temporarily importing a spa_t in order * to get the vdev stats associated with the imported devices. */ @@ -2088,8 +2094,15 @@ spa_load_verify(spa_t *spa) spa->spa_load_meta_errors = sle.sle_meta_count; spa->spa_load_data_errors = sle.sle_data_count; - if (!error && sle.sle_meta_count <= policy.zrp_maxmeta && - sle.sle_data_count <= policy.zrp_maxdata) { + if (sle.sle_meta_count != 0 || sle.sle_data_count != 0) { + spa_load_note(spa, "spa_load_verify found %llu metadata errors " + "and %llu data errors", (u_longlong_t)sle.sle_meta_count, + (u_longlong_t)sle.sle_data_count); + } + + if (spa_load_verify_dryrun || + (!error && sle.sle_meta_count <= policy.zrp_maxmeta && + sle.sle_data_count <= policy.zrp_maxdata)) { int64_t loss = 0; verify_ok = B_TRUE; @@ -2106,6 +2119,9 @@ spa_load_verify(spa_t *spa) } else { spa->spa_load_max_txg = spa->spa_uberblock.ub_txg; } + + if (spa_load_verify_dryrun) + return (0); if (error) { if (error != ENXIO && error != EIO) From owner-svn-src-all@freebsd.org Mon Apr 16 03:42:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABC07F80F0D; Mon, 16 Apr 2018 03:42: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CAB88359F; Mon, 16 Apr 2018 03:42: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 57BE31818F; Mon, 16 Apr 2018 03:42: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 w3G3g75D015545; Mon, 16 Apr 2018 03:42:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3g6IS015541; Mon, 16 Apr 2018 03:42:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160342.w3G3g6IS015541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:42: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: r332532 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua X-SVN-Commit-Revision: 332532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:42:07 -0000 Author: mav Date: Mon Apr 16 03:42:06 2018 New Revision: 332532 URL: https://svnweb.freebsd.org/changeset/base/332532 Log: MFC r329771: MFV r329770: 9035 zfs: this statement may fall through illumos/illumos-gate@46ac8fdfc5a1f9d8240c79a6ae5b2889cbe83553 Reviewed by: Yuri Pankov Reviewed by: Andy Fiddaman Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: Toomas Soome Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lgc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/llex.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltable.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lgc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lgc.c Mon Apr 16 03:41:21 2018 (r332531) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lgc.c Mon Apr 16 03:42:06 2018 (r332532) @@ -677,7 +677,7 @@ static void freeobj (lua_State *L, GCObject *o) { case LUA_TUSERDATA: luaM_freemem(L, o, sizeudata(gco2u(o))); break; case LUA_TSHRSTR: G(L)->strt.nuse--; - /* go through */ + /* FALLTHROUGH */ case LUA_TLNGSTR: { luaM_freemem(L, o, sizestring(gco2ts(o))); break; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/llex.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/llex.c Mon Apr 16 03:41:21 2018 (r332531) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/llex.c Mon Apr 16 03:42:06 2018 (r332532) @@ -475,6 +475,7 @@ static int llex (LexState *ls, SemInfo *seminfo) { else if (!lisdigit(ls->current)) return '.'; /* else go through */ } + /* FALLTHROUGH */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { read_numeral(ls, seminfo); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c Mon Apr 16 03:41:21 2018 (r332531) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c Mon Apr 16 03:42:06 2018 (r332532) @@ -519,7 +519,7 @@ static const char *match (MatchState *ms, const char * } case '+': /* 1 or more repetitions */ s++; /* 1 match already done */ - /* go through */ + /* FALLTHROUGH */ case '*': /* 0 or more repetitions */ s = max_expand(ms, s, p, ep); break; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltable.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltable.c Mon Apr 16 03:41:21 2018 (r332531) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltable.c Mon Apr 16 03:42:06 2018 (r332532) @@ -490,6 +490,7 @@ const TValue *luaH_get (Table *t, const TValue *key) { return luaH_getint(t, k); /* use specialized version */ /* else go through */ } + /* FALLTHROUGH */ default: { Node *n = mainposition(t, key); do { /* check whether `key' is somewhere in the chain */ From owner-svn-src-all@freebsd.org Mon Apr 16 03:42:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D33FCF8111A; Mon, 16 Apr 2018 03:42:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8598B8373E; Mon, 16 Apr 2018 03:42:47 +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 808FC181B4; Mon, 16 Apr 2018 03:42:47 +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 w3G3gl7G015619; Mon, 16 Apr 2018 03:42:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3glRc015618; Mon, 16 Apr 2018 03:42:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160342.w3G3glRc015618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:42:47 +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: r332533 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:42:48 -0000 Author: mav Date: Mon Apr 16 03:42:47 2018 New Revision: 332533 URL: https://svnweb.freebsd.org/changeset/base/332533 Log: MFC r329775: MFV r329774: 8408 dsl_props_set_sync_impl() does not handle nested nvlists correctly illumos/illumos-gate@85723e5eec42f46dbfdb4c09b9e1ed66501d1ccf When iterating over the input nvlist in dsl_props_set_sync_impl() when we don't preserve the nvpair name before looking up ZPROP_VALUE, so when we later go to process it nvpair_name() is always "value" instead of the actual property name. This results in a couple of bugs in the recv code: - received properties are not restored correctly when failing to receive an incremental send stream - received properties are not completely replaced by the new ones when successfully receiving an incremental send stream This was discovered on ZFS on Linux (fixed in https://github.com/zfsonlinux/zfs/commit/5f1346c29997dd4e02acf4c19c875d5484f33b1e) Reviewed by: Paul Dagnelie Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: loli10K Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Mon Apr 16 03:42:06 2018 (r332532) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Mon Apr 16 03:42:47 2018 (r332533) @@ -856,11 +856,15 @@ dsl_props_set_sync_impl(dsl_dataset_t *ds, zprop_sourc while ((elem = nvlist_next_nvpair(props, elem)) != NULL) { nvpair_t *pair = elem; + const char *name = nvpair_name(pair); if (nvpair_type(pair) == DATA_TYPE_NVLIST) { /* - * dsl_prop_get_all_impl() returns properties in this - * format. + * This usually happens when we reuse the nvlist_t data + * returned by the counterpart dsl_prop_get_all_impl(). + * For instance we do this to restore the original + * received properties when an error occurs in the + * zfs_ioc_recv() codepath. */ nvlist_t *attrs = fnvpair_value_nvlist(pair); pair = fnvlist_lookup_nvpair(attrs, ZPROP_VALUE); @@ -868,14 +872,14 @@ dsl_props_set_sync_impl(dsl_dataset_t *ds, zprop_sourc if (nvpair_type(pair) == DATA_TYPE_STRING) { const char *value = fnvpair_value_string(pair); - dsl_prop_set_sync_impl(ds, nvpair_name(pair), + dsl_prop_set_sync_impl(ds, name, source, 1, strlen(value) + 1, value, tx); } else if (nvpair_type(pair) == DATA_TYPE_UINT64) { uint64_t intval = fnvpair_value_uint64(pair); - dsl_prop_set_sync_impl(ds, nvpair_name(pair), + dsl_prop_set_sync_impl(ds, name, source, sizeof (intval), 1, &intval, tx); } else if (nvpair_type(pair) == DATA_TYPE_BOOLEAN) { - dsl_prop_set_sync_impl(ds, nvpair_name(pair), + dsl_prop_set_sync_impl(ds, name, source, 0, 0, NULL, tx); } else { panic("invalid nvpair type"); From owner-svn-src-all@freebsd.org Mon Apr 16 03:43:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D4A2F8125F; Mon, 16 Apr 2018 03:43:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C662083896; Mon, 16 Apr 2018 03:43:29 +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 C1630181B6; Mon, 16 Apr 2018 03:43:29 +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 w3G3hTg9015704; Mon, 16 Apr 2018 03:43:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3hTAk015703; Mon, 16 Apr 2018 03:43:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160343.w3G3hTAk015703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332534 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:43:30 -0000 Author: mav Date: Mon Apr 16 03:43:29 2018 New Revision: 332534 URL: https://svnweb.freebsd.org/changeset/base/332534 Log: MFC r329777: MFV r329776: 8477 Assertion failed in vdev_state_dirty(): spa_writeable(spa) illumos/illumos-gate@f4c1745bd6c9829a05ecec15759ede7757100ab5 Illumos 4080 allows "zpool clear" to work on readonly pools: i don't think this is the intended behaviour, we shouldn't be allowed to clear readonly pools. Probably. A fix is already in the ZFS on Linux repository to addess this issue: https://github.com/zfsonlinux/zfs/commit/92e43c17188d47f47b69318e4884096dec380e36 Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: loli10K Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 16 03:42:47 2018 (r332533) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 16 03:43:29 2018 (r332534) @@ -6150,7 +6150,7 @@ zfs_ioctl_init(void) zfs_secpolicy_config, B_TRUE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_CLEAR, zfs_ioc_clear, - zfs_secpolicy_config, B_TRUE, POOL_CHECK_NONE); + zfs_secpolicy_config, B_TRUE, POOL_CHECK_READONLY); zfs_ioctl_register_pool(ZFS_IOC_POOL_REOPEN, zfs_ioc_pool_reopen, zfs_secpolicy_config, B_TRUE, POOL_CHECK_SUSPENDED); From owner-svn-src-all@freebsd.org Mon Apr 16 03:44:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A162F813DF; Mon, 16 Apr 2018 03:44: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB40183A07; Mon, 16 Apr 2018 03:44:13 +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 B636C181B8; Mon, 16 Apr 2018 03:44:13 +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 w3G3iD0u015804; Mon, 16 Apr 2018 03:44:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3iDU8015802; Mon, 16 Apr 2018 03:44:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160344.w3G3iDU8015802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:44: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: r332535 - in stable/11: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:44:14 -0000 Author: mav Date: Mon Apr 16 03:44:13 2018 New Revision: 332535 URL: https://svnweb.freebsd.org/changeset/base/332535 Log: MFC r329783: 8942 zfs promote .../%recv should be an error illumos/illumos-gate@add927f8c8d101e16c23eb9cd270be4fd7edf7d5 Reported on the ZFSonLinux https://github.com/zfsonlinux/zfs/issues/4843, fixed by https://github.com/zfsonlinux/zfs/pull/6339: If we are in the middle of an incremental zfs receive, the child .../%recv will exist. If you concurrently run zfs promote .../%recv, it will "work", but then zfs gets confused. For example, there's no obvious way to destroy the containing filesystem (because it is now a clone of its invisible child). Attempting to do this promote should be an error. We could fix this by having zfs_ioc_promote() check if zc_name contains a %, similar to zfs_ioc_rename(). Reviewed by: Paul Dagnelie Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: loli10K Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Apr 16 03:43:29 2018 (r332534) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Apr 16 03:44:13 2018 (r332535) @@ -3786,6 +3786,9 @@ zfs_promote(zfs_handle_t *zhp) return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); } + if (!zfs_validate_name(hdl, zhp->zfs_name, zhp->zfs_type, B_TRUE)) + return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf)); + ret = lzc_promote(zhp->zfs_name, snapname, sizeof (snapname)); if (ret != 0) { @@ -4155,6 +4158,10 @@ zfs_rename(zfs_handle_t *zhp, const char *source, cons (void) strlcat(zhp->zfs_name, source, sizeof(zhp->zfs_name)); zhp->zfs_type = ZFS_TYPE_SNAPSHOT; } + + /* make sure source name is valid */ + if (!zfs_validate_name(hdl, zhp->zfs_name, zhp->zfs_type, B_TRUE)) + return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf)); /* * Make sure the target name is valid Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 16 03:43:29 2018 (r332534) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 16 03:44:13 2018 (r332535) @@ -3920,9 +3920,12 @@ zfs_ioc_rename(zfs_cmd_t *zc) allow_mounted = (zc->zc_cookie & 2) != 0; #endif + /* "zfs rename" from and to ...%recv datasets should both fail */ + zc->zc_name[sizeof (zc->zc_name) - 1] = '\0'; zc->zc_value[sizeof (zc->zc_value) - 1] = '\0'; - if (dataset_namecheck(zc->zc_value, NULL, NULL) != 0 || - strchr(zc->zc_value, '%')) + if (dataset_namecheck(zc->zc_name, NULL, NULL) != 0 || + dataset_namecheck(zc->zc_value, NULL, NULL) != 0 || + strchr(zc->zc_name, '%') || strchr(zc->zc_value, '%')) return (SET_ERROR(EINVAL)); at = strchr(zc->zc_name, '@'); @@ -4973,6 +4976,11 @@ zfs_ioc_promote(zfs_cmd_t *zc) char origin[ZFS_MAX_DATASET_NAME_LEN]; char *cp; int error; + + zc->zc_name[sizeof (zc->zc_name) - 1] = '\0'; + if (dataset_namecheck(zc->zc_name, NULL, NULL) != 0 || + strchr(zc->zc_name, '%')) + return (SET_ERROR(EINVAL)); error = dsl_pool_hold(zc->zc_name, FTAG, &dp); if (error != 0) From owner-svn-src-all@freebsd.org Mon Apr 16 03:45:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6A5BF8164A; Mon, 16 Apr 2018 03:45:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EB4283E73; Mon, 16 Apr 2018 03:45: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 6614A181BB; Mon, 16 Apr 2018 03:45: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 w3G3jeFE015924; Mon, 16 Apr 2018 03:45:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3jdMS015916; Mon, 16 Apr 2018 03:45:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160345.w3G3jdMS015916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:45: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: r332536 - in stable/11: cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/... X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/contr... X-SVN-Commit-Revision: 332536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:45:41 -0000 Author: mav Date: Mon Apr 16 03:45:39 2018 New Revision: 332536 URL: https://svnweb.freebsd.org/changeset/base/332536 Log: MFC r329798: MFV r329793, r329795: 9075 Improve ZFS pool import/load process and corrupted pool recovery illumos/illumos-gate@6f7938128a2c5e23f4b970ea101137eadd1470a1 Some work has been done lately to improve the debugability of the ZFS pool load (and import) process. This includes: https://www.illumos.org/issues/7638: Refactor spa_load_impl into several functions https://www.illumos.org/issues/8961: SPA load/import should tell us why it failed https://www.illumos.org/issues/7277: zdb should be able to print zfs_dbgmsg's To iterate on top of that, there's a few changes that were made to make the import process more resilient and crash free. One of the first tasks during the pool load process is to parse a config provided from userland that describes what devices the pool is composed of. A vdev tree is generated from that config, and then all the vdevs are opened. The Meta Object Set (MOS) of the pool is accessed, and several metadata objects that are necessary to load the pool are read. The exact configuration of the pool is also stored inside the MOS. Since the configuration provided from userland is external and might not accurately describe the vdev tree of the pool at the txg that is being loaded, it cannot be relied upon to safely operate the pool. For that reason, the configuration in the MOS is read early on. In the past, the two configurations were compared together and if there was a mismatch then the load process was aborted and an error was returned. The latter was a good way to ensure a pool does not get corrupted, however it made the pool load process needlessly fragile in cases where the vdev configuration changed or the userland configuration was outdated. Since the MOS is stored in 3 copies, the configuration provided by userland doesn't have to be perfect in order to read its contents. Hence, a new approach has been adopted: The pool is first opened with the untrusted userland configuration just so that the real configuration can be read from the MOS. The trusted MOS configuration is then used to generate a new vdev tree and the pool is re-opened. When the pool is opened with an untrusted configuration, writes are disabled to avoid accidentally damaging it. During reads, some sanity checks are performed on block pointers to see if each DVA points to a known vdev; when the configuration is untrusted, instead of panicking the system if those checks fail we simply avoid issuing reads to the invalid DVAs. This new two-step pool load process now allows rewinding pools accross vdev tree changes such as device replacement, addition, etc. Loading a pool from an external config file in a clustering environment also becomes much safer now since the pool will import even if the config is outdated and didn't, for instance, register a recent device addition. With this code in place, it became relatively easy to implement a long-sought-after feature: the ability to import a pool with missing top level (i.e. non-redundant) devices. Note that since this almost guarantees some loss Of data, this feature is for now restricted to a read-only import. Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Andrew Stormont Approved by: Hans Rosenfeld Author: Pavel Zakharov Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Apr 16 03:44:13 2018 (r332535) +++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Apr 16 03:45:39 2018 (r332536) @@ -1582,6 +1582,10 @@ print_status_config(zpool_handle_t *zhp, const char *n (void) printf(gettext("split into new pool")); break; + case VDEV_AUX_CHILDREN_OFFLINE: + (void) printf(gettext("all children offline")); + break; + default: (void) printf(gettext("corrupted data")); break; @@ -1675,6 +1679,10 @@ print_import_config(const char *name, nvlist_t *nv, in (void) printf(gettext("too many errors")); break; + case VDEV_AUX_CHILDREN_OFFLINE: + (void) printf(gettext("all children offline")); + break; + default: (void) printf(gettext("corrupted data")); break; @@ -2328,6 +2336,7 @@ zpool_do_import(int argc, char **argv) idata.poolname = searchname; idata.guid = searchguid; idata.cachefile = cachefile; + idata.policy = policy; pools = zpool_search_import(g_zfs, &idata); Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Apr 16 03:44:13 2018 (r332535) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Apr 16 03:45:39 2018 (r332536) @@ -391,6 +391,7 @@ typedef struct importargs { int can_be_active : 1; /* can the pool be active? */ int unique : 1; /* does 'poolname' already exist? */ int exists : 1; /* set on return if pool already exists */ + nvlist_t *policy; /* rewind policy (rewind txg, etc.) */ } importargs_t; extern nvlist_t *zpool_search_import(libzfs_handle_t *, importargs_t *); Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Mon Apr 16 03:44:13 2018 (r332535) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Mon Apr 16 03:45:39 2018 (r332536) @@ -440,7 +440,8 @@ vdev_is_hole(uint64_t *hole_array, uint_t holes, uint_ * return to the user. */ static nvlist_t * -get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boolean_t active_ok) +get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boolean_t active_ok, + nvlist_t *policy) { pool_entry_t *pe; vdev_entry_t *ve; @@ -774,6 +775,12 @@ get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boo continue; } + if (policy != NULL) { + if (nvlist_add_nvlist(config, ZPOOL_REWIND_POLICY, + policy) != 0) + goto nomem; + } + if ((nvl = refresh_config(hdl, config)) == NULL) { nvlist_free(config); config = NULL; @@ -1413,7 +1420,7 @@ skipdir: goto error; } - ret = get_configs(hdl, &pools, iarg->can_be_active); + ret = get_configs(hdl, &pools, iarg->can_be_active, iarg->policy); error: for (pe = pools.pools; pe != NULL; pe = penext) { @@ -1542,6 +1549,14 @@ zpool_find_import_cached(libzfs_handle_t *hdl, const c if (active) continue; + + if (nvlist_add_string(src, ZPOOL_CONFIG_CACHEFILE, + cachefile) != 0) { + (void) no_memory(hdl); + nvlist_free(raw); + nvlist_free(pools); + return (NULL); + } if ((dst = refresh_config(hdl, src)) == NULL) { nvlist_free(raw); Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 16 03:44:13 2018 (r332535) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 16 03:45:39 2018 (r332536) @@ -1809,8 +1809,9 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *con nvlist_lookup_nvlist(nvinfo, ZPOOL_CONFIG_MISSING_DEVICES, &missing) == 0) { (void) printf(dgettext(TEXT_DOMAIN, - "The devices below are missing, use " - "'-m' to import the pool anyway:\n")); + "The devices below are missing or " + "corrupted, use '-m' to import the pool " + "anyway:\n")); print_vdev_tree(hdl, NULL, missing, 2); (void) printf("\n"); } Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Mon Apr 16 03:44:13 2018 (r332535) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Mon Apr 16 03:45:39 2018 (r332536) @@ -1007,6 +1007,16 @@ kernel_fini(void) urandom_fd = -1; } +/* ARGSUSED */ +uint32_t +zone_get_hostid(void *zonep) +{ + /* + * We're emulating the system's hostid in userland. + */ + return (strtoul(hw_serial, NULL, 10)); +} + int z_uncompress(void *dst, size_t *dstlen, const void *src, size_t srclen) { Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Apr 16 03:44:13 2018 (r332535) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Apr 16 03:45:39 2018 (r332536) @@ -609,6 +609,7 @@ typedef struct callb_cpr { #define zone_dataset_visible(x, y) (1) #define INGLOBALZONE(z) (1) +extern uint32_t zone_get_hostid(void *zonep); extern char *kmem_asprintf(const char *fmt, ...); #define strfree(str) kmem_free((str), strlen(str) + 1) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:44:13 2018 (r332535) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:45:39 2018 (r332536) @@ -163,9 +163,8 @@ const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ static void spa_sync_version(void *arg, dmu_tx_t *tx); static void spa_sync_props(void *arg, dmu_tx_t *tx); static boolean_t spa_has_active_shared_spare(spa_t *spa); -static int spa_load_impl(spa_t *spa, uint64_t, nvlist_t *config, - spa_load_state_t state, spa_import_type_t type, boolean_t trust_config, - char **ereport); +static int spa_load_impl(spa_t *spa, spa_import_type_t type, char **ereport, + boolean_t reloading); static void spa_vdev_resilver_done(spa_t *spa); uint_t zio_taskq_batch_pct = 75; /* 1 thread per cpu in pset */ @@ -193,6 +192,68 @@ boolean_t spa_load_verify_dryrun = B_FALSE; #define TRYIMPORT_NAME "$import" /* + * For debugging purposes: print out vdev tree during pool import. + */ +int spa_load_print_vdev_tree = B_FALSE; + +/* + * A non-zero value for zfs_max_missing_tvds means that we allow importing + * pools with missing top-level vdevs. This is strictly intended for advanced + * pool recovery cases since missing data is almost inevitable. Pools with + * missing devices can only be imported read-only for safety reasons, and their + * fail-mode will be automatically set to "continue". + * + * With 1 missing vdev we should be able to import the pool and mount all + * datasets. User data that was not modified after the missing device has been + * added should be recoverable. This means that snapshots created prior to the + * addition of that device should be completely intact. + * + * With 2 missing vdevs, some datasets may fail to mount since there are + * dataset statistics that are stored as regular metadata. Some data might be + * recoverable if those vdevs were added recently. + * + * With 3 or more missing vdevs, the pool is severely damaged and MOS entries + * may be missing entirely. Chances of data recovery are very low. Note that + * there are also risks of performing an inadvertent rewind as we might be + * missing all the vdevs with the latest uberblocks. + */ +uint64_t zfs_max_missing_tvds = 0; + +/* + * The parameters below are similar to zfs_max_missing_tvds but are only + * intended for a preliminary open of the pool with an untrusted config which + * might be incomplete or out-dated. + * + * We are more tolerant for pools opened from a cachefile since we could have + * an out-dated cachefile where a device removal was not registered. + * We could have set the limit arbitrarily high but in the case where devices + * are really missing we would want to return the proper error codes; we chose + * SPA_DVAS_PER_BP - 1 so that some copies of the MOS would still be available + * and we get a chance to retrieve the trusted config. + */ +uint64_t zfs_max_missing_tvds_cachefile = SPA_DVAS_PER_BP - 1; +/* + * In the case where config was assembled by scanning device paths (/dev/dsks + * by default) we are less tolerant since all the existing devices should have + * been detected and we want spa_load to return the right error codes. + */ +uint64_t zfs_max_missing_tvds_scan = 0; + + +SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_load_print_vdev_tree, CTLFLAG_RWTUN, + &spa_load_print_vdev_tree, 0, + "print out vdev tree during pool import"); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds, CTLFLAG_RWTUN, + &zfs_max_missing_tvds, 0, + "allow importing pools with missing top-level vdevs"); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds_cachefile, CTLFLAG_RWTUN, + &zfs_max_missing_tvds_cachefile, 0, + "allow importing pools with missing top-level vdevs in cache file"); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds_scan, CTLFLAG_RWTUN, + &zfs_max_missing_tvds_scan, 0, + "allow importing pools with missing top-level vdevs during scan"); + +/* * ========================================================================== * SPA properties routines * ========================================================================== @@ -1692,13 +1753,34 @@ load_nvlist(spa_t *spa, uint64_t obj, nvlist_t **value } /* + * Concrete top-level vdevs that are not missing and are not logs. At every + * spa_sync we write new uberblocks to at least SPA_SYNC_MIN_VDEVS core tvds. + */ +static uint64_t +spa_healthy_core_tvds(spa_t *spa) +{ + vdev_t *rvd = spa->spa_root_vdev; + uint64_t tvds = 0; + + for (uint64_t i = 0; i < rvd->vdev_children; i++) { + vdev_t *vd = rvd->vdev_child[i]; + if (vd->vdev_islog) + continue; + if (vdev_is_concrete(vd) && !vdev_is_dead(vd)) + tvds++; + } + + return (tvds); +} + +/* * Checks to see if the given vdev could not be opened, in which case we post a * sysevent to notify the autoreplace code that the device has been removed. */ static void spa_check_removed(vdev_t *vd) { - for (int c = 0; c < vd->vdev_children; c++) + for (uint64_t c = 0; c < vd->vdev_children; c++) spa_check_removed(vd->vdev_child[c]); if (vd->vdev_ops->vdev_op_leaf && vdev_is_dead(vd) && @@ -1708,38 +1790,14 @@ spa_check_removed(vdev_t *vd) } } -static void -spa_config_valid_zaps(vdev_t *vd, vdev_t *mvd) +static int +spa_check_for_missing_logs(spa_t *spa) { - ASSERT3U(vd->vdev_children, ==, mvd->vdev_children); + vdev_t *rvd = spa->spa_root_vdev; - vd->vdev_top_zap = mvd->vdev_top_zap; - vd->vdev_leaf_zap = mvd->vdev_leaf_zap; - - for (uint64_t i = 0; i < vd->vdev_children; i++) { - spa_config_valid_zaps(vd->vdev_child[i], mvd->vdev_child[i]); - } -} - -/* - * Validate the current config against the MOS config - */ -static boolean_t -spa_config_valid(spa_t *spa, nvlist_t *config) -{ - vdev_t *mrvd, *rvd = spa->spa_root_vdev; - nvlist_t *nv; - - VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nv) == 0); - - spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); - VERIFY(spa_config_parse(spa, &mrvd, nv, NULL, 0, VDEV_ALLOC_LOAD) == 0); - - ASSERT3U(rvd->vdev_children, ==, mrvd->vdev_children); - /* * If we're doing a normal import, then build up any additional - * diagnostic information about missing devices in this config. + * diagnostic information about missing log devices. * We'll pass this up to the user for further processing. */ if (!(spa->spa_import_flags & ZFS_IMPORT_MISSING_LOG)) { @@ -1750,109 +1808,52 @@ spa_config_valid(spa_t *spa, nvlist_t *config) KM_SLEEP); VERIFY(nvlist_alloc(&nv, NV_UNIQUE_NAME, KM_SLEEP) == 0); - for (int c = 0; c < rvd->vdev_children; c++) { + for (uint64_t c = 0; c < rvd->vdev_children; c++) { vdev_t *tvd = rvd->vdev_child[c]; - vdev_t *mtvd = mrvd->vdev_child[c]; - if (tvd->vdev_ops == &vdev_missing_ops && - mtvd->vdev_ops != &vdev_missing_ops && - mtvd->vdev_islog) - child[idx++] = vdev_config_generate(spa, mtvd, - B_FALSE, 0); + /* + * We consider a device as missing only if it failed + * to open (i.e. offline or faulted is not considered + * as missing). + */ + if (tvd->vdev_islog && + tvd->vdev_state == VDEV_STATE_CANT_OPEN) { + child[idx++] = vdev_config_generate(spa, tvd, + B_FALSE, VDEV_CONFIG_MISSING); + } } - if (idx) { - VERIFY(nvlist_add_nvlist_array(nv, - ZPOOL_CONFIG_CHILDREN, child, idx) == 0); - VERIFY(nvlist_add_nvlist(spa->spa_load_info, - ZPOOL_CONFIG_MISSING_DEVICES, nv) == 0); + if (idx > 0) { + fnvlist_add_nvlist_array(nv, + ZPOOL_CONFIG_CHILDREN, child, idx); + fnvlist_add_nvlist(spa->spa_load_info, + ZPOOL_CONFIG_MISSING_DEVICES, nv); - for (int i = 0; i < idx; i++) + for (uint64_t i = 0; i < idx; i++) nvlist_free(child[i]); } nvlist_free(nv); kmem_free(child, rvd->vdev_children * sizeof (char **)); - } - /* - * Compare the root vdev tree with the information we have - * from the MOS config (mrvd). Check each top-level vdev - * with the corresponding MOS config top-level (mtvd). - */ - for (int c = 0; c < rvd->vdev_children; c++) { - vdev_t *tvd = rvd->vdev_child[c]; - vdev_t *mtvd = mrvd->vdev_child[c]; + if (idx > 0) { + spa_load_failed(spa, "some log devices are missing"); + return (SET_ERROR(ENXIO)); + } + } else { + for (uint64_t c = 0; c < rvd->vdev_children; c++) { + vdev_t *tvd = rvd->vdev_child[c]; - /* - * Resolve any "missing" vdevs in the current configuration. - * Also trust the MOS config about any "indirect" vdevs. - * If we find that the MOS config has more accurate information - * about the top-level vdev then use that vdev instead. - */ - if ((tvd->vdev_ops == &vdev_missing_ops && - mtvd->vdev_ops != &vdev_missing_ops) || - (mtvd->vdev_ops == &vdev_indirect_ops && - tvd->vdev_ops != &vdev_indirect_ops)) { - - /* - * Device specific actions. - */ - if (mtvd->vdev_islog) { - if (!(spa->spa_import_flags & - ZFS_IMPORT_MISSING_LOG)) { - continue; - } - + if (tvd->vdev_islog && + tvd->vdev_state == VDEV_STATE_CANT_OPEN) { spa_set_log_state(spa, SPA_LOG_CLEAR); - } else if (mtvd->vdev_ops != &vdev_indirect_ops) { - continue; + spa_load_note(spa, "some log devices are " + "missing, ZIL is dropped."); + break; } - - /* - * Swap the missing vdev with the data we were - * able to obtain from the MOS config. - */ - vdev_remove_child(rvd, tvd); - vdev_remove_child(mrvd, mtvd); - - vdev_add_child(rvd, mtvd); - vdev_add_child(mrvd, tvd); - - vdev_reopen(rvd); - } else { - if (mtvd->vdev_islog) { - /* - * Load the slog device's state from the MOS - * config since it's possible that the label - * does not contain the most up-to-date - * information. - */ - vdev_load_log_state(tvd, mtvd); - vdev_reopen(tvd); - } - - /* - * Per-vdev ZAP info is stored exclusively in the MOS. - */ - spa_config_valid_zaps(tvd, mtvd); } - - /* - * Never trust this info from userland; always use what's - * in the MOS. This prevents it from getting out of sync - * with the rest of the info in the MOS. - */ - tvd->vdev_removing = mtvd->vdev_removing; - tvd->vdev_indirect_config = mtvd->vdev_indirect_config; } - vdev_free(mrvd); - spa_config_exit(spa, SCL_ALL, FTAG); - - /* - * Ensure we were able to validate the config. - */ - return (rvd->vdev_guid_sum == spa->spa_uberblock.ub_guid_sum); + return (0); } /* @@ -2249,55 +2250,17 @@ spa_try_repair(spa_t *spa, nvlist_t *config) } static int -spa_load(spa_t *spa, spa_load_state_t state, spa_import_type_t type, - boolean_t trust_config) +spa_load(spa_t *spa, spa_load_state_t state, spa_import_type_t type) { - nvlist_t *config = spa->spa_config; char *ereport = FM_EREPORT_ZFS_POOL; - char *comment; int error; - uint64_t pool_guid; - nvlist_t *nvl; - if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, &pool_guid)) - return (SET_ERROR(EINVAL)); + spa->spa_load_state = state; - ASSERT(spa->spa_comment == NULL); - if (nvlist_lookup_string(config, ZPOOL_CONFIG_COMMENT, &comment) == 0) - spa->spa_comment = spa_strdup(comment); + gethrestime(&spa->spa_loaded_ts); + error = spa_load_impl(spa, type, &ereport, B_FALSE); /* - * Versioning wasn't explicitly added to the label until later, so if - * it's not present treat it as the initial version. - */ - if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, - &spa->spa_ubsync.ub_version) != 0) - spa->spa_ubsync.ub_version = SPA_VERSION_INITIAL; - - (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, - &spa->spa_config_txg); - - if ((state == SPA_LOAD_IMPORT || state == SPA_LOAD_TRYIMPORT) && - spa_guid_exists(pool_guid, 0)) { - error = SET_ERROR(EEXIST); - } else { - spa->spa_config_guid = pool_guid; - - if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_SPLIT, - &nvl) == 0) { - VERIFY(nvlist_dup(nvl, &spa->spa_config_splitting, - KM_SLEEP) == 0); - } - - nvlist_free(spa->spa_load_info); - spa->spa_load_info = fnvlist_alloc(); - - gethrestime(&spa->spa_loaded_ts); - error = spa_load_impl(spa, pool_guid, config, state, type, - trust_config, &ereport); - } - - /* * Don't count references from objsets that are already closed * and are making their way through the eviction process. */ @@ -2347,23 +2310,87 @@ vdev_count_verify_zaps(vdev_t *vd) } static int -spa_ld_parse_config(spa_t *spa, uint64_t pool_guid, nvlist_t *config, - spa_import_type_t type) +spa_verify_host(spa_t *spa, nvlist_t *mos_config) { + uint64_t hostid; + char *hostname; + uint64_t myhostid = 0; + + if (!spa_is_root(spa) && nvlist_lookup_uint64(mos_config, + ZPOOL_CONFIG_HOSTID, &hostid) == 0) { + hostname = fnvlist_lookup_string(mos_config, + ZPOOL_CONFIG_HOSTNAME); + + myhostid = zone_get_hostid(NULL); + + if (hostid != 0 && myhostid != 0 && hostid != myhostid) { + cmn_err(CE_WARN, "pool '%s' could not be " + "loaded as it was last accessed by " + "another system (host: %s hostid: 0x%llx). " + "See: http://illumos.org/msg/ZFS-8000-EY", + spa_name(spa), hostname, (u_longlong_t)hostid); + spa_load_failed(spa, "hostid verification failed: pool " + "last accessed by host: %s (hostid: 0x%llx)", + hostname, (u_longlong_t)hostid); + return (SET_ERROR(EBADF)); + } + } + + return (0); +} + +static int +spa_ld_parse_config(spa_t *spa, spa_import_type_t type) +{ int error = 0; - nvlist_t *nvtree = NULL; + nvlist_t *nvtree, *nvl, *config = spa->spa_config; int parse; vdev_t *rvd; + uint64_t pool_guid; + char *comment; + /* + * Versioning wasn't explicitly added to the label until later, so if + * it's not present treat it as the initial version. + */ + if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, + &spa->spa_ubsync.ub_version) != 0) + spa->spa_ubsync.ub_version = SPA_VERSION_INITIAL; + + if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, &pool_guid)) { + spa_load_failed(spa, "invalid config provided: '%s' missing", + ZPOOL_CONFIG_POOL_GUID); + return (SET_ERROR(EINVAL)); + } + + if ((spa->spa_load_state == SPA_LOAD_IMPORT || spa->spa_load_state == + SPA_LOAD_TRYIMPORT) && spa_guid_exists(pool_guid, 0)) { + spa_load_failed(spa, "a pool with guid %llu is already open", + (u_longlong_t)pool_guid); + return (SET_ERROR(EEXIST)); + } + + spa->spa_config_guid = pool_guid; + + nvlist_free(spa->spa_load_info); + spa->spa_load_info = fnvlist_alloc(); + + ASSERT(spa->spa_comment == NULL); + if (nvlist_lookup_string(config, ZPOOL_CONFIG_COMMENT, &comment) == 0) + spa->spa_comment = spa_strdup(comment); + + (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, + &spa->spa_config_txg); + + if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_SPLIT, &nvl) == 0) + spa->spa_config_splitting = fnvlist_dup(nvl); + if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvtree)) { spa_load_failed(spa, "invalid config provided: '%s' missing", ZPOOL_CONFIG_VDEV_TREE); return (SET_ERROR(EINVAL)); } - parse = (type == SPA_IMPORT_EXISTING ? - VDEV_ALLOC_LOAD : VDEV_ALLOC_SPLIT); - /* * Create "The Godfather" zio to hold all async IOs */ @@ -2381,6 +2408,8 @@ spa_ld_parse_config(spa_t *spa, uint64_t pool_guid, nv * configuration requires knowing the version number. */ spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); + parse = (type == SPA_IMPORT_EXISTING ? + VDEV_ALLOC_LOAD : VDEV_ALLOC_SPLIT); error = spa_config_parse(spa, &rvd, nvtree, NULL, 0, parse); spa_config_exit(spa, SCL_ALL, FTAG); @@ -2401,71 +2430,105 @@ spa_ld_parse_config(spa_t *spa, uint64_t pool_guid, nv return (0); } +/* + * Recursively open all vdevs in the vdev tree. This function is called twice: + * first with the untrusted config, then with the trusted config. + */ static int spa_ld_open_vdevs(spa_t *spa) { int error = 0; + /* + * spa_missing_tvds_allowed defines how many top-level vdevs can be + * missing/unopenable for the root vdev to be still considered openable. + */ + if (spa->spa_trust_config) { + spa->spa_missing_tvds_allowed = zfs_max_missing_tvds; + } else if (spa->spa_config_source == SPA_CONFIG_SRC_CACHEFILE) { + spa->spa_missing_tvds_allowed = zfs_max_missing_tvds_cachefile; + } else if (spa->spa_config_source == SPA_CONFIG_SRC_SCAN) { + spa->spa_missing_tvds_allowed = zfs_max_missing_tvds_scan; + } else { + spa->spa_missing_tvds_allowed = 0; + } + + spa->spa_missing_tvds_allowed = + MAX(zfs_max_missing_tvds, spa->spa_missing_tvds_allowed); + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); error = vdev_open(spa->spa_root_vdev); spa_config_exit(spa, SCL_ALL, FTAG); + + if (spa->spa_missing_tvds != 0) { + spa_load_note(spa, "vdev tree has %lld missing top-level " + "vdevs.", (u_longlong_t)spa->spa_missing_tvds); + if (spa->spa_trust_config && (spa->spa_mode & FWRITE)) { + /* + * Although theoretically we could allow users to open + * incomplete pools in RW mode, we'd need to add a lot + * of extra logic (e.g. adjust pool space to account + * for missing vdevs). + * This limitation also prevents users from accidentally + * opening the pool in RW mode during data recovery and + * damaging it further. + */ + spa_load_note(spa, "pools with missing top-level " + "vdevs can only be opened in read-only mode."); + error = SET_ERROR(ENXIO); + } else { + spa_load_note(spa, "current settings allow for maximum " + "%lld missing top-level vdevs at this stage.", + (u_longlong_t)spa->spa_missing_tvds_allowed); + } + } if (error != 0) { spa_load_failed(spa, "unable to open vdev tree [error=%d]", error); } + if (spa->spa_missing_tvds != 0 || error != 0) + vdev_dbgmsg_print_tree(spa->spa_root_vdev, 2); return (error); } +/* + * We need to validate the vdev labels against the configuration that + * we have in hand. This function is called twice: first with an untrusted + * config, then with a trusted config. The validation is more strict when the + * config is trusted. + */ static int -spa_ld_validate_vdevs(spa_t *spa, spa_import_type_t type, - boolean_t trust_config) +spa_ld_validate_vdevs(spa_t *spa) { int error = 0; vdev_t *rvd = spa->spa_root_vdev; - /* - * We need to validate the vdev labels against the configuration that - * we have in hand, which is dependent on the setting of trust_config. - * If trust_config is true then we're validating the vdev labels based - * on that config. Otherwise, we're validating against the cached - * config (zpool.cache) that was read when we loaded the zfs module, and - * then later we will recursively call spa_load() and validate against - * the vdev config. - * - * If we're assembling a new pool that's been split off from an - * existing pool, the labels haven't yet been updated so we skip - * validation for now. - */ - if (type != SPA_IMPORT_ASSEMBLE) { - spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); - error = vdev_validate(rvd, trust_config); - spa_config_exit(spa, SCL_ALL, FTAG); + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); + error = vdev_validate(rvd); + spa_config_exit(spa, SCL_ALL, FTAG); - if (error != 0) { - spa_load_failed(spa, "vdev_validate failed [error=%d]", - error); - return (error); - } + if (error != 0) { + spa_load_failed(spa, "vdev_validate failed [error=%d]", error); + return (error); + } - if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) { - spa_load_failed(spa, "cannot open vdev tree after " - "invalidating some vdevs"); - return (SET_ERROR(ENXIO)); - } + if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) { + spa_load_failed(spa, "cannot open vdev tree after invalidating " + "some vdevs"); + vdev_dbgmsg_print_tree(rvd, 2); + return (SET_ERROR(ENXIO)); } return (0); } static int -spa_ld_select_uberblock(spa_t *spa, nvlist_t *config, spa_import_type_t type, - boolean_t trust_config) +spa_ld_select_uberblock(spa_t *spa, spa_import_type_t type) { vdev_t *rvd = spa->spa_root_vdev; nvlist_t *label; uberblock_t *ub = &spa->spa_uberblock; - uint64_t children; /* * Find the best uberblock. @@ -2558,26 +2621,9 @@ spa_ld_select_uberblock(spa_t *spa, nvlist_t *config, nvlist_free(unsup_feat); } - /* - * If the vdev guid sum doesn't match the uberblock, we have an - * incomplete configuration. We first check to see if the pool - * is aware of the complete config (i.e ZPOOL_CONFIG_VDEV_CHILDREN). - * If it is, defer the vdev_guid_sum check till later so we - * can handle missing vdevs. - */ - if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_VDEV_CHILDREN, - &children) != 0 && trust_config && type != SPA_IMPORT_ASSEMBLE && - rvd->vdev_guid_sum != ub->ub_guid_sum) { - spa_load_failed(spa, "guid sum in config doesn't match guid " - "sum in uberblock (%llu != %llu)", - (u_longlong_t)rvd->vdev_guid_sum, - (u_longlong_t)ub->ub_guid_sum); - return (spa_vdev_err(rvd, VDEV_AUX_BAD_GUID_SUM, ENXIO)); - } - if (type != SPA_IMPORT_ASSEMBLE && spa->spa_config_splitting) { spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); - spa_try_repair(spa, config); + spa_try_repair(spa, spa->spa_config); spa_config_exit(spa, SCL_ALL, FTAG); nvlist_free(spa->spa_config_splitting); spa->spa_config_splitting = NULL; @@ -2616,49 +2662,167 @@ spa_ld_open_rootbp(spa_t *spa) } static int -spa_ld_validate_config(spa_t *spa, spa_import_type_t type) +spa_ld_load_trusted_config(spa_t *spa, spa_import_type_t type, + boolean_t reloading) { - vdev_t *rvd = spa->spa_root_vdev; + vdev_t *mrvd, *rvd = spa->spa_root_vdev; + nvlist_t *nv, *mos_config, *policy; + int error = 0, copy_error; + uint64_t healthy_tvds, healthy_tvds_mos; + uint64_t mos_config_txg; if (spa_dir_prop(spa, DMU_POOL_CONFIG, &spa->spa_config_object, B_TRUE) != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); /* - * Validate the config, using the MOS config to fill in any - * information which might be missing. If we fail to validate - * the config then declare the pool unfit for use. If we're - * assembling a pool from a split, the log is not transferred - * over. + * If we're assembling a pool from a split, the config provided is + * already trusted so there is nothing to do. */ - if (type != SPA_IMPORT_ASSEMBLE) { - nvlist_t *mos_config; - if (load_nvlist(spa, spa->spa_config_object, &mos_config) - != 0) { - spa_load_failed(spa, "unable to retrieve MOS config"); - return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); - } + if (type == SPA_IMPORT_ASSEMBLE) + return (0); - if (!spa_config_valid(spa, mos_config)) { + healthy_tvds = spa_healthy_core_tvds(spa); + + if (load_nvlist(spa, spa->spa_config_object, &mos_config) + != 0) { + spa_load_failed(spa, "unable to retrieve MOS config"); + return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } + + /* + * If we are doing an open, pool owner wasn't verified yet, thus do + * the verification here. + */ + if (spa->spa_load_state == SPA_LOAD_OPEN) { + error = spa_verify_host(spa, mos_config); + if (error != 0) { nvlist_free(mos_config); - spa_load_failed(spa, "mismatch between config provided " - "and config stored in MOS"); - return (spa_vdev_err(rvd, VDEV_AUX_BAD_GUID_SUM, - ENXIO)); + return (error); } - nvlist_free(mos_config); + } + nv = fnvlist_lookup_nvlist(mos_config, ZPOOL_CONFIG_VDEV_TREE); + + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); + + /* + * Build a new vdev tree from the trusted config + */ + VERIFY(spa_config_parse(spa, &mrvd, nv, NULL, 0, VDEV_ALLOC_LOAD) == 0); + + /* + * Vdev paths in the MOS may be obsolete. If the untrusted config was + * obtained by scanning /dev/dsk, then it will have the right vdev + * paths. We update the trusted MOS config with this information. + * We first try to copy the paths with vdev_copy_path_strict, which + * succeeds only when both configs have exactly the same vdev tree. + * If that fails, we fall back to a more flexible method that has a + * best effort policy. + */ + copy_error = vdev_copy_path_strict(rvd, mrvd); + if (copy_error != 0 || spa_load_print_vdev_tree) { + spa_load_note(spa, "provided vdev tree:"); + vdev_dbgmsg_print_tree(rvd, 2); + spa_load_note(spa, "MOS vdev tree:"); + vdev_dbgmsg_print_tree(mrvd, 2); + } + if (copy_error != 0) { + spa_load_note(spa, "vdev_copy_path_strict failed, falling " + "back to vdev_copy_path_relaxed"); + vdev_copy_path_relaxed(rvd, mrvd); + } + + vdev_close(rvd); + vdev_free(rvd); + spa->spa_root_vdev = mrvd; + rvd = mrvd; + spa_config_exit(spa, SCL_ALL, FTAG); + + /* + * We will use spa_config if we decide to reload the spa or if spa_load + * fails and we rewind. We must thus regenerate the config using the + * MOS information with the updated paths. Rewind policy is an import + * setting and is not in the MOS. We copy it over to our new, trusted + * config. + */ + mos_config_txg = fnvlist_lookup_uint64(mos_config, + ZPOOL_CONFIG_POOL_TXG); + nvlist_free(mos_config); + mos_config = spa_config_generate(spa, NULL, mos_config_txg, B_FALSE); + if (nvlist_lookup_nvlist(spa->spa_config, ZPOOL_REWIND_POLICY, + &policy) == 0) + fnvlist_add_nvlist(mos_config, ZPOOL_REWIND_POLICY, policy); + spa_config_set(spa, mos_config); + spa->spa_config_source = SPA_CONFIG_SRC_MOS; + + /* + * Now that we got the config from the MOS, we should be more strict + * in checking blkptrs and can make assumptions about the consistency + * of the vdev tree. spa_trust_config must be set to true before opening + * vdevs in order for them to be writeable. + */ + spa->spa_trust_config = B_TRUE; + + /* + * Open and validate the new vdev tree + */ + error = spa_ld_open_vdevs(spa); + if (error != 0) + return (error); + + error = spa_ld_validate_vdevs(spa); + if (error != 0) + return (error); + + if (copy_error != 0 || spa_load_print_vdev_tree) { + spa_load_note(spa, "final vdev tree:"); + vdev_dbgmsg_print_tree(rvd, 2); + } + + if (spa->spa_load_state != SPA_LOAD_TRYIMPORT && + !spa->spa_extreme_rewind && zfs_max_missing_tvds == 0) { /* - * Now that we've validated the config, check the state of the - * root vdev. If it can't be opened, it indicates one or - * more toplevel vdevs are faulted. + * Sanity check to make sure that we are indeed loading the + * latest uberblock. If we missed SPA_SYNC_MIN_VDEVS tvds + * in the config provided and they happened to be the only ones + * to have the latest uberblock, we could involuntarily perform + * an extreme rewind. */ - if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) { - spa_load_failed(spa, "some top vdevs are unavailable"); - return (SET_ERROR(ENXIO)); + healthy_tvds_mos = spa_healthy_core_tvds(spa); + if (healthy_tvds_mos - healthy_tvds >= + SPA_SYNC_MIN_VDEVS) { + spa_load_note(spa, "config provided misses too many " + "top-level vdevs compared to MOS (%lld vs %lld). ", + (u_longlong_t)healthy_tvds, + (u_longlong_t)healthy_tvds_mos); + spa_load_note(spa, "vdev tree:"); + vdev_dbgmsg_print_tree(rvd, 2); + if (reloading) { + spa_load_failed(spa, "config was already " + "provided from MOS. Aborting."); + return (spa_vdev_err(rvd, + VDEV_AUX_CORRUPT_DATA, EIO)); + } + spa_load_note(spa, "spa must be reloaded using MOS " + "config"); + return (SET_ERROR(EAGAIN)); } } + error = spa_check_for_missing_logs(spa); + if (error != 0) + return (spa_vdev_err(rvd, VDEV_AUX_BAD_GUID_SUM, ENXIO)); + + if (rvd->vdev_guid_sum != spa->spa_uberblock.ub_guid_sum) { + spa_load_failed(spa, "uberblock guid sum doesn't match MOS " + "guid sum (%llu != %llu)", + (u_longlong_t)spa->spa_uberblock.ub_guid_sum, + (u_longlong_t)rvd->vdev_guid_sum); + return (spa_vdev_err(rvd, VDEV_AUX_BAD_GUID_SUM, + ENXIO)); + } + return (0); } @@ -2825,62 +2989,6 @@ spa_ld_load_special_directories(spa_t *spa) } static int -spa_ld_prepare_for_reload(spa_t *spa, int orig_mode) -{ - vdev_t *rvd = spa->spa_root_vdev; - - uint64_t hostid; - nvlist_t *policy = NULL; - nvlist_t *mos_config; - - if (load_nvlist(spa, spa->spa_config_object, &mos_config) != 0) { - spa_load_failed(spa, "unable to retrieve MOS config"); - return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); - } - - if (!spa_is_root(spa) && nvlist_lookup_uint64(mos_config, - ZPOOL_CONFIG_HOSTID, &hostid) == 0) { - char *hostname; - unsigned long myhostid = 0; - - VERIFY(nvlist_lookup_string(mos_config, - ZPOOL_CONFIG_HOSTNAME, &hostname) == 0); - -#ifdef _KERNEL - myhostid = zone_get_hostid(NULL); -#else /* _KERNEL */ - /* - * We're emulating the system's hostid in userland, so - * we can't use zone_get_hostid(). - */ - (void) ddi_strtoul(hw_serial, NULL, 10, &myhostid); -#endif /* _KERNEL */ - if (check_hostid && hostid != 0 && myhostid != 0 && - hostid != myhostid) { - nvlist_free(mos_config); - cmn_err(CE_WARN, "pool '%s' could not be " - "loaded as it was last accessed by " - "another system (host: %s hostid: 0x%lx). " - "See: http://illumos.org/msg/ZFS-8000-EY", *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Apr 16 03:47:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DADC9F818C4; Mon, 16 Apr 2018 03:47: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8630B852C7; Mon, 16 Apr 2018 03:47: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 80FD0181C6; Mon, 16 Apr 2018 03:47:54 +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 w3G3lsi9016053; Mon, 16 Apr 2018 03:47:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3lrIN016045; Mon, 16 Apr 2018 03:47:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160347.w3G3lrIN016045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:47: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: r332537 - in stable/11/sys: cddl/contrib/opensolaris/uts/common cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/uts/common/fs/zfs/sys conf X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys: cddl/contrib/opensolaris/uts/common cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/uts/common/fs/zfs/sys conf X-SVN-Commit-Revision: 332537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:47:55 -0000 Author: mav Date: Mon Apr 16 03:47:53 2018 New Revision: 332537 URL: https://svnweb.freebsd.org/changeset/base/332537 Log: MFC r329802: MFV r329799, r329800: 9079 race condition in starting and ending condesing thread for indirect vdevs illumos/illumos-gate@667ec66f1b4f491d5e839644e0912cad1c9e7122 The timeline of the race condition is the following: [1] Thread A is about to finish condesing the first vdev in spa_condense_indirect_thread(), so it calls the spa_condense_indirect_complete_sync() sync task which sets the spa_condensing_indirect field to NULL. Waiting for the sync task to finish, thread A sleeps until the txg is done. When this happens, thread A will acquire spa_async_lock and set spa_condense_thread to NULL. [2] While thread A waits for the txg to finish, thread B which is running spa_sync() checks whether it should condense the second vdev in vdev_indirect_should_condense() by checking the spa_condensing_indirect field which was set to NULL by spa_condense_indirect_thread() from thread A. So it goes on and tries to spawn a new condensing thread in spa_condense_indirect_start_sync() and the aforementioned assertions fails because thread A has not set spa_condense_thread to NULL (which is basically the last thing it does before returning). The main issue here is that we rely on both spa_condensing_indirect and spa_condense_thread to signify whether a condensing thread is running. Ideally we would only use one throughout the codebase. In addition, for managing spa_condense_thread we currently use spa_async_lock which basically tights condensing to scrubing when it comes to pausing and resuming those actions during spa export. Reviewed by: Matt Ahrens Reviewed by: Pavel Zakharov Approved by: Hans Rosenfeld Author: Serapheim Dimitropoulos Added: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h - copied unchanged from r329802, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c - copied unchanged from r329802, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c stable/11/sys/conf/files Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Mon Apr 16 03:45:39 2018 (r332536) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Mon Apr 16 03:47:53 2018 (r332537) @@ -148,7 +148,8 @@ ZFS_COMMON_OBJS += \ zio_compress.o \ zio_inject.o \ zle.o \ - zrlock.o + zrlock.o \ + zthr.o ZFS_SHARED_OBJS += \ zfeature_common.o \ Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:45:39 2018 (r332536) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 03:47:53 2018 (r332537) @@ -1411,6 +1411,12 @@ spa_unload(spa_t *spa) spa->spa_vdev_removal = NULL; } + if (spa->spa_condense_zthr != NULL) { + ASSERT(!zthr_isrunning(spa->spa_condense_zthr)); + zthr_destroy(spa->spa_condense_zthr); + spa->spa_condense_zthr = NULL; + } + spa_condense_fini(spa); bpobj_close(&spa->spa_deferred_bpobj); @@ -2167,6 +2173,16 @@ spa_vdev_err(vdev_t *vdev, vdev_aux_t aux, int err) return (SET_ERROR(err)); } +static void +spa_spawn_aux_threads(spa_t *spa) +{ + ASSERT(spa_writeable(spa)); + + ASSERT(MUTEX_HELD(&spa_namespace_lock)); + + spa_start_indirect_condensing_thread(spa); +} + /* * Fix up config after a partly-completed split. This is done with the * ZPOOL_CONFIG_SPLIT nvlist. Both the splitting pool and the split-off @@ -3574,18 +3590,6 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char ASSERT(spa->spa_load_state != SPA_LOAD_TRYIMPORT); /* - * We must check this before we start the sync thread, because - * we only want to start a condense thread for condense - * operations that were in progress when the pool was - * imported. Once we start syncing, spa_sync() could - * initiate a condense (and start a thread for it). In - * that case it would be wrong to start a second - * condense thread. - */ - boolean_t condense_in_progress = - (spa->spa_condensing_indirect != NULL); - - /* * Traverse the ZIL and claim all blocks. */ spa_ld_claim_log_blocks(spa); @@ -3637,15 +3641,9 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char */ dsl_pool_clean_tmp_userrefs(spa->spa_dsl_pool); - /* - * Note: unlike condensing, we don't need an analogous - * "removal_in_progress" dance because no other thread - * can start a removal while we hold the spa_namespace_lock. - */ spa_restart_removal(spa); - if (condense_in_progress) - spa_condense_indirect_restart(spa); + spa_spawn_aux_threads(spa); } spa_load_note(spa, "LOADED"); @@ -4569,6 +4567,8 @@ spa_create(const char *pool, nvlist_t *nvroot, nvlist_ */ txg_wait_synced(spa->spa_dsl_pool, txg); + spa_spawn_aux_threads(spa); + spa_write_cachefile(spa, B_FALSE, B_TRUE); spa_event_notify(spa, NULL, NULL, ESC_ZFS_POOL_CREATE); @@ -6753,12 +6753,15 @@ spa_async_suspend(spa_t *spa) mutex_enter(&spa->spa_async_lock); spa->spa_async_suspended++; while (spa->spa_async_thread != NULL || - spa->spa_async_thread_vd != NULL || - spa->spa_condense_thread != NULL) + spa->spa_async_thread_vd != NULL) cv_wait(&spa->spa_async_cv, &spa->spa_async_lock); mutex_exit(&spa->spa_async_lock); spa_vdev_remove_suspend(spa); + + zthr_t *condense_thread = spa->spa_condense_zthr; + if (condense_thread != NULL && zthr_isrunning(condense_thread)) + VERIFY0(zthr_cancel(condense_thread)); } void @@ -6769,6 +6772,10 @@ spa_async_resume(spa_t *spa) spa->spa_async_suspended--; mutex_exit(&spa->spa_async_lock); spa_restart_removal(spa); + + zthr_t *condense_thread = spa->spa_condense_zthr; + if (condense_thread != NULL && !zthr_isrunning(condense_thread)) + zthr_resume(condense_thread); } static boolean_t Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Mon Apr 16 03:45:39 2018 (r332536) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Mon Apr 16 03:47:53 2018 (r332537) @@ -44,6 +44,7 @@ #include #include #include +#include #include #ifdef __cplusplus @@ -280,7 +281,7 @@ struct spa { spa_condensing_indirect_phys_t spa_condensing_indirect_phys; spa_condensing_indirect_t *spa_condensing_indirect; - kthread_t *spa_condense_thread; /* thread doing condense. */ + zthr_t *spa_condense_zthr; /* zthr doing condense. */ char *spa_root; /* alternate root directory */ uint64_t spa_ena; /* spa-wide ereport ENA */ Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h Mon Apr 16 03:45:39 2018 (r332536) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h Mon Apr 16 03:47:53 2018 (r332537) @@ -76,7 +76,7 @@ extern int spa_remove_init(spa_t *); extern void spa_restart_removal(spa_t *); extern int spa_condense_init(spa_t *); extern void spa_condense_fini(spa_t *); -extern void spa_condense_indirect_restart(spa_t *); +extern void spa_start_indirect_condensing_thread(spa_t *); extern void spa_vdev_condense_suspend(spa_t *); extern int spa_vdev_remove(spa_t *, uint64_t, boolean_t); extern void free_from_removing_vdev(vdev_t *, uint64_t, uint64_t, uint64_t); Copied: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h (from r329802, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h Mon Apr 16 03:47:53 2018 (r332537, copy of r329802, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h) @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + + +/* + * Copyright (c) 2017 by Delphix. All rights reserved. + */ + +#ifndef _SYS_ZTHR_H +#define _SYS_ZTHR_H + +typedef struct zthr zthr_t; +typedef int (zthr_func_t)(void *, zthr_t *); +typedef boolean_t (zthr_checkfunc_t)(void *, zthr_t *); + +struct zthr { + kthread_t *zthr_thread; + kmutex_t zthr_lock; + kcondvar_t zthr_cv; + boolean_t zthr_cancel; + + zthr_checkfunc_t *zthr_checkfunc; + zthr_func_t *zthr_func; + void *zthr_arg; + int zthr_rc; +}; + +extern zthr_t *zthr_create(zthr_checkfunc_t checkfunc, + zthr_func_t *func, void *arg); +extern void zthr_exit(zthr_t *t, int rc); +extern void zthr_destroy(zthr_t *t); + +extern void zthr_wakeup(zthr_t *t); +extern int zthr_cancel(zthr_t *t); +extern void zthr_resume(zthr_t *t); + +extern boolean_t zthr_iscancelled(zthr_t *t); +extern boolean_t zthr_isrunning(zthr_t *t); + +#endif /* _SYS_ZTHR_H */ Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Mon Apr 16 03:45:39 2018 (r332536) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Mon Apr 16 03:47:53 2018 (r332537) @@ -30,6 +30,8 @@ #include #include #include +#include +#include /* * An indirect vdev corresponds to a vdev that has been removed. Since @@ -475,7 +477,7 @@ spa_condense_indirect_commit_entry(spa_t *spa, static void spa_condense_indirect_generate_new_mapping(vdev_t *vd, - uint32_t *obsolete_counts, uint64_t start_index) + uint32_t *obsolete_counts, uint64_t start_index, zthr_t *zthr) { spa_t *spa = vd->vdev_spa; uint64_t mapi = start_index; @@ -490,7 +492,15 @@ spa_condense_indirect_generate_new_mapping(vdev_t *vd, (u_longlong_t)vd->vdev_id, (u_longlong_t)mapi); - while (mapi < old_num_entries && !spa_shutting_down(spa)) { + while (mapi < old_num_entries) { + + if (zthr_iscancelled(zthr)) { + zfs_dbgmsg("pausing condense of vdev %llu " + "at index %llu", (u_longlong_t)vd->vdev_id, + (u_longlong_t)mapi); + break; + } + vdev_indirect_mapping_entry_phys_t *entry = &old_mapping->vim_entries[mapi]; uint64_t entry_size = DVA_GET_ASIZE(&entry->vimep_dst); @@ -508,18 +518,30 @@ spa_condense_indirect_generate_new_mapping(vdev_t *vd, mapi++; } - if (spa_shutting_down(spa)) { - zfs_dbgmsg("pausing condense of vdev %llu at index %llu", - (u_longlong_t)vd->vdev_id, - (u_longlong_t)mapi); - } } -static void -spa_condense_indirect_thread(void *arg) +/* ARGSUSED */ +static boolean_t +spa_condense_indirect_thread_check(void *arg, zthr_t *zthr) { - vdev_t *vd = arg; - spa_t *spa = vd->vdev_spa; + spa_t *spa = arg; + + return (spa->spa_condensing_indirect != NULL); +} + +/* ARGSUSED */ +static int +spa_condense_indirect_thread(void *arg, zthr_t *zthr) +{ + spa_t *spa = arg; + vdev_t *vd; + + ASSERT3P(spa->spa_condensing_indirect, !=, NULL); + spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); + vd = vdev_lookup_top(spa, spa->spa_condensing_indirect_phys.scip_vdev); + ASSERT3P(vd, !=, NULL); + spa_config_exit(spa, SCL_VDEV, FTAG); + spa_condensing_indirect_t *sci = spa->spa_condensing_indirect; spa_condensing_indirect_phys_t *scip = &spa->spa_condensing_indirect_phys; @@ -593,25 +615,24 @@ spa_condense_indirect_thread(void *arg) } } - spa_condense_indirect_generate_new_mapping(vd, counts, start_index); + spa_condense_indirect_generate_new_mapping(vd, counts, + start_index, zthr); vdev_indirect_mapping_free_obsolete_counts(old_mapping, counts); /* - * We may have bailed early from generate_new_mapping(), if - * the spa is shutting down. In this case, do not complete - * the condense. + * If the zthr has received a cancellation signal while running + * in generate_new_mapping() or at any point after that, then bail + * early. We don't want to complete the condense if the spa is + * shutting down. */ - if (!spa_shutting_down(spa)) { - VERIFY0(dsl_sync_task(spa_name(spa), NULL, - spa_condense_indirect_complete_sync, sci, 0, - ZFS_SPACE_CHECK_NONE)); - } + if (zthr_iscancelled(zthr)) + return (0); - mutex_enter(&spa->spa_async_lock); - spa->spa_condense_thread = NULL; - cv_broadcast(&spa->spa_async_cv); - mutex_exit(&spa->spa_async_lock); + VERIFY0(dsl_sync_task(spa_name(spa), NULL, + spa_condense_indirect_complete_sync, sci, 0, ZFS_SPACE_CHECK_NONE)); + + return (0); thread_exit(); } @@ -665,9 +686,7 @@ spa_condense_indirect_start_sync(vdev_t *vd, dmu_tx_t (u_longlong_t)scip->scip_prev_obsolete_sm_object, (u_longlong_t)scip->scip_next_mapping_object); - ASSERT3P(spa->spa_condense_thread, ==, NULL); - spa->spa_condense_thread = thread_create(NULL, 0, - spa_condense_indirect_thread, vd, 0, &p0, TS_RUN, minclsyspri); + zthr_wakeup(spa->spa_condense_zthr); } /* @@ -744,24 +763,12 @@ spa_condense_fini(spa_t *spa) } } -/* - * Restart the condense - called when the pool is opened. - */ void -spa_condense_indirect_restart(spa_t *spa) +spa_start_indirect_condensing_thread(spa_t *spa) { - vdev_t *vd; - ASSERT(spa->spa_condensing_indirect != NULL); - spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); - vd = vdev_lookup_top(spa, - spa->spa_condensing_indirect_phys.scip_vdev); - ASSERT(vd != NULL); - spa_config_exit(spa, SCL_VDEV, FTAG); - - ASSERT3P(spa->spa_condense_thread, ==, NULL); - spa->spa_condense_thread = thread_create(NULL, 0, - spa_condense_indirect_thread, vd, 0, &p0, TS_RUN, - minclsyspri); + ASSERT3P(spa->spa_condense_zthr, ==, NULL); + spa->spa_condense_zthr = zthr_create(spa_condense_indirect_thread_check, + spa_condense_indirect_thread, spa); } /* Copied: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c (from r329802, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c Mon Apr 16 03:47:53 2018 (r332537, copy of r329802, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c) @@ -0,0 +1,319 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2017 by Delphix. All rights reserved. + */ + +/* + * ZTHR Infrastructure + * =================== + * + * ZTHR threads are used for isolated operations that span multiple txgs + * within a SPA. They generally exist from SPA creation/loading and until + * the SPA is exported/destroyed. The ideal requirements for an operation + * to be modeled with a zthr are the following: + * + * 1] The operation needs to run over multiple txgs. + * 2] There is be a single point of reference in memory or on disk that + * indicates whether the operation should run/is running or is + * stopped. + * + * If the operation satisfies the above then the following rules guarantee + * a certain level of correctness: + * + * 1] Any thread EXCEPT the zthr changes the work indicator from stopped + * to running but not the opposite. + * 2] Only the zthr can change the work indicator from running to stopped + * (e.g. when it is done) but not the opposite. + * + * This way a normal zthr cycle should go like this: + * + * 1] An external thread changes the work indicator from stopped to + * running and wakes up the zthr. + * 2] The zthr wakes up, checks the indicator and starts working. + * 3] When the zthr is done, it changes the indicator to stopped, allowing + * a new cycle to start. + * + * == ZTHR creation + * + * Every zthr needs three inputs to start running: + * + * 1] A user-defined checker function (checkfunc) that decides whether + * the zthr should start working or go to sleep. The function should + * return TRUE when the zthr needs to work or FALSE to let it sleep, + * and should adhere to the following signature: + * boolean_t checkfunc_name(void *args, zthr_t *t); + * + * 2] A user-defined ZTHR function (func) which the zthr executes when + * it is not sleeping. The function should adhere to the following + * signature type: + * int func_name(void *args, zthr_t *t); + * + * 3] A void args pointer that will be passed to checkfunc and func + * implicitly by the infrastructure. + * + * The reason why the above API needs two different functions, + * instead of one that both checks and does the work, has to do with + * the zthr's internal lock (zthr_lock) and the allowed cancellation + * windows. We want to hold the zthr_lock while running checkfunc + * but not while running func. This way the zthr can be cancelled + * while doing work and not while checking for work. + * + * To start a zthr: + * zthr_t *zthr_pointer = zthr_create(checkfunc, func, args); + * + * After that you should be able to wakeup, cancel, and resume the + * zthr from another thread using zthr_pointer. + * + * NOTE: ZTHR threads could potentially wake up spuriously and the + * user should take this into account when writing a checkfunc. + * [see ZTHR state transitions] + * + * == ZTHR cancellation + * + * ZTHR threads must be cancelled when their SPA is being exported + * or when they need to be paused so they don't interfere with other + * operations. + * + * To cancel a zthr: + * zthr_cancel(zthr_pointer); + * + * To resume it: + * zthr_resume(zthr_pointer); + * + * A zthr will implicitly check if it has received a cancellation + * signal every time func returns and everytime it wakes up [see ZTHR + * state transitions below]. + * + * At times, waiting for the zthr's func to finish its job may take + * time. This may be very time-consuming for some operations that + * need to cancel the SPA's zthrs (e.g spa_export). For this scenario + * the user can explicitly make their ZTHR function aware of incoming + * cancellation signals using zthr_iscancelled(). A common pattern for + * that looks like this: + * + * int + * func_name(void *args, zthr_t *t) + * { + * ... ... + * while (!work_done && !zthr_iscancelled(t)) { + * ... ... + * } + * return (0); + * } + * + * == ZTHR exit + * + * For the rare cases where the zthr wants to stop running voluntarily + * while running its ZTHR function (func), we provide zthr_exit(). + * When a zthr has voluntarily stopped running, it can be resumed with + * zthr_resume(), just like it would if it was cancelled by some other + * thread. + * + * == ZTHR cleanup + * + * Cancelling a zthr doesn't clean up its metadata (internal locks, + * function pointers to func and checkfunc, etc..). This is because + * we want to keep them around in case we want to resume the execution + * of the zthr later. Similarly for zthrs that exit themselves. + * + * To completely cleanup a zthr, cancel it first to ensure that it + * is not running and then use zthr_destroy(). + * + * == ZTHR state transitions + * + * zthr creation + * + + * | + * | woke up + * | +--------------+ sleep + * | | ^ + * | | | + * | | | FALSE + * | | | + * v v FALSE + + * cancelled? +---------> checkfunc? + * + ^ + + * | | | + * | | | TRUE + * | | | + * | | func returned v + * | +---------------+ func + * | + * | TRUE + * | + * v + * zthr stopped running + * + */ + +#include +#include + +void +zthr_exit(zthr_t *t, int rc) +{ + ASSERT3P(t->zthr_thread, ==, curthread); + mutex_enter(&t->zthr_lock); + t->zthr_thread = NULL; + t->zthr_rc = rc; + cv_broadcast(&t->zthr_cv); + mutex_exit(&t->zthr_lock); + thread_exit(); +} + +static void +zthr_procedure(void *arg) +{ + zthr_t *t = arg; + int rc = 0; + + mutex_enter(&t->zthr_lock); + while (!t->zthr_cancel) { + if (t->zthr_checkfunc(t->zthr_arg, t)) { + mutex_exit(&t->zthr_lock); + rc = t->zthr_func(t->zthr_arg, t); + mutex_enter(&t->zthr_lock); + } else { + /* go to sleep */ + cv_wait(&t->zthr_cv, &t->zthr_lock); + } + } + mutex_exit(&t->zthr_lock); + + zthr_exit(t, rc); +} + +zthr_t * +zthr_create(zthr_checkfunc_t *checkfunc, zthr_func_t *func, void *arg) +{ + zthr_t *t = kmem_zalloc(sizeof (*t), KM_SLEEP); + mutex_init(&t->zthr_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(&t->zthr_cv, NULL, CV_DEFAULT, NULL); + + mutex_enter(&t->zthr_lock); + t->zthr_checkfunc = checkfunc; + t->zthr_func = func; + t->zthr_arg = arg; + + t->zthr_thread = thread_create(NULL, 0, zthr_procedure, t, + 0, &p0, TS_RUN, minclsyspri); + mutex_exit(&t->zthr_lock); + + return (t); +} + +void +zthr_destroy(zthr_t *t) +{ + VERIFY3P(t->zthr_thread, ==, NULL); + mutex_destroy(&t->zthr_lock); + cv_destroy(&t->zthr_cv); + kmem_free(t, sizeof (*t)); +} + +/* + * Note: If the zthr is not sleeping and misses the wakeup + * (e.g it is running its ZTHR function), it will check if + * there is work to do before going to sleep using its checker + * function [see ZTHR state transition in ZTHR block comment]. + * Thus, missing the wakeup still yields the expected behavior. + */ +void +zthr_wakeup(zthr_t *t) +{ + ASSERT3P(t->zthr_thread, !=, NULL); + + mutex_enter(&t->zthr_lock); + cv_broadcast(&t->zthr_cv); + mutex_exit(&t->zthr_lock); +} + +/* + * Note: If the zthr is not running (e.g. has been cancelled + * already), this is a no-op. + */ +int +zthr_cancel(zthr_t *t) +{ + int rc = 0; + + mutex_enter(&t->zthr_lock); + + /* broadcast in case the zthr is sleeping */ + cv_broadcast(&t->zthr_cv); + + t->zthr_cancel = B_TRUE; + while (t->zthr_thread != NULL) + cv_wait(&t->zthr_cv, &t->zthr_lock); + t->zthr_cancel = B_FALSE; + rc = t->zthr_rc; + mutex_exit(&t->zthr_lock); + + return (rc); +} + +void +zthr_resume(zthr_t *t) +{ + ASSERT3P(t->zthr_thread, ==, NULL); + + mutex_enter(&t->zthr_lock); + + ASSERT3P(&t->zthr_checkfunc, !=, NULL); + ASSERT3P(&t->zthr_func, !=, NULL); + ASSERT(!t->zthr_cancel); + + t->zthr_thread = thread_create(NULL, 0, zthr_procedure, t, + 0, &p0, TS_RUN, minclsyspri); + + mutex_exit(&t->zthr_lock); +} + +/* + * This function is intended to be used by the zthr itself + * to check if another thread has signal it to stop running. + * + * returns TRUE if we are in the middle of trying to cancel + * this thread. + * + * returns FALSE otherwise. + */ +boolean_t +zthr_iscancelled(zthr_t *t) +{ + boolean_t cancelled; + + ASSERT3P(t->zthr_thread, ==, curthread); + + mutex_enter(&t->zthr_lock); + cancelled = t->zthr_cancel; + mutex_exit(&t->zthr_lock); + + return (cancelled); +} + +boolean_t +zthr_isrunning(zthr_t *t) +{ + boolean_t running; + + mutex_enter(&t->zthr_lock); + running = (t->zthr_thread != NULL); + mutex_exit(&t->zthr_lock); + + return (running); +} Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Mon Apr 16 03:45:39 2018 (r332536) +++ stable/11/sys/conf/files Mon Apr 16 03:47:53 2018 (r332537) @@ -259,6 +259,7 @@ cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compres cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zle.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c optional zfs compile-with "${ZFS_C}" +cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/callb.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/fm.c optional zfs compile-with "${ZFS_C}" From owner-svn-src-all@freebsd.org Mon Apr 16 03:48:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF418F81A09; Mon, 16 Apr 2018 03:48:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 731D085B95; Mon, 16 Apr 2018 03:48:37 +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 6E10F181CA; Mon, 16 Apr 2018 03:48:37 +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 w3G3mbjd016133; Mon, 16 Apr 2018 03:48:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3mbDs016132; Mon, 16 Apr 2018 03:48:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160348.w3G3mbDs016132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:48: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: r332538 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:48:38 -0000 Author: mav Date: Mon Apr 16 03:48:37 2018 New Revision: 332538 URL: https://svnweb.freebsd.org/changeset/base/332538 Log: MFC r329805: MFV r329803: 9080 recursive enter of vdev_indirect_rwlock from vdev_indirect_remap() illumos/illumos-gate@bdfded42e66b9fc1395ff2401aa2952f7c44ae34 A scenario came up where a callback executed by vdev_indirect_remap() on a vdev, calls vdev_indirect_remap() on the same vdev and tries to reacquire vdev_indirect_rwlock that was already acquired from the first call to vdev_indirect_remap(). The specific scenario, is that we want to remap a block pointer that is snapshoted but its dataset's remap_deadlist is not cached. So in order to add it we issue a read through a vdev_indirect_remap() on the same vdev, which brings up the aforementioned issue. Reviewed by: Matthew Ahrens Reviewed by: George Wilson Approved by: Hans Rosenfeld Author: Serapheim Dimitropoulos Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Mon Apr 16 03:47:53 2018 (r332537) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Mon Apr 16 03:48:37 2018 (r332538) @@ -14,7 +14,7 @@ */ /* - * Copyright (c) 2014, 2015 by Delphix. All rights reserved. + * Copyright (c) 2014, 2017 by Delphix. All rights reserved. */ #include @@ -854,6 +854,57 @@ rs_alloc(vdev_t *vd, uint64_t offset, uint64_t asize, } /* + * Given an indirect vdev and an extent on that vdev, it duplicates the + * physical entries of the indirect mapping that correspond to the extent + * to a new array and returns a pointer to it. In addition, copied_entries + * is populated with the number of mapping entries that were duplicated. + * + * Note that the function assumes that the caller holds vdev_indirect_rwlock. + * This ensures that the mapping won't change due to condensing as we + * copy over its contents. + * + * Finally, since we are doing an allocation, it is up to the caller to + * free the array allocated in this function. + */ +vdev_indirect_mapping_entry_phys_t * +vdev_indirect_mapping_duplicate_adjacent_entries(vdev_t *vd, uint64_t offset, + uint64_t asize, uint64_t *copied_entries) +{ + vdev_indirect_mapping_entry_phys_t *duplicate_mappings = NULL; + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + uint64_t entries = 0; + + ASSERT(RW_READ_HELD(&vd->vdev_indirect_rwlock)); + + vdev_indirect_mapping_entry_phys_t *first_mapping = + vdev_indirect_mapping_entry_for_offset(vim, offset); + ASSERT3P(first_mapping, !=, NULL); + + vdev_indirect_mapping_entry_phys_t *m = first_mapping; + while (asize > 0) { + uint64_t size = DVA_GET_ASIZE(&m->vimep_dst); + + ASSERT3U(offset, >=, DVA_MAPPING_GET_SRC_OFFSET(m)); + ASSERT3U(offset, <, DVA_MAPPING_GET_SRC_OFFSET(m) + size); + + uint64_t inner_offset = offset - DVA_MAPPING_GET_SRC_OFFSET(m); + uint64_t inner_size = MIN(asize, size - inner_offset); + + offset += inner_size; + asize -= inner_size; + entries++; + m++; + } + + size_t copy_length = entries * sizeof (*first_mapping); + duplicate_mappings = kmem_alloc(copy_length, KM_SLEEP); + bcopy(first_mapping, duplicate_mappings, copy_length); + *copied_entries = entries; + + return (duplicate_mappings); +} + +/* * Goes through the relevant indirect mappings until it hits a concrete vdev * and issues the callback. On the way to the concrete vdev, if any other * indirect vdevs are encountered, then the callback will also be called on @@ -893,24 +944,42 @@ vdev_indirect_remap(vdev_t *vd, uint64_t offset, uint6 for (remap_segment_t *rs = rs_alloc(vd, offset, asize, 0); rs != NULL; rs = list_remove_head(&stack)) { vdev_t *v = rs->rs_vd; + uint64_t num_entries = 0; + ASSERT(spa_config_held(spa, SCL_ALL, RW_READER) != 0); + ASSERT(rs->rs_asize > 0); + /* - * Note: this can be called from open context - * (eg. zio_read()), so we need the rwlock to prevent - * the mapping from being changed by condensing. + * Note: As this function can be called from open context + * (e.g. zio_read()), we need the following rwlock to + * prevent the mapping from being changed by condensing. + * + * So we grab the lock and we make a copy of the entries + * that are relevant to the extent that we are working on. + * Once that is done, we drop the lock and iterate over + * our copy of the mapping. Once we are done with the with + * the remap segment and we free it, we also free our copy + * of the indirect mapping entries that are relevant to it. + * + * This way we don't need to wait until the function is + * finished with a segment, to condense it. In addition, we + * don't need a recursive rwlock for the case that a call to + * vdev_indirect_remap() needs to call itself (through the + * codepath of its callback) for the same vdev in the middle + * of its execution. */ rw_enter(&v->vdev_indirect_rwlock, RW_READER); vdev_indirect_mapping_t *vim = v->vdev_indirect_mapping; ASSERT3P(vim, !=, NULL); - ASSERT(spa_config_held(spa, SCL_ALL, RW_READER) != 0); - ASSERT(rs->rs_asize > 0); - vdev_indirect_mapping_entry_phys_t *mapping = - vdev_indirect_mapping_entry_for_offset(vim, rs->rs_offset); + vdev_indirect_mapping_duplicate_adjacent_entries(v, + rs->rs_offset, rs->rs_asize, &num_entries); ASSERT3P(mapping, !=, NULL); + ASSERT3U(num_entries, >, 0); + rw_exit(&v->vdev_indirect_rwlock); - while (rs->rs_asize > 0) { + for (uint64_t i = 0; i < num_entries; i++) { /* * Note: the vdev_indirect_mapping can not change * while we are running. It only changes while the @@ -919,20 +988,23 @@ vdev_indirect_remap(vdev_t *vd, uint64_t offset, uint6 * function is only called for frees, which also only * happen from syncing context. */ + vdev_indirect_mapping_entry_phys_t *m = &mapping[i]; - uint64_t size = DVA_GET_ASIZE(&mapping->vimep_dst); - uint64_t dst_offset = - DVA_GET_OFFSET(&mapping->vimep_dst); - uint64_t dst_vdev = DVA_GET_VDEV(&mapping->vimep_dst); + ASSERT3P(m, !=, NULL); + ASSERT3U(rs->rs_asize, >, 0); + uint64_t size = DVA_GET_ASIZE(&m->vimep_dst); + uint64_t dst_offset = DVA_GET_OFFSET(&m->vimep_dst); + uint64_t dst_vdev = DVA_GET_VDEV(&m->vimep_dst); + ASSERT3U(rs->rs_offset, >=, - DVA_MAPPING_GET_SRC_OFFSET(mapping)); + DVA_MAPPING_GET_SRC_OFFSET(m)); ASSERT3U(rs->rs_offset, <, - DVA_MAPPING_GET_SRC_OFFSET(mapping) + size); + DVA_MAPPING_GET_SRC_OFFSET(m) + size); ASSERT3U(dst_vdev, !=, v->vdev_id); uint64_t inner_offset = rs->rs_offset - - DVA_MAPPING_GET_SRC_OFFSET(mapping); + DVA_MAPPING_GET_SRC_OFFSET(m); uint64_t inner_size = MIN(rs->rs_asize, size - inner_offset); @@ -973,10 +1045,10 @@ vdev_indirect_remap(vdev_t *vd, uint64_t offset, uint6 rs->rs_offset += inner_size; rs->rs_asize -= inner_size; rs->rs_split_offset += inner_size; - mapping++; } + VERIFY0(rs->rs_asize); - rw_exit(&v->vdev_indirect_rwlock); + kmem_free(mapping, num_entries * sizeof (*mapping)); kmem_free(rs, sizeof (remap_segment_t)); } list_destroy(&stack); From owner-svn-src-all@freebsd.org Mon Apr 16 03:49:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5E3AF81B3A; Mon, 16 Apr 2018 03:49: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98F93863DF; Mon, 16 Apr 2018 03:49:27 +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 9394A181CB; Mon, 16 Apr 2018 03:49:27 +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 w3G3nRtJ016218; Mon, 16 Apr 2018 03:49:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3nRkf016216; Mon, 16 Apr 2018 03:49:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160349.w3G3nRkf016216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:49: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: r332539 - stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 332539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:49:28 -0000 Author: mav Date: Mon Apr 16 03:49:27 2018 New Revision: 332539 URL: https://svnweb.freebsd.org/changeset/base/332539 Log: MFC r329808: MFV r329807: 8940 Sending an intra-pool resumable send stream may result in EXDEV illumos/illumos-gate@544132fce3fa6583f01318f9559adc46614343a7 "zfs send -t " for an incremental send should be able to resume successfully when sending to the same pool: a subtle issue in zfs_iter_children() doesn't currently allow this. Because resuming from a token requires "guid" -> "dataset" mapping (guid_to_name()), we have to walk the whole hierarchy to find the right snapshots to send. When resuming an incremental send both source and destination live in the same pool and have the same guid: this is where zfs_iter_children() gets confused and picks up the wrong snapshot, so we end up trying to send an incremental "destination@snap1 -> source@snap2" stream instead of "source@snap1 -> source@snap2": this fails with an "Invalid cross-device link" (EXDEV) error. Reviewed by: Paul Dagnelie Reviewed by: Matthew Ahrens Approved by: Hans Rosenfeld Author: loli10K Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Mon Apr 16 03:48:37 2018 (r332538) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Mon Apr 16 03:49:27 2018 (r332539) @@ -424,16 +424,20 @@ zfs_iter_snapspec(zfs_handle_t *fs_zhp, const char *sp /* * Iterate over all children, snapshots and filesystems + * Process snapshots before filesystems because they are nearer the input + * handle: this is extremely important when used with zfs_iter_f functions + * looking for data, following the logic that we would like to find it as soon + * and as close as possible. */ int zfs_iter_children(zfs_handle_t *zhp, zfs_iter_f func, void *data) { int ret; - if ((ret = zfs_iter_filesystems(zhp, func, data)) != 0) + if ((ret = zfs_iter_snapshots(zhp, B_FALSE, func, data)) != 0) return (ret); - return (zfs_iter_snapshots(zhp, B_FALSE, func, data)); + return (zfs_iter_filesystems(zhp, func, data)); } Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Mon Apr 16 03:48:37 2018 (r332538) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Mon Apr 16 03:49:27 2018 (r332539) @@ -1585,6 +1585,7 @@ zfs_send_resume(libzfs_handle_t *hdl, sendflags_t *fla int error = 0; char name[ZFS_MAX_DATASET_NAME_LEN]; enum lzc_send_flags lzc_flags = 0; + FILE *fout = (flags->verbose && flags->dryrun) ? stdout : stderr; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot resume send")); @@ -1599,9 +1600,9 @@ zfs_send_resume(libzfs_handle_t *hdl, sendflags_t *fla return (zfs_error(hdl, EZFS_FAULT, errbuf)); } if (flags->verbose) { - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + (void) fprintf(fout, dgettext(TEXT_DOMAIN, "resume token contents:\n")); - nvlist_print(stderr, resume_nvl); + nvlist_print(fout, resume_nvl); } if (nvlist_lookup_string(resume_nvl, "toname", &toname) != 0 || @@ -1658,7 +1659,7 @@ zfs_send_resume(libzfs_handle_t *hdl, sendflags_t *fla lzc_flags, &size); if (error == 0) size = MAX(0, (int64_t)(size - bytes)); - send_print_verbose(stderr, zhp->zfs_name, fromname, + send_print_verbose(fout, zhp->zfs_name, fromname, size, flags->parsable); } From owner-svn-src-all@freebsd.org Mon Apr 16 03:52:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E316F820A3; Mon, 16 Apr 2018 03:52:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1769586D05; Mon, 16 Apr 2018 03:52:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB93718354; Mon, 16 Apr 2018 03:52:55 +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 w3G3qtm7020787; Mon, 16 Apr 2018 03:52:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3qsqA020776; Mon, 16 Apr 2018 03:52:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160352.w3G3qsqA020776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:52: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: r332540 - in stable/11: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/contrib/opensolaris/uts/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensola... X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/contrib/opensolaris/uts/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys... X-SVN-Commit-Revision: 332540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:52:57 -0000 Author: mav Date: Mon Apr 16 03:52:54 2018 New Revision: 332540 URL: https://svnweb.freebsd.org/changeset/base/332540 Log: MFC r331404: MFV r331400: 8484 Implement aggregate sum and use for arc counters In pursuit of improving performance on multi-core systems, we should implements fanned out counters and use them to improve the performance of some of the arc statistics. These stats are updated extremely frequently, and can consume a significant amount of CPU time. Reviewed by: Pavel Zakharov Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: Paul Dagnelie Added: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash - copied unchanged from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash.descrip - copied unchanged from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash.descrip stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c - copied unchanged from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c - copied unchanged from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h - copied unchanged from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/cityhash.h - copied unchanged from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/cityhash.h Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h stable/11/sys/conf/files Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Apr 16 03:49:27 2018 (r332539) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Apr 16 03:52:54 2018 (r332540) @@ -559,6 +559,7 @@ extern void delay(clock_t ticks); } while (0); #define max_ncpus 64 +#define boot_ncpus (sysconf(_SC_NPROCESSORS_ONLN)) #define minclsyspri 60 #define maxclsyspri 99 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Mon Apr 16 03:49:27 2018 (r332539) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Mon Apr 16 03:52:54 2018 (r332540) @@ -63,12 +63,14 @@ LUA_OBJS += \ ZFS_COMMON_OBJS += \ abd.o \ + aggsum.o \ arc.o \ bplist.o \ blkptr.o \ bpobj.o \ bptree.o \ bqueue.o \ + cityhash.o \ dbuf.o \ ddt.o \ ddt_zap.o \ Copied: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash (from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash Mon Apr 16 03:52:54 2018 (r332540, copy of r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash) @@ -0,0 +1,19 @@ +Copyright (c) 2011 Google, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. Copied: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash.descrip (from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash.descrip) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash.descrip Mon Apr 16 03:52:54 2018 (r332540, copy of r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.cityhash.descrip) @@ -0,0 +1 @@ +CITYHASH CHECKSUM FUNCTIONALITY IN ZFS Copied: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c (from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c Mon Apr 16 03:52:54 2018 (r332540, copy of r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c) @@ -0,0 +1,232 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2017 by Delphix. All rights reserved. + */ + +#include +#include + +/* + * Aggregate-sum counters are a form of fanned-out counter, used when atomic + * instructions on a single field cause enough CPU cache line contention to + * slow system performance. Due to their increased overhead and the expense + * involved with precisely reading from them, they should only be used in cases + * where the write rate (increment/decrement) is much higher than the read rate + * (get value). + * + * Aggregate sum counters are comprised of two basic parts, the core and the + * buckets. The core counter contains a lock for the entire counter, as well + * as the current upper and lower bounds on the value of the counter. The + * aggsum_bucket structure contains a per-bucket lock to protect the contents of + * the bucket, the current amount that this bucket has changed from the global + * counter (called the delta), and the amount of increment and decrement we have + * "borrowed" from the core counter. + * + * The basic operation of an aggsum is simple. Threads that wish to modify the + * counter will modify one bucket's counter (determined by their current CPU, to + * help minimize lock and cache contention). If the bucket already has + * sufficient capacity borrowed from the core structure to handle their request, + * they simply modify the delta and return. If the bucket does not, we clear + * the bucket's current state (to prevent the borrowed amounts from getting too + * large), and borrow more from the core counter. Borrowing is done by adding to + * the upper bound (or subtracting from the lower bound) of the core counter, + * and setting the borrow value for the bucket to the amount added (or + * subtracted). Clearing the bucket is the opposite; we add the current delta + * to both the lower and upper bounds of the core counter, subtract the borrowed + * incremental from the upper bound, and add the borrowed decrement from the + * lower bound. Note that only borrowing and clearing require access to the + * core counter; since all other operations access CPU-local resources, + * performance can be much higher than a traditional counter. + * + * Threads that wish to read from the counter have a slightly more challenging + * task. It is fast to determine the upper and lower bounds of the aggum; this + * does not require grabbing any locks. This suffices for cases where an + * approximation of the aggsum's value is acceptable. However, if one needs to + * know whether some specific value is above or below the current value in the + * aggsum, they invoke aggsum_compare(). This function operates by repeatedly + * comparing the target value to the upper and lower bounds of the aggsum, and + * then clearing a bucket. This proceeds until the target is outside of the + * upper and lower bounds and we return a response, or the last bucket has been + * cleared and we know that the target is equal to the aggsum's value. Finally, + * the most expensive operation is determining the precise value of the aggsum. + * To do this, we clear every bucket and then return the upper bound (which must + * be equal to the lower bound). What makes aggsum_compare() and aggsum_value() + * expensive is clearing buckets. This involves grabbing the global lock + * (serializing against themselves and borrow operations), grabbing a bucket's + * lock (preventing threads on those CPUs from modifying their delta), and + * zeroing out the borrowed value (forcing that thread to borrow on its next + * request, which will also be expensive). This is what makes aggsums well + * suited for write-many read-rarely operations. + */ + +/* + * We will borrow aggsum_borrow_multiplier times the current request, so we will + * have to get the as_lock approximately every aggsum_borrow_multiplier calls to + * aggsum_delta(). + */ +static uint_t aggsum_borrow_multiplier = 10; + +void +aggsum_init(aggsum_t *as, uint64_t value) +{ + bzero(as, sizeof (*as)); + as->as_lower_bound = as->as_upper_bound = value; + mutex_init(&as->as_lock, NULL, MUTEX_DEFAULT, NULL); + as->as_numbuckets = boot_ncpus; + as->as_buckets = kmem_zalloc(boot_ncpus * sizeof (aggsum_bucket_t), + KM_SLEEP); + for (int i = 0; i < as->as_numbuckets; i++) { + mutex_init(&as->as_buckets[i].asc_lock, + NULL, MUTEX_DEFAULT, NULL); + } +} + +void +aggsum_fini(aggsum_t *as) +{ + for (int i = 0; i < as->as_numbuckets; i++) + mutex_destroy(&as->as_buckets[i].asc_lock); + mutex_destroy(&as->as_lock); +} + +int64_t +aggsum_lower_bound(aggsum_t *as) +{ + return (as->as_lower_bound); +} + +int64_t +aggsum_upper_bound(aggsum_t *as) +{ + return (as->as_upper_bound); +} + +static void +aggsum_flush_bucket(aggsum_t *as, struct aggsum_bucket *asb) +{ + ASSERT(MUTEX_HELD(&as->as_lock)); + ASSERT(MUTEX_HELD(&asb->asc_lock)); + + /* + * We use atomic instructions for this because we read the upper and + * lower bounds without the lock, so we need stores to be atomic. + */ + atomic_add_64((volatile uint64_t *)&as->as_lower_bound, asb->asc_delta); + atomic_add_64((volatile uint64_t *)&as->as_upper_bound, asb->asc_delta); + asb->asc_delta = 0; + atomic_add_64((volatile uint64_t *)&as->as_upper_bound, + -asb->asc_borrowed); + atomic_add_64((volatile uint64_t *)&as->as_lower_bound, + asb->asc_borrowed); + asb->asc_borrowed = 0; +} + +uint64_t +aggsum_value(aggsum_t *as) +{ + int64_t rv; + + mutex_enter(&as->as_lock); + if (as->as_lower_bound == as->as_upper_bound) { + rv = as->as_lower_bound; + for (int i = 0; i < as->as_numbuckets; i++) { + ASSERT0(as->as_buckets[i].asc_delta); + ASSERT0(as->as_buckets[i].asc_borrowed); + } + mutex_exit(&as->as_lock); + return (rv); + } + for (int i = 0; i < as->as_numbuckets; i++) { + struct aggsum_bucket *asb = &as->as_buckets[i]; + mutex_enter(&asb->asc_lock); + aggsum_flush_bucket(as, asb); + mutex_exit(&asb->asc_lock); + } + VERIFY3U(as->as_lower_bound, ==, as->as_upper_bound); + rv = as->as_lower_bound; + mutex_exit(&as->as_lock); + + return (rv); +} + +static void +aggsum_borrow(aggsum_t *as, int64_t delta, struct aggsum_bucket *asb) +{ + int64_t abs_delta = (delta < 0 ? -delta : delta); + mutex_enter(&as->as_lock); + mutex_enter(&asb->asc_lock); + + aggsum_flush_bucket(as, asb); + + atomic_add_64((volatile uint64_t *)&as->as_upper_bound, abs_delta); + atomic_add_64((volatile uint64_t *)&as->as_lower_bound, -abs_delta); + asb->asc_borrowed = abs_delta; + + mutex_exit(&asb->asc_lock); + mutex_exit(&as->as_lock); +} + +void +aggsum_add(aggsum_t *as, int64_t delta) +{ + struct aggsum_bucket *asb = + &as->as_buckets[CPU_SEQID % as->as_numbuckets]; + + for (;;) { + mutex_enter(&asb->asc_lock); + if (asb->asc_delta + delta <= (int64_t)asb->asc_borrowed && + asb->asc_delta + delta >= -(int64_t)asb->asc_borrowed) { + asb->asc_delta += delta; + mutex_exit(&asb->asc_lock); + return; + } + mutex_exit(&asb->asc_lock); + aggsum_borrow(as, delta * aggsum_borrow_multiplier, asb); + } +} + +/* + * Compare the aggsum value to target efficiently. Returns -1 if the value + * represented by the aggsum is less than target, 1 if it's greater, and 0 if + * they are equal. + */ +int +aggsum_compare(aggsum_t *as, uint64_t target) +{ + if (as->as_upper_bound < target) + return (-1); + if (as->as_lower_bound > target) + return (1); + mutex_enter(&as->as_lock); + for (int i = 0; i < as->as_numbuckets; i++) { + struct aggsum_bucket *asb = &as->as_buckets[i]; + mutex_enter(&asb->asc_lock); + aggsum_flush_bucket(as, asb); + mutex_exit(&asb->asc_lock); + if (as->as_upper_bound < target) { + mutex_exit(&as->as_lock); + return (-1); + } + if (as->as_lower_bound > target) { + mutex_exit(&as->as_lock); + return (1); + } + } + VERIFY3U(as->as_lower_bound, ==, as->as_upper_bound); + ASSERT3U(as->as_lower_bound, ==, target); + mutex_exit(&as->as_lock); + return (0); +} Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 03:49:27 2018 (r332539) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 03:52:54 2018 (r332540) @@ -275,6 +275,8 @@ #include #include #include +#include +#include #include @@ -561,6 +563,7 @@ typedef struct arc_stats { kstat_named_t arcstat_c; kstat_named_t arcstat_c_min; kstat_named_t arcstat_c_max; + /* Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_size; /* * Number of compressed bytes stored in the arc_buf_hdr_t's b_pabd. @@ -589,12 +592,14 @@ typedef struct arc_stats { * (allocated via arc_buf_hdr_t_full and arc_buf_hdr_t_l2only * caches), and arc_buf_t structures (allocated via arc_buf_t * cache). + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_hdr_size; /* * Number of bytes consumed by ARC buffers of type equal to * ARC_BUFC_DATA. This is generally consumed by buffers backing * on disk user data (e.g. plain file contents). + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_data_size; /* @@ -602,6 +607,7 @@ typedef struct arc_stats { * ARC_BUFC_METADATA. This is generally consumed by buffers * backing on disk data that is used for internal ZFS * structures (e.g. ZAP, dnode, indirect blocks, etc). + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_metadata_size; /* @@ -610,6 +616,7 @@ typedef struct arc_stats { * buffers (allocated directly via zio_buf_* functions), * dmu_buf_impl_t structures (allocated via dmu_buf_impl_t * cache), and dnode_t structures (allocated via dnode_t cache). + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_other_size; /* @@ -617,6 +624,7 @@ typedef struct arc_stats { * arc_anon state. This includes *all* buffers in the arc_anon * state; e.g. data, metadata, evictable, and unevictable buffers * are all included in this value. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_anon_size; /* @@ -624,6 +632,7 @@ typedef struct arc_stats { * following criteria: backing buffers of type ARC_BUFC_DATA, * residing in the arc_anon state, and are eligible for eviction * (e.g. have no outstanding holds on the buffer). + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_anon_evictable_data; /* @@ -631,6 +640,7 @@ typedef struct arc_stats { * following criteria: backing buffers of type ARC_BUFC_METADATA, * residing in the arc_anon state, and are eligible for eviction * (e.g. have no outstanding holds on the buffer). + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_anon_evictable_metadata; /* @@ -638,6 +648,7 @@ typedef struct arc_stats { * arc_mru state. This includes *all* buffers in the arc_mru * state; e.g. data, metadata, evictable, and unevictable buffers * are all included in this value. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mru_size; /* @@ -645,6 +656,7 @@ typedef struct arc_stats { * following criteria: backing buffers of type ARC_BUFC_DATA, * residing in the arc_mru state, and are eligible for eviction * (e.g. have no outstanding holds on the buffer). + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mru_evictable_data; /* @@ -652,6 +664,7 @@ typedef struct arc_stats { * following criteria: backing buffers of type ARC_BUFC_METADATA, * residing in the arc_mru state, and are eligible for eviction * (e.g. have no outstanding holds on the buffer). + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mru_evictable_metadata; /* @@ -662,18 +675,21 @@ typedef struct arc_stats { * don't actually have ARC buffers linked off of these headers. * Thus, *if* the headers had associated ARC buffers, these * buffers *would have* consumed this number of bytes. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mru_ghost_size; /* * Number of bytes that *would have been* consumed by ARC * buffers that are eligible for eviction, of type * ARC_BUFC_DATA, and linked off the arc_mru_ghost state. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mru_ghost_evictable_data; /* * Number of bytes that *would have been* consumed by ARC * buffers that are eligible for eviction, of type * ARC_BUFC_METADATA, and linked off the arc_mru_ghost state. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mru_ghost_evictable_metadata; /* @@ -681,36 +697,42 @@ typedef struct arc_stats { * arc_mfu state. This includes *all* buffers in the arc_mfu * state; e.g. data, metadata, evictable, and unevictable buffers * are all included in this value. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mfu_size; /* * Number of bytes consumed by ARC buffers that are eligible for * eviction, of type ARC_BUFC_DATA, and reside in the arc_mfu * state. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mfu_evictable_data; /* * Number of bytes consumed by ARC buffers that are eligible for * eviction, of type ARC_BUFC_METADATA, and reside in the * arc_mfu state. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mfu_evictable_metadata; /* * Total number of bytes that *would have been* consumed by ARC * buffers in the arc_mfu_ghost state. See the comment above * arcstat_mru_ghost_size for more details. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mfu_ghost_size; /* * Number of bytes that *would have been* consumed by ARC * buffers that are eligible for eviction, of type * ARC_BUFC_DATA, and linked off the arc_mfu_ghost state. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mfu_ghost_evictable_data; /* * Number of bytes that *would have been* consumed by ARC * buffers that are eligible for eviction, of type * ARC_BUFC_METADATA, and linked off the arc_mru_ghost state. + * Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_mfu_ghost_evictable_metadata; kstat_named_t arcstat_l2_hits; @@ -732,6 +754,7 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_io_error; kstat_named_t arcstat_l2_lsize; kstat_named_t arcstat_l2_psize; + /* Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_l2_hdr_size; kstat_named_t arcstat_l2_write_trylock_fail; kstat_named_t arcstat_l2_write_passed_headroom; @@ -746,6 +769,7 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_write_buffer_list_iter; kstat_named_t arcstat_l2_write_buffer_list_null_iter; kstat_named_t arcstat_memory_throttle_count; + /* Not updated directly; only synced in arc_kstat_update. */ kstat_named_t arcstat_meta_used; kstat_named_t arcstat_meta_limit; kstat_named_t arcstat_meta_max; @@ -905,14 +929,12 @@ static arc_state_t *arc_l2c_only; * the possibility of inconsistency by having shadow copies of the variables, * while still allowing the code to be readable. */ -#define arc_size ARCSTAT(arcstat_size) /* actual total arc size */ #define arc_p ARCSTAT(arcstat_p) /* target size of MRU */ #define arc_c ARCSTAT(arcstat_c) /* target size of cache */ #define arc_c_min ARCSTAT(arcstat_c_min) /* min target cache size */ #define arc_c_max ARCSTAT(arcstat_c_max) /* max target cache size */ #define arc_meta_limit ARCSTAT(arcstat_meta_limit) /* max size for metadata */ #define arc_meta_min ARCSTAT(arcstat_meta_min) /* min size for metadata */ -#define arc_meta_used ARCSTAT(arcstat_meta_used) /* size of metadata */ #define arc_meta_max ARCSTAT(arcstat_meta_max) /* max size of metadata */ /* compressed size of entire arc */ @@ -922,6 +944,22 @@ static arc_state_t *arc_l2c_only; /* number of bytes in the arc from arc_buf_t's */ #define arc_overhead_size ARCSTAT(arcstat_overhead_size) +/* + * There are also some ARC variables that we want to export, but that are + * updated so often that having the canonical representation be the statistic + * variable causes a performance bottleneck. We want to use aggsum_t's for these + * instead, but still be able to export the kstat in the same way as before. + * The solution is to always use the aggsum version, except in the kstat update + * callback. + */ +aggsum_t arc_size; +aggsum_t arc_meta_used; +aggsum_t astat_data_size; +aggsum_t astat_metadata_size; +aggsum_t astat_hdr_size; +aggsum_t astat_other_size; +aggsum_t astat_l2_hdr_size; + static int arc_no_grow; /* Don't try to grow cache size */ static uint64_t arc_tempreserve; static uint64_t arc_loaned_bytes; @@ -1433,21 +1471,14 @@ l2arc_trim(const arc_buf_hdr_t *hdr) } } +/* + * We use Cityhash for this. It's fast, and has good hash properties without + * requiring any large static buffers. + */ static uint64_t buf_hash(uint64_t spa, const dva_t *dva, uint64_t birth) { - uint8_t *vdva = (uint8_t *)dva; - uint64_t crc = -1ULL; - int i; - - ASSERT(zfs_crc64_table[128] == ZFS_CRC64_POLY); - - for (i = 0; i < sizeof (dva_t); i++) - crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ vdva[i]) & 0xFF]; - - crc ^= (spa>>8) ^ birth; - - return (crc); + return (cityhash4(spa, dva->dva_word[0], dva->dva_word[1], birth)); } #define HDR_EMPTY(hdr) \ @@ -2643,26 +2674,26 @@ arc_space_consume(uint64_t space, arc_space_type_t typ switch (type) { case ARC_SPACE_DATA: - ARCSTAT_INCR(arcstat_data_size, space); + aggsum_add(&astat_data_size, space); break; case ARC_SPACE_META: - ARCSTAT_INCR(arcstat_metadata_size, space); + aggsum_add(&astat_metadata_size, space); break; case ARC_SPACE_OTHER: - ARCSTAT_INCR(arcstat_other_size, space); + aggsum_add(&astat_other_size, space); break; case ARC_SPACE_HDRS: - ARCSTAT_INCR(arcstat_hdr_size, space); + aggsum_add(&astat_hdr_size, space); break; case ARC_SPACE_L2HDRS: - ARCSTAT_INCR(arcstat_l2_hdr_size, space); + aggsum_add(&astat_l2_hdr_size, space); break; } if (type != ARC_SPACE_DATA) - ARCSTAT_INCR(arcstat_meta_used, space); + aggsum_add(&arc_meta_used, space); - atomic_add_64(&arc_size, space); + aggsum_add(&arc_size, space); } void @@ -2672,31 +2703,36 @@ arc_space_return(uint64_t space, arc_space_type_t type switch (type) { case ARC_SPACE_DATA: - ARCSTAT_INCR(arcstat_data_size, -space); + aggsum_add(&astat_data_size, -space); break; case ARC_SPACE_META: - ARCSTAT_INCR(arcstat_metadata_size, -space); + aggsum_add(&astat_metadata_size, -space); break; case ARC_SPACE_OTHER: - ARCSTAT_INCR(arcstat_other_size, -space); + aggsum_add(&astat_other_size, -space); break; case ARC_SPACE_HDRS: - ARCSTAT_INCR(arcstat_hdr_size, -space); + aggsum_add(&astat_hdr_size, -space); break; case ARC_SPACE_L2HDRS: - ARCSTAT_INCR(arcstat_l2_hdr_size, -space); + aggsum_add(&astat_l2_hdr_size, -space); break; } if (type != ARC_SPACE_DATA) { - ASSERT(arc_meta_used >= space); - if (arc_meta_max < arc_meta_used) - arc_meta_max = arc_meta_used; - ARCSTAT_INCR(arcstat_meta_used, -space); + ASSERT(aggsum_compare(&arc_meta_used, space) >= 0); + /* + * We use the upper bound here rather than the precise value + * because the arc_meta_max value doesn't need to be + * precise. It's only consumed by humans via arcstats. + */ + if (arc_meta_max < aggsum_upper_bound(&arc_meta_used)) + arc_meta_max = aggsum_upper_bound(&arc_meta_used); + aggsum_add(&arc_meta_used, -space); } - ASSERT(arc_size >= space); - atomic_add_64(&arc_size, -space); + ASSERT(aggsum_compare(&arc_size, space) >= 0); + aggsum_add(&arc_size, -space); } /* @@ -3898,7 +3934,7 @@ arc_adjust_impl(arc_state_t *state, uint64_t spa, int6 * capped by the arc_meta_limit tunable. */ static uint64_t -arc_adjust_meta(void) +arc_adjust_meta(uint64_t meta_used) { uint64_t total_evicted = 0; int64_t target; @@ -3910,7 +3946,7 @@ arc_adjust_meta(void) * we're over the meta limit more than we're over arc_p, we * evict some from the MRU here, and some from the MFU below. */ - target = MIN((int64_t)(arc_meta_used - arc_meta_limit), + target = MIN((int64_t)(meta_used - arc_meta_limit), (int64_t)(refcount_count(&arc_anon->arcs_size) + refcount_count(&arc_mru->arcs_size) - arc_p)); @@ -3921,8 +3957,9 @@ arc_adjust_meta(void) * below the meta limit, but not so much as to drop us below the * space allotted to the MFU (which is defined as arc_c - arc_p). */ - target = MIN((int64_t)(arc_meta_used - arc_meta_limit), - (int64_t)(refcount_count(&arc_mfu->arcs_size) - (arc_c - arc_p))); + target = MIN((int64_t)(meta_used - arc_meta_limit), + (int64_t)(refcount_count(&arc_mfu->arcs_size) - + (arc_c - arc_p))); total_evicted += arc_adjust_impl(arc_mfu, 0, target, ARC_BUFC_METADATA); @@ -4013,12 +4050,14 @@ arc_adjust(void) uint64_t total_evicted = 0; uint64_t bytes; int64_t target; + uint64_t asize = aggsum_value(&arc_size); + uint64_t ameta = aggsum_value(&arc_meta_used); /* * If we're over arc_meta_limit, we want to correct that before * potentially evicting data buffers below. */ - total_evicted += arc_adjust_meta(); + total_evicted += arc_adjust_meta(ameta); /* * Adjust MRU size @@ -4030,9 +4069,9 @@ arc_adjust(void) * the MRU is over arc_p, we'll evict enough to get back to * arc_p here, and then evict more from the MFU below. */ - target = MIN((int64_t)(arc_size - arc_c), + target = MIN((int64_t)(asize - arc_c), (int64_t)(refcount_count(&arc_anon->arcs_size) + - refcount_count(&arc_mru->arcs_size) + arc_meta_used - arc_p)); + refcount_count(&arc_mru->arcs_size) + ameta - arc_p)); /* * If we're below arc_meta_min, always prefer to evict data. @@ -4043,7 +4082,7 @@ arc_adjust(void) * type, spill over into the next type. */ if (arc_adjust_type(arc_mru) == ARC_BUFC_METADATA && - arc_meta_used > arc_meta_min) { + ameta > arc_meta_min) { bytes = arc_adjust_impl(arc_mru, 0, target, ARC_BUFC_METADATA); total_evicted += bytes; @@ -4076,10 +4115,10 @@ arc_adjust(void) * size back to arc_p, if we're still above the target cache * size, we evict the rest from the MFU. */ - target = arc_size - arc_c; + target = asize - arc_c; if (arc_adjust_type(arc_mfu) == ARC_BUFC_METADATA && - arc_meta_used > arc_meta_min) { + ameta > arc_meta_min) { bytes = arc_adjust_impl(arc_mfu, 0, target, ARC_BUFC_METADATA); total_evicted += bytes; @@ -4180,6 +4219,7 @@ arc_flush(spa_t *spa, boolean_t retry) void arc_shrink(int64_t to_free) { + uint64_t asize = aggsum_value(&arc_size); if (arc_c > arc_c_min) { DTRACE_PROBE4(arc__shrink, uint64_t, arc_c, uint64_t, arc_c_min, uint64_t, arc_p, uint64_t, to_free); @@ -4189,8 +4229,8 @@ arc_shrink(int64_t to_free) arc_c = arc_c_min; atomic_add_64(&arc_p, -(arc_p >> arc_shrink_shift)); - if (arc_c > arc_size) - arc_c = MAX(arc_size, arc_c_min); + if (asize < arc_c) + arc_c = MAX(asize, arc_c_min); if (arc_p > arc_c) arc_p = (arc_c >> 1); @@ -4201,8 +4241,8 @@ arc_shrink(int64_t to_free) ASSERT((int64_t)arc_p >= 0); } - if (arc_size > arc_c) { - DTRACE_PROBE2(arc__shrink_adjust, uint64_t, arc_size, + if (asize > arc_c) { + DTRACE_PROBE2(arc__shrink_adjust, uint64_t, asize, uint64_t, arc_c); (void) arc_adjust(); } @@ -4402,7 +4442,7 @@ arc_kmem_reap_now(void) DTRACE_PROBE(arc__kmem_reap_start); #ifdef _KERNEL - if (arc_meta_used >= arc_meta_limit) { + if (aggsum_compare(&arc_meta_used, arc_meta_limit) >= 0) { /* * We are exceeding our meta-data cache limit. * Purge some DNLC entries to release holds on meta-data. @@ -4566,7 +4606,7 @@ arc_reclaim_thread(void *unused __unused) * be helpful and could potentially cause us to enter an * infinite loop. */ - if (arc_size <= arc_c || evicted == 0) { + if (aggsum_compare(&arc_size, arc_c) <= 0|| evicted == 0) { /* * We're either no longer overflowing, or we * can't evict anything more, so we should wake @@ -4699,7 +4739,8 @@ arc_adapt(int bytes, arc_state_t *state) * If we're within (2 * maxblocksize) bytes of the target * cache size, increment the target cache size */ - if (arc_size > arc_c - (2ULL << SPA_MAXBLOCKSHIFT)) { + if (aggsum_compare(&arc_size, arc_c - (2ULL << SPA_MAXBLOCKSHIFT)) > + 0) { DTRACE_PROBE1(arc__inc_adapt, int, bytes); atomic_add_64(&arc_c, (int64_t)bytes); if (arc_c > arc_c_max) @@ -4723,7 +4764,16 @@ arc_is_overflowing(void) uint64_t overflow = MAX(SPA_MAXBLOCKSIZE, arc_c >> zfs_arc_overflow_shift); - return (arc_size >= arc_c + overflow); + /* + * We just compare the lower bound here for performance reasons. Our + * primary goals are to make sure that the arc never grows without + * bound, and that it can reach its maximum size. This check + * accomplishes both goals. The maximum amount we could run over by is + * 2 * aggsum_borrow_multiplier * NUM_CPUS * the average size of a block + * in the ARC. In practice, that's in the tens of MB, which is low + * enough to be safe. + */ + return (aggsum_lower_bound(&arc_size) >= arc_c + overflow); } static abd_t * @@ -4838,7 +4888,8 @@ arc_get_data_impl(arc_buf_hdr_t *hdr, uint64_t size, v * If we are growing the cache, and we are adding anonymous * data, and we have outgrown arc_p, update arc_p */ - if (arc_size < arc_c && hdr->b_l1hdr.b_state == arc_anon && + if (aggsum_compare(&arc_size, arc_c) < 0 && + hdr->b_l1hdr.b_state == arc_anon && (refcount_count(&arc_anon->arcs_size) + refcount_count(&arc_mru->arcs_size) > arc_p)) arc_p = MIN(arc_c, arc_p + size); @@ -6293,6 +6344,15 @@ arc_kstat_update(kstat_t *ksp, int rw) &as->arcstat_mfu_ghost_size, &as->arcstat_mfu_ghost_evictable_data, &as->arcstat_mfu_ghost_evictable_metadata); + + ARCSTAT(arcstat_size) = aggsum_value(&arc_size); + ARCSTAT(arcstat_meta_used) = aggsum_value(&arc_meta_used); + ARCSTAT(arcstat_data_size) = aggsum_value(&astat_data_size); + ARCSTAT(arcstat_metadata_size) = + aggsum_value(&astat_metadata_size); + ARCSTAT(arcstat_hdr_size) = aggsum_value(&astat_hdr_size); + ARCSTAT(arcstat_other_size) = aggsum_value(&astat_other_size); + ARCSTAT(arcstat_l2_hdr_size) = aggsum_value(&astat_l2_hdr_size); } return (0); @@ -6425,6 +6485,14 @@ arc_state_init(void) refcount_create(&arc_mfu->arcs_size); refcount_create(&arc_mfu_ghost->arcs_size); refcount_create(&arc_l2c_only->arcs_size); + + aggsum_init(&arc_meta_used, 0); + aggsum_init(&arc_size, 0); + aggsum_init(&astat_data_size, 0); + aggsum_init(&astat_metadata_size, 0); + aggsum_init(&astat_hdr_size, 0); + aggsum_init(&astat_other_size, 0); + aggsum_init(&astat_l2_hdr_size, 0); } static void @@ -6529,7 +6597,6 @@ arc_init(void) arc_c = arc_c_max; arc_p = (arc_c >> 1); - arc_size = 0; /* limit meta-data to 1/4 of the arc capacity */ arc_meta_limit = arc_c_max / 4; Copied: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c (from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c Mon Apr 16 03:52:54 2018 (r332540, copy of r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c) @@ -0,0 +1,63 @@ +// Copyright (c) 2011 Google, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +/* + * Copyright (c) 2017 by Delphix. All rights reserved. + */ + +#include + +#define HASH_K1 0xb492b66fbe98f273ULL +#define HASH_K2 0x9ae16a3b2f90404fULL + +/* + * Bitwise right rotate. Normally this will compile to a single + * instruction. + */ +static inline uint64_t +rotate(uint64_t val, int shift) +{ + // Avoid shifting by 64: doing so yields an undefined result. + return (shift == 0 ? val : (val >> shift) | (val << (64 - shift))); +} + +static inline uint64_t +cityhash_helper(uint64_t u, uint64_t v, uint64_t mul) +{ + uint64_t a = (u ^ v) * mul; + a ^= (a >> 47); + uint64_t b = (v ^ a) * mul; + b ^= (b >> 47); + b *= mul; + return (b); +} + +uint64_t +cityhash4(uint64_t w1, uint64_t w2, uint64_t w3, uint64_t w4) +{ + uint64_t mul = HASH_K2 + 64; + uint64_t a = w1 * HASH_K1; + uint64_t b = w2; + uint64_t c = w4 * mul; + uint64_t d = w3 * HASH_K2; + return (cityhash_helper(rotate(a + b, 43) + rotate(c, 30) + d, + a + rotate(b + HASH_K2, 18) + c, mul)); + +} Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 03:49:27 2018 (r332539) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 03:52:54 2018 (r332540) @@ -48,6 +48,7 @@ #include #include #include +#include uint_t zfs_dbuf_evict_key; @@ -177,23 +178,14 @@ static dbuf_hash_table_t dbuf_hash_table; static uint64_t dbuf_hash_count; +/* + * We use Cityhash for this. It's fast, and has good hash properties without + * requiring any large static buffers. + */ static uint64_t dbuf_hash(void *os, uint64_t obj, uint8_t lvl, uint64_t blkid) { - uintptr_t osv = (uintptr_t)os; - uint64_t crc = -1ULL; - - ASSERT(zfs_crc64_table[128] == ZFS_CRC64_POLY); - crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (lvl)) & 0xFF]; - crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (osv >> 6)) & 0xFF]; - crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (obj >> 0)) & 0xFF]; - crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (obj >> 8)) & 0xFF]; - crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (blkid >> 0)) & 0xFF]; - crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (blkid >> 8)) & 0xFF]; - - crc ^= (osv>>14) ^ (obj>>16) ^ (blkid>>16); - - return (crc); + return (cityhash4((uintptr_t)os, obj, (uint64_t)lvl, blkid)); } #define DBUF_EQUAL(dbuf, os, obj, level, blkid) \ Copied: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h (from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h Mon Apr 16 03:52:54 2018 (r332540, copy of r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h) @@ -0,0 +1,58 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2017 by Delphix. All rights reserved. + */ + +#ifndef _SYS_AGGSUM_H +#define _SYS_AGGSUM_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct aggsum_bucket { + kmutex_t asc_lock; + int64_t asc_delta; + uint64_t asc_borrowed; + uint64_t asc_pad[4]; /* pad out to cache line (64 bytes) */ +} aggsum_bucket_t __aligned(CACHE_LINE_SIZE); + +/* + * Fan out over FANOUT cpus. + */ +typedef struct aggsum { + kmutex_t as_lock; + int64_t as_lower_bound; + int64_t as_upper_bound; + uint64_t as_numbuckets; + aggsum_bucket_t *as_buckets; +} aggsum_t; + +void aggsum_init(aggsum_t *, uint64_t); +void aggsum_fini(aggsum_t *); +int64_t aggsum_lower_bound(aggsum_t *); +int64_t aggsum_upper_bound(aggsum_t *); +int aggsum_compare(aggsum_t *, uint64_t); +uint64_t aggsum_value(aggsum_t *); +void aggsum_add(aggsum_t *, int64_t); + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_AGGSUM_H */ Copied: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/cityhash.h (from r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/cityhash.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/cityhash.h Mon Apr 16 03:52:54 2018 (r332540, copy of r331404, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/cityhash.h) @@ -0,0 +1,41 @@ +// Copyright (c) 2011 Google, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Apr 16 03:53:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C05DF82190; Mon, 16 Apr 2018 03:53:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D80A86E36; Mon, 16 Apr 2018 03:53:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0886A18355; Mon, 16 Apr 2018 03:53:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3G3rYn7020867; Mon, 16 Apr 2018 03:53:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3rY1l020866; Mon, 16 Apr 2018 03:53:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160353.w3G3rY1l020866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332541 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:53:35 -0000 Author: mav Date: Mon Apr 16 03:53:34 2018 New Revision: 332541 URL: https://svnweb.freebsd.org/changeset/base/332541 Log: MFC r331406: MFV r331405: 9084 spa_*_ashift must ignore spare devices illumos/illumos-gate@b037f3dbd69cef4a7ffd576ad33e07bfaf0b1e84 Reviewed by: Prashanth Sreenivasa Reviewed by: George Wilson Approved by: Dan McDonald Author: Prakash Surya Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 03:52:54 2018 (r332540) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 03:53:34 2018 (r332541) @@ -1589,14 +1589,6 @@ vdev_open(vdev_t *vd) return (error); } - if (vd->vdev_top == vd && vd->vdev_ashift != 0 && - !vd->vdev_isl2cache && !vd->vdev_islog) { - if (vd->vdev_ashift > spa->spa_max_ashift) - spa->spa_max_ashift = vd->vdev_ashift; - if (vd->vdev_ashift < spa->spa_min_ashift) - spa->spa_min_ashift = vd->vdev_ashift; - } - /* * Track the min and max ashift values for normal data devices. */ From owner-svn-src-all@freebsd.org Mon Apr 16 03:54:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17297F822EC; Mon, 16 Apr 2018 03:54: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE90986FAA; Mon, 16 Apr 2018 03:54:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B97DB18357; Mon, 16 Apr 2018 03:54:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3G3sZkB020956; Mon, 16 Apr 2018 03:54:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3sZ30020953; Mon, 16 Apr 2018 03:54:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160354.w3G3sZ30020953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:54:35 +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: r332542 - in stable/11: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:54:36 -0000 Author: mav Date: Mon Apr 16 03:54:35 2018 New Revision: 332542 URL: https://svnweb.freebsd.org/changeset/base/332542 Log: MFC r331408: MFV r331407: 9213 zfs: sytem typo illumos/illumos-gate@edc8ef7d921c96b23969898aeb766cb24960bda7 Reviewed by: C Fraire Reviewed by: Andy Fiddaman Approved by: Joshua M. Clulow Author: Toomas Soome Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Apr 16 03:53:34 2018 (r332541) +++ stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Apr 16 03:54:35 2018 (r332542) @@ -2215,7 +2215,7 @@ zfs_do_upgrade(int argc, char **argv) if (cb.cb_numfailed != 0) ret = 1; } else { - /* List old-version filesytems */ + /* List old-version filesystems */ boolean_t found; (void) printf(gettext("This system is currently running " "ZFS filesystem version %llu.\n\n"), ZPL_VERSION); Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Apr 16 03:53:34 2018 (r332541) +++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Apr 16 03:54:35 2018 (r332542) @@ -1852,7 +1852,7 @@ show_import(nvlist_t *config) case ZPOOL_STATUS_UNSUP_FEAT_READ: (void) printf(gettext("status: The pool uses the following " - "feature(s) not supported on this sytem:\n")); + "feature(s) not supported on this system:\n")); zpool_print_unsup_feat(config); break; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Mon Apr 16 03:53:34 2018 (r332541) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Mon Apr 16 03:54:35 2018 (r332542) @@ -2369,7 +2369,7 @@ slow: /* * Determine whether Access should be granted/denied. * - * The least priv subsytem is always consulted as a basic privilege + * The least priv subsystem is always consulted as a basic privilege * can define any form of access. */ int From owner-svn-src-all@freebsd.org Mon Apr 16 03:55:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06FE9F823C2; Mon, 16 Apr 2018 03:55:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8071870F0; Mon, 16 Apr 2018 03:55: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 A2CD818358; Mon, 16 Apr 2018 03:55: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 w3G3tE90021065; Mon, 16 Apr 2018 03:55:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3tEvN021064; Mon, 16 Apr 2018 03:55:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160355.w3G3tEvN021064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332543 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 332543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:55:15 -0000 Author: mav Date: Mon Apr 16 03:55:14 2018 New Revision: 332543 URL: https://svnweb.freebsd.org/changeset/base/332543 Log: MFC r331414: Reduce struct aggsum_bucket padding to fit into one cache line. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h Mon Apr 16 03:54:35 2018 (r332542) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/aggsum.h Mon Apr 16 03:55:14 2018 (r332543) @@ -29,7 +29,7 @@ typedef struct aggsum_bucket { kmutex_t asc_lock; int64_t asc_delta; uint64_t asc_borrowed; - uint64_t asc_pad[4]; /* pad out to cache line (64 bytes) */ + uint64_t asc_pad[2]; /* pad out to cache line (64 bytes) */ } aggsum_bucket_t __aligned(CACHE_LINE_SIZE); /* From owner-svn-src-all@freebsd.org Mon Apr 16 03:56:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE536F82570; Mon, 16 Apr 2018 03:56:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A71E87721; Mon, 16 Apr 2018 03:56:10 +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 84CD418359; Mon, 16 Apr 2018 03:56:10 +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 w3G3uASk021153; Mon, 16 Apr 2018 03:56:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3uAUm021152; Mon, 16 Apr 2018 03:56:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160356.w3G3uAUm021152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332544 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:56:11 -0000 Author: mav Date: Mon Apr 16 03:56:10 2018 New Revision: 332544 URL: https://svnweb.freebsd.org/changeset/base/332544 Log: MFC r331420 (by avg): zfs: fix mismatch between format specifier and type vdev_dbgmsg_print_tree printed vdev_id of uint64_t type with %u format specifier. That caused subsequent parameters to be incorrectly read from the stack and lead to a crash when a wrong value was interpreted as a string pointer. This should be upstreamed. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 03:55:14 2018 (r332543) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 03:56:10 2018 (r332544) @@ -237,7 +237,7 @@ vdev_dbgmsg_print_tree(vdev_t *vd, int indent) } zfs_dbgmsg("%*svdev %u: %s%s, guid: %llu, path: %s, %s", indent, - "", vd->vdev_id, vd->vdev_ops->vdev_op_type, + "", (int)vd->vdev_id, vd->vdev_ops->vdev_op_type, vd->vdev_islog ? " (log)" : "", (u_longlong_t)vd->vdev_guid, vd->vdev_path ? vd->vdev_path : "N/A", state); From owner-svn-src-all@freebsd.org Mon Apr 16 03:58:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 951A4F8280D; Mon, 16 Apr 2018 03:58:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EB9F878B6; Mon, 16 Apr 2018 03:58:09 +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 378C21835C; Mon, 16 Apr 2018 03:58:09 +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 w3G3w9d4021273; Mon, 16 Apr 2018 03:58:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G3w8ld021271; Mon, 16 Apr 2018 03:58:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160358.w3G3w8ld021271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 03:58: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: r332545 - in stable/11/cddl/contrib/opensolaris/cmd: zdb ztest X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/cddl/contrib/opensolaris/cmd: zdb ztest X-SVN-Commit-Revision: 332545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 03:58:09 -0000 Author: mav Date: Mon Apr 16 03:58:08 2018 New Revision: 332545 URL: https://svnweb.freebsd.org/changeset/base/332545 Log: MFC r331699: Partial MFV r329753: 8809 libzpool should leverage work done in libfakekernel illumos/illumos-gate@f06dce2c1f0f3af78581e7574f65bfba843ddb6e Reviewed by: Sebastien Roy Reviewed by: Prakash Surya Reviewed by: Gordon Ross Approved by: Richard Lowe Author: Andrew Stormont We do not have libfakekernel, but need to reduce code divergence. Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 03:56:10 2018 (r332544) +++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 03:58:08 2018 (r332545) @@ -24,6 +24,7 @@ * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 Nexenta Systems, Inc. + * Copyright 2017 RackTop Systems. */ #include @@ -88,12 +89,14 @@ extern boolean_t zfs_recover; extern uint64_t zfs_arc_max, zfs_arc_meta_limit; extern int zfs_vdev_async_read_max_active; extern boolean_t spa_load_verify_dryrun; +extern int aok; #else int reference_tracking_enable; boolean_t zfs_recover; uint64_t zfs_arc_max, zfs_arc_meta_limit; int zfs_vdev_async_read_max_active; boolean_t spa_load_verify_dryrun; +int aok; #endif static const char cmdname[] = "zdb"; Modified: stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Apr 16 03:56:10 2018 (r332544) +++ stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Apr 16 03:58:08 2018 (r332545) @@ -26,6 +26,7 @@ * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 Joyent, Inc. + * Copyright 2017 RackTop Systems. */ /* @@ -247,8 +248,8 @@ typedef enum { typedef struct rll { void *rll_writer; int rll_readers; - mutex_t rll_lock; - cond_t rll_cv; + kmutex_t rll_lock; + kcondvar_t rll_cv; } rll_t; typedef struct rl { @@ -282,11 +283,11 @@ typedef struct ztest_od { typedef struct ztest_ds { ztest_shared_ds_t *zd_shared; objset_t *zd_os; - rwlock_t zd_zilog_lock; + krwlock_t zd_zilog_lock; zilog_t *zd_zilog; ztest_od_t *zd_od; /* debugging aid */ char zd_name[ZFS_MAX_DATASET_NAME_LEN]; - mutex_t zd_dirobj_lock; + kmutex_t zd_dirobj_lock; rll_t zd_object_lock[ZTEST_OBJECT_LOCKS]; rll_t zd_range_lock[ZTEST_RANGE_LOCKS]; } ztest_ds_t; @@ -397,7 +398,7 @@ ztest_info_t ztest_info[] = { * The callbacks are ordered by txg number. */ typedef struct ztest_cb_list { - mutex_t zcl_callbacks_lock; + kmutex_t zcl_callbacks_lock; list_t zcl_callbacks; } ztest_cb_list_t; @@ -432,7 +433,7 @@ ztest_shared_t *ztest_shared; static spa_t *ztest_spa = NULL; static ztest_ds_t *ztest_ds; -static mutex_t ztest_vdev_lock; +static kmutex_t ztest_vdev_lock; /* * The ztest_name_lock protects the pool and dataset namespace used by @@ -440,7 +441,7 @@ static mutex_t ztest_vdev_lock; * this lock as writer. Grabbing the lock as reader will ensure that the * namespace does not change while the lock is held. */ -static rwlock_t ztest_name_lock; +static krwlock_t ztest_name_lock; static boolean_t ztest_dump_core = B_TRUE; static boolean_t ztest_exiting; @@ -1096,8 +1097,8 @@ ztest_rll_init(rll_t *rll) { rll->rll_writer = NULL; rll->rll_readers = 0; - VERIFY(_mutex_init(&rll->rll_lock, USYNC_THREAD, NULL) == 0); - VERIFY(cond_init(&rll->rll_cv, USYNC_THREAD, NULL) == 0); + mutex_init(&rll->rll_lock, NULL, USYNC_THREAD, NULL); + cv_init(&rll->rll_cv, NULL, USYNC_THREAD, NULL); } static void @@ -1105,32 +1106,32 @@ ztest_rll_destroy(rll_t *rll) { ASSERT(rll->rll_writer == NULL); ASSERT(rll->rll_readers == 0); - VERIFY(_mutex_destroy(&rll->rll_lock) == 0); - VERIFY(cond_destroy(&rll->rll_cv) == 0); + mutex_destroy(&rll->rll_lock); + cv_destroy(&rll->rll_cv); } static void ztest_rll_lock(rll_t *rll, rl_type_t type) { - VERIFY(mutex_lock(&rll->rll_lock) == 0); + mutex_enter(&rll->rll_lock); if (type == RL_READER) { while (rll->rll_writer != NULL) - (void) cond_wait(&rll->rll_cv, &rll->rll_lock); + cv_wait(&rll->rll_cv, &rll->rll_lock); rll->rll_readers++; } else { while (rll->rll_writer != NULL || rll->rll_readers) - (void) cond_wait(&rll->rll_cv, &rll->rll_lock); + cv_wait(&rll->rll_cv, &rll->rll_lock); rll->rll_writer = curthread; } - VERIFY(mutex_unlock(&rll->rll_lock) == 0); + mutex_exit(&rll->rll_lock); } static void ztest_rll_unlock(rll_t *rll) { - VERIFY(mutex_lock(&rll->rll_lock) == 0); + mutex_enter(&rll->rll_lock); if (rll->rll_writer) { ASSERT(rll->rll_readers == 0); @@ -1142,9 +1143,9 @@ ztest_rll_unlock(rll_t *rll) } if (rll->rll_writer == NULL && rll->rll_readers == 0) - VERIFY(cond_broadcast(&rll->rll_cv) == 0); + cv_broadcast(&rll->rll_cv); - VERIFY(mutex_unlock(&rll->rll_lock) == 0); + mutex_exit(&rll->rll_lock); } static void @@ -1203,8 +1204,8 @@ ztest_zd_init(ztest_ds_t *zd, ztest_shared_ds_t *szd, if (zd->zd_shared != NULL) zd->zd_shared->zd_seq = 0; - VERIFY(rwlock_init(&zd->zd_zilog_lock, USYNC_THREAD, NULL) == 0); - VERIFY(_mutex_init(&zd->zd_dirobj_lock, USYNC_THREAD, NULL) == 0); + rw_init(&zd->zd_zilog_lock, NULL, USYNC_THREAD, NULL); + mutex_init(&zd->zd_dirobj_lock, NULL, USYNC_THREAD, NULL); for (int l = 0; l < ZTEST_OBJECT_LOCKS; l++) ztest_rll_init(&zd->zd_object_lock[l]); @@ -1216,7 +1217,7 @@ ztest_zd_init(ztest_ds_t *zd, ztest_shared_ds_t *szd, static void ztest_zd_fini(ztest_ds_t *zd) { - VERIFY(_mutex_destroy(&zd->zd_dirobj_lock) == 0); + mutex_destroy(&zd->zd_dirobj_lock); for (int l = 0; l < ZTEST_OBJECT_LOCKS; l++) ztest_rll_destroy(&zd->zd_object_lock[l]); @@ -1971,7 +1972,7 @@ ztest_lookup(ztest_ds_t *zd, ztest_od_t *od, int count int missing = 0; int error; - ASSERT(_mutex_held(&zd->zd_dirobj_lock)); + ASSERT(MUTEX_HELD(&zd->zd_dirobj_lock)); for (int i = 0; i < count; i++, od++) { od->od_object = 0; @@ -2011,7 +2012,7 @@ ztest_create(ztest_ds_t *zd, ztest_od_t *od, int count { int missing = 0; - ASSERT(_mutex_held(&zd->zd_dirobj_lock)); + ASSERT(MUTEX_HELD(&zd->zd_dirobj_lock)); for (int i = 0; i < count; i++, od++) { if (missing) { @@ -2056,7 +2057,7 @@ ztest_remove(ztest_ds_t *zd, ztest_od_t *od, int count int missing = 0; int error; - ASSERT(_mutex_held(&zd->zd_dirobj_lock)); + ASSERT(MUTEX_HELD(&zd->zd_dirobj_lock)); od += count - 1; @@ -2202,7 +2203,7 @@ ztest_io(ztest_ds_t *zd, uint64_t object, uint64_t off if (ztest_random(2) == 0) io_type = ZTEST_IO_WRITE_TAG; - (void) rw_rdlock(&zd->zd_zilog_lock); + rw_enter(&zd->zd_zilog_lock, RW_READER); switch (io_type) { @@ -2239,7 +2240,7 @@ ztest_io(ztest_ds_t *zd, uint64_t object, uint64_t off break; case ZTEST_IO_REWRITE: - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); err = ztest_dsl_prop_set_uint64(zd->zd_name, ZFS_PROP_CHECKSUM, spa_dedup_checksum(ztest_spa), B_FALSE); @@ -2249,7 +2250,7 @@ ztest_io(ztest_ds_t *zd, uint64_t object, uint64_t off ztest_random_dsl_prop(ZFS_PROP_COMPRESSION), B_FALSE); VERIFY(err == 0 || err == ENOSPC); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); VERIFY0(dmu_read(zd->zd_os, object, offset, blocksize, data, DMU_READ_NO_PREFETCH)); @@ -2258,7 +2259,7 @@ ztest_io(ztest_ds_t *zd, uint64_t object, uint64_t off break; } - (void) rw_unlock(&zd->zd_zilog_lock); + rw_exit(&zd->zd_zilog_lock); umem_free(data, blocksize); } @@ -2297,13 +2298,13 @@ ztest_object_init(ztest_ds_t *zd, ztest_od_t *od, size int count = size / sizeof (*od); int rv = 0; - VERIFY(mutex_lock(&zd->zd_dirobj_lock) == 0); + mutex_enter(&zd->zd_dirobj_lock); if ((ztest_lookup(zd, od, count) != 0 || remove) && (ztest_remove(zd, od, count) != 0 || ztest_create(zd, od, count) != 0)) rv = -1; zd->zd_od = od; - VERIFY(mutex_unlock(&zd->zd_dirobj_lock) == 0); + mutex_exit(&zd->zd_dirobj_lock); return (rv); } @@ -2314,7 +2315,7 @@ ztest_zil_commit(ztest_ds_t *zd, uint64_t id) { zilog_t *zilog = zd->zd_zilog; - (void) rw_rdlock(&zd->zd_zilog_lock); + rw_enter(&zd->zd_zilog_lock, RW_READER); zil_commit(zilog, ztest_random(ZTEST_OBJECTS)); @@ -2329,7 +2330,7 @@ ztest_zil_commit(ztest_ds_t *zd, uint64_t id) zd->zd_shared->zd_seq = zilog->zl_commit_lr_seq; mutex_exit(&zilog->zl_lock); - (void) rw_unlock(&zd->zd_zilog_lock); + rw_exit(&zd->zd_zilog_lock); } /* @@ -2348,8 +2349,8 @@ ztest_zil_remount(ztest_ds_t *zd, uint64_t id) * updating the zil (i.e. adding in-memory log records) and the * zd_zilog_lock to block any I/O. */ - VERIFY0(mutex_lock(&zd->zd_dirobj_lock)); - (void) rw_wrlock(&zd->zd_zilog_lock); + mutex_enter(&zd->zd_dirobj_lock); + rw_enter(&zd->zd_zilog_lock, RW_WRITER); /* zfsvfs_teardown() */ zil_close(zd->zd_zilog); @@ -2358,8 +2359,8 @@ ztest_zil_remount(ztest_ds_t *zd, uint64_t id) VERIFY(zil_open(os, ztest_get_data) == zd->zd_zilog); zil_replay(os, zd, ztest_replay_vector); - (void) rw_unlock(&zd->zd_zilog_lock); - VERIFY(mutex_unlock(&zd->zd_dirobj_lock) == 0); + rw_exit(&zd->zd_zilog_lock); + mutex_exit(&zd->zd_dirobj_lock); } /* @@ -2394,7 +2395,7 @@ ztest_spa_create_destroy(ztest_ds_t *zd, uint64_t id) * Attempt to create an existing pool. It shouldn't matter * what's in the nvroot; we should fail with EEXIST. */ - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, 0, 0, 0, 1); VERIFY3U(EEXIST, ==, spa_create(zo->zo_pool, nvroot, NULL, NULL)); nvlist_free(nvroot); @@ -2402,7 +2403,7 @@ ztest_spa_create_destroy(ztest_ds_t *zd, uint64_t id) VERIFY3U(EBUSY, ==, spa_destroy(zo->zo_pool)); spa_close(spa, FTAG); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* ARGSUSED */ @@ -2415,7 +2416,7 @@ ztest_spa_upgrade(ztest_ds_t *zd, uint64_t id) nvlist_t *nvroot, *props; char *name; - VERIFY0(mutex_lock(&ztest_vdev_lock)); + mutex_enter(&ztest_vdev_lock); name = kmem_asprintf("%s_upgrade", ztest_opts.zo_pool); /* @@ -2474,7 +2475,7 @@ ztest_spa_upgrade(ztest_ds_t *zd, uint64_t id) spa_close(spa, FTAG); strfree(name); - VERIFY0(mutex_unlock(&ztest_vdev_lock)); + mutex_exit(&ztest_vdev_lock); } static vdev_t * @@ -2527,7 +2528,7 @@ ztest_vdev_add_remove(ztest_ds_t *zd, uint64_t id) nvlist_t *nvroot; int error; - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); leaves = MAX(zs->zs_mirrors + zs->zs_splits, 1) * ztest_opts.zo_raidz; spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); @@ -2553,9 +2554,9 @@ ztest_vdev_add_remove(ztest_ds_t *zd, uint64_t id) * dmu_objset_destroy() to fail with EBUSY thus * leaving the dataset in an inconsistent state. */ - VERIFY(rw_wrlock(&ztest_name_lock) == 0); + rw_enter(&ztest_name_lock, RW_WRITER); error = spa_vdev_remove(spa, guid, B_FALSE); - VERIFY(rw_unlock(&ztest_name_lock) == 0); + rw_exit(&ztest_name_lock); if (error && error != EEXIST) fatal(0, "spa_vdev_remove() = %d", error); @@ -2579,7 +2580,7 @@ ztest_vdev_add_remove(ztest_ds_t *zd, uint64_t id) fatal(0, "spa_vdev_add() = %d", error); } - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); } /* @@ -2605,7 +2606,7 @@ ztest_vdev_aux_add_remove(ztest_ds_t *zd, uint64_t id) aux = ZPOOL_CONFIG_L2CACHE; } - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); @@ -2662,7 +2663,7 @@ ztest_vdev_aux_add_remove(ztest_ds_t *zd, uint64_t id) fatal(0, "spa_vdev_remove(%llu) = %d", guid, error); } - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); } /* @@ -2679,11 +2680,11 @@ ztest_split_pool(ztest_ds_t *zd, uint64_t id) uint_t c, children, schildren = 0, lastlogid = 0; int error = 0; - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); /* ensure we have a useable config; mirrors of raidz aren't supported */ if (zs->zs_mirrors < 3 || ztest_opts.zo_raidz > 1) { - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); return; } @@ -2742,9 +2743,9 @@ ztest_split_pool(ztest_ds_t *zd, uint64_t id) spa_config_exit(spa, SCL_VDEV, FTAG); - (void) rw_wrlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_WRITER); error = spa_vdev_split_mirror(spa, "splitp", config, NULL, B_FALSE); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); nvlist_free(config); @@ -2757,7 +2758,7 @@ ztest_split_pool(ztest_ds_t *zd, uint64_t id) ++zs->zs_splits; --zs->zs_mirrors; } - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); } @@ -2786,7 +2787,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id) int oldvd_is_log; int error, expected_error; - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); leaves = MAX(zs->zs_mirrors, 1) * ztest_opts.zo_raidz; spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); @@ -2799,7 +2800,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id) */ if (spa->spa_vdev_removal != NULL) { spa_config_exit(spa, SCL_ALL, FTAG); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); return; } @@ -2859,7 +2860,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id) if (error != 0 && error != ENODEV && error != EBUSY && error != ENOTSUP) fatal(0, "detach (%s) returned %d", oldpath, error); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); return; } @@ -2957,7 +2958,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id) newsize, replacing, error, expected_error); } - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); } /* ARGSUSED */ @@ -2968,7 +2969,7 @@ ztest_device_removal(ztest_ds_t *zd, uint64_t id) vdev_t *vd; uint64_t guid; - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); vd = vdev_lookup_top(spa, ztest_random_vdev_top(spa, B_FALSE)); @@ -2977,7 +2978,7 @@ ztest_device_removal(ztest_ds_t *zd, uint64_t id) (void) spa_vdev_remove(spa, guid, B_FALSE); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); } /* @@ -3105,7 +3106,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) uint64_t top; uint64_t old_class_space, new_class_space, old_ms_count, new_ms_count; - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); spa_config_enter(spa, SCL_STATE, spa, RW_READER); /* @@ -3116,7 +3117,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) */ if (spa->spa_vdev_removal != NULL) { spa_config_exit(spa, SCL_STATE, FTAG); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); return; } @@ -3145,7 +3146,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) if (tvd->vdev_state != VDEV_STATE_HEALTHY || psize == 0 || psize >= 4 * ztest_opts.zo_vdev_size) { spa_config_exit(spa, SCL_STATE, spa); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); return; } ASSERT(psize > 0); @@ -3170,7 +3171,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) "the vdev configuration changed.\n"); } spa_config_exit(spa, SCL_STATE, spa); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); return; } @@ -3204,7 +3205,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) "intervening vdev offline or remove.\n"); } spa_config_exit(spa, SCL_STATE, spa); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); return; } @@ -3234,7 +3235,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) } spa_config_exit(spa, SCL_STATE, spa); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); } /* @@ -3345,7 +3346,7 @@ ztest_dmu_objset_create_destroy(ztest_ds_t *zd, uint64 char name[ZFS_MAX_DATASET_NAME_LEN]; zilog_t *zilog; - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); (void) snprintf(name, sizeof (name), "%s/temp_%llu", ztest_opts.zo_pool, (u_longlong_t)id); @@ -3384,7 +3385,7 @@ ztest_dmu_objset_create_destroy(ztest_ds_t *zd, uint64 if (error) { if (error == ENOSPC) { ztest_record_enospc(FTAG); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); return; } fatal(0, "dmu_objset_create(%s) = %d", name, error); @@ -3432,7 +3433,7 @@ ztest_dmu_objset_create_destroy(ztest_ds_t *zd, uint64 dmu_objset_disown(os, FTAG); ztest_zd_fini(&zdtmp); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* @@ -3441,10 +3442,10 @@ ztest_dmu_objset_create_destroy(ztest_ds_t *zd, uint64 void ztest_dmu_snapshot_create_destroy(ztest_ds_t *zd, uint64_t id) { - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); (void) ztest_snapshot_destroy(zd->zd_name, id); (void) ztest_snapshot_create(zd->zd_name, id); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* @@ -3503,7 +3504,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_ char *osname = zd->zd_name; int error; - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); ztest_dsl_dataset_cleanup(osname, id); @@ -3580,7 +3581,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_ out: ztest_dsl_dataset_cleanup(osname, id); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* @@ -4513,9 +4514,9 @@ ztest_commit_callback(void *arg, int error) ASSERT3U(data->zcd_txg, !=, 0); /* Remove our callback from the list */ - (void) mutex_lock(&zcl.zcl_callbacks_lock); + mutex_enter(&zcl.zcl_callbacks_lock); list_remove(&zcl.zcl_callbacks, data); - (void) mutex_unlock(&zcl.zcl_callbacks_lock); + mutex_exit(&zcl.zcl_callbacks_lock); out: umem_free(data, sizeof (ztest_cb_data_t)); @@ -4617,7 +4618,7 @@ ztest_dmu_commit_callbacks(ztest_ds_t *zd, uint64_t id dmu_write(os, od[0].od_object, 0, sizeof (uint64_t), &txg, tx); - (void) mutex_lock(&zcl.zcl_callbacks_lock); + mutex_enter(&zcl.zcl_callbacks_lock); /* * Since commit callbacks don't have any ordering requirement and since @@ -4664,7 +4665,7 @@ ztest_dmu_commit_callbacks(ztest_ds_t *zd, uint64_t id tmp_cb = cb_data[i]; } - (void) mutex_unlock(&zcl.zcl_callbacks_lock); + mutex_exit(&zcl.zcl_callbacks_lock); dmu_tx_commit(tx); } @@ -4680,27 +4681,27 @@ ztest_dsl_prop_get_set(ztest_ds_t *zd, uint64_t id) ZFS_PROP_DEDUP }; - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); for (int p = 0; p < sizeof (proplist) / sizeof (proplist[0]); p++) (void) ztest_dsl_prop_set_uint64(zd->zd_name, proplist[p], ztest_random_dsl_prop(proplist[p]), (int)ztest_random(2)); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* ARGSUSED */ void ztest_remap_blocks(ztest_ds_t *zd, uint64_t id) { - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); int error = dmu_objset_remap_indirects(zd->zd_name); if (error == ENOSPC) error = 0; ASSERT0(error); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* ARGSUSED */ @@ -4709,7 +4710,7 @@ ztest_spa_prop_get_set(ztest_ds_t *zd, uint64_t id) { nvlist_t *props = NULL; - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); (void) ztest_spa_prop_set_uint64(ZPOOL_PROP_DEDUPDITTO, ZIO_DEDUPDITTO_MIN + ztest_random(ZIO_DEDUPDITTO_MIN)); @@ -4721,7 +4722,7 @@ ztest_spa_prop_get_set(ztest_ds_t *zd, uint64_t id) nvlist_free(props); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } static int @@ -4756,7 +4757,7 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, uint64_t id) char osname[ZFS_MAX_DATASET_NAME_LEN]; nvlist_t *holds; - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); dmu_objset_name(os, osname); @@ -4861,7 +4862,7 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, uint64_t id) VERIFY3U(dmu_objset_hold(fullname, FTAG, &origin), ==, ENOENT); out: - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* @@ -4889,11 +4890,11 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id) uint64_t guid0 = 0; boolean_t islog = B_FALSE; - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); maxfaults = MAXFAULTS(); leaves = MAX(zs->zs_mirrors, 1) * ztest_opts.zo_raidz; mirror_save = zs->zs_mirrors; - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); ASSERT(leaves >= 1); @@ -4903,7 +4904,7 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id) * they are in progress (i.e. spa_change_guid). Those * operations will have grabbed the name lock as writer. */ - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); /* * We need SCL_STATE here because we're going to look at vd0->vdev_tsd. @@ -4975,7 +4976,7 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id) if (sav->sav_count == 0) { spa_config_exit(spa, SCL_STATE, FTAG); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); return; } vd0 = sav->sav_vdevs[ztest_random(sav->sav_count)]; @@ -4989,7 +4990,7 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id) } spa_config_exit(spa, SCL_STATE, FTAG); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); /* * If we can tolerate two or more faults, or we're dealing @@ -5009,12 +5010,12 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id) * leaving the dataset in an inconsistent state. */ if (islog) - (void) rw_wrlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_WRITER); VERIFY(vdev_offline(spa, guid0, flags) != EBUSY); if (islog) - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } else { /* * Ideally we would like to be able to randomly @@ -5025,9 +5026,9 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id) * prevent a race between injection testing and * aux_vdev removal. */ - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); (void) vdev_online(spa, guid0, 0, NULL); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); } } @@ -5099,9 +5100,9 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id) offset + sizeof (bad) > psize - VDEV_LABEL_END_SIZE) continue; - VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + mutex_enter(&ztest_vdev_lock); if (mirror_save != zs->zs_mirrors) { - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); (void) close(fd); return; } @@ -5110,7 +5111,7 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id) fatal(1, "can't inject bad word at 0x%llx in %s", offset, pathrand); - VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); + mutex_exit(&ztest_vdev_lock); if (ztest_opts.zo_verbose >= 7) (void) printf("injected bad word into %s," @@ -5150,13 +5151,13 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) * Take the name lock as writer to prevent anyone else from changing * the pool and dataset properies we need to maintain during this test. */ - (void) rw_wrlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_WRITER); if (ztest_dsl_prop_set_uint64(zd->zd_name, ZFS_PROP_DEDUP, checksum, B_FALSE) != 0 || ztest_dsl_prop_set_uint64(zd->zd_name, ZFS_PROP_COPIES, 1, B_FALSE) != 0) { - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); return; } @@ -5175,7 +5176,7 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) dmu_tx_hold_write(tx, object, 0, copies * blocksize); txg = ztest_tx_assign(tx, TXG_WAIT, FTAG); if (txg == 0) { - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); return; } @@ -5223,7 +5224,7 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) abd_free(abd); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* @@ -5254,9 +5255,9 @@ ztest_reguid(ztest_ds_t *zd, uint64_t id) orig = spa_guid(spa); load = spa_load_guid(spa); - (void) rw_wrlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_WRITER); error = spa_change_guid(spa); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); if (error != 0) return; @@ -5280,7 +5281,7 @@ ztest_spa_rename(ztest_ds_t *zd, uint64_t id) char *oldname, *newname; spa_t *spa; - (void) rw_wrlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_WRITER); oldname = ztest_opts.zo_pool; newname = umem_alloc(strlen(oldname) + 5, UMEM_NOFAIL); @@ -5320,7 +5321,7 @@ ztest_spa_rename(ztest_ds_t *zd, uint64_t id) umem_free(newname, strlen(newname) + 1); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); } /* @@ -5676,18 +5677,18 @@ ztest_dataset_open(int d) ztest_dataset_name(name, ztest_opts.zo_pool, d); - (void) rw_rdlock(&ztest_name_lock); + rw_enter(&ztest_name_lock, RW_READER); error = ztest_dataset_create(name); if (error == ENOSPC) { - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); ztest_record_enospc(FTAG); return (error); } ASSERT(error == 0 || error == EEXIST); VERIFY0(dmu_objset_own(name, DMU_OST_OTHER, B_FALSE, zd, &os)); - (void) rw_unlock(&ztest_name_lock); + rw_exit(&ztest_name_lock); ztest_zd_init(zd, ZTEST_GET_SHARED_DS(d), os); @@ -5749,8 +5750,8 @@ ztest_run(ztest_shared_t *zs) /* * Initialize parent/child shared state. */ - VERIFY(_mutex_init(&ztest_vdev_lock, USYNC_THREAD, NULL) == 0); - VERIFY(rwlock_init(&ztest_name_lock, USYNC_THREAD, NULL) == 0); + mutex_init(&ztest_vdev_lock, NULL, USYNC_THREAD, NULL); + rw_init(&ztest_name_lock, NULL, USYNC_THREAD, NULL); zs->zs_thread_start = gethrtime(); zs->zs_thread_stop = @@ -5762,7 +5763,7 @@ ztest_run(ztest_shared_t *zs) ztest_random(ztest_opts.zo_passtime * NANOSEC); } - (void) _mutex_init(&zcl.zcl_callbacks_lock, USYNC_THREAD, NULL); + mutex_init(&zcl.zcl_callbacks_lock, NULL, USYNC_THREAD, NULL); list_create(&zcl.zcl_callbacks, sizeof (ztest_cb_data_t), offsetof(ztest_cb_data_t, zcd_node)); @@ -5909,10 +5910,10 @@ ztest_run(ztest_shared_t *zs) list_destroy(&zcl.zcl_callbacks); - (void) _mutex_destroy(&zcl.zcl_callbacks_lock); + mutex_destroy(&zcl.zcl_callbacks_lock); - (void) rwlock_destroy(&ztest_name_lock); - (void) _mutex_destroy(&ztest_vdev_lock); + rw_destroy(&ztest_name_lock); + mutex_destroy(&ztest_vdev_lock); } static void @@ -6056,8 +6057,8 @@ ztest_init(ztest_shared_t *zs) spa_t *spa; nvlist_t *nvroot, *props; - VERIFY(_mutex_init(&ztest_vdev_lock, USYNC_THREAD, NULL) == 0); - VERIFY(rwlock_init(&ztest_name_lock, USYNC_THREAD, NULL) == 0); + mutex_init(&ztest_vdev_lock, NULL, USYNC_THREAD, NULL); + rw_init(&ztest_name_lock, NULL, USYNC_THREAD, NULL); kernel_init(FREAD | FWRITE); @@ -6095,8 +6096,8 @@ ztest_init(ztest_shared_t *zs) ztest_run_zdb(ztest_opts.zo_pool); - (void) rwlock_destroy(&ztest_name_lock); - (void) _mutex_destroy(&ztest_vdev_lock); + rw_destroy(&ztest_name_lock); + mutex_destroy(&ztest_vdev_lock); } static void From owner-svn-src-all@freebsd.org Mon Apr 16 04:02:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3F7CF82DEB; Mon, 16 Apr 2018 04:02:53 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 818E987D18; Mon, 16 Apr 2018 04:02:53 +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 7C2E5184E6; Mon, 16 Apr 2018 04:02:53 +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 w3G42rd0026168; Mon, 16 Apr 2018 04:02:53 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G42rvM026167; Mon, 16 Apr 2018 04:02:53 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201804160402.w3G42rvM026167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 16 Apr 2018 04:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332546 - head/sys/powerpc/mpc85xx X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/mpc85xx X-SVN-Commit-Revision: 332546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:02:54 -0000 Author: jhibbits Date: Mon Apr 16 04:02:53 2018 New Revision: 332546 URL: https://svnweb.freebsd.org/changeset/base/332546 Log: Use a resource hint instead of environment variable for DIU mode This makes it more consistent with FreeBSD norms, rather than using Linux's norms. Now, instead of needing an environment variable video-mode=fslfb:1280x1024@60 Now one would use a hint: hint.fb.0.mode=1280x1024@60 Modified: head/sys/powerpc/mpc85xx/fsl_diu.c Modified: head/sys/powerpc/mpc85xx/fsl_diu.c ============================================================================== --- head/sys/powerpc/mpc85xx/fsl_diu.c Mon Apr 16 03:58:08 2018 (r332545) +++ head/sys/powerpc/mpc85xx/fsl_diu.c Mon Apr 16 04:02:53 2018 (r332546) @@ -363,12 +363,9 @@ diu_attach(device_t dev) /* TODO: Eventually, allow EDID to be dynamically provided. */ if (OF_getprop_alloc(node, "edid", &edid_cells) <= 0) { - /* - * u-boot uses the environment variable name 'video-mode', so - * just use the same name here. Should allow another variable - * that better fits our design model, but this is fine. - */ - if ((vm_name = kern_getenv("video-mode")) == NULL) { + /* Get a resource hint: hint.fb.N.mode */ + if (resource_string_value(device_get_name(dev), + device_get_unit(dev), "mode", &vm_name) != 0) { device_printf(dev, "No EDID data and no video-mode env set\n"); return (ENXIO); @@ -383,7 +380,7 @@ diu_attach(device_t dev) videomode = edid.edid_preferred_mode; } else { /* Parse video-mode kenv variable. */ - if ((err = sscanf(vm_name, "fslfb:%dx%d@%d", &w, &h, &r)) != 3) { + if ((err = sscanf(vm_name, "%dx%d@%d", &w, &h, &r)) != 3) { device_printf(dev, "Cannot parse video mode: %s\n", vm_name); return (ENXIO); From owner-svn-src-all@freebsd.org Mon Apr 16 04:10:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77B57F83578; Mon, 16 Apr 2018 04:10:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 204626A7B2; Mon, 16 Apr 2018 04:10:57 +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 1AACF1850D; Mon, 16 Apr 2018 04:10: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 w3G4AvCG028772; Mon, 16 Apr 2018 04:10:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G4AuGh028765; Mon, 16 Apr 2018 04:10:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160410.w3G4AuGh028765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 04:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332547 - in stable/11: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/op... X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core... X-SVN-Commit-Revision: 332547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:10:57 -0000 Author: mav Date: Mon Apr 16 04:10:56 2018 New Revision: 332547 URL: https://svnweb.freebsd.org/changeset/base/332547 Log: MFC r331701: MFV r331695, 331700: 9166 zfs storage pool checkpoint illumos/illumos-gate@8671400134a11c848244896ca51a7db4d0f69da4 The idea of Storage Pool Checkpoint (aka zpool checkpoint) deals with exactly that. It can be thought of as a “pool-wide snapshot†(or a variation of extreme rewind that doesn’t corrupt your data). It remembers the entire state of the pool at the point that it was taken and the user can revert back to it later or discard it. Its generic use case is an administrator that is about to perform a set of destructive actions to ZFS as part of a critical procedure. She takes a checkpoint of the pool before performing the actions, then rewinds back to it if one of them fails or puts the pool into an unexpected state. Otherwise, she discards it. With the assumption that no one else is making modifications to ZFS, she basically wraps all these actions into a “high-level transactionâ€. Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Reviewed by: Dan Kimmel Approved by: Richard Lowe Author: Serapheim Dimitropoulos Added: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c - copied unchanged from r331701, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_checkpoint.h - copied unchanged from r331701, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_checkpoint.h Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.8 stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/11/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c stable/11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_synctask.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_synctask.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h stable/11/sys/conf/files Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Mon Apr 16 04:02:53 2018 (r332546) +++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Mon Apr 16 04:10:56 2018 (r332547) @@ -21,7 +21,7 @@ .Nd display zpool debugging and consistency information .Sh SYNOPSIS .Nm -.Op Fl AbcdDFGhiLMPsvX +.Op Fl AbcdDFGhikLMPsvX .Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl I Ar inflight I/Os .Oo Fl o Ar var Ns = Ns Ar value Oc Ns ... @@ -170,6 +170,9 @@ Display information about intent log .Pq ZIL entries relating to each dataset. If specified multiple times, display counts of each intent log transaction type. +.It Fl k +Examine the checkpointed state of the pool. +Note, the on disk format of the pool is not reverted to the checkpointed state. .It Fl l Ar device Read the vdev labels from the specified device. .Nm Fl l Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 04:02:53 2018 (r332546) +++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 04:10:56 2018 (r332547) @@ -131,7 +131,7 @@ static void usage(void) { (void) fprintf(stderr, - "Usage:\t%s [-AbcdDFGhiLMPsvX] [-e [-V] [-p ...]] " + "Usage:\t%s [-AbcdDFGhikLMPsvX] [-e [-V] [-p ...]] " "[-I ]\n" "\t\t[-o =]... [-t ] [-U ] [-x ]\n" "\t\t[ [ ...]]\n" @@ -168,6 +168,8 @@ usage(void) (void) fprintf(stderr, " -h pool history\n"); (void) fprintf(stderr, " -i intent logs\n"); (void) fprintf(stderr, " -l read label contents\n"); + (void) fprintf(stderr, " -k examine the checkpointed state " + "of the pool\n"); (void) fprintf(stderr, " -L disable leak tracking (do not " "load spacemaps)\n"); (void) fprintf(stderr, " -m metaslabs\n"); @@ -729,6 +731,22 @@ get_prev_obsolete_spacemap_refcount(spa_t *spa) } static int +get_checkpoint_refcount(vdev_t *vd) +{ + int refcount = 0; + + if (vd->vdev_top == vd && vd->vdev_top_zap != 0 && + zap_contains(spa_meta_objset(vd->vdev_spa), + vd->vdev_top_zap, VDEV_TOP_ZAP_POOL_CHECKPOINT_SM) == 0) + refcount++; + + for (uint64_t c = 0; c < vd->vdev_children; c++) + refcount += get_checkpoint_refcount(vd->vdev_child[c]); + + return (refcount); +} + +static int verify_spacemap_refcounts(spa_t *spa) { uint64_t expected_refcount = 0; @@ -741,6 +759,7 @@ verify_spacemap_refcounts(spa_t *spa) actual_refcount += get_metaslab_refcount(spa->spa_root_vdev); actual_refcount += get_obsolete_refcount(spa->spa_root_vdev); actual_refcount += get_prev_obsolete_spacemap_refcount(spa); + actual_refcount += get_checkpoint_refcount(spa->spa_root_vdev); if (expected_refcount != actual_refcount) { (void) printf("space map refcount mismatch: expected %lld != " @@ -814,8 +833,8 @@ static void dump_metaslab_stats(metaslab_t *msp) { char maxbuf[32]; - range_tree_t *rt = msp->ms_tree; - avl_tree_t *t = &msp->ms_size_tree; + range_tree_t *rt = msp->ms_allocatable; + avl_tree_t *t = &msp->ms_allocatable_by_size; int free_pct = range_tree_space(rt) * 100 / msp->ms_size; /* max sure nicenum has enough space */ @@ -851,7 +870,7 @@ dump_metaslab(metaslab_t *msp) metaslab_load_wait(msp); if (!msp->ms_loaded) { VERIFY0(metaslab_load(msp)); - range_tree_stat_verify(msp->ms_tree); + range_tree_stat_verify(msp->ms_allocatable); } dump_metaslab_stats(msp); metaslab_unload(msp); @@ -2289,6 +2308,8 @@ dump_uberblock(uberblock_t *ub, const char *header, co snprintf_blkptr(blkbuf, sizeof (blkbuf), &ub->ub_rootbp); (void) printf("\trootbp = %s\n", blkbuf); } + (void) printf("\tcheckpoint_txg = %llu\n", + (u_longlong_t)ub->ub_checkpoint_txg); (void) printf("%s", footer ? footer : ""); } @@ -2649,6 +2670,7 @@ static const char *zdb_ot_extname[] = { typedef struct zdb_cb { zdb_blkstats_t zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1]; uint64_t zcb_removing_size; + uint64_t zcb_checkpoint_size; uint64_t zcb_dedup_asize; uint64_t zcb_dedup_blocks; uint64_t zcb_embedded_blocks[NUM_BP_EMBEDDED_TYPES]; @@ -2748,7 +2770,7 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t *zilog, const b } VERIFY3U(zio_wait(zio_claim(NULL, zcb->zcb_spa, - refcnt ? 0 : spa_first_txg(zcb->zcb_spa), + refcnt ? 0 : spa_min_claim_txg(zcb->zcb_spa), bp, NULL, NULL, ZIO_FLAG_CANFAIL)), ==, 0); } @@ -2950,7 +2972,7 @@ claim_segment_impl_cb(uint64_t inner_offset, vdev_t *v ASSERT(vdev_is_concrete(vd)); VERIFY0(metaslab_claim_impl(vd, offset, size, - spa_first_txg(vd->vdev_spa))); + spa_min_claim_txg(vd->vdev_spa))); } static void @@ -3011,70 +3033,6 @@ zdb_claim_removing(spa_t *spa, zdb_cb_t *zcb) spa_config_exit(spa, SCL_CONFIG, FTAG); } -/* - * vm_idxp is an in-out parameter which (for indirect vdevs) is the - * index in vim_entries that has the first entry in this metaslab. On - * return, it will be set to the first entry after this metaslab. - */ -static void -zdb_leak_init_ms(metaslab_t *msp, uint64_t *vim_idxp) -{ - metaslab_group_t *mg = msp->ms_group; - vdev_t *vd = mg->mg_vd; - vdev_t *rvd = vd->vdev_spa->spa_root_vdev; - - mutex_enter(&msp->ms_lock); - metaslab_unload(msp); - - /* - * We don't want to spend the CPU manipulating the size-ordered - * tree, so clear the range_tree ops. - */ - msp->ms_tree->rt_ops = NULL; - - (void) fprintf(stderr, - "\rloading vdev %llu of %llu, metaslab %llu of %llu ...", - (longlong_t)vd->vdev_id, - (longlong_t)rvd->vdev_children, - (longlong_t)msp->ms_id, - (longlong_t)vd->vdev_ms_count); - - /* - * For leak detection, we overload the metaslab ms_tree to - * contain allocated segments instead of free segments. As a - * result, we can't use the normal metaslab_load/unload - * interfaces. - */ - if (vd->vdev_ops == &vdev_indirect_ops) { - vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; - for (; *vim_idxp < vdev_indirect_mapping_num_entries(vim); - (*vim_idxp)++) { - vdev_indirect_mapping_entry_phys_t *vimep = - &vim->vim_entries[*vim_idxp]; - uint64_t ent_offset = DVA_MAPPING_GET_SRC_OFFSET(vimep); - uint64_t ent_len = DVA_GET_ASIZE(&vimep->vimep_dst); - ASSERT3U(ent_offset, >=, msp->ms_start); - if (ent_offset >= msp->ms_start + msp->ms_size) - break; - - /* - * Mappings do not cross metaslab boundaries, - * because we create them by walking the metaslabs. - */ - ASSERT3U(ent_offset + ent_len, <=, - msp->ms_start + msp->ms_size); - range_tree_add(msp->ms_tree, ent_offset, ent_len); - } - } else if (msp->ms_sm != NULL) { - VERIFY0(space_map_load(msp->ms_sm, msp->ms_tree, SM_ALLOC)); - } - - if (!msp->ms_loaded) { - msp->ms_loaded = B_TRUE; - } - mutex_exit(&msp->ms_lock); -} - /* ARGSUSED */ static int increment_indirect_mapping_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx) @@ -3131,7 +3089,243 @@ zdb_load_obsolete_counts(vdev_t *vd) return (counts); } +typedef struct checkpoint_sm_exclude_entry_arg { + vdev_t *cseea_vd; + uint64_t cseea_checkpoint_size; +} checkpoint_sm_exclude_entry_arg_t; + +static int +checkpoint_sm_exclude_entry_cb(maptype_t type, uint64_t offset, uint64_t size, + void *arg) +{ + checkpoint_sm_exclude_entry_arg_t *cseea = arg; + vdev_t *vd = cseea->cseea_vd; + metaslab_t *ms = vd->vdev_ms[offset >> vd->vdev_ms_shift]; + uint64_t end = offset + size; + + ASSERT(type == SM_FREE); + + /* + * Since the vdev_checkpoint_sm exists in the vdev level + * and the ms_sm space maps exist in the metaslab level, + * an entry in the checkpoint space map could theoretically + * cross the boundaries of the metaslab that it belongs. + * + * In reality, because of the way that we populate and + * manipulate the checkpoint's space maps currently, + * there shouldn't be any entries that cross metaslabs. + * Hence the assertion below. + * + * That said, there is no fundamental requirement that + * the checkpoint's space map entries should not cross + * metaslab boundaries. So if needed we could add code + * that handles metaslab-crossing segments in the future. + */ + VERIFY3U(offset, >=, ms->ms_start); + VERIFY3U(end, <=, ms->ms_start + ms->ms_size); + + /* + * By removing the entry from the allocated segments we + * also verify that the entry is there to begin with. + */ + mutex_enter(&ms->ms_lock); + range_tree_remove(ms->ms_allocatable, offset, size); + mutex_exit(&ms->ms_lock); + + cseea->cseea_checkpoint_size += size; + return (0); +} + static void +zdb_leak_init_vdev_exclude_checkpoint(vdev_t *vd, zdb_cb_t *zcb) +{ + spa_t *spa = vd->vdev_spa; + space_map_t *checkpoint_sm = NULL; + uint64_t checkpoint_sm_obj; + + /* + * If there is no vdev_top_zap, we are in a pool whose + * version predates the pool checkpoint feature. + */ + if (vd->vdev_top_zap == 0) + return; + + /* + * If there is no reference of the vdev_checkpoint_sm in + * the vdev_top_zap, then one of the following scenarios + * is true: + * + * 1] There is no checkpoint + * 2] There is a checkpoint, but no checkpointed blocks + * have been freed yet + * 3] The current vdev is indirect + * + * In these cases we return immediately. + */ + if (zap_contains(spa_meta_objset(spa), vd->vdev_top_zap, + VDEV_TOP_ZAP_POOL_CHECKPOINT_SM) != 0) + return; + + VERIFY0(zap_lookup(spa_meta_objset(spa), vd->vdev_top_zap, + VDEV_TOP_ZAP_POOL_CHECKPOINT_SM, sizeof (uint64_t), 1, + &checkpoint_sm_obj)); + + checkpoint_sm_exclude_entry_arg_t cseea; + cseea.cseea_vd = vd; + cseea.cseea_checkpoint_size = 0; + + VERIFY0(space_map_open(&checkpoint_sm, spa_meta_objset(spa), + checkpoint_sm_obj, 0, vd->vdev_asize, vd->vdev_ashift)); + space_map_update(checkpoint_sm); + + VERIFY0(space_map_iterate(checkpoint_sm, + checkpoint_sm_exclude_entry_cb, &cseea)); + space_map_close(checkpoint_sm); + + zcb->zcb_checkpoint_size += cseea.cseea_checkpoint_size; +} + +static void +zdb_leak_init_exclude_checkpoint(spa_t *spa, zdb_cb_t *zcb) +{ + vdev_t *rvd = spa->spa_root_vdev; + for (uint64_t c = 0; c < rvd->vdev_children; c++) { + ASSERT3U(c, ==, rvd->vdev_child[c]->vdev_id); + zdb_leak_init_vdev_exclude_checkpoint(rvd->vdev_child[c], zcb); + } +} + +static void +load_concrete_ms_allocatable_trees(spa_t *spa, maptype_t maptype) +{ + vdev_t *rvd = spa->spa_root_vdev; + for (uint64_t i = 0; i < rvd->vdev_children; i++) { + vdev_t *vd = rvd->vdev_child[i]; + + ASSERT3U(i, ==, vd->vdev_id); + + if (vd->vdev_ops == &vdev_indirect_ops) + continue; + + for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { + metaslab_t *msp = vd->vdev_ms[m]; + + (void) fprintf(stderr, + "\rloading concrete vdev %llu, " + "metaslab %llu of %llu ...", + (longlong_t)vd->vdev_id, + (longlong_t)msp->ms_id, + (longlong_t)vd->vdev_ms_count); + + mutex_enter(&msp->ms_lock); + metaslab_unload(msp); + + /* + * We don't want to spend the CPU manipulating the + * size-ordered tree, so clear the range_tree ops. + */ + msp->ms_allocatable->rt_ops = NULL; + + if (msp->ms_sm != NULL) { + VERIFY0(space_map_load(msp->ms_sm, + msp->ms_allocatable, maptype)); + } + if (!msp->ms_loaded) + msp->ms_loaded = B_TRUE; + mutex_exit(&msp->ms_lock); + } + } +} + +/* + * vm_idxp is an in-out parameter which (for indirect vdevs) is the + * index in vim_entries that has the first entry in this metaslab. + * On return, it will be set to the first entry after this metaslab. + */ +static void +load_indirect_ms_allocatable_tree(vdev_t *vd, metaslab_t *msp, + uint64_t *vim_idxp) +{ + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + + mutex_enter(&msp->ms_lock); + metaslab_unload(msp); + + /* + * We don't want to spend the CPU manipulating the + * size-ordered tree, so clear the range_tree ops. + */ + msp->ms_allocatable->rt_ops = NULL; + + for (; *vim_idxp < vdev_indirect_mapping_num_entries(vim); + (*vim_idxp)++) { + vdev_indirect_mapping_entry_phys_t *vimep = + &vim->vim_entries[*vim_idxp]; + uint64_t ent_offset = DVA_MAPPING_GET_SRC_OFFSET(vimep); + uint64_t ent_len = DVA_GET_ASIZE(&vimep->vimep_dst); + ASSERT3U(ent_offset, >=, msp->ms_start); + if (ent_offset >= msp->ms_start + msp->ms_size) + break; + + /* + * Mappings do not cross metaslab boundaries, + * because we create them by walking the metaslabs. + */ + ASSERT3U(ent_offset + ent_len, <=, + msp->ms_start + msp->ms_size); + range_tree_add(msp->ms_allocatable, ent_offset, ent_len); + } + + if (!msp->ms_loaded) + msp->ms_loaded = B_TRUE; + mutex_exit(&msp->ms_lock); +} + +static void +zdb_leak_init_prepare_indirect_vdevs(spa_t *spa, zdb_cb_t *zcb) +{ + vdev_t *rvd = spa->spa_root_vdev; + for (uint64_t c = 0; c < rvd->vdev_children; c++) { + vdev_t *vd = rvd->vdev_child[c]; + + ASSERT3U(c, ==, vd->vdev_id); + + if (vd->vdev_ops != &vdev_indirect_ops) + continue; + + /* + * Note: we don't check for mapping leaks on + * removing vdevs because their ms_allocatable's + * are used to look for leaks in allocated space. + */ + zcb->zcb_vd_obsolete_counts[c] = zdb_load_obsolete_counts(vd); + + /* + * Normally, indirect vdevs don't have any + * metaslabs. We want to set them up for + * zio_claim(). + */ + VERIFY0(vdev_metaslab_init(vd, 0)); + + vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping; + uint64_t vim_idx = 0; + for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { + + (void) fprintf(stderr, + "\rloading indirect vdev %llu, " + "metaslab %llu of %llu ...", + (longlong_t)vd->vdev_id, + (longlong_t)vd->vdev_ms[m]->ms_id, + (longlong_t)vd->vdev_ms_count); + + load_indirect_ms_allocatable_tree(vd, vd->vdev_ms[m], + &vim_idx); + } + ASSERT3U(vim_idx, ==, vdev_indirect_mapping_num_entries(vim)); + } +} + +static void zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) { zcb->zcb_spa = spa; @@ -3142,7 +3336,7 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) /* * We are going to be changing the meaning of the metaslab's - * ms_tree. Ensure that the allocator doesn't try to + * ms_allocatable. Ensure that the allocator doesn't try to * use the tree. */ spa->spa_normal_class->mc_ops = &zdb_metaslab_ops; @@ -3152,39 +3346,37 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) umem_zalloc(rvd->vdev_children * sizeof (uint32_t *), UMEM_NOFAIL); + /* + * For leak detection, we overload the ms_allocatable trees + * to contain allocated segments instead of free segments. + * As a result, we can't use the normal metaslab_load/unload + * interfaces. + */ + zdb_leak_init_prepare_indirect_vdevs(spa, zcb); + load_concrete_ms_allocatable_trees(spa, SM_ALLOC); - for (uint64_t c = 0; c < rvd->vdev_children; c++) { - vdev_t *vd = rvd->vdev_child[c]; - uint64_t vim_idx = 0; + /* + * On load_concrete_ms_allocatable_trees() we loaded all the + * allocated entries from the ms_sm to the ms_allocatable for + * each metaslab. If the pool has a checkpoint or is in the + * middle of discarding a checkpoint, some of these blocks + * may have been freed but their ms_sm may not have been + * updated because they are referenced by the checkpoint. In + * order to avoid false-positives during leak-detection, we + * go through the vdev's checkpoint space map and exclude all + * its entries from their relevant ms_allocatable. + * + * We also aggregate the space held by the checkpoint and add + * it to zcb_checkpoint_size. + * + * Note that at this point we are also verifying that all the + * entries on the checkpoint_sm are marked as allocated in + * the ms_sm of their relevant metaslab. + * [see comment in checkpoint_sm_exclude_entry_cb()] + */ + zdb_leak_init_exclude_checkpoint(spa, zcb); - ASSERT3U(c, ==, vd->vdev_id); - - /* - * Note: we don't check for mapping leaks on - * removing vdevs because their ms_tree's are - * used to look for leaks in allocated space. - */ - if (vd->vdev_ops == &vdev_indirect_ops) { - zcb->zcb_vd_obsolete_counts[c] = - zdb_load_obsolete_counts(vd); - - /* - * Normally, indirect vdevs don't have any - * metaslabs. We want to set them up for - * zio_claim(). - */ - VERIFY0(vdev_metaslab_init(vd, 0)); - } - - for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { - zdb_leak_init_ms(vd->vdev_ms[m], &vim_idx); - } - if (vd->vdev_ops == &vdev_indirect_ops) { - ASSERT3U(vim_idx, ==, - vdev_indirect_mapping_num_entries( - vd->vdev_indirect_mapping)); - } - } + /* for cleaner progress output */ (void) fprintf(stderr, "\n"); if (bpobj_is_open(&dp->dp_obsolete_bpobj)) { @@ -3193,12 +3385,16 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) (void) bpobj_iterate_nofree(&dp->dp_obsolete_bpobj, increment_indirect_mapping_cb, zcb, NULL); } + } else { + /* + * If leak tracing is disabled, we still need to consider + * any checkpointed space in our space verification. + */ + zcb->zcb_checkpoint_size += spa_get_checkpoint_space(spa); } spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); - zdb_ddt_leak_init(spa, zcb); - spa_config_exit(spa, SCL_CONFIG, FTAG); } @@ -3225,7 +3421,7 @@ zdb_check_for_obsolete_leaks(vdev_t *vd, zdb_cb_t *zcb for (uint64_t inner_offset = 0; inner_offset < DVA_GET_ASIZE(&vimep->vimep_dst); inner_offset += 1 << vd->vdev_ashift) { - if (range_tree_contains(msp->ms_tree, + if (range_tree_contains(msp->ms_allocatable, offset + inner_offset, 1 << vd->vdev_ashift)) { obsolete_bytes += 1 << vd->vdev_ashift; } @@ -3291,23 +3487,23 @@ zdb_leak_fini(spa_t *spa, zdb_cb_t *zcb) ASSERT3P(mg, ==, msp->ms_group); /* - * The ms_tree has been overloaded to - * contain allocated segments. Now that we - * finished traversing all blocks, any - * block that remains in the ms_tree + * ms_allocatable has been overloaded + * to contain allocated segments. Now that + * we finished traversing all blocks, any + * block that remains in the ms_allocatable * represents an allocated block that we * did not claim during the traversal. * Claimed blocks would have been removed - * from the ms_tree. For indirect vdevs, - * space remaining in the tree represents - * parts of the mapping that are not - * referenced, which is not a bug. + * from the ms_allocatable. For indirect + * vdevs, space remaining in the tree + * represents parts of the mapping that are + * not referenced, which is not a bug. */ if (vd->vdev_ops == &vdev_indirect_ops) { - range_tree_vacate(msp->ms_tree, + range_tree_vacate(msp->ms_allocatable, NULL, NULL); } else { - range_tree_vacate(msp->ms_tree, + range_tree_vacate(msp->ms_allocatable, zdb_leak, vd); } @@ -3430,7 +3626,7 @@ dump_block_stats(spa_t *spa) total_alloc = norm_alloc + metaslab_class_get_alloc(spa_log_class(spa)); total_found = tzb->zb_asize - zcb.zcb_dedup_asize + - zcb.zcb_removing_size; + zcb.zcb_removing_size + zcb.zcb_checkpoint_size; if (total_found == total_alloc) { if (!dump_opt['L']) @@ -3839,7 +4035,385 @@ verify_device_removal_feature_counts(spa_t *spa) return (ret); } +#define BOGUS_SUFFIX "_CHECKPOINTED_UNIVERSE" +/* + * Import the checkpointed state of the pool specified by the target + * parameter as readonly. The function also accepts a pool config + * as an optional parameter, else it attempts to infer the config by + * the name of the target pool. + * + * Note that the checkpointed state's pool name will be the name of + * the original pool with the above suffix appened to it. In addition, + * if the target is not a pool name (e.g. a path to a dataset) then + * the new_path parameter is populated with the updated path to + * reflect the fact that we are looking into the checkpointed state. + * + * The function returns a newly-allocated copy of the name of the + * pool containing the checkpointed state. When this copy is no + * longer needed it should be freed with free(3C). Same thing + * applies to the new_path parameter if allocated. + */ +static char * +import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path) +{ + int error = 0; + char *poolname, *bogus_name; + + /* If the target is not a pool, the extract the pool name */ + char *path_start = strchr(target, '/'); + if (path_start != NULL) { + size_t poolname_len = path_start - target; + poolname = strndup(target, poolname_len); + } else { + poolname = target; + } + + if (cfg == NULL) { + error = spa_get_stats(poolname, &cfg, NULL, 0); + if (error != 0) { + fatal("Tried to read config of pool \"%s\" but " + "spa_get_stats() failed with error %d\n", + poolname, error); + } + } + + (void) asprintf(&bogus_name, "%s%s", poolname, BOGUS_SUFFIX); + fnvlist_add_string(cfg, ZPOOL_CONFIG_POOL_NAME, bogus_name); + + error = spa_import(bogus_name, cfg, NULL, + ZFS_IMPORT_MISSING_LOG | ZFS_IMPORT_CHECKPOINT); + if (error != 0) { + fatal("Tried to import pool \"%s\" but spa_import() failed " + "with error %d\n", bogus_name, error); + } + + if (new_path != NULL && path_start != NULL) + (void) asprintf(new_path, "%s%s", bogus_name, path_start); + + if (target != poolname) + free(poolname); + + return (bogus_name); +} + +typedef struct verify_checkpoint_sm_entry_cb_arg { + vdev_t *vcsec_vd; + + /* the following fields are only used for printing progress */ + uint64_t vcsec_entryid; + uint64_t vcsec_num_entries; +} verify_checkpoint_sm_entry_cb_arg_t; + +#define ENTRIES_PER_PROGRESS_UPDATE 10000 + +static int +verify_checkpoint_sm_entry_cb(maptype_t type, uint64_t offset, uint64_t size, + void *arg) +{ + verify_checkpoint_sm_entry_cb_arg_t *vcsec = arg; + vdev_t *vd = vcsec->vcsec_vd; + metaslab_t *ms = vd->vdev_ms[offset >> vd->vdev_ms_shift]; + uint64_t end = offset + size; + + ASSERT(type == SM_FREE); + + if ((vcsec->vcsec_entryid % ENTRIES_PER_PROGRESS_UPDATE) == 0) { + (void) fprintf(stderr, + "\rverifying vdev %llu, space map entry %llu of %llu ...", + (longlong_t)vd->vdev_id, + (longlong_t)vcsec->vcsec_entryid, + (longlong_t)vcsec->vcsec_num_entries); + } + vcsec->vcsec_entryid++; + + /* + * See comment in checkpoint_sm_exclude_entry_cb() + */ + VERIFY3U(offset, >=, ms->ms_start); + VERIFY3U(end, <=, ms->ms_start + ms->ms_size); + + /* + * The entries in the vdev_checkpoint_sm should be marked as + * allocated in the checkpointed state of the pool, therefore + * their respective ms_allocateable trees should not contain them. + */ + mutex_enter(&ms->ms_lock); + range_tree_verify(ms->ms_allocatable, offset, size); + mutex_exit(&ms->ms_lock); + + return (0); +} + +/* + * Verify that all segments in the vdev_checkpoint_sm are allocated + * according to the checkpoint's ms_sm (i.e. are not in the checkpoint's + * ms_allocatable). + * + * Do so by comparing the checkpoint space maps (vdev_checkpoint_sm) of + * each vdev in the current state of the pool to the metaslab space maps + * (ms_sm) of the checkpointed state of the pool. + * + * Note that the function changes the state of the ms_allocatable + * trees of the current spa_t. The entries of these ms_allocatable + * trees are cleared out and then repopulated from with the free + * entries of their respective ms_sm space maps. + */ static void +verify_checkpoint_vdev_spacemaps(spa_t *checkpoint, spa_t *current) +{ + vdev_t *ckpoint_rvd = checkpoint->spa_root_vdev; + vdev_t *current_rvd = current->spa_root_vdev; + + load_concrete_ms_allocatable_trees(checkpoint, SM_FREE); + + for (uint64_t c = 0; c < ckpoint_rvd->vdev_children; c++) { + vdev_t *ckpoint_vd = ckpoint_rvd->vdev_child[c]; + vdev_t *current_vd = current_rvd->vdev_child[c]; + + space_map_t *checkpoint_sm = NULL; + uint64_t checkpoint_sm_obj; + + if (ckpoint_vd->vdev_ops == &vdev_indirect_ops) { + /* + * Since we don't allow device removal in a pool + * that has a checkpoint, we expect that all removed + * vdevs were removed from the pool before the + * checkpoint. + */ + ASSERT3P(current_vd->vdev_ops, ==, &vdev_indirect_ops); + continue; + } + + /* + * If the checkpoint space map doesn't exist, then nothing + * here is checkpointed so there's nothing to verify. + */ + if (current_vd->vdev_top_zap == 0 || + zap_contains(spa_meta_objset(current), + current_vd->vdev_top_zap, + VDEV_TOP_ZAP_POOL_CHECKPOINT_SM) != 0) + continue; + + VERIFY0(zap_lookup(spa_meta_objset(current), + current_vd->vdev_top_zap, VDEV_TOP_ZAP_POOL_CHECKPOINT_SM, + sizeof (uint64_t), 1, &checkpoint_sm_obj)); + + VERIFY0(space_map_open(&checkpoint_sm, spa_meta_objset(current), + checkpoint_sm_obj, 0, current_vd->vdev_asize, + current_vd->vdev_ashift)); + space_map_update(checkpoint_sm); + + verify_checkpoint_sm_entry_cb_arg_t vcsec; + vcsec.vcsec_vd = ckpoint_vd; + vcsec.vcsec_entryid = 0; + vcsec.vcsec_num_entries = + space_map_length(checkpoint_sm) / sizeof (uint64_t); + VERIFY0(space_map_iterate(checkpoint_sm, + verify_checkpoint_sm_entry_cb, &vcsec)); + dump_spacemap(current->spa_meta_objset, checkpoint_sm); + space_map_close(checkpoint_sm); + } + + /* + * If we've added vdevs since we took the checkpoint, ensure + * that their checkpoint space maps are empty. + */ + if (ckpoint_rvd->vdev_children < current_rvd->vdev_children) { + for (uint64_t c = ckpoint_rvd->vdev_children; + c < current_rvd->vdev_children; c++) { + vdev_t *current_vd = current_rvd->vdev_child[c]; + ASSERT3P(current_vd->vdev_checkpoint_sm, ==, NULL); + } + } + + /* for cleaner progress output */ + (void) fprintf(stderr, "\n"); +} + +/* + * Verifies that all space that's allocated in the checkpoint is + * still allocated in the current version, by checking that everything + * in checkpoint's ms_allocatable (which is actually allocated, not + * allocatable/free) is not present in current's ms_allocatable. + * + * Note that the function changes the state of the ms_allocatable + * trees of both spas when called. The entries of all ms_allocatable + * trees are cleared out and then repopulated from their respective + * ms_sm space maps. In the checkpointed state we load the allocated + * entries, and in the current state we load the free entries. + */ +static void +verify_checkpoint_ms_spacemaps(spa_t *checkpoint, spa_t *current) +{ + vdev_t *ckpoint_rvd = checkpoint->spa_root_vdev; + vdev_t *current_rvd = current->spa_root_vdev; + + load_concrete_ms_allocatable_trees(checkpoint, SM_ALLOC); + load_concrete_ms_allocatable_trees(current, SM_FREE); + + for (uint64_t i = 0; i < ckpoint_rvd->vdev_children; i++) { + vdev_t *ckpoint_vd = ckpoint_rvd->vdev_child[i]; + vdev_t *current_vd = current_rvd->vdev_child[i]; + + if (ckpoint_vd->vdev_ops == &vdev_indirect_ops) { + /* + * See comment in verify_checkpoint_vdev_spacemaps() + */ + ASSERT3P(current_vd->vdev_ops, ==, &vdev_indirect_ops); + continue; + } + + for (uint64_t m = 0; m < ckpoint_vd->vdev_ms_count; m++) { + metaslab_t *ckpoint_msp = ckpoint_vd->vdev_ms[m]; + metaslab_t *current_msp = current_vd->vdev_ms[m]; + + (void) fprintf(stderr, + "\rverifying vdev %llu of %llu, " + "metaslab %llu of %llu ...", + (longlong_t)current_vd->vdev_id, + (longlong_t)current_rvd->vdev_children, + (longlong_t)current_vd->vdev_ms[m]->ms_id, + (longlong_t)current_vd->vdev_ms_count); + + /* + * We walk through the ms_allocatable trees that + * are loaded with the allocated blocks from the + * ms_sm spacemaps of the checkpoint. For each + * one of these ranges we ensure that none of them + * exists in the ms_allocatable trees of the + * current state which are loaded with the ranges + * that are currently free. + * + * This way we ensure that none of the blocks that + * are part of the checkpoint were freed by mistake. + */ + range_tree_walk(ckpoint_msp->ms_allocatable, + (range_tree_func_t *)range_tree_verify, + current_msp->ms_allocatable); + } + } + + /* for cleaner progress output */ + (void) fprintf(stderr, "\n"); +} + +static void +verify_checkpoint_blocks(spa_t *spa) +{ + spa_t *checkpoint_spa; + char *checkpoint_pool; + nvlist_t *config = NULL; + int error = 0; + + /* + * We import the checkpointed state of the pool (under a different + * name) so we can do verification on it against the current state + * of the pool. + */ + checkpoint_pool = import_checkpointed_state(spa->spa_name, config, + NULL); + ASSERT(strcmp(spa->spa_name, checkpoint_pool) != 0); + + error = spa_open(checkpoint_pool, &checkpoint_spa, FTAG); + if (error != 0) { + fatal("Tried to open pool \"%s\" but spa_open() failed with " + "error %d\n", checkpoint_pool, error); + } + + /* + * Ensure that ranges in the checkpoint space maps of each vdev + * are allocated according to the checkpointed state's metaslab + * space maps. + */ + verify_checkpoint_vdev_spacemaps(checkpoint_spa, spa); + + /* + * Ensure that allocated ranges in the checkpoint's metaslab + * space maps remain allocated in the metaslab space maps of + * the current state. + */ + verify_checkpoint_ms_spacemaps(checkpoint_spa, spa); + + /* + * Once we are done, we get rid of the checkpointed state. + */ + spa_close(checkpoint_spa, FTAG); + free(checkpoint_pool); +} + +static void +dump_leftover_checkpoint_blocks(spa_t *spa) +{ + vdev_t *rvd = spa->spa_root_vdev; + + for (uint64_t i = 0; i < rvd->vdev_children; i++) { + vdev_t *vd = rvd->vdev_child[i]; + + space_map_t *checkpoint_sm = NULL; + uint64_t checkpoint_sm_obj; + + if (vd->vdev_top_zap == 0) + continue; + + if (zap_contains(spa_meta_objset(spa), vd->vdev_top_zap, + VDEV_TOP_ZAP_POOL_CHECKPOINT_SM) != 0) + continue; + + VERIFY0(zap_lookup(spa_meta_objset(spa), vd->vdev_top_zap, + VDEV_TOP_ZAP_POOL_CHECKPOINT_SM, + sizeof (uint64_t), 1, &checkpoint_sm_obj)); + + VERIFY0(space_map_open(&checkpoint_sm, spa_meta_objset(spa), + checkpoint_sm_obj, 0, vd->vdev_asize, vd->vdev_ashift)); + space_map_update(checkpoint_sm); + dump_spacemap(spa->spa_meta_objset, checkpoint_sm); + space_map_close(checkpoint_sm); + } +} + +static int +verify_checkpoint(spa_t *spa) +{ + uberblock_t checkpoint; + int error; + + if (!spa_feature_is_active(spa, SPA_FEATURE_POOL_CHECKPOINT)) + return (0); + + error = zap_lookup(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT, + DMU_POOL_ZPOOL_CHECKPOINT, sizeof (uint64_t), + sizeof (uberblock_t) / sizeof (uint64_t), &checkpoint); + + if (error == ENOENT) { + /* + * If the feature is active but the uberblock is missing + * then we must be in the middle of discarding the + * checkpoint. + */ + (void) printf("\nPartially discarded checkpoint " + "state found:\n"); + dump_leftover_checkpoint_blocks(spa); + return (0); + } else if (error != 0) { + (void) printf("lookup error %d when looking for " + "checkpointed uberblock in MOS\n", error); + return (error); + } + dump_uberblock(&checkpoint, "\nCheckpointed uberblock found:\n", "\n"); + + if (checkpoint.ub_checkpoint_txg == 0) { + (void) printf("\nub_checkpoint_txg not set in checkpointed " + "uberblock\n"); + error = 3; + } + + if (error == 0) + verify_checkpoint_blocks(spa); + + return (error); +} + +static void dump_zpool(spa_t *spa) { dsl_pool_t *dp = spa_get_dsl(spa); @@ -3938,6 +4512,9 @@ dump_zpool(spa_t *spa) if (dump_opt['h']) dump_history(spa); + if (rc == 0 && !dump_opt['L']) + rc = verify_checkpoint(spa); + if (rc != 0) { dump_debug_buffer(); exit(rc); @@ -4451,6 +5028,7 @@ main(int argc, char **argv) int rewind = ZPOOL_NEVER_REWIND; char *spa_config_path_env; boolean_t target_is_spa = B_TRUE; + nvlist_t *cfg = NULL; (void) setrlimit(RLIMIT_NOFILE, &rl); (void) enable_extended_FILE_stdio(-1, -1); @@ -4467,7 +5045,7 @@ main(int argc, char **argv) spa_config_path = spa_config_path_env; while ((c = getopt(argc, argv, - "AbcCdDeEFGhiI:lLmMo:Op:PqRsSt:uU:vVx:X")) != -1) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Apr 16 04:11:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40977F83832; Mon, 16 Apr 2018 04:11: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2B266AA4D; Mon, 16 Apr 2018 04:11: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 DD4651854E; Mon, 16 Apr 2018 04:11: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 w3G4Bmcq030371; Mon, 16 Apr 2018 04:11:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G4BmWs030370; Mon, 16 Apr 2018 04:11:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160411.w3G4BmWs030370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 04:11: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: r332548 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:11:49 -0000 Author: mav Date: Mon Apr 16 04:11:48 2018 New Revision: 332548 URL: https://svnweb.freebsd.org/changeset/base/332548 Log: MFC r331703: MFV 331702: 9187 racing condition between vdev label and spa_last_synced_txg in vdev_validate illumos/illumos-gate@d1de72cfa29ab77ff80e2bb0e668a6afa5bccaf0 ztest failed with uncorrectable IO error despite having the fix for #7163. Both sides of the mirror have CANT_OPEN_BAD_LABEL, which also distinguishes it from that issue. Definitely seems like a racing condition between the vdev_validate and spa_sync: 1. Thread A (spa_sync): vdev label is updated to latest txg 2. Thread B (vdev_validate): vdev label's txg is compared to spa_last_synced_txg and is ahead. 3. Thread A (spa_sync): spa_last_synced_txg is updated to latest txg. Solution: do not check txg in vdev_validate unless config lock is held. Reviewed by: George Wilson Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Pavel Zakharov Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 04:10:56 2018 (r332547) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Apr 16 04:11:48 2018 (r332548) @@ -1696,8 +1696,11 @@ vdev_validate(vdev_t *vd) /* * If we are performing an extreme rewind, we allow for a label that * was modified at a point after the current txg. + * If config lock is not held do not check for the txg. spa_sync could + * be updating the vdev's label before updating spa_last_synced_txg. */ - if (spa->spa_extreme_rewind || spa_last_synced_txg(spa) == 0) + if (spa->spa_extreme_rewind || spa_last_synced_txg(spa) == 0 || + spa_config_held(spa, SCL_CONFIG, RW_WRITER) != SCL_CONFIG) txg = UINT64_MAX; else txg = spa_last_synced_txg(spa); From owner-svn-src-all@freebsd.org Mon Apr 16 04:13:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C374F83A3C; Mon, 16 Apr 2018 04:13:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E03596AD65; Mon, 16 Apr 2018 04:13: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 DB33F1868D; Mon, 16 Apr 2018 04:13: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 w3G4DJ8g031368; Mon, 16 Apr 2018 04:13:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G4DJdH031367; Mon, 16 Apr 2018 04:13:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160413.w3G4DJdH031367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 04:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332549 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:13:20 -0000 Author: mav Date: Mon Apr 16 04:13:19 2018 New Revision: 332549 URL: https://svnweb.freebsd.org/changeset/base/332549 Log: MFC r331705: MFV 331704: 9191 dump vdev tree to zfs_dbgmsg when spa load fails due to missing log devices illumos/illumos-gate@ccef24b493bcbd146fcd6d8946666cae081470b6 Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Pavel Zakharov Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 04:11:48 2018 (r332548) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 04:13:19 2018 (r332549) @@ -1887,6 +1887,7 @@ spa_check_for_missing_logs(spa_t *spa) if (idx > 0) { spa_load_failed(spa, "some log devices are missing"); + vdev_dbgmsg_print_tree(rvd, 2); return (SET_ERROR(ENXIO)); } } else { @@ -1898,6 +1899,7 @@ spa_check_for_missing_logs(spa_t *spa) spa_set_log_state(spa, SPA_LOG_CLEAR); spa_load_note(spa, "some log devices are " "missing, ZIL is dropped."); + vdev_dbgmsg_print_tree(rvd, 2); break; } } From owner-svn-src-all@freebsd.org Mon Apr 16 04:14:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A28DF83B7B; Mon, 16 Apr 2018 04:14:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CF2A6AEE0; Mon, 16 Apr 2018 04:14:04 +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 37C0B1868F; Mon, 16 Apr 2018 04:14:04 +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 w3G4E41d031457; Mon, 16 Apr 2018 04:14:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G4E3GQ031448; Mon, 16 Apr 2018 04:14:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160414.w3G4E3GQ031448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 04:14:03 +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: r332550 - in stable/11: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/c... X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/co... X-SVN-Commit-Revision: 332550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:14:04 -0000 Author: mav Date: Mon Apr 16 04:14:03 2018 New Revision: 332550 URL: https://svnweb.freebsd.org/changeset/base/332550 Log: MFC r331707: MFV r331706: 9235 rename zpool_rewind_policy_t to zpool_load_policy_t illumos/illumos-gate@5dafeea3ebd2dd77affc802bcb90f63faf01589f We want to be able to pass various settings during import/open of a pool, which are not only related to rewind. Instead of adding a new policy and duplicate a bunch of code, we should just rename rewind_policy to a more generic term like load_policy. For instance, we'd like to set spa->spa_import_flags from the nvlist, rather from a flags parameter passed to spa_import as in some cases we want those flags not only for the import case, but also for the open case. One such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would allow zfs to open a pool when logs are missing. Reviewed by: Matt Ahrens Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Pavel Zakharov Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.c stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Apr 16 04:14:03 2018 (r332550) @@ -5222,8 +5222,8 @@ main(int argc, char **argv) (dump_opt['X'] ? ZPOOL_EXTREME_REWIND : 0); if (nvlist_alloc(&policy, NV_UNIQUE_NAME_TYPE, 0) != 0 || - nvlist_add_uint64(policy, ZPOOL_REWIND_REQUEST_TXG, max_txg) != 0 || - nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind) != 0) + nvlist_add_uint64(policy, ZPOOL_LOAD_REQUEST_TXG, max_txg) != 0 || + nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY, rewind) != 0) fatal("internal error: %s", strerror(ENOMEM)); error = 0; @@ -5240,7 +5240,7 @@ main(int argc, char **argv) } if (nvlist_add_nvlist(cfg, - ZPOOL_REWIND_POLICY, policy) != 0) { + ZPOOL_LOAD_POLICY, policy) != 0) { fatal("can't open '%s': %s", target, strerror(ENOMEM)); } Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Apr 16 04:14:03 2018 (r332550) @@ -2357,8 +2357,9 @@ zpool_do_import(int argc, char **argv) /* In the future, we can capture further policy and include it here */ if (nvlist_alloc(&policy, NV_UNIQUE_NAME, 0) != 0 || - nvlist_add_uint64(policy, ZPOOL_REWIND_REQUEST_TXG, txg) != 0 || - nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind_policy) != 0) + nvlist_add_uint64(policy, ZPOOL_LOAD_REQUEST_TXG, txg) != 0 || + nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY, + rewind_policy) != 0) goto error; if (searchdirs == NULL) { @@ -2483,7 +2484,7 @@ zpool_do_import(int argc, char **argv) if (do_destroyed && pool_state != POOL_STATE_DESTROYED) continue; - verify(nvlist_add_nvlist(config, ZPOOL_REWIND_POLICY, + verify(nvlist_add_nvlist(config, ZPOOL_LOAD_POLICY, policy) == 0); if (argc == 0) { @@ -3971,8 +3972,10 @@ zpool_do_clear(int argc, char **argv) /* In future, further rewind policy choices can be passed along here */ if (nvlist_alloc(&policy, NV_UNIQUE_NAME, 0) != 0 || - nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind_policy) != 0) + nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY, + rewind_policy) != 0) { return (1); + } pool = argv[0]; device = argc == 2 ? argv[1] : NULL; Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Apr 16 04:14:03 2018 (r332550) @@ -396,7 +396,7 @@ typedef struct importargs { int can_be_active : 1; /* can the pool be active? */ int unique : 1; /* does 'poolname' already exist? */ int exists : 1; /* set on return if pool already exists */ - nvlist_t *policy; /* rewind policy (rewind txg, etc.) */ + nvlist_t *policy; /* load policy (max txg, rewind, etc.) */ } importargs_t; extern nvlist_t *zpool_search_import(libzfs_handle_t *, importargs_t *); Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Mon Apr 16 04:14:03 2018 (r332550) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright 2015 RackTop Systems. * Copyright 2016 Nexenta Systems, Inc. */ @@ -776,7 +776,7 @@ get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boo } if (policy != NULL) { - if (nvlist_add_nvlist(config, ZPOOL_REWIND_POLICY, + if (nvlist_add_nvlist(config, ZPOOL_LOAD_POLICY, policy) != 0) goto nomem; } Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Apr 16 04:14:03 2018 (r332550) @@ -1715,7 +1715,7 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *con nvlist_t *props, int flags) { zfs_cmd_t zc = { 0 }; - zpool_rewind_policy_t policy; + zpool_load_policy_t policy; nvlist_t *nv = NULL; nvlist_t *nvinfo = NULL; nvlist_t *missing = NULL; @@ -1787,7 +1787,7 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *con zcmd_free_nvlists(&zc); - zpool_get_rewind_policy(config, &policy); + zpool_get_load_policy(config, &policy); if (error) { char desc[1024]; @@ -1796,7 +1796,7 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *con * Dry-run failed, but we print out what success * looks like if we found a best txg */ - if (policy.zrp_request & ZPOOL_TRY_REWIND) { + if (policy.zlp_rewind & ZPOOL_TRY_REWIND) { zpool_rewind_exclaim(hdl, newname ? origname : thename, B_TRUE, nv); nvlist_free(nv); @@ -1889,10 +1889,10 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *con ret = -1; else if (zhp != NULL) zpool_close(zhp); - if (policy.zrp_request & + if (policy.zlp_rewind & (ZPOOL_DO_REWIND | ZPOOL_TRY_REWIND)) { zpool_rewind_exclaim(hdl, newname ? origname : thename, - ((policy.zrp_request & ZPOOL_TRY_REWIND) != 0), nv); + ((policy.zlp_rewind & ZPOOL_TRY_REWIND) != 0), nv); } nvlist_free(nv); return (0); @@ -3286,7 +3286,7 @@ zpool_clear(zpool_handle_t *zhp, const char *path, nvl zfs_cmd_t zc = { 0 }; char msg[1024]; nvlist_t *tgt; - zpool_rewind_policy_t policy; + zpool_load_policy_t policy; boolean_t avail_spare, l2cache; libzfs_handle_t *hdl = zhp->zpool_hdl; nvlist_t *nvi = NULL; @@ -3318,8 +3318,8 @@ zpool_clear(zpool_handle_t *zhp, const char *path, nvl &zc.zc_guid) == 0); } - zpool_get_rewind_policy(rewindnvl, &policy); - zc.zc_cookie = policy.zrp_request; + zpool_get_load_policy(rewindnvl, &policy); + zc.zc_cookie = policy.zlp_rewind; if (zcmd_alloc_dst_nvlist(hdl, &zc, zhp->zpool_config_size * 2) != 0) return (-1); @@ -3335,13 +3335,13 @@ zpool_clear(zpool_handle_t *zhp, const char *path, nvl } } - if (!error || ((policy.zrp_request & ZPOOL_TRY_REWIND) && + if (!error || ((policy.zlp_rewind & ZPOOL_TRY_REWIND) && errno != EPERM && errno != EACCES)) { - if (policy.zrp_request & + if (policy.zlp_rewind & (ZPOOL_DO_REWIND | ZPOOL_TRY_REWIND)) { (void) zcmd_read_dst_nvlist(hdl, &zc, &nvi); zpool_rewind_exclaim(hdl, zc.zc_name, - ((policy.zrp_request & ZPOOL_TRY_REWIND) != 0), + ((policy.zlp_rewind & ZPOOL_TRY_REWIND) != 0), nvi); nvlist_free(nvi); } Modified: stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.c Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.c Mon Apr 16 04:14:03 2018 (r332550) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. */ /* @@ -66,17 +66,17 @@ zfs_allocatable_devs(nvlist_t *nv) } void -zpool_get_rewind_policy(nvlist_t *nvl, zpool_rewind_policy_t *zrpp) +zpool_get_load_policy(nvlist_t *nvl, zpool_load_policy_t *zlpp) { nvlist_t *policy; nvpair_t *elem; char *nm; /* Defaults */ - zrpp->zrp_request = ZPOOL_NO_REWIND; - zrpp->zrp_maxmeta = 0; - zrpp->zrp_maxdata = UINT64_MAX; - zrpp->zrp_txg = UINT64_MAX; + zlpp->zlp_rewind = ZPOOL_NO_REWIND; + zlpp->zlp_maxmeta = 0; + zlpp->zlp_maxdata = UINT64_MAX; + zlpp->zlp_txg = UINT64_MAX; if (nvl == NULL) return; @@ -84,24 +84,24 @@ zpool_get_rewind_policy(nvlist_t *nvl, zpool_rewind_po elem = NULL; while ((elem = nvlist_next_nvpair(nvl, elem)) != NULL) { nm = nvpair_name(elem); - if (strcmp(nm, ZPOOL_REWIND_POLICY) == 0) { + if (strcmp(nm, ZPOOL_LOAD_POLICY) == 0) { if (nvpair_value_nvlist(elem, &policy) == 0) - zpool_get_rewind_policy(policy, zrpp); + zpool_get_load_policy(policy, zlpp); return; - } else if (strcmp(nm, ZPOOL_REWIND_REQUEST) == 0) { - if (nvpair_value_uint32(elem, &zrpp->zrp_request) == 0) - if (zrpp->zrp_request & ~ZPOOL_REWIND_POLICIES) - zrpp->zrp_request = ZPOOL_NO_REWIND; - } else if (strcmp(nm, ZPOOL_REWIND_REQUEST_TXG) == 0) { - (void) nvpair_value_uint64(elem, &zrpp->zrp_txg); - } else if (strcmp(nm, ZPOOL_REWIND_META_THRESH) == 0) { - (void) nvpair_value_uint64(elem, &zrpp->zrp_maxmeta); - } else if (strcmp(nm, ZPOOL_REWIND_DATA_THRESH) == 0) { - (void) nvpair_value_uint64(elem, &zrpp->zrp_maxdata); + } else if (strcmp(nm, ZPOOL_LOAD_REWIND_POLICY) == 0) { + if (nvpair_value_uint32(elem, &zlpp->zlp_rewind) == 0) + if (zlpp->zlp_rewind & ~ZPOOL_REWIND_POLICIES) + zlpp->zlp_rewind = ZPOOL_NO_REWIND; + } else if (strcmp(nm, ZPOOL_LOAD_REQUEST_TXG) == 0) { + (void) nvpair_value_uint64(elem, &zlpp->zlp_txg); + } else if (strcmp(nm, ZPOOL_LOAD_META_THRESH) == 0) { + (void) nvpair_value_uint64(elem, &zlpp->zlp_maxmeta); + } else if (strcmp(nm, ZPOOL_LOAD_DATA_THRESH) == 0) { + (void) nvpair_value_uint64(elem, &zlpp->zlp_maxdata); } } - if (zrpp->zrp_request == 0) - zrpp->zrp_request = ZPOOL_NO_REWIND; + if (zlpp->zlp_rewind == 0) + zlpp->zlp_rewind = ZPOOL_NO_REWIND; } typedef struct zfs_version_spa_map { Modified: stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h Mon Apr 16 04:14:03 2018 (r332550) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. */ #ifndef _ZFS_COMUTIL_H @@ -34,7 +34,7 @@ extern "C" { #endif extern boolean_t zfs_allocatable_devs(nvlist_t *); -extern void zpool_get_rewind_policy(nvlist_t *, zpool_rewind_policy_t *); +extern void zpool_get_load_policy(nvlist_t *, zpool_load_policy_t *); extern int zfs_zpl_version_map(int spa_version); extern int zfs_spa_version_map(int zpl_version); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Mon Apr 16 04:14:03 2018 (r332550) @@ -2109,13 +2109,13 @@ spa_load_verify(spa_t *spa) { zio_t *rio; spa_load_error_t sle = { 0 }; - zpool_rewind_policy_t policy; + zpool_load_policy_t policy; boolean_t verify_ok = B_FALSE; int error = 0; - zpool_get_rewind_policy(spa->spa_config, &policy); + zpool_get_load_policy(spa->spa_config, &policy); - if (policy.zrp_request & ZPOOL_NEVER_REWIND) + if (policy.zlp_rewind & ZPOOL_NEVER_REWIND) return (0); dsl_pool_config_enter(spa->spa_dsl_pool, FTAG); @@ -2154,8 +2154,8 @@ spa_load_verify(spa_t *spa) } if (spa_load_verify_dryrun || - (!error && sle.sle_meta_count <= policy.zrp_maxmeta && - sle.sle_data_count <= policy.zrp_maxdata)) { + (!error && sle.sle_meta_count <= policy.zlp_maxmeta && + sle.sle_data_count <= policy.zlp_maxdata)) { int64_t loss = 0; verify_ok = B_TRUE; @@ -2855,17 +2855,17 @@ spa_ld_trusted_config(spa_t *spa, spa_import_type_t ty /* * We will use spa_config if we decide to reload the spa or if spa_load * fails and we rewind. We must thus regenerate the config using the - * MOS information with the updated paths. Rewind policy is an import - * setting and is not in the MOS. We copy it over to our new, trusted - * config. + * MOS information with the updated paths. ZPOOL_LOAD_POLICY is used to + * pass settings on how to load the pool and is not stored in the MOS. + * We copy it over to our new, trusted config. */ mos_config_txg = fnvlist_lookup_uint64(mos_config, ZPOOL_CONFIG_POOL_TXG); nvlist_free(mos_config); mos_config = spa_config_generate(spa, NULL, mos_config_txg, B_FALSE); - if (nvlist_lookup_nvlist(spa->spa_config, ZPOOL_REWIND_POLICY, + if (nvlist_lookup_nvlist(spa->spa_config, ZPOOL_LOAD_POLICY, &policy) == 0) - fnvlist_add_nvlist(mos_config, ZPOOL_REWIND_POLICY, policy); + fnvlist_add_nvlist(mos_config, ZPOOL_LOAD_POLICY, policy); spa_config_set(spa, mos_config); spa->spa_config_source = SPA_CONFIG_SRC_MOS; @@ -4125,13 +4125,13 @@ spa_open_common(const char *pool, spa_t **spapp, void } if (spa->spa_state == POOL_STATE_UNINITIALIZED) { - zpool_rewind_policy_t policy; + zpool_load_policy_t policy; firstopen = B_TRUE; - zpool_get_rewind_policy(nvpolicy ? nvpolicy : spa->spa_config, + zpool_get_load_policy(nvpolicy ? nvpolicy : spa->spa_config, &policy); - if (policy.zrp_request & ZPOOL_DO_REWIND) + if (policy.zlp_rewind & ZPOOL_DO_REWIND) state = SPA_LOAD_RECOVER; spa_activate(spa, spa_mode_global); @@ -4141,8 +4141,8 @@ spa_open_common(const char *pool, spa_t **spapp, void spa->spa_config_source = SPA_CONFIG_SRC_CACHEFILE; zfs_dbgmsg("spa_open_common: opening %s", pool); - error = spa_load_best(spa, state, policy.zrp_txg, - policy.zrp_request); + error = spa_load_best(spa, state, policy.zlp_txg, + policy.zlp_rewind); if (error == EBADF) { /* @@ -5326,7 +5326,7 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ spa_t *spa; char *altroot = NULL; spa_load_state_t state = SPA_LOAD_IMPORT; - zpool_rewind_policy_t policy; + zpool_load_policy_t policy; uint64_t mode = spa_mode_global; uint64_t readonly = B_FALSE; int error; @@ -5377,8 +5377,8 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ */ spa_async_suspend(spa); - zpool_get_rewind_policy(config, &policy); - if (policy.zrp_request & ZPOOL_DO_REWIND) + zpool_get_load_policy(config, &policy); + if (policy.zlp_rewind & ZPOOL_DO_REWIND) state = SPA_LOAD_RECOVER; spa->spa_config_source = SPA_CONFIG_SRC_TRYIMPORT; @@ -5388,9 +5388,9 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ zfs_dbgmsg("spa_import: importing %s", pool); } else { zfs_dbgmsg("spa_import: importing %s, max_txg=%lld " - "(RECOVERY MODE)", pool, (longlong_t)policy.zrp_txg); + "(RECOVERY MODE)", pool, (longlong_t)policy.zlp_txg); } - error = spa_load_best(spa, state, policy.zrp_txg, policy.zrp_request); + error = spa_load_best(spa, state, policy.zlp_txg, policy.zlp_rewind); /* * Propagate anything learned while loading the pool and pass it @@ -5517,7 +5517,7 @@ spa_tryimport(nvlist_t *tryconfig) spa_t *spa; uint64_t state; int error; - zpool_rewind_policy_t policy; + zpool_load_policy_t policy; if (nvlist_lookup_string(tryconfig, ZPOOL_CONFIG_POOL_NAME, &poolname)) return (NULL); @@ -5533,16 +5533,14 @@ spa_tryimport(nvlist_t *tryconfig) spa_activate(spa, FREAD); /* - * Rewind pool if a max txg was provided. Note that even though we - * retrieve the complete rewind policy, only the rewind txg is relevant - * for tryimport. + * Rewind pool if a max txg was provided. */ - zpool_get_rewind_policy(spa->spa_config, &policy); - if (policy.zrp_txg != UINT64_MAX) { - spa->spa_load_max_txg = policy.zrp_txg; + zpool_get_load_policy(spa->spa_config, &policy); + if (policy.zlp_txg != UINT64_MAX) { + spa->spa_load_max_txg = policy.zlp_txg; spa->spa_extreme_rewind = B_TRUE; zfs_dbgmsg("spa_tryimport: importing %s, max_txg=%lld", - poolname, (longlong_t)policy.zrp_txg); + poolname, (longlong_t)policy.zlp_txg); } else { zfs_dbgmsg("spa_tryimport: importing %s", poolname); } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Mon Apr 16 04:13:19 2018 (r332549) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Mon Apr 16 04:14:03 2018 (r332550) @@ -501,7 +501,7 @@ typedef enum { #define ZPL_VERSION_USERSPACE ZPL_VERSION_4 #define ZPL_VERSION_SA ZPL_VERSION_5 -/* Rewind request information */ +/* Rewind policy information */ #define ZPOOL_NO_REWIND 1 /* No policy - default behavior */ #define ZPOOL_NEVER_REWIND 2 /* Do not search for best txg or rewind */ #define ZPOOL_TRY_REWIND 4 /* Search for best txg, but do not rewind */ @@ -510,12 +510,12 @@ typedef enum { #define ZPOOL_REWIND_MASK 28 /* All the possible rewind bits */ #define ZPOOL_REWIND_POLICIES 31 /* All the possible policy bits */ -typedef struct zpool_rewind_policy { - uint32_t zrp_request; /* rewind behavior requested */ - uint64_t zrp_maxmeta; /* max acceptable meta-data errors */ - uint64_t zrp_maxdata; /* max acceptable data errors */ - uint64_t zrp_txg; /* specific txg to load */ -} zpool_rewind_policy_t; +typedef struct zpool_load_policy { + uint32_t zlp_rewind; /* rewind policy requested */ + uint64_t zlp_maxmeta; /* max acceptable meta-data errors */ + uint64_t zlp_maxdata; /* max acceptable data errors */ + uint64_t zlp_txg; /* specific txg to load */ +} zpool_load_policy_t; /* * The following are configuration names used in the nvlist describing a pool's @@ -603,12 +603,12 @@ typedef struct zpool_rewind_policy { #define ZPOOL_CONFIG_FRU "fru" #define ZPOOL_CONFIG_AUX_STATE "aux_state" -/* Rewind policy parameters */ -#define ZPOOL_REWIND_POLICY "rewind-policy" -#define ZPOOL_REWIND_REQUEST "rewind-request" -#define ZPOOL_REWIND_REQUEST_TXG "rewind-request-txg" -#define ZPOOL_REWIND_META_THRESH "rewind-meta-thresh" -#define ZPOOL_REWIND_DATA_THRESH "rewind-data-thresh" +/* Pool load policy parameters */ +#define ZPOOL_LOAD_POLICY "load-policy" +#define ZPOOL_LOAD_REWIND_POLICY "load-rewind-policy" +#define ZPOOL_LOAD_REQUEST_TXG "load-request-txg" +#define ZPOOL_LOAD_META_THRESH "load-meta-thresh" +#define ZPOOL_LOAD_DATA_THRESH "load-data-thresh" /* Rewind data discovered */ #define ZPOOL_CONFIG_LOAD_TIME "rewind_txg_ts" From owner-svn-src-all@freebsd.org Mon Apr 16 04:14:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6FF6F83CB3; Mon, 16 Apr 2018 04:14: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69BCF6B04B; Mon, 16 Apr 2018 04:14:42 +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 64C7818691; Mon, 16 Apr 2018 04:14:42 +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 w3G4Eg2E031531; Mon, 16 Apr 2018 04:14:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G4Egjh031530; Mon, 16 Apr 2018 04:14:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160414.w3G4Egjh031530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 04:14: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: r332551 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:14:42 -0000 Author: mav Date: Mon Apr 16 04:14:42 2018 New Revision: 332551 URL: https://svnweb.freebsd.org/changeset/base/332551 Log: MFC r331709: MFV r331708: 9321 arc_loan_compressed_buf() can increment arc_loaned_bytes by the wrong value illumos/illumos-gate@9be12bd737714550277bd02b0c693db560976990 arc_loan_compressed_buf() increments arc_loaned_bytes by psize unconditionally In the case of zfs_compressed_arc_enabled=0, when the buf is returned via arc_return_buf(), if ARC_BUF_COMPRESSED(buf) is false, then arc_loaned_bytes is decremented by lsize, not psize. Switch to using arc_buf_size(buf), instead of psize, which will return psize or lsize, depending on the result of ARC_BUF_COMPRESSED(buf). Reviewed by: Matt Ahrens Reviewed by: George Wilson Approved by: Garrett D'Amore Author: Allan Jude Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 04:14:03 2018 (r332550) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 04:14:42 2018 (r332551) @@ -2877,7 +2877,7 @@ arc_loan_buf(spa_t *spa, boolean_t is_metadata, int si arc_buf_t *buf = arc_alloc_buf(spa, arc_onloan_tag, is_metadata ? ARC_BUFC_METADATA : ARC_BUFC_DATA, size); - arc_loaned_bytes_update(size); + arc_loaned_bytes_update(arc_buf_size(buf)); return (buf); } @@ -2889,7 +2889,7 @@ arc_loan_compressed_buf(spa_t *spa, uint64_t psize, ui arc_buf_t *buf = arc_alloc_compressed_buf(spa, arc_onloan_tag, psize, lsize, compression_type); - arc_loaned_bytes_update(psize); + arc_loaned_bytes_update(arc_buf_size(buf)); return (buf); } From owner-svn-src-all@freebsd.org Mon Apr 16 04:15:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ABBBF83E18; Mon, 16 Apr 2018 04:15: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 041086B1B0; Mon, 16 Apr 2018 04:15: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 F332F18693; Mon, 16 Apr 2018 04:15:25 +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 w3G4FPrk031622; Mon, 16 Apr 2018 04:15:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G4FPi4031621; Mon, 16 Apr 2018 04:15:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160415.w3G4FPi4031621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 04:15: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: r332552 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:15:26 -0000 Author: mav Date: Mon Apr 16 04:15:25 2018 New Revision: 332552 URL: https://svnweb.freebsd.org/changeset/base/332552 Log: MFC r331711: MFV 331710: 9188 increase size of dbuf cache to reduce indirect block decompression illumos/illumos-gate@268bbb2a2fa79c36d4695d13a595ba50a7754b76 With compressed ARC (6950) we use up to 25% of our CPU to decompress indirect blocks, under a workload of random cached reads. To reduce this decompression cost, we would like to increase the size of the dbuf cache so that more indirect blocks can be stored uncompressed. If we are caching entire large files of recordsize=8K, the indirect blocks use 1/64th as much memory as the data blocks (assuming they have the same compression ratio). We suggest making the dbuf cache be 1/32nd of all memory, so that in this scenario we should be able to keep all the indirect blocks decompressed in the dbuf cache. (We want it to be more than the 1/64th that the indirect blocks would use because we need to cache other stuff in the dbuf cache as well.) In real world workloads, this won't help as dramatically as the example above, but we think it's still worth it because the risk of decreasing performance is low. The potential negative performance impact is that we will be slightly reducing the size of the ARC (by ~3%). Reviewed by: Dan Kimmel Reviewed by: Prashanth Sreenivasa Reviewed by: Paul Dagnelie Reviewed by: Sanjay Nadkarni Reviewed by: Allan Jude Reviewed by: Igor Kozhukhov Approved by: Garrett D'Amore Author: George Wilson Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 04:14:42 2018 (r332551) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 04:15:25 2018 (r332552) @@ -85,10 +85,10 @@ static boolean_t dbuf_evict_thread_exit; */ static multilist_t *dbuf_cache; static refcount_t dbuf_cache_size; -uint64_t dbuf_cache_max_bytes = 100 * 1024 * 1024; +uint64_t dbuf_cache_max_bytes = 0; -/* Cap the size of the dbuf cache to log2 fraction of arc size. */ -int dbuf_cache_max_shift = 5; +/* Set the default size of the dbuf cache to log2 fraction of arc size. */ +int dbuf_cache_shift = 5; /* * The dbuf cache uses a three-stage eviction policy: @@ -138,8 +138,8 @@ uint_t dbuf_cache_lowater_pct = 10; SYSCTL_DECL(_vfs_zfs); SYSCTL_QUAD(_vfs_zfs, OID_AUTO, dbuf_cache_max_bytes, CTLFLAG_RWTUN, &dbuf_cache_max_bytes, 0, "dbuf cache size in bytes"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, dbuf_cache_max_shift, CTLFLAG_RDTUN, - &dbuf_cache_max_shift, 0, "dbuf size as log2 fraction of ARC"); +SYSCTL_INT(_vfs_zfs, OID_AUTO, dbuf_cache_shift, CTLFLAG_RDTUN, + &dbuf_cache_shift, 0, "dbuf cache size as log2 fraction of ARC"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_hiwater_pct, CTLFLAG_RWTUN, &dbuf_cache_hiwater_pct, 0, "max percents above the dbuf cache size"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_lowater_pct, CTLFLAG_RWTUN, @@ -610,11 +610,15 @@ retry: mutex_init(&h->hash_mutexes[i], NULL, MUTEX_DEFAULT, NULL); /* - * Setup the parameters for the dbuf cache. We cap the size of the - * dbuf cache to 1/32nd (default) of the size of the ARC. + * Setup the parameters for the dbuf cache. We set the size of the + * dbuf cache to 1/32nd (default) of the size of the ARC. If the value + * has been set in /etc/system and it's not greater than the size of + * the ARC, then we honor that value. */ - dbuf_cache_max_bytes = MIN(dbuf_cache_max_bytes, - arc_max_bytes() >> dbuf_cache_max_shift); + if (dbuf_cache_max_bytes == 0 || + dbuf_cache_max_bytes >= arc_max_bytes()) { + dbuf_cache_max_bytes = arc_max_bytes() >> dbuf_cache_shift; + } /* * All entries are queued via taskq_dispatch_ent(), so min/maxalloc From owner-svn-src-all@freebsd.org Mon Apr 16 04:16:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68549F83EAC; Mon, 16 Apr 2018 04:16:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18B446B2F9; Mon, 16 Apr 2018 04:16:11 +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 1351B18694; Mon, 16 Apr 2018 04:16:11 +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 w3G4GAwL031704; Mon, 16 Apr 2018 04:16:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G4GAsi031702; Mon, 16 Apr 2018 04:16:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160416.w3G4GAsi031702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 04:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332553 - in stable/11: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:16:11 -0000 Author: mav Date: Mon Apr 16 04:16:10 2018 New Revision: 332553 URL: https://svnweb.freebsd.org/changeset/base/332553 Log: MFC r331713: MFV r331712: 9280 Assertion failure while running removal_with_ganging test with 4K devices illumos/illumos-gate@243952c7eeef020886e3e2e3df99a513df40584a Reviewed by: George Wilson Reviewed by: John Kennedy Approved by: Garrett D'Amore Author: Matt Ahrens Modified: stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Apr 16 04:15:25 2018 (r332552) +++ stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Apr 16 04:16:10 2018 (r332553) @@ -164,7 +164,7 @@ typedef struct ztest_shared_opts { int zo_init; uint64_t zo_time; uint64_t zo_maxloops; - uint64_t zo_metaslab_gang_bang; + uint64_t zo_metaslab_force_ganging; } ztest_shared_opts_t; static const ztest_shared_opts_t ztest_opts_defaults = { @@ -186,10 +186,10 @@ static const ztest_shared_opts_t ztest_opts_defaults = .zo_init = 1, .zo_time = 300, /* 5 minutes */ .zo_maxloops = 50, /* max loops during spa_freeze() */ - .zo_metaslab_gang_bang = 32 << 10 + .zo_metaslab_force_ganging = 32 << 10 }; -extern uint64_t metaslab_gang_bang; +extern uint64_t metaslab_force_ganging; extern uint64_t metaslab_df_alloc_threshold; extern uint64_t zfs_deadman_synctime_ms; extern int metaslab_preload_limit; @@ -567,12 +567,12 @@ usage(boolean_t requested) const ztest_shared_opts_t *zo = &ztest_opts_defaults; char nice_vdev_size[NN_NUMBUF_SZ]; - char nice_gang_bang[NN_NUMBUF_SZ]; + char nice_force_ganging[NN_NUMBUF_SZ]; FILE *fp = requested ? stdout : stderr; nicenum(zo->zo_vdev_size, nice_vdev_size, sizeof (nice_vdev_size)); - nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang, - sizeof (nice_gang_bang)); + nicenum(zo->zo_metaslab_force_ganging, nice_force_ganging, + sizeof (nice_force_ganging)); (void) fprintf(fp, "Usage: %s\n" "\t[-v vdevs (default: %llu)]\n" @@ -607,7 +607,7 @@ usage(boolean_t requested) zo->zo_raidz_parity, /* -R */ zo->zo_datasets, /* -d */ zo->zo_threads, /* -t */ - nice_gang_bang, /* -g */ + nice_force_ganging, /* -g */ zo->zo_init, /* -i */ (u_longlong_t)zo->zo_killrate, /* -k */ zo->zo_pool, /* -p */ @@ -676,8 +676,8 @@ process_options(int argc, char **argv) zo->zo_threads = MAX(1, value); break; case 'g': - zo->zo_metaslab_gang_bang = MAX(SPA_MINBLOCKSIZE << 1, - value); + zo->zo_metaslab_force_ganging = + MAX(SPA_MINBLOCKSIZE << 1, value); break; case 'i': zo->zo_init = value; @@ -6425,7 +6425,7 @@ main(int argc, char **argv) zs = ztest_shared; if (fd_data_str) { - metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang; + metaslab_force_ganging = ztest_opts.zo_metaslab_force_ganging; metaslab_df_alloc_threshold = zs->zs_metaslab_df_alloc_threshold; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Mon Apr 16 04:15:25 2018 (r332552) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Mon Apr 16 04:16:10 2018 (r332553) @@ -44,9 +44,9 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, ((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER)) uint64_t metaslab_aliquot = 512ULL << 10; -uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ -SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, gang_bang, CTLFLAG_RWTUN, - &metaslab_gang_bang, 0, +uint64_t metaslab_force_ganging = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ +SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, force_ganging, CTLFLAG_RWTUN, + &metaslab_force_ganging, 0, "Force gang block allocation for blocks larger than or equal to this value"); /* @@ -3172,7 +3172,7 @@ metaslab_alloc_dva(spa_t *spa, metaslab_class_t *mc, u /* * For testing, make some blocks above a certain size be gang blocks. */ - if (psize >= metaslab_gang_bang && (ddi_get_lbolt() & 3) == 0) { + if (psize >= metaslab_force_ganging && (ddi_get_lbolt() & 3) == 0) { metaslab_trace_add(zal, NULL, NULL, psize, d, TRACE_FORCE_GANG); return (SET_ERROR(ENOSPC)); } From owner-svn-src-all@freebsd.org Mon Apr 16 04:16:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 297DBF83F9B; Mon, 16 Apr 2018 04:16:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0D256B443; Mon, 16 Apr 2018 04:16: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 CBAE918695; Mon, 16 Apr 2018 04:16: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 w3G4GkEL031780; Mon, 16 Apr 2018 04:16:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G4GkRG031779; Mon, 16 Apr 2018 04:16:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804160416.w3G4GkRG031779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Apr 2018 04:16: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: r332554 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 332554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 04:16:47 -0000 Author: mav Date: Mon Apr 16 04:16:46 2018 New Revision: 332554 URL: https://svnweb.freebsd.org/changeset/base/332554 Log: MFC r331950: 9434 Speculative prefetch is blocked by device removal code. Device removal code does not set spa_indirect_vdevs_loaded for pools that never experienced device removal. At least one visual consequence of it is completely blocked speculative prefetcher. This patch sets the variable in such situations. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c Mon Apr 16 04:16:10 2018 (r332553) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c Mon Apr 16 04:16:46 2018 (r332554) @@ -368,6 +368,7 @@ spa_remove_init(spa_t *spa) spa->spa_removing_phys.sr_state = DSS_NONE; spa->spa_removing_phys.sr_removing_vdev = -1; spa->spa_removing_phys.sr_prev_indirect_vdev = -1; + spa->spa_indirect_vdevs_loaded = B_TRUE; return (0); } else if (error != 0) { return (error); From owner-svn-src-all@freebsd.org Mon Apr 16 07:26:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912DCF9098D; Mon, 16 Apr 2018 07:26:24 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 453FD737D0; Mon, 16 Apr 2018 07:26:24 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BA051A454; Mon, 16 Apr 2018 07:26:24 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3G7QOJ7026330; Mon, 16 Apr 2018 07:26:24 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G7QOoi026329; Mon, 16 Apr 2018 07:26:24 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201804160726.w3G7QOoi026329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 16 Apr 2018 07:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332555 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 332555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 07:26:24 -0000 Author: tsoome Date: Mon Apr 16 07:26:23 2018 New Revision: 332555 URL: https://svnweb.freebsd.org/changeset/base/332555 Log: loader: provide values in help_getnext() With r328289 we attempt to make sure we free the resources allocated in help_getnext(), however, it is possible that we get no resources allocated and help_getnext() will return early. Make sure we have pointers set to NULL early in help_getnext(). Reported by: Andy Fiddaman Modified: head/stand/common/commands.c Modified: head/stand/common/commands.c ============================================================================== --- head/stand/common/commands.c Mon Apr 16 04:16:46 2018 (r332554) +++ head/stand/common/commands.c Mon Apr 16 07:26:23 2018 (r332555) @@ -64,7 +64,9 @@ static int help_getnext(int fd, char **topic, char **subtopic, char **desc) { char line[81], *cp, *ep; - + + /* Make sure we provide sane values. */ + *topic = *subtopic = *desc = NULL; for (;;) { if (fgetstr(line, 80, fd) < 0) return(0); From owner-svn-src-all@freebsd.org Mon Apr 16 07:36:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15F8BF9149C for ; Mon, 16 Apr 2018 07:36:42 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84B247690F for ; Mon, 16 Apr 2018 07:36:41 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wr0-x242.google.com with SMTP id l49so22997609wrl.4 for ; Mon, 16 Apr 2018 00:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=ENCw/PNP2dDC2OvRdLXb6F38XId+C+xvawrgWmGuIn0=; b=tS5EjC5XkuB0cJ1KKnloQIsba0Ltrc8z9/apT7r6g0fHSEp83ISZvH+yd8vtxEkUP+ 1k3J0ZmMfyl3xiIQcdggsrIzULtzk4z0fKMQ2aWF4nNw/7a7W9kBHcPACnewFKN35cGZ fINitgzKjFcyGIgmpibEa25ynjIuwWsGmfpAimrPM74FS18EIFjehbrKIr9KcFj5D3cC yJ4EO56Yn9x+kQA2KQqXfc1qL4k1QgdIvJDdyv1oWLQwYb1kRNsKDTnw9wIa7GR/Fj54 isoy1BkQVZWqc/fCt1N9YMbajetQXwjvmdsQ0k6KBVpdJz1fizE6PHhfuFDy/a09hTNF KgPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=ENCw/PNP2dDC2OvRdLXb6F38XId+C+xvawrgWmGuIn0=; b=Ezg3qO4GKH9WbjjswWXj0Dl169w4wIFE4Koc1VTs1gNWvjQqkLbS1rIOnYrp8XLkRZ SkJXJ48Je1P+vMKDATHluTocwqYk5LTRfWQtk0fgGgrDYokpoZSGDckryU+Lk5rjk/c2 V4T8n0ZRCNkCBlPn2CuRK58zPOFXd7sff6u7ioK+Z+HcdKr1S/IaFKC3Hz5h/1kem1fG 3pX3SGcyOkUrm+WuujcoeeDTvk/FT5XAdZI5OEdn9x0nqYvoXt/cN3ALcNaD3fGhrvce 8H4q6JW8qcGdmb04TwRpyDW/3vmk0B7V1WLwpTJpWK/HCkvsR+P1wdvkOiQv7ywnNahe Obrg== X-Gm-Message-State: ALQs6tAheCMjTrnyl7wjMsYD+s3GWTHurvAUdZtF9WLs1Dp91TFZcv3B q1t8YNPXjfxE6zJNdeodQWXj1Q== X-Google-Smtp-Source: AIpwx4+gPMo4VQYJVcgToRdyl+GypojOdWY5Jalv0g7msg1OgBu8e7b4mausO1NAZynVrwIhVda3yQ== X-Received: by 10.28.7.76 with SMTP id 73mr10034363wmh.128.1523864200314; Mon, 16 Apr 2018 00:36:40 -0700 (PDT) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id n49sm18622454wrn.50.2018.04.16.00.36.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 00:36:39 -0700 (PDT) Subject: Re: svn commit: r332523 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201804160054.w3G0swF1030058@repo.freebsd.org> From: Steven Hartland Message-ID: Date: Mon, 16 Apr 2018 08:36:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201804160054.w3G0swF1030058@repo.freebsd.org> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 07:36:42 -0000 Hey Mav, this seems like an important one to get in for 11.2 so just wanted to check if that was your intention as there's no MFC tag on the commit? On 16/04/2018 01:54, Alexander Motin wrote: > Author: mav > Date: Mon Apr 16 00:54:58 2018 > New Revision: 332523 > URL: https://svnweb.freebsd.org/changeset/base/332523 > > Log: > 9433 Fix ARC hit rate > > When the compressed ARC feature was added in commit d3c2ae1 > the method of reference counting in the ARC was modified. As > part of this accounting change the arc_buf_add_ref() function > was removed entirely. > > This would have be fine but the arc_buf_add_ref() function > served a second undocumented purpose of updating the ARC access > information when taking a hold on a dbuf. Without this logic > in place a cached dbuf would not migrate its associated > arc_buf_hdr_t to the MFU list. This would negatively impact > the ARC hit rate, particularly on systems with a small ARC. > > This change reinstates the missing call to arc_access() from > dbuf_hold() by implementing a new arc_buf_access() function. > > Reviewed-by: Giuseppe Di Natale > Reviewed-by: Tony Hutter > Reviewed-by: Tim Chase > Reviewed by: George Wilson > Reviewed-by: George Melikov > Signed-off-by: Brian Behlendorf > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 00:42:45 2018 (r332522) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 00:54:58 2018 (r332523) > @@ -540,8 +540,13 @@ typedef struct arc_stats { > */ > kstat_named_t arcstat_mutex_miss; > /* > + * Number of buffers skipped when updating the access state due to the > + * header having already been released after acquiring the hash lock. > + */ > + kstat_named_t arcstat_access_skip; > + /* > * Number of buffers skipped because they have I/O in progress, are > - * indrect prefetch buffers that have not lived long enough, or are > + * indirect prefetch buffers that have not lived long enough, or are > * not from the spa we're trying to evict from. > */ > kstat_named_t arcstat_evict_skip; > @@ -796,6 +801,7 @@ static arc_stats_t arc_stats = { > { "allocated", KSTAT_DATA_UINT64 }, > { "deleted", KSTAT_DATA_UINT64 }, > { "mutex_miss", KSTAT_DATA_UINT64 }, > + { "access_skip", KSTAT_DATA_UINT64 }, > { "evict_skip", KSTAT_DATA_UINT64 }, > { "evict_not_enough", KSTAT_DATA_UINT64 }, > { "evict_l2_cached", KSTAT_DATA_UINT64 }, > @@ -5063,6 +5069,51 @@ arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) > } else { > ASSERT(!"invalid arc state"); > } > +} > + > +/* > + * This routine is called by dbuf_hold() to update the arc_access() state > + * which otherwise would be skipped for entries in the dbuf cache. > + */ > +void > +arc_buf_access(arc_buf_t *buf) > +{ > + mutex_enter(&buf->b_evict_lock); > + arc_buf_hdr_t *hdr = buf->b_hdr; > + > + /* > + * Avoid taking the hash_lock when possible as an optimization. > + * The header must be checked again under the hash_lock in order > + * to handle the case where it is concurrently being released. > + */ > + if (hdr->b_l1hdr.b_state == arc_anon || HDR_EMPTY(hdr)) { > + mutex_exit(&buf->b_evict_lock); > + ARCSTAT_BUMP(arcstat_access_skip); > + return; > + } > + > + kmutex_t *hash_lock = HDR_LOCK(hdr); > + mutex_enter(hash_lock); > + > + if (hdr->b_l1hdr.b_state == arc_anon || HDR_EMPTY(hdr)) { > + mutex_exit(hash_lock); > + mutex_exit(&buf->b_evict_lock); > + ARCSTAT_BUMP(arcstat_access_skip); > + return; > + } > + > + mutex_exit(&buf->b_evict_lock); > + > + ASSERT(hdr->b_l1hdr.b_state == arc_mru || > + hdr->b_l1hdr.b_state == arc_mfu); > + > + DTRACE_PROBE1(arc__hit, arc_buf_hdr_t *, hdr); > + arc_access(hdr, hash_lock); > + mutex_exit(hash_lock); > + > + ARCSTAT_BUMP(arcstat_hits); > + ARCSTAT_CONDSTAT(!HDR_PREFETCH(hdr), > + demand, prefetch, !HDR_ISTYPE_METADATA(hdr), data, metadata, hits); > } > > /* a generic arc_done_func_t which you can use */ > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 00:42:45 2018 (r332522) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 00:54:58 2018 (r332523) > @@ -2579,8 +2579,10 @@ top: > return (SET_ERROR(ENOENT)); > } > > - if (db->db_buf != NULL) > + if (db->db_buf != NULL) { > + arc_buf_access(db->db_buf); > ASSERT3P(db->db.db_data, ==, db->db_buf->b_data); > + } > > ASSERT(db->db_buf == NULL || arc_referenced(db->db_buf)); > > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Mon Apr 16 00:42:45 2018 (r332522) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Mon Apr 16 00:54:58 2018 (r332523) > @@ -169,6 +169,7 @@ void arc_loan_inuse_buf(arc_buf_t *buf, void *tag); > void arc_buf_destroy(arc_buf_t *buf, void *tag); > int arc_buf_size(arc_buf_t *buf); > int arc_buf_lsize(arc_buf_t *buf); > +void arc_buf_access(arc_buf_t *buf); > void arc_release(arc_buf_t *buf, void *tag); > int arc_released(arc_buf_t *buf); > void arc_buf_freeze(arc_buf_t *buf); > From owner-svn-src-all@freebsd.org Mon Apr 16 08:03:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD0E7F93337; Mon, 16 Apr 2018 08:03:18 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EEBF7CDFA; Mon, 16 Apr 2018 08:03:18 +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 597C31AA99; Mon, 16 Apr 2018 08:03:18 +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 w3G83I3S046365; Mon, 16 Apr 2018 08:03:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G83IgT046364; Mon, 16 Apr 2018 08:03:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804160803.w3G83IgT046364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 08:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332556 - head X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 332556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 08:03:18 -0000 Author: trasz Date: Mon Apr 16 08:03:18 2018 New Revision: 332556 URL: https://svnweb.freebsd.org/changeset/base/332556 Log: Fix ObsoleteFiles.inc entry for libstand.3. MFC after: 2 weeks Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Apr 16 07:26:23 2018 (r332555) +++ head/ObsoleteFiles.inc Mon Apr 16 08:03:18 2018 (r332556) @@ -419,7 +419,7 @@ OLD_FILES+=usr/share/man/man9/mbp_sync.9.gz OLD_FILES+=usr/lib/libstand.a OLD_FILES+=usr/lib/libstand_p.a OLD_FILES+=usr/include/stand.h -OLD_FILES+=usr/share/man/man3/libstand.3 +OLD_FILES+=usr/share/man/man3/libstand.3.gz # 20171003: remove RCMDS OLD_FILES+=bin/rcp OLD_FILES+=rescue/rcp From owner-svn-src-all@freebsd.org Mon Apr 16 08:15:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D4F7F94021; Mon, 16 Apr 2018 08:15:51 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FC477FD24; Mon, 16 Apr 2018 08:15:51 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AB7D1AC27; Mon, 16 Apr 2018 08:15:51 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3G8FoUh051908; Mon, 16 Apr 2018 08:15:50 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G8FoYK051907; Mon, 16 Apr 2018 08:15:50 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201804160815.w3G8FoYK051907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 16 Apr 2018 08:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332557 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 332557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 08:15:51 -0000 Author: tsoome Date: Mon Apr 16 08:15:50 2018 New Revision: 332557 URL: https://svnweb.freebsd.org/changeset/base/332557 Log: loader: make sure we use snprintf() in commands.c Safeguard against memory corruptions. Modified: head/stand/common/commands.c Modified: head/stand/common/commands.c ============================================================================== --- head/stand/common/commands.c Mon Apr 16 08:03:18 2018 (r332556) +++ head/stand/common/commands.c Mon Apr 16 08:15:50 2018 (r332557) @@ -236,7 +236,7 @@ command_commandlist(int argc, char *argv[]) if (res) break; if (((*cmdp)->c_name != NULL) && ((*cmdp)->c_desc != NULL)) { - sprintf(name, " %-15s ", (*cmdp)->c_name); + snprintf(name, sizeof(name), " %-15s ", (*cmdp)->c_name); pager_output(name); pager_output((*cmdp)->c_desc); res = pager_output("\n"); @@ -435,12 +435,12 @@ command_more(int argc, char *argv[]) res=0; pager_open(); for (i = 1; (i < argc) && (res == 0); i++) { - sprintf(line, "*** FILE %s BEGIN ***\n", argv[i]); + snprintf(line, sizeof(line), "*** FILE %s BEGIN ***\n", argv[i]); if (pager_output(line)) break; res = page_file(argv[i]); if (!res) { - sprintf(line, "*** FILE %s END ***\n", argv[i]); + snprintf(line, sizeof(line), "*** FILE %s END ***\n", argv[i]); res = pager_output(line); } } @@ -501,7 +501,7 @@ command_lsdev(int argc, char *argv[]) if (devsw[i]->dv_print(verbose)) break; } else { - sprintf(line, "%s: (unknown)\n", devsw[i]->dv_name); + snprintf(line, sizeof(line), "%s: (unknown)\n", devsw[i]->dv_name); if (pager_output(line)) break; } From owner-svn-src-all@freebsd.org Mon Apr 16 08:41:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 807A1F962B7; Mon, 16 Apr 2018 08:41:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32BA78628E; Mon, 16 Apr 2018 08:41:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DB501B09B; Mon, 16 Apr 2018 08:41:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3G8fjt7063876; Mon, 16 Apr 2018 08:41:45 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G8fijP063874; Mon, 16 Apr 2018 08:41:44 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201804160841.w3G8fijP063874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 16 Apr 2018 08:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332558 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 332558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 08:41:45 -0000 Author: tsoome Date: Mon Apr 16 08:41:44 2018 New Revision: 332558 URL: https://svnweb.freebsd.org/changeset/base/332558 Log: loader: command_errmsg should be const Use const char * for command_errmsg. Modified: head/stand/common/bootstrap.h head/stand/common/commands.c Modified: head/stand/common/bootstrap.h ============================================================================== --- head/stand/common/bootstrap.h Mon Apr 16 08:15:50 2018 (r332557) +++ head/stand/common/bootstrap.h Mon Apr 16 08:41:44 2018 (r332558) @@ -36,7 +36,7 @@ /* Commands and return values; nonzero return sets command_errmsg != NULL */ typedef int (bootblk_cmd_t)(int argc, char *argv[]); #define COMMAND_ERRBUFSZ (256) -extern char *command_errmsg; +extern const char *command_errmsg; extern char command_errbuf[COMMAND_ERRBUFSZ]; #define CMD_OK 0 #define CMD_WARN 1 Modified: head/stand/common/commands.c ============================================================================== --- head/stand/common/commands.c Mon Apr 16 08:15:50 2018 (r332557) +++ head/stand/common/commands.c Mon Apr 16 08:41:44 2018 (r332558) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" -char *command_errmsg; +const char *command_errmsg; /* XXX should have procedural interface for setting, size limit? */ char command_errbuf[COMMAND_ERRBUFSZ]; From owner-svn-src-all@freebsd.org Mon Apr 16 09:17:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06102F98885; Mon, 16 Apr 2018 09:17:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A42936C4F0; Mon, 16 Apr 2018 09:17:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 933291B59B; Mon, 16 Apr 2018 09:17:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3G9HafN081291; Mon, 16 Apr 2018 09:17:36 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3G9HaCN081290; Mon, 16 Apr 2018 09:17:36 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804160917.w3G9HaCN081290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 16 Apr 2018 09:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332559 - head/usr.sbin/mountd X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/usr.sbin/mountd X-SVN-Commit-Revision: 332559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 09:17:37 -0000 Author: avg Date: Mon Apr 16 09:17:36 2018 New Revision: 332559 URL: https://svnweb.freebsd.org/changeset/base/332559 Log: mountd: fix a crash when getgrouplist reports too many groups Previously the code only warned about the condition and then happily proceeded to use the too large value resulting in the array out-of-bounds access. Obtained from: Panzura (Chuanbo Zheng) MFC after: 10 days Sponsored by: Panzura Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Mon Apr 16 08:41:44 2018 (r332558) +++ head/usr.sbin/mountd/mountd.c Mon Apr 16 09:17:36 2018 (r332559) @@ -2915,8 +2915,11 @@ parsecred(char *namelist, struct xucred *cr) } cr->cr_uid = pw->pw_uid; ngroups = XU_NGROUPS + 1; - if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) + if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) { syslog(LOG_ERR, "too many groups"); + ngroups = XU_NGROUPS + 1; + } + /* * Compress out duplicate. */ From owner-svn-src-all@freebsd.org Mon Apr 16 10:56:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A5CEF9F093; Mon, 16 Apr 2018 10:56:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 F286481849; Mon, 16 Apr 2018 10:56:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w3GAuBCo031934 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 16 Apr 2018 13:56:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w3GAuBCo031934 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w3GAuBpK031933; Mon, 16 Apr 2018 13:56:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 16 Apr 2018 13:56:11 +0300 From: Konstantin Belousov To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332559 - head/usr.sbin/mountd Message-ID: <20180416105611.GG1774@kib.kiev.ua> References: <201804160917.w3G9HaCN081290@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201804160917.w3G9HaCN081290@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 10:56:22 -0000 On Mon, Apr 16, 2018 at 09:17:36AM +0000, Andriy Gapon wrote: > Author: avg > Date: Mon Apr 16 09:17:36 2018 > New Revision: 332559 > URL: https://svnweb.freebsd.org/changeset/base/332559 > > Log: > mountd: fix a crash when getgrouplist reports too many groups > > Previously the code only warned about the condition and then happily > proceeded to use the too large value resulting in the array > out-of-bounds access. > > Obtained from: Panzura (Chuanbo Zheng) > MFC after: 10 days > Sponsored by: Panzura > > Modified: > head/usr.sbin/mountd/mountd.c > > Modified: head/usr.sbin/mountd/mountd.c > ============================================================================== > --- head/usr.sbin/mountd/mountd.c Mon Apr 16 08:41:44 2018 (r332558) > +++ head/usr.sbin/mountd/mountd.c Mon Apr 16 09:17:36 2018 (r332559) > @@ -2915,8 +2915,11 @@ parsecred(char *namelist, struct xucred *cr) > } > cr->cr_uid = pw->pw_uid; > ngroups = XU_NGROUPS + 1; > - if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) > + if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) { > syslog(LOG_ERR, "too many groups"); > + ngroups = XU_NGROUPS + 1; Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? > + } > + > /* > * Compress out duplicate. > */ From owner-svn-src-all@freebsd.org Mon Apr 16 11:12:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A88CFA0739; Mon, 16 Apr 2018 11:12:42 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8DC887062; Mon, 16 Apr 2018 11:12:41 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f52.google.com with SMTP id r7-v6so14343219lfr.1; Mon, 16 Apr 2018 04:12: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:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=yfXg6zTFh46QzkgC1anpw+gZ7evT62z2+8FHbE9UDQw=; b=WcbyDQpdd9jOjJIX26ooegsAFkSo1skLOou6MiPXAbHhUjBq5WusofVvMJhGtByFjm hnUY34tcNlHgSlwfpoJwYqHQlmGIF6VL3CZtkoGuhq3PILspWWNHihvNvcd1AywQSGaw PnIupPVNonrYJNvAuhI3txC6YipjlgW1JWDh/cTtuZrSSa28LFjr57GYZWefDZ9QfvUB 8CcBO3X1Gpg7uGoCDqdKXsvbufOsyXmUmqplEl+aUrct9J6XQZr5Plg8gj/Q3CcEynpM 6qCZem08ujMDGCUy/yURlyPzByYAk3PLVoq8hO/g4njmYT+oVjTSVZfWCF++qDD1NUFM cIww== X-Gm-Message-State: ALQs6tCul/lz2779FMQFiXWSyobg4iFFz9EacbEFeWcSqFwUfDCXXfUL tuWGokvEnQOmU8PjEwtbbq+Xv4uD X-Google-Smtp-Source: AIpwx4+c2rMLXYM7nbJxygQZq1+ln7SiBa8DN+9+DTd6sRgDjlbjo2ZEvM2DZ8xvst89cB2J8eLuLg== X-Received: by 2002:a19:4f5e:: with SMTP id a30-v6mr3790504lfk.97.1523876751808; Mon, 16 Apr 2018 04:05:51 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id o203-v6sm2790025lff.25.2018.04.16.04.05.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 04:05:50 -0700 (PDT) Subject: Re: svn commit: r332559 - head/usr.sbin/mountd To: Konstantin Belousov Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201804160917.w3G9HaCN081290@repo.freebsd.org> <20180416105611.GG1774@kib.kiev.ua> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <84a443f7-ce41-0de4-cd6e-d7c450eb1460@FreeBSD.org> Date: Mon, 16 Apr 2018 14:05:49 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180416105611.GG1774@kib.kiev.ua> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 11:12:42 -0000 On 16/04/2018 13:56, Konstantin Belousov wrote: > On Mon, Apr 16, 2018 at 09:17:36AM +0000, Andriy Gapon wrote: >> Author: avg >> Date: Mon Apr 16 09:17:36 2018 >> New Revision: 332559 >> URL: https://svnweb.freebsd.org/changeset/base/332559 >> >> Log: >> mountd: fix a crash when getgrouplist reports too many groups >> >> Previously the code only warned about the condition and then happily >> proceeded to use the too large value resulting in the array >> out-of-bounds access. >> >> Obtained from: Panzura (Chuanbo Zheng) >> MFC after: 10 days >> Sponsored by: Panzura >> >> Modified: >> head/usr.sbin/mountd/mountd.c >> >> Modified: head/usr.sbin/mountd/mountd.c >> ============================================================================== >> --- head/usr.sbin/mountd/mountd.c Mon Apr 16 08:41:44 2018 (r332558) >> +++ head/usr.sbin/mountd/mountd.c Mon Apr 16 09:17:36 2018 (r332559) >> @@ -2915,8 +2915,11 @@ parsecred(char *namelist, struct xucred *cr) >> } >> cr->cr_uid = pw->pw_uid; >> ngroups = XU_NGROUPS + 1; >> - if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) >> + if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) { >> syslog(LOG_ERR, "too many groups"); >> + ngroups = XU_NGROUPS + 1; > Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? Two reasons: 1. it's what the code already used 2. the groups are placed into struct xucred and later that struct is passed to kernel, so in my opinion it's xucred that defines the limit in this case -- Andriy Gapon From owner-svn-src-all@freebsd.org Mon Apr 16 11:22:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E243FFA11C6; Mon, 16 Apr 2018 11:22:10 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8094989E9F; Mon, 16 Apr 2018 11:22:10 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (220-253-154-11.dyn.iinet.net.au [220.253.154.11]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id w3GBM5hW020092 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 16 Apr 2018 04:22:07 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r332559 - head/usr.sbin/mountd To: Konstantin Belousov , Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201804160917.w3G9HaCN081290@repo.freebsd.org> <20180416105611.GG1774@kib.kiev.ua> From: Julian Elischer Message-ID: <5e754f1f-9688-884a-cddd-fa4b65e67f0b@freebsd.org> Date: Mon, 16 Apr 2018 19:21:59 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180416105611.GG1774@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 11:22:11 -0000 On 16/4/18 6:56 pm, Konstantin Belousov wrote: > On Mon, Apr 16, 2018 at 09:17:36AM +0000, Andriy Gapon wrote: >> Author: avg >> Date: Mon Apr 16 09:17:36 2018 >> New Revision: 332559 >> URL: https://svnweb.freebsd.org/changeset/base/332559 >> >> Log: >> mountd: fix a crash when getgrouplist reports too many groups >> >> Previously the code only warned about the condition and then happily >> proceeded to use the too large value resulting in the array >> out-of-bounds access. >> >> Obtained from: Panzura (Chuanbo Zheng) >> MFC after: 10 days >> Sponsored by: Panzura >> >> Modified: >> head/usr.sbin/mountd/mountd.c >> >> Modified: head/usr.sbin/mountd/mountd.c >> ============================================================================== >> --- head/usr.sbin/mountd/mountd.c Mon Apr 16 08:41:44 2018 (r332558) >> +++ head/usr.sbin/mountd/mountd.c Mon Apr 16 09:17:36 2018 (r332559) >> @@ -2915,8 +2915,11 @@ parsecred(char *namelist, struct xucred *cr) >> } >> cr->cr_uid = pw->pw_uid; >> ngroups = XU_NGROUPS + 1; >> - if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) >> + if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) { >> syslog(LOG_ERR, "too many groups"); >> + ngroups = XU_NGROUPS + 1; > Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? valid question.. because that is how many are allocated? it was a "minimally invasive patch".. whoever used XU_NGROUPS before should have fixed it. Having said that, thanks for drawing out attention to it.. will probably fix. > >> + } >> + >> /* >> * Compress out duplicate. >> */ > From owner-svn-src-all@freebsd.org Mon Apr 16 11:48:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37EB0FA2C97 for ; Mon, 16 Apr 2018 11:48:03 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDC8B68613 for ; Mon, 16 Apr 2018 11:48:02 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: by mail-io0-x241.google.com with SMTP id v13so17674843iob.6 for ; Mon, 16 Apr 2018 04:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=balabit-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6slhwknvG3Q2AIfsHxRZJ7lB59sPa8abXvYaYlgyFlc=; b=i/Y2w5eG57GmtqbdZi0Jd75r1HJMnCPJ1lS1OLQYfHLLsfeTVRGB09KC5pQmGD6JqN w+KXYnvwJRcgYEOlD23r90CEA85MdqKr4wjuq8Z6YxEtYTAIxAqleo+OQ2ym4IXh2jEz 9xzktW/Iazd3SioYpVMUV0a1h1BGCenImU4BgXmLLfjpR97q6+ga7/fcVFJEUAlQnywJ d4wF9+FWNSal20eJCFWuJzte2zo+idmsO6AbXv0OcvB7ppMYjFJpgGXd+ulSRIPneN20 f0LRFW7jRdVCqod32wlB8CqrbkGQhMwe6UIp9rFhgmQ7Ty/cEBAxXNlkEXhwYHqWEcjg XLEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6slhwknvG3Q2AIfsHxRZJ7lB59sPa8abXvYaYlgyFlc=; b=XH8rDDPJ3gcQCqr6pMcKYxjVTLl8LiAd7eTSY7JOg9XKsH8iv3triInOudTmjWMht9 NC3inNcDFQmn5U+Yt0eTEEDZN+XE5+D0zP5kASKu+qgxGXnlv93luatfZJQXsMV5FZ15 +sL6bQ4rFAff3mDIyFIQyfLp6MGhnWM/t8WYa7ti5D4vZYMmA6Rf/bJIzTTt6u4fPs7/ vgCo3+LbkwmfYk26bGeJpL6n89sFwlx3fPWeDThbrLE2cAszlVah99KwWNelXy1U9LMk 5rYchIyYRn+cDDcFTa+QgMKIDE3qOesbiFsww/I9L8bn8AekCSuk4hvq8j/SQRKlznYY 0jYg== X-Gm-Message-State: ALQs6tCZOoBM0zdoOkNhMcBhns3W407SyHWxZ+CkjnCfw1PlZ8X4udcT kaoFilSmnEZYel20hpwhMu6dwcJdkHSMiWCU9xxHrw== X-Google-Smtp-Source: AIpwx49+plWXrqDwidS5U3V8W6CFYjSbZooHLwEgIhkv38sGfkwEJ5eLhCITAFo5u1LAQsHiD9OLz9UJbN87/ODJmQM= X-Received: by 10.107.6.31 with SMTP id 31mr5990760iog.80.1523879281964; Mon, 16 Apr 2018 04:48:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.192.128.68 with HTTP; Mon, 16 Apr 2018 04:48:01 -0700 (PDT) In-Reply-To: <201804150834.w3F8YGO3038226@repo.freebsd.org> References: <201804150834.w3F8YGO3038226@repo.freebsd.org> From: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= Date: Mon, 16 Apr 2018 13:48:01 +0200 Message-ID: Subject: Re: svn commit: r332510 - in head: usr.bin/wall usr.sbin/syslogd To: Ed Schouten Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 11:48:03 -0000 On Sun, Apr 15, 2018 at 10:34 AM, Ed Schouten wrote: > Author: ed > Date: Sun Apr 15 08:34:16 2018 > New Revision: 332510 > URL: https://svnweb.freebsd.org/changeset/base/332510 > > Log: > Add RFC 5424 syslog message output to syslogd. > > - Move all of the code responsible for transmitting log messages into a > separate function, fprintlog_write(). > - Instead of manually modifying a list of iovecs, add a structure > iovlist with some helper functions. > - Alter the F_FORW (UDP message forwarding) case to also use iovecs like > the other cases. Use sendmsg() instead of sendto(). > - In the case of F_FORW, truncate the message to a size dependent on the > address family (AF_INET, AF_INET6), as proposed by RFC 5426. > - Move all traditional message formatting into fprintlog_bsd(). Get rid > of some of the string copying and snprintf()'ing. Simply emit more > iovecs to get the job done. > - Increase ttymsg()'s limit of 7 iovecs to 32. Add a definition for this > limit, so it can be reused by iovlist. > - Add fprintlog_rfc5424() to emit RFC 5424 formatted log entries. > - Add a "-O" command line option to enable RFC 5424 formatting. It would > have been nicer if we supported "-o rfc5424", just like on NetBSD. > Unfortunately, the "-o" flag is already used for a different purpose > on FreeBSD. > - Don't truncate hostnames in the RFC 5424 case, as suggested by that > specific RFC. > > For people interested in using this, this feature can be enabled by > adding the following line to /etc/rc.conf: > > syslogd_flags="-s -O rfc5424" > > Differential Revision: https://reviews.freebsd.org/D15011 Release notes: yes > > > Modified: > head/usr.bin/wall/ttymsg.c > head/usr.bin/wall/ttymsg.h > head/usr.sbin/syslogd/syslogd.8 > head/usr.sbin/syslogd/syslogd.c > > Modified: head/usr.bin/wall/ttymsg.c > ============================================================ > ================== > --- head/usr.bin/wall/ttymsg.c Sat Apr 14 22:14:18 2018 (r332509) > +++ head/usr.bin/wall/ttymsg.c Sun Apr 15 08:34:16 2018 (r332510) > @@ -61,7 +61,7 @@ static const char sccsid[] = "@(#)ttymsg.c 8.2 (Berkel > const char * > ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) > { > - struct iovec localiov[7]; > + struct iovec localiov[TTYMSG_IOV_MAX]; > ssize_t left, wret; > int cnt, fd; > char device[MAXNAMLEN] = _PATH_DEV; > > Modified: head/usr.bin/wall/ttymsg.h > ============================================================ > ================== > --- head/usr.bin/wall/ttymsg.h Sat Apr 14 22:14:18 2018 (r332509) > +++ head/usr.bin/wall/ttymsg.h Sun Apr 15 08:34:16 2018 (r332510) > @@ -1,3 +1,5 @@ > /* $FreeBSD$ */ > > +#define TTYMSG_IOV_MAX 32 > + > const char *ttymsg(struct iovec *, int, const char *, int); > > Modified: head/usr.sbin/syslogd/syslogd.8 > ============================================================ > ================== > --- head/usr.sbin/syslogd/syslogd.8 Sat Apr 14 22:14:18 2018 > (r332509) > +++ head/usr.sbin/syslogd/syslogd.8 Sun Apr 15 08:34:16 2018 > (r332510) > @@ -28,7 +28,7 @@ > .\" @(#)syslogd.8 8.1 (Berkeley) 6/6/93 > .\" $FreeBSD$ > .\" > -.Dd November 28, 2017 > +.Dd April 9, 2018 > .Dt SYSLOGD 8 > .Os > .Sh NAME > @@ -42,6 +42,7 @@ > .Op Fl f Ar config_file > .Op Fl l Oo Ar mode Ns \&: Oc Ns Ar path > .Op Fl m Ar mark_interval > +.Op Fl O Ar format > .Op Fl P Ar pid_file > .Op Fl p Ar log_socket > .Op Fl S Ar logpriv_socket > @@ -242,6 +243,20 @@ Usually the > .Dq kern > facility is reserved for messages read directly from > .Pa /dev/klog . > +.It Fl O Ar format > +Select the output format of generated log messages. > +The values > +.Ar bsd > +and > +.Ar rfc3164 > +are used to generate RFC 3164 log messages. > +The values > +.Ar syslog > +and > +.Ar rfc5424 > +are used to generate RFC 5424 log messages, > +having RFC 3339 timestamps with microsecond precision. > +The default is to generate RFC 3164 log messages. > .It Fl m Ar mark_interval > Select the number of minutes between > .Dq mark > > Modified: head/usr.sbin/syslogd/syslogd.c > ============================================================ > ================== > --- head/usr.sbin/syslogd/syslogd.c Sat Apr 14 22:14:18 2018 > (r332509) > +++ head/usr.sbin/syslogd/syslogd.c Sun Apr 15 08:34:16 2018 > (r332510) > @@ -136,6 +136,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -367,9 +368,12 @@ static int KeepKernFac; /* Keep remotely logged > kernel > static int needdofsync = 0; /* Are any file(s) waiting to be fsynced? > */ > static struct pidfh *pfh; > static int sigpipe[2]; /* Pipe to catch a signal during select(). > */ > +static bool RFC3164OutputFormat = true; /* Use legacy format by > default. */ > > static volatile sig_atomic_t MarkSet, WantDie, WantInitialize, > WantReapchild; > > +struct iovlist; > + > static int allowaddr(char *); > static int addfile(struct filed *); > static int addpeer(struct peer *); > @@ -386,6 +390,7 @@ static void dofsync(void); > static void domark(int); > static void fprintlog_first(struct filed *, const char *, const char *, > const char *, const char *, const char *, const char *, int); > +static void fprintlog_write(struct filed *, struct iovlist *, int); > static void fprintlog_successive(struct filed *, int); > static void init(int); > static void logerror(const char *); > @@ -498,7 +503,7 @@ main(int argc, char *argv[]) > if (madvise(NULL, 0, MADV_PROTECT) != 0) > dprintf("madvise() failed: %s\n", strerror(errno)); > > - while ((ch = getopt(argc, argv, "468Aa:b:cCdf:FHkl:m:nNop:P: > sS:Tuv")) > + while ((ch = getopt(argc, argv, "468Aa:b:cCdf:FHkl:m:nNoO:p:P: > sS:Tuv")) > != -1) > switch (ch) { > #ifdef INET > @@ -621,6 +626,16 @@ main(int argc, char *argv[]) > case 'n': > resolve = 0; > break; > + case 'O': > + if (strcmp(optarg, "bsd") == 0 || > + strcmp(optarg, "rfc3164") == 0) > + RFC3164OutputFormat = true; > + else if (strcmp(optarg, "syslog") == 0 || > + strcmp(optarg, "rfc5424") == 0) > + RFC3164OutputFormat = false; > + else > + usage(); > + break; > case 'o': > use_bootfile = 1; > break; > @@ -880,12 +895,12 @@ static void > usage(void) > { > > - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", > - "usage: syslogd [-468ACcdFHknosTuv] [-a allowed_peer]", > - " [-b bind_address] [-f config_file]", > - " [-l [mode:]path] [-m mark_interval]", > - " [-P pid_file] [-p log_socket]", > - " [-S logpriv_socket]"); > + fprintf(stderr, > + "usage: syslogd [-468ACcdFHknosTuv] [-a allowed_peer]\n" > + " [-b bind_address] [-f config_file]\n" > + " [-l [mode:]path] [-m mark_interval]\n" > + " [-O format] [-P pid_file] [-p > log_socket]\n" > + " [-S logpriv_socket]\n"); > exit(1); > } > > @@ -1558,177 +1573,114 @@ dofsync(void) > } > } > > -#define IOV_SIZE 7 > +/* > + * List of iovecs to which entries can be appended. > + * Used for constructing the message to be logged. > + */ > +struct iovlist { > + struct iovec iov[TTYMSG_IOV_MAX]; > + size_t iovcnt; > + size_t totalsize; > +}; > + > static void > -fprintlog_first(struct filed *f, const char *hostname, const char > *app_name, > - const char *procid, const char *msgid __unused, > - const char *structured_data __unused, const char *msg, int flags) > +iovlist_init(struct iovlist *il) > { > - struct iovec iov[IOV_SIZE]; > - struct addrinfo *r; > - int l, lsent = 0; > - char tagged_msg[MAXLINE + 1], line[MAXLINE + 1], greetings[200]; > - char nul[] = "", space[] = " ", lf[] = "\n", crlf[] = "\r\n"; > - char timebuf[RFC3164_DATELEN + 1]; > - const char *msgret; > > - if (strftime(timebuf, sizeof(timebuf), RFC3164_DATEFMT, > - &f->f_lasttime.tm) == 0) > - timebuf[0] = '\0'; > - if (f->f_type == F_WALL) { > - /* The time displayed is not synchornized with the other > log > - * destinations (like messages). Following fragment was > using > - * ctime(&now), which was updating the time every 30 sec. > - * With f_lasttime, time is synchronized correctly. > - */ > - iov[0] = (struct iovec){ > - .iov_base = greetings, > - .iov_len = snprintf(greetings, sizeof(greetings), > - "\r\n\7Message from syslogd@%s " > - "at %.24s ...\r\n", hostname, timebuf) > + il->iovcnt = 0; > + il->totalsize = 0; > +} > + > +static void > +iovlist_append(struct iovlist *il, const char *str) > +{ > + size_t size; > + > + /* Discard components if we've run out of iovecs. */ > + if (il->iovcnt < nitems(il->iov)) { > + size = strlen(str); > + il->iov[il->iovcnt++] = (struct iovec){ > + .iov_base = __DECONST(char *, str), > + .iov_len = size, > }; > - if (iov[0].iov_len >= sizeof(greetings)) > - iov[0].iov_len = sizeof(greetings) - 1; > - iov[1] = (struct iovec){ > - .iov_base = nul, > - .iov_len = 0 > - }; > - } else { > - iov[0] = (struct iovec){ > - .iov_base = timebuf, > - .iov_len = strlen(timebuf) > - }; > - iov[1] = (struct iovec){ > - .iov_base = space, > - .iov_len = 1 > - }; > + il->totalsize += size; > } > +} > > - if (LogFacPri) { > - static char fp_buf[30]; /* Hollow laugh */ > - int fac = f->f_prevpri & LOG_FACMASK; > - int pri = LOG_PRI(f->f_prevpri); > - const char *f_s = NULL; > - char f_n[5]; /* Hollow laugh */ > - const char *p_s = NULL; > - char p_n[5]; /* Hollow laugh */ > +static void > +iovlist_truncate(struct iovlist *il, size_t size) > +{ > + struct iovec *last; > + size_t diff; > > - if (LogFacPri > 1) { > - const CODE *c; > - > - for (c = facilitynames; c->c_name; c++) { > - if (c->c_val == fac) { > - f_s = c->c_name; > - break; > - } > - } > - for (c = prioritynames; c->c_name; c++) { > - if (c->c_val == pri) { > - p_s = c->c_name; > - break; > - } > - } > + while (size > il->totalsize) { > + diff = size - il->totalsize; > + last = &il->iov[il->iovcnt - 1]; > + if (diff >= last->iov_len) { > + /* Remove the last iovec entirely. */ > + --il->iovcnt; > + il->totalsize -= last->iov_len; > + } else { > + /* Remove the last iovec partially. */ > + last->iov_len -= diff; > + il->totalsize -= diff; > } > - if (!f_s) { > - snprintf(f_n, sizeof f_n, "%d", LOG_FAC(fac)); > - f_s = f_n; > - } > - if (!p_s) { > - snprintf(p_n, sizeof p_n, "%d", pri); > - p_s = p_n; > - } > - snprintf(fp_buf, sizeof fp_buf, "<%s.%s> ", f_s, p_s); > - iov[2] = (struct iovec){ > - .iov_base = fp_buf, > - .iov_len = strlen(fp_buf) > - }; > - } else { > - iov[2] = (struct iovec){ > - .iov_base = nul, > - .iov_len = 0 > - }; > } > - /* Prepend the application name to the message if provided. */ > - if (app_name != NULL) { > - if (procid != NULL) > - snprintf(tagged_msg, sizeof(tagged_msg), > - "%s[%s]: %s", app_name, procid, msg); > - else > - snprintf(tagged_msg, sizeof(tagged_msg), > - "%s: %s", app_name, msg); > - msg = tagged_msg; > - } > - iov[3] = (struct iovec){ > - .iov_base = __DECONST(char *, hostname), > - .iov_len = strlen(hostname) > - }; > - iov[4] = (struct iovec){ > - .iov_base = space, > - .iov_len = 1 > - }; > - iov[5] = (struct iovec){ > - .iov_base = __DECONST(char *, msg), > - .iov_len = strlen(msg) > - }; > - dprintf("Logging to %s", TypeNames[f->f_type]); > - f->f_time = now; > +} > > - switch (f->f_type) { > - case F_UNUSED: > - dprintf("\n"); > - break; > +static void > +fprintlog_write(struct filed *f, struct iovlist *il, int flags) > +{ > + struct msghdr msghdr; > + struct addrinfo *r; > + struct socklist *sl; > + const char *msgret; > + ssize_t lsent; > > + switch (f->f_type) { > case F_FORW: > + /* Truncate messages to RFC 5426 recommended size. */ > dprintf(" %s", f->fu_forw_hname); > switch (f->fu_forw_addr->ai_addr->sa_family) { > #ifdef INET > case AF_INET: > dprintf(":%d\n", > ntohs(satosin(f->fu_forw_addr- > >ai_addr)->sin_port)); > + iovlist_truncate(il, 480); > break; > #endif > #ifdef INET6 > case AF_INET6: > dprintf(":%d\n", > ntohs(satosin6(f->fu_forw_ > addr->ai_addr)->sin6_port)); > + iovlist_truncate(il, 1180); > break; > #endif > default: > dprintf("\n"); > } > - /* check for local vs remote messages */ > - if (strcasecmp(hostname, LocalHostName)) > - l = snprintf(line, sizeof line - 1, > - "<%d>%.15s Forwarded from %s: %s", > - f->f_prevpri, (char *)iov[0].iov_base, > - hostname, (char *)iov[5].iov_base); > - else > - l = snprintf(line, sizeof line - 1, "<%d>%.15s %s", > - f->f_prevpri, (char *)iov[0].iov_base, > - (char *)iov[5].iov_base); > - if (l < 0) > - l = 0; > - else if (l > MAXLINE) > - l = MAXLINE; > > + lsent = 0; > for (r = f->fu_forw_addr; r; r = r->ai_next) { > - struct socklist *sl; > - > + memset(&msghdr, 0, sizeof(msghdr)); > + msghdr.msg_name = r->ai_addr; > + msghdr.msg_namelen = r->ai_addrlen; > + msghdr.msg_iov = il->iov; > + msghdr.msg_iovlen = il->iovcnt; > STAILQ_FOREACH(sl, &shead, next) { > if (sl->sl_ss.ss_family == AF_LOCAL || > sl->sl_ss.ss_family == AF_UNSPEC || > sl->sl_socket < 0) > continue; > - lsent = sendto(sl->sl_socket, line, l, 0, > - r->ai_addr, r->ai_addrlen); > - if (lsent == l) > + lsent = sendmsg(sl->sl_socket, &msghdr, 0); > + if (lsent == (ssize_t)il->totalsize) > break; > } > - if (lsent == l && !send_to_all) > + if (lsent == (ssize_t)il->totalsize && > !send_to_all) > break; > } > - dprintf("lsent/l: %d/%d\n", lsent, l); > - if (lsent != l) { > + dprintf("lsent/totalsize: %zd/%zu\n", lsent, > il->totalsize); > + if (lsent != (ssize_t)il->totalsize) { > int e = errno; > logerror("sendto"); > errno = e; > @@ -1758,11 +1710,8 @@ fprintlog_first(struct filed *f, const char > *hostname, > > case F_FILE: > dprintf(" %s\n", f->fu_fname); > - iov[6] = (struct iovec){ > - .iov_base = lf, > - .iov_len = 1 > - }; > - if (writev(f->f_file, iov, nitems(iov)) < 0) { > + iovlist_append(il, "\n"); > + if (writev(f->f_file, il->iov, il->iovcnt) < 0) { > /* > * If writev(2) fails for potentially transient > errors > * like the filesystem being full, ignore it. > @@ -1782,10 +1731,7 @@ fprintlog_first(struct filed *f, const char > *hostname, > > case F_PIPE: > dprintf(" %s\n", f->fu_pipe_pname); > - iov[6] = (struct iovec){ > - .iov_base = lf, > - .iov_len = 1 > - }; > + iovlist_append(il, "\n"); > if (f->fu_pipe_pid == 0) { > if ((f->f_file = p_open(f->fu_pipe_pname, > &f->fu_pipe_pid)) < 0) { > @@ -1793,7 +1739,7 @@ fprintlog_first(struct filed *f, const char > *hostname, > break; > } > } > - if (writev(f->f_file, iov, nitems(iov)) < 0) { > + if (writev(f->f_file, il->iov, il->iovcnt) < 0) { > int e = errno; > > deadq_enter(f->fu_pipe_pid, f->fu_pipe_pname); > @@ -1812,12 +1758,9 @@ fprintlog_first(struct filed *f, const char > *hostname, > > case F_TTY: > dprintf(" %s%s\n", _PATH_DEV, f->fu_fname); > - iov[6] = (struct iovec){ > - .iov_base = crlf, > - .iov_len = 2 > - }; > + iovlist_append(il, "\r\n"); > errno = 0; /* ttymsg() only sometimes returns an > errno */ > - if ((msgret = ttymsg(iov, nitems(iov), f->fu_fname, 10))) { > + if ((msgret = ttymsg(il->iov, il->iovcnt, f->fu_fname, > 10))) { > f->f_type = F_UNUSED; > logerror(msgret); > } > @@ -1826,14 +1769,190 @@ fprintlog_first(struct filed *f, const char > *hostname, > case F_USERS: > case F_WALL: > dprintf("\n"); > - iov[6] = (struct iovec){ > - .iov_base = crlf, > - .iov_len = 2 > - }; > - wallmsg(f, iov, nitems(iov)); > + iovlist_append(il, "\r\n"); > + wallmsg(f, il->iov, il->iovcnt); > break; > } > +} > + > +static void > +fprintlog_rfc5424(struct filed *f, const char *hostname, const char > *app_name, > + const char *procid, const char *msgid, const char *structured_data, > + const char *msg, int flags) > +{ > + struct iovlist il; > + suseconds_t usec; > + int i; > + char timebuf[33], priority_number[5]; > + > + iovlist_init(&il); > + if (f->f_type == F_WALL) > + iovlist_append(&il, "\r\n\aMessage from syslogd ...\r\n"); > + iovlist_append(&il, "<"); > + snprintf(priority_number, sizeof(priority_number), "%d", > f->f_prevpri); > + iovlist_append(&il, priority_number); > + iovlist_append(&il, ">1 "); > + if (strftime(timebuf, sizeof(timebuf), "%FT%T.______%z", > + &f->f_lasttime.tm) == sizeof(timebuf) - 2) { > + /* Add colon to the time zone offset, which %z doesn't do. > */ > + timebuf[32] = '\0'; > + timebuf[31] = timebuf[30]; > + timebuf[30] = timebuf[29]; > + timebuf[29] = ':'; > + > + /* Overwrite space for microseconds with actual value. */ > + usec = f->f_lasttime.usec; > + for (i = 25; i >= 20; --i) { > + timebuf[i] = usec % 10 + '0'; > + usec /= 10; > + } > + iovlist_append(&il, timebuf); > + } else > + iovlist_append(&il, "-"); > + iovlist_append(&il, " "); > + iovlist_append(&il, hostname); > + iovlist_append(&il, " "); > + iovlist_append(&il, app_name == NULL ? "-" : app_name); > + iovlist_append(&il, " "); > + iovlist_append(&il, procid == NULL ? "-" : procid); > + iovlist_append(&il, " "); > + iovlist_append(&il, msgid == NULL ? "-" : msgid); > + iovlist_append(&il, " "); > + iovlist_append(&il, structured_data == NULL ? "-" : > structured_data); > + iovlist_append(&il, " "); > + iovlist_append(&il, msg); > + > + fprintlog_write(f, &il, flags); > +} > + > +static void > +fprintlog_rfc3164(struct filed *f, const char *hostname, const char > *app_name, > + const char *procid, const char *msg, int flags) > +{ > + struct iovlist il; > + const CODE *c; > + int facility, priority; > + char timebuf[RFC3164_DATELEN + 1], facility_number[5], > + priority_number[5]; > + bool facility_found, priority_found; > + > + if (strftime(timebuf, sizeof(timebuf), RFC3164_DATEFMT, > + &f->f_lasttime.tm) == 0) > + timebuf[0] = '\0'; > + > + iovlist_init(&il); > + switch (f->f_type) { > + case F_FORW: > + /* Message forwarded over the network. */ > + iovlist_append(&il, "<"); > + snprintf(priority_number, sizeof(priority_number), "%d", > + f->f_prevpri); > + iovlist_append(&il, priority_number); > + iovlist_append(&il, ">"); > + iovlist_append(&il, timebuf); > + if (strcasecmp(hostname, LocalHostName) != 0) { > + iovlist_append(&il, " Forwarded from "); > + iovlist_append(&il, hostname); > + iovlist_append(&il, ":"); > + } > + iovlist_append(&il, " "); > + break; > + > + case F_WALL: > + /* Message written to terminals. */ > + iovlist_append(&il, "\r\n\aMessage from syslogd@"); > + iovlist_append(&il, hostname); > + iovlist_append(&il, " at "); > + iovlist_append(&il, timebuf); > + iovlist_append(&il, " ...\r\n"); > + break; > + > + default: > + /* Message written to files. */ > + iovlist_append(&il, timebuf); > + iovlist_append(&il, " "); > + iovlist_append(&il, hostname); > + iovlist_append(&il, " "); > + > + if (LogFacPri) { > + iovlist_append(&il, "<"); > + > + facility = f->f_prevpri & LOG_FACMASK; > + facility_found = false; > + if (LogFacPri > 1) { > + for (c = facilitynames; c->c_name; c++) { > + if (c->c_val == facility) { > + iovlist_append(&il, > c->c_name); > + facility_found = true; > + break; > + } > + } > + } > + if (!facility_found) { > + snprintf(facility_number, > + sizeof(facility_number), "%d", > + LOG_FAC(facility)); > + iovlist_append(&il, facility_number); > + } > + > + iovlist_append(&il, "."); > + > + priority = LOG_PRI(f->f_prevpri); > + priority_found = false; > + if (LogFacPri > 1) { > + for (c = prioritynames; c->c_name; c++) { > + if (c->c_val == priority) { > + iovlist_append(&il, > c->c_name); > + priority_found = true; > + break; > + } > + } > + } > + if (!priority_found) { > + snprintf(priority_number, > + sizeof(priority_number), "%d", > priority); > + iovlist_append(&il, priority_number); > + } > + > + iovlist_append(&il, "> "); > + } > + break; > + } > + > + /* Message body with application name and process ID prefixed. */ > + if (app_name != NULL) { > + iovlist_append(&il, app_name); > + if (procid != NULL) { > + iovlist_append(&il, "["); > + iovlist_append(&il, procid); > + iovlist_append(&il, "]"); > + } > + iovlist_append(&il, ": "); > + } > + iovlist_append(&il, msg); > + > + fprintlog_write(f, &il, flags); > +} > + > +static void > +fprintlog_first(struct filed *f, const char *hostname, const char > *app_name, > + const char *procid, const char *msgid __unused, > + const char *structured_data __unused, const char *msg, int flags) > +{ > + > + dprintf("Logging to %s", TypeNames[f->f_type]); > + f->f_time = now; > f->f_prevcount = 0; > + if (f->f_type == F_UNUSED) { > + dprintf("\n"); > + return; > + } > + > + if (RFC3164OutputFormat) > + fprintlog_rfc3164(f, hostname, app_name, procid, msg, > flags); > + else > + fprintlog_rfc5424(f, hostname, app_name, procid, msgid, > + structured_data, msg, flags); > } > > /* > @@ -2229,8 +2348,10 @@ init(int signo) > if (gethostname(LocalHostName, sizeof(LocalHostName))) > err(EX_OSERR, "gethostname() failed"); > if ((p = strchr(LocalHostName, '.')) != NULL) { > - *p++ = '\0'; > - LocalDomain = p; > + /* RFC 5424 prefers logging FQDNs. */ > + if (RFC3164OutputFormat) > + *p = '\0'; > + LocalDomain = p + 1; > } else { > LocalDomain = ""; > } > _______________________________________________ > 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" > From owner-svn-src-all@freebsd.org Mon Apr 16 12:05:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2037FA48F1; Mon, 16 Apr 2018 12:05:53 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660087.outbound.protection.outlook.com [40.107.66.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8A86C5C9; Mon, 16 Apr 2018 12:05:52 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM (52.132.66.153) by YQBPR0101MB1073.CANPRD01.PROD.OUTLOOK.COM (52.132.66.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.675.9; Mon, 16 Apr 2018 12:05:51 +0000 Received: from YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM ([fe80::893c:efc2:d71f:945a]) by YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM ([fe80::893c:efc2:d71f:945a%13]) with mapi id 15.20.0675.015; Mon, 16 Apr 2018 12:05:51 +0000 From: Rick Macklem To: Julian Elischer , Konstantin Belousov , Andriy Gapon CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r332559 - head/usr.sbin/mountd Thread-Topic: svn commit: r332559 - head/usr.sbin/mountd Thread-Index: AQHT1WPJF2YW/FdX9EeBNLw0aDyfeKQDOEiAgAAHNYCAAApiFQ== Date: Mon, 16 Apr 2018 12:05:51 +0000 Message-ID: References: <201804160917.w3G9HaCN081290@repo.freebsd.org> <20180416105611.GG1774@kib.kiev.ua>, <5e754f1f-9688-884a-cddd-fa4b65e67f0b@freebsd.org> In-Reply-To: <5e754f1f-9688-884a-cddd-fa4b65e67f0b@freebsd.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YQBPR0101MB1073; 7:sWuwQzBF1aEi4Ur6w3l4LE4YvAfRCfAfVtYDMi2TMhG0QmlwdLeThonFT84M4GlzEqoUMuwGjHNhzrgFr6aBSnNJcOqJykMA+gB+eJXZIKrMePdx0GyWz6OupKuRMkrVVC1CgSwa/uiZkkso3n93KPkLRBsOPq4bvdo7m6xaK7GLueTwCcX0qzYq9IOeRuMI/+U0e21fiWY4dE5SCTA0whHYdfyU0MXiNzzhJWfODzf6SXF3bEw/zP8z3BjBWtXc x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YQBPR0101MB1073; x-ms-traffictypediagnostic: YQBPR0101MB1073: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231232)(944501327)(52105095)(93006095)(93001095)(3002001)(6041310)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:YQBPR0101MB1073; BCL:0; PCL:0; RULEID:; SRVR:YQBPR0101MB1073; x-forefront-prvs: 0644578634 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(346002)(39380400002)(396003)(39860400002)(199004)(189003)(316002)(81156014)(81166006)(5660300001)(97736004)(11346002)(86362001)(476003)(8676002)(786003)(68736007)(446003)(106356001)(105586002)(99286004)(2900100001)(3660700001)(25786009)(486006)(186003)(305945005)(26005)(7696005)(76176011)(33656002)(4326008)(6506007)(74316002)(3280700002)(229853002)(110136005)(478600001)(6436002)(54906003)(53936002)(9686003)(59450400001)(74482002)(14454004)(102836004)(55016002)(5250100002)(2906002)(6246003)(8936002)(39060400002); DIR:OUT; SFP:1101; SCL:1; SRVR:YQBPR0101MB1073; H:YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: jfG+RyR6/D5MfqYCnUmmUYBFK2Q/UgmFGUZWErcvl55yTPXxj+tEn+5kydd+opMGjftCCBigaZnek/rY3pQhhe8YiboEuxTqqzVp+ob1+0E1c5DKc+QLhfxP4aQF27DXEXGVQUrTlXHTkA6LY0eLmsozvGaFezV0HwDMghRGtZLQe+OWvin7yp3U3O0NMjok spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: e284a8a6-99c9-40a2-dfc4-08d5a3926615 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: e284a8a6-99c9-40a2-dfc4-08d5a3926615 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2018 12:05:51.5430 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB1073 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 12:05:54 -0000 Julian Elischer wrote: >On 16/4/18 6:56 pm, Konstantin Belousov wrote: [stuff snipped] >>> + ngroups =3D XU_NGROUPS + 1; >> Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? >valid question.. because that is how many are allocated? >it was a "minimally invasive patch".. whoever used XU_NGROUPS before >should have fixed it. >Having said that, thanks for drawing out attention to it.. will >probably fix. 16 is the limit specified in the RFCs for Sun RPC, so that is the "on the w= ire" limit. I haven't looked at the code. It might make sense to handle more here and t= hen set the limit at 16 after getting rid of duplicates, but I have no idea if = it matters? rick [more stuff snipped] From owner-svn-src-all@freebsd.org Mon Apr 16 12:46:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C97FF8044A; Mon, 16 Apr 2018 12:46:15 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C36F874C79; Mon, 16 Apr 2018 12:46:14 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDE8A1D73D; Mon, 16 Apr 2018 12:46:14 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GCkETK087200; Mon, 16 Apr 2018 12:46:14 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GCkEZA087199; Mon, 16 Apr 2018 12:46:14 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201804161246.w3GCkEZA087199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 16 Apr 2018 12:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332560 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 332560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 12:46:15 -0000 Author: tsoome Date: Mon Apr 16 12:46:14 2018 New Revision: 332560 URL: https://svnweb.freebsd.org/changeset/base/332560 Log: loader: make sure we do not return garbage from help_getnext Since we do free subtopic and desc in help_getnext(), we need to set them also NULL, so we make sure we dont get double free(). Approved by: bapt Differential Revision: https://reviews.freebsd.org/D15082 Modified: head/stand/common/commands.c Modified: head/stand/common/commands.c ============================================================================== --- head/stand/common/commands.c Mon Apr 16 09:17:36 2018 (r332559) +++ head/stand/common/commands.c Mon Apr 16 12:46:14 2018 (r332560) @@ -74,7 +74,6 @@ help_getnext(int fd, char **topic, char **subtopic, ch if ((strlen(line) < 3) || (line[0] != '#') || (line[1] != ' ')) continue; - *topic = *subtopic = *desc = NULL; cp = line + 2; while((cp != NULL) && (*cp != 0)) { ep = strchr(cp, ' '); @@ -95,6 +94,7 @@ help_getnext(int fd, char **topic, char **subtopic, ch if (*topic == NULL) { free(*subtopic); free(*desc); + *subtopic = *desc = NULL; continue; } return(1); From owner-svn-src-all@freebsd.org Mon Apr 16 13:18:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A178EF82516; Mon, 16 Apr 2018 13:18:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 541597D082; Mon, 16 Apr 2018 13:18:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43EDD1DC2E; Mon, 16 Apr 2018 13:18:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GDIJuF002358; Mon, 16 Apr 2018 13:18:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GDIJl9002357; Mon, 16 Apr 2018 13:18:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804161318.w3GDIJl9002357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Apr 2018 13:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332561 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 332561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 13:18:19 -0000 Author: kevans Date: Mon Apr 16 13:18:18 2018 New Revision: 332561 URL: https://svnweb.freebsd.org/changeset/base/332561 Log: Rename volume label for ESP Harry Schmalzbauer reports that some firmware, in his experience, trips over the ESP we install due to the volume label. It has been theorized that this is due to some confusion with the label and the path on the ESP to boot1.efi. Regardless, Harry found that renaming the label seems to fix it. PR: 214282 MFC after: 3 days Modified: head/stand/efi/boot1/generate-fat.sh Modified: head/stand/efi/boot1/generate-fat.sh ============================================================================== --- head/stand/efi/boot1/generate-fat.sh Mon Apr 16 12:46:14 2018 (r332560) +++ head/stand/efi/boot1/generate-fat.sh Mon Apr 16 13:18:18 2018 (r332561) @@ -42,7 +42,7 @@ while read ARCH FILENAME; do dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE DEVICE=`mdconfig -a -f $OUTPUT_FILE` - newfs_msdos -F 12 -L EFI $DEVICE + newfs_msdos -F 12 -L EFISYS $DEVICE mkdir stub mount -t msdosfs /dev/$DEVICE stub From owner-svn-src-all@freebsd.org Mon Apr 16 13:31:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 067DFF835BD for ; Mon, 16 Apr 2018 13:31:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A880814B7 for ; Mon, 16 Apr 2018 13:31:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id t192-v6so11735766itc.1 for ; Mon, 16 Apr 2018 06:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=HoCxvMSGrUzq4CZxrSeJ+RVsFGGrjSjbzEK829Q/nkA=; b=m9+QhtbGjDLnuTQlhEWd4QlEc9rlpKFuRF7Lv2+UWTdzuWBxIL7jgbpKj1Z7ZU+QTu GwBaJnn0BTp1pcbNOut8nkzZjNCsy1zwAPRGBuw8Q9aW6PKyae1mKfRvk+/Bu9NFpNgF PV6GeQ0xzC2jYe30g1jad81XJqxGc6ErcimTjmnbikfBGF9cZa+m0NxqC3u87Hd1Em+z 3WUHWictv1ZhIuF9Paf7JGoNY/a2D0AAmUOVssIjnlXTJWP1P60tp/EyBBtKyc20qeP/ qvIQWRlNL2h7BA3HcICj+d76n9IpKl5n/o8iUEvdGjCRafl0bjL/DbvL+/69B/mreS3C llvA== 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:in-reply-to:references:from :date:message-id:subject:to:cc; bh=HoCxvMSGrUzq4CZxrSeJ+RVsFGGrjSjbzEK829Q/nkA=; b=neINK8MrABtAWKqJ5653sML+AXczfUeL4EVWIGPZoh3NPAGdx+J4JC3DHb7p2p/y0T kCxxmtwwdm4QP4KmWb71ADdOg30XEXpmBmPKDWtEEOaiHnbNY9AkEqWQFYhcH4Rx4q9J oh7zNsMnTToRgAhbjEFX+Dw5BovO5OFBt79GaBrDmfbszg2BejmwzrrNprQedEiESAlI hXFkTBcXJHcEOk2qIjpM2Q2GH9ULGVx6cS7BEqofMPZ0Bj9L51G7H7qyY6Phe3c3tNXO EUyqe8B1z4L/VzUyJdkMPw8xx4tyQ0FO4/Ir2Tg/V/v4OUFG4Ot6/ssBYS7SLr52GGod mQ5w== X-Gm-Message-State: ALQs6tDM8t83Zz7eVgg4c6pHtkdgSfA7YPPED2lB/jLK8fqEwZEPHpZh i2AxH8D4/WPhION0A6VmjamO6hxcOveLVHBd6bDcog== X-Google-Smtp-Source: AIpwx4/FaHzAEbnB2rWumHAFHcsBP0lqUw7sCplkb5g2QoFbZYlPsj1J9YQPCwqQXTWkU9T5YJiYCPaGT8Ke2Yiup4I= X-Received: by 2002:a24:e983:: with SMTP id f125-v6mr4927154ith.36.1523885509821; Mon, 16 Apr 2018 06:31:49 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.166.4 with HTTP; Mon, 16 Apr 2018 06:31:49 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <201804161318.w3GDIJl9002357@repo.freebsd.org> References: <201804161318.w3GDIJl9002357@repo.freebsd.org> From: Warner Losh Date: Mon, 16 Apr 2018 07:31:49 -0600 X-Google-Sender-Auth: B2yc13EQIrF5CMNoUKaa_6ylQCc Message-ID: Subject: Re: svn commit: r332561 - head/stand/efi/boot1 To: Kyle Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 13:31:51 -0000 On Mon, Apr 16, 2018 at 7:18 AM, Kyle Evans wrote: > Author: kevans > Date: Mon Apr 16 13:18:18 2018 > New Revision: 332561 > URL: https://svnweb.freebsd.org/changeset/base/332561 > > Log: > Rename volume label for ESP > > Harry Schmalzbauer reports that some firmware, in his experience, trips > over the ESP we install due to the volume label. It has been theorized > that > this is due to some confusion with the label and the path on the ESP to > boot1.efi. > > Regardless, Harry found that renaming the label seems to fix it. > rm -rf boot1.efifat after svn rm is the right answer here. Warner From owner-svn-src-all@freebsd.org Mon Apr 16 13:50:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09170F84B1A; Mon, 16 Apr 2018 13:50:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEDF5847B2; Mon, 16 Apr 2018 13:50:02 +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 A987B1E1DA; Mon, 16 Apr 2018 13:50:02 +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 w3GDo2uA017333; Mon, 16 Apr 2018 13:50:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GDo2v9017329; Mon, 16 Apr 2018 13:50:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804161350.w3GDo2v9017329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Apr 2018 13:50:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332562 - stable/11/usr.bin/dtc X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/dtc X-SVN-Commit-Revision: 332562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 13:50:03 -0000 Author: kevans Date: Mon Apr 16 13:50:01 2018 New Revision: 332562 URL: https://svnweb.freebsd.org/changeset/base/332562 Log: MFC r332483: dtc(1): Update to upstream 006664a Highlights: - Passing "-" to -o will now cause output to go to stdout - Path-based syntactic sugar for overlays is now accepted. This looks like: /dts-v1/; /plugin/; &{/soc} { sid: eeprom@1c14000 { compatible = "allwinner,sun8i-h3-sid"; reg = <0x1c14000 0x400>; status = "okay"; }; }; Modified: stable/11/usr.bin/dtc/dtc.1 stable/11/usr.bin/dtc/dtc.cc stable/11/usr.bin/dtc/fdt.cc stable/11/usr.bin/dtc/fdt.hh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/dtc/dtc.1 ============================================================================== --- stable/11/usr.bin/dtc/dtc.1 Mon Apr 16 13:18:18 2018 (r332561) +++ stable/11/usr.bin/dtc/dtc.1 Mon Apr 16 13:50:01 2018 (r332562) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd January 17, 2018 +.Dd April 7, 2018 .Dt DTC 1 .Os .Sh NAME @@ -275,7 +275,7 @@ tree when the overlay is applied. .Pp Much simpler syntactic sugar was later invented to simplify generating overlays. Instead of creating targetted fragments manually, one can instead create a root -node that targets a label in the base node using the +node that targets a label in the base FDT using the .Va &label syntax supported in conventional DTS. This will indicate that a fragment should be generated for the node, with the @@ -283,6 +283,19 @@ given .Va label being the target, and the properties and child nodes will be used as the __overlay__. +.Pp +Additionally, a path-based version of this syntactic sugar is supported. +A root node may target a path in the base FDT using a name of the form +.Va &{/path} . +A fragment will be generated for the node as it is in the +.Va &label +case, except the +.Va target-path +property will be set to +.Va /path +and no +.Va target +will be set. .Pp Both conventional overlays and the later-added syntactic sugar are supported. .Pp Modified: stable/11/usr.bin/dtc/dtc.cc ============================================================================== --- stable/11/usr.bin/dtc/dtc.cc Mon Apr 16 13:18:18 2018 (r332561) +++ stable/11/usr.bin/dtc/dtc.cc Mon Apr 16 13:50:01 2018 (r332562) @@ -171,11 +171,14 @@ main(int argc, char **argv) case 'o': { outfile_name = optarg; - outfile = open(optarg, O_CREAT | O_TRUNC | O_WRONLY, 0666); - if (outfile == -1) + if (strcmp(outfile_name, "-") != 0) { - perror("Unable to open output file"); - return EXIT_FAILURE; + outfile = open(optarg, O_CREAT | O_TRUNC | O_WRONLY, 0666); + if (outfile == -1) + { + perror("Unable to open output file"); + return EXIT_FAILURE; + } } break; } Modified: stable/11/usr.bin/dtc/fdt.cc ============================================================================== --- stable/11/usr.bin/dtc/fdt.cc Mon Apr 16 13:18:18 2018 (r332561) +++ stable/11/usr.bin/dtc/fdt.cc Mon Apr 16 13:50:01 2018 (r332562) @@ -727,14 +727,32 @@ node::parse_name(text_input_buffer &input, bool &is_pr return n; } -void -node::visit(std::function fn) +node::visit_behavior +node::visit(std::function fn, node *parent) { - fn(*this); - for (auto &&c : children) + visit_behavior behavior; + behavior = fn(*this, parent); + if (behavior == VISIT_BREAK) { - c->visit(fn); + return VISIT_BREAK; } + else if (behavior != VISIT_CONTINUE) + { + for (auto &&c : children) + { + behavior = c->visit(fn, this); + // Any status other than VISIT_RECURSE stops our execution and + // bubbles up to our caller. The caller may then either continue + // visiting nodes that are siblings to this one or completely halt + // visiting. + if (behavior != VISIT_RECURSE) + { + return behavior; + } + } + } + // Continue recursion by default + return VISIT_RECURSE; } node::node(input_buffer &structs, input_buffer &strings) : valid(true) @@ -1319,7 +1337,7 @@ device_tree::resolve_cross_references(uint32_t &phandl phandle_set.insert({&i.val, i}); } std::vector> sorted_phandles; - root->visit([&](node &n) { + root->visit([&](node &n, node *parent) { for (auto &p : n.properties()) { for (auto &v : *p) @@ -1331,7 +1349,9 @@ device_tree::resolve_cross_references(uint32_t &phandl } } } - }); + // Allow recursion + return node::VISIT_RECURSE; + }, nullptr); assert(sorted_phandles.size() == fixups.size()); for (auto &i : sorted_phandles) @@ -1471,9 +1491,24 @@ device_tree::parse_file(text_input_buffer &input, else if (input.consume('&')) { input.next_token(); - string name = input.parse_node_name(); + string name; + bool name_is_path_reference = false; + // This is to deal with names intended as path references, e.g. &{/path}. + // While it may make sense in a non-plugin context, we don't support such + // usage at this time. + if (input.consume('{') && is_plugin) + { + name = input.parse_to('}'); + input.consume('}'); + name_is_path_reference = true; + } + else + { + name = input.parse_node_name(); + } input.next_token(); n = node::parse(input, std::move(name), string_set(), string(), &defines); + n->name_is_path_reference = name_is_path_reference; } else { @@ -1702,11 +1737,21 @@ device_tree::create_fragment_wrapper(node_ptr &node, i node_ptr newroot = node::create_special_node("", symbols); node_ptr wrapper = node::create_special_node("__overlay__", symbols); - // Generate the fragment with target = <&name> + // Generate the fragment with $propname = <&name> property_value v; + std::string propname; v.string_data = node->name; - v.type = property_value::PHANDLE; - auto prop = std::make_shared(std::string("target")); + if (!node->name_is_path_reference) + { + propname = "target"; + v.type = property_value::PHANDLE; + } + else + { + propname = "target-path"; + v.type = property_value::STRING; + } + auto prop = std::make_shared(std::string(propname)); prop->add_value(v); symbols.push_back(prop); Modified: stable/11/usr.bin/dtc/fdt.hh ============================================================================== --- stable/11/usr.bin/dtc/fdt.hh Mon Apr 16 13:18:18 2018 (r332561) +++ stable/11/usr.bin/dtc/fdt.hh Mon Apr 16 13:50:01 2018 (r332562) @@ -409,6 +409,10 @@ class node */ std::string name; /** + * The name of the node is a path reference. + */ + bool name_is_path_reference = false; + /** * The unit address of the node, which is optionally written after the * name followed by an at symbol. */ @@ -421,6 +425,25 @@ class node * Iterator type for child nodes. */ typedef std::vector::iterator child_iterator; + /** + * Recursion behavior to be observed for visiting + */ + enum visit_behavior + { + /** + * Recurse as normal through the rest of the tree. + */ + VISIT_RECURSE, + /** + * Continue recursing through the device tree, but do not + * recurse through this branch of the tree any further. + */ + VISIT_CONTINUE, + /** + * Immediately halt the visit. No further nodes will be visited. + */ + VISIT_BREAK + }; private: /** * Adaptor to use children in range-based for loops. @@ -635,9 +658,13 @@ class node */ void write_dts(FILE *file, int indent); /** - * Recursively visit this node and then its children. + * Recursively visit this node and then its children based on the + * callable's return value. The callable may return VISIT_BREAK + * immediately halt all recursion and end the visit, VISIT_CONTINUE to + * not recurse into the current node's children, or VISIT_RECURSE to recurse + * through children as expected. parent will be passed to the callable. */ - void visit(std::function); + visit_behavior visit(std::function, node *parent); }; /** From owner-svn-src-all@freebsd.org Mon Apr 16 13:52:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 857EBF84EB4; Mon, 16 Apr 2018 13:52:24 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3719185D4B; Mon, 16 Apr 2018 13:52:24 +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 3051B1E359; Mon, 16 Apr 2018 13:52:24 +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 w3GDqOdL021910; Mon, 16 Apr 2018 13:52:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GDqNtM021905; Mon, 16 Apr 2018 13:52:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804161352.w3GDqNtM021905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 16 Apr 2018 13:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332563 - in head/sys: arm/include ddb mips/include powerpc/include sparc64/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/include ddb mips/include powerpc/include sparc64/include X-SVN-Commit-Revision: 332563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 13:52:24 -0000 Author: imp Date: Mon Apr 16 13:52:23 2018 New Revision: 332563 URL: https://svnweb.freebsd.org/changeset/base/332563 Log: No need to force md code to define a macro that's the same as _BYTE_ORDER. Use that instead. Modified: head/sys/arm/include/db_machdep.h head/sys/ddb/db_access.c head/sys/mips/include/db_machdep.h head/sys/powerpc/include/db_machdep.h head/sys/sparc64/include/db_machdep.h Modified: head/sys/arm/include/db_machdep.h ============================================================================== --- head/sys/arm/include/db_machdep.h Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/arm/include/db_machdep.h Mon Apr 16 13:52:23 2018 (r332563) @@ -95,7 +95,4 @@ int db_validate_address(vm_offset_t); u_int branch_taken (u_int insn, db_addr_t pc); -#ifdef __ARMEB__ -#define BYTE_MSF (1) -#endif #endif /* !_MACHINE_DB_MACHDEP_H_ */ Modified: head/sys/ddb/db_access.c ============================================================================== --- head/sys/ddb/db_access.c Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/ddb/db_access.c Mon Apr 16 13:52:23 2018 (r332563) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -51,10 +52,6 @@ static unsigned db_extend[] = { /* table for sign-exte 0xFF800000U }; -#ifndef BYTE_MSF -#define BYTE_MSF 0 -#endif - db_expr_t db_get_value(db_addr_t addr, int size, bool is_signed) { @@ -69,9 +66,9 @@ db_get_value(db_addr_t addr, int size, bool is_signed) } value = 0; -#if BYTE_MSF +#if _BYTE_ORDER == _BIG_ENDIAN for (i = 0; i < size; i++) -#else /* BYTE_LSF */ +#else /* _LITTLE_ENDIAN */ for (i = size - 1; i >= 0; i--) #endif { @@ -91,9 +88,9 @@ db_put_value(db_addr_t addr, int size, db_expr_t value char data[sizeof(int)]; int i; -#if BYTE_MSF +#if _BYTE_ORDER == _BIG_ENDIAN for (i = size - 1; i >= 0; i--) -#else /* BYTE_LSF */ +#else /* _LITTLE_ENDIAN */ for (i = 0; i < size; i++) #endif { Modified: head/sys/mips/include/db_machdep.h ============================================================================== --- head/sys/mips/include/db_machdep.h Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/mips/include/db_machdep.h Mon Apr 16 13:52:23 2018 (r332563) @@ -41,17 +41,12 @@ #include #include -#include typedef struct trapframe db_regs_t; extern db_regs_t ddb_regs; /* register state */ typedef vm_offset_t db_addr_t; /* address - unsigned */ typedef register_t db_expr_t; /* expression - signed */ - -#if BYTE_ORDER == _BIG_ENDIAN -#define BYTE_MSF (1) -#endif #define SOFTWARE_SSTEP /* Need software single step */ #define SOFTWARE_SSTEP_EMUL /* next_instr_address() emulates 100% */ Modified: head/sys/powerpc/include/db_machdep.h ============================================================================== --- head/sys/powerpc/include/db_machdep.h Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/powerpc/include/db_machdep.h Mon Apr 16 13:52:23 2018 (r332563) @@ -40,8 +40,6 @@ #define DB_ELF_SYMBOLS #define DB_ELFSIZE __ELF_WORD_SIZE -#define BYTE_MSF (1) - typedef vm_offset_t db_addr_t; /* address - unsigned */ typedef intptr_t db_expr_t; /* expression - signed */ Modified: head/sys/sparc64/include/db_machdep.h ============================================================================== --- head/sys/sparc64/include/db_machdep.h Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/sparc64/include/db_machdep.h Mon Apr 16 13:52:23 2018 (r332563) @@ -33,8 +33,6 @@ #include #include -#define BYTE_MSF (1) - typedef vm_offset_t db_addr_t; typedef long db_expr_t; From owner-svn-src-all@freebsd.org Mon Apr 16 13:52:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 667F5F84F1B; Mon, 16 Apr 2018 13:52:41 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 118F78604F; Mon, 16 Apr 2018 13:52:41 +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 0B2001E362; Mon, 16 Apr 2018 13:52:41 +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 w3GDqe5M021967; Mon, 16 Apr 2018 13:52:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GDqeMC021966; Mon, 16 Apr 2018 13:52:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804161352.w3GDqeMC021966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 16 Apr 2018 13:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332564 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 332564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 13:52:41 -0000 Author: imp Date: Mon Apr 16 13:52:40 2018 New Revision: 332564 URL: https://svnweb.freebsd.org/changeset/base/332564 Log: Use bool instead of boolean_t here. No reason to use boolean_t. Also, stop passing FALSE to a bool parameter. Modified: head/sys/i386/i386/db_trace.c Modified: head/sys/i386/i386/db_trace.c ============================================================================== --- head/sys/i386/i386/db_trace.c Mon Apr 16 13:52:23 2018 (r332563) +++ head/sys/i386/i386/db_trace.c Mon Apr 16 13:52:40 2018 (r332564) @@ -216,7 +216,7 @@ db_numargs(fp) int inst; int args; - argp = (char *)db_get_value((int)&fp->f_retaddr, 4, FALSE); + argp = (char *)db_get_value((int)&fp->f_retaddr, 4, false); /* * XXX etext is wrong for LKMs. We should attempt to interpret * the instruction at the return address in all cases. This @@ -226,7 +226,7 @@ db_numargs(fp) args = -1; } else { retry: - inst = db_get_value((int)argp, 4, FALSE); + inst = db_get_value((int)argp, 4, false); if ((inst & 0xff) == 0x59) /* popl %ecx */ args = 1; else if ((inst & 0xffff) == 0xc483) /* addl $Ibs, %esp */ @@ -255,7 +255,7 @@ db_print_stack_entry(name, narg, argnp, argp, callpc, while (n) { if (argnp) db_printf("%s=", *argnp++); - db_printf("%r", db_get_value((int)argp, 4, FALSE)); + db_printf("%r", db_get_value((int)argp, 4, false)); argp++; if (--n != 0) db_printf(","); @@ -304,8 +304,8 @@ db_nextframe(struct i386_frame **fp, db_addr_t *ip, st c_db_sym_t sym; const char *name; - eip = db_get_value((int) &(*fp)->f_retaddr, 4, FALSE); - ebp = db_get_value((int) &(*fp)->f_frame, 4, FALSE); + eip = db_get_value((int) &(*fp)->f_retaddr, 4, false); + ebp = db_get_value((int) &(*fp)->f_frame, 4, false); /* * Figure out frame type. We look at the address just before @@ -435,7 +435,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, db_expr_t offset; c_db_sym_t sym; int instr, narg; - boolean_t first; + bool first; if (db_segsize(tf) == 16) { db_printf( @@ -473,13 +473,13 @@ db_backtrace(struct thread *td, struct trapframe *tf, instr = (int)(kdb_frame + 1); else instr = (int)&kdb_frame->tf_esp; - pc = db_get_value(instr, 4, FALSE); + pc = db_get_value(instr, 4, false); } if (count == -1) count = 1024; - first = TRUE; + first = true; while (count-- && !db_pager_quit) { sym = db_search_symbol(pc, DB_STGY_ANY, &offset); db_symbol_values(sym, &name, NULL); @@ -497,7 +497,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, */ actframe = frame; if (first) { - first = FALSE; + first = false; if (sym == C_DB_SYM_NULL && sp != 0) { /* * If a symbol couldn't be found, we've probably @@ -506,13 +506,13 @@ db_backtrace(struct thread *td, struct trapframe *tf, */ db_print_stack_entry(name, 0, 0, 0, pc, NULL); - pc = db_get_value(sp, 4, FALSE); + pc = db_get_value(sp, 4, false); if (db_search_symbol(pc, DB_STGY_PROC, &offset) == C_DB_SYM_NULL) break; continue; } else if (tf != NULL) { - instr = db_get_value(pc, 4, FALSE); + instr = db_get_value(pc, 4, false); if ((instr & 0xffffff) == 0x00e58955) { /* pushl %ebp; movl %esp, %ebp */ actframe = (void *)(get_esp(tf) - 4); @@ -554,7 +554,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, if (actframe != frame) { /* `frame' belongs to caller. */ pc = (db_addr_t) - db_get_value((int)&actframe->f_retaddr, 4, FALSE); + db_get_value((int)&actframe->f_retaddr, 4, false); continue; } @@ -588,7 +588,7 @@ db_trace_self(void) __asm __volatile("movl %%ebp,%0" : "=r" (ebp)); frame = (struct i386_frame *)ebp; - callpc = (db_addr_t)db_get_value((int)&frame->f_retaddr, 4, FALSE); + callpc = (db_addr_t)db_get_value((int)&frame->f_retaddr, 4, false); frame = frame->f_frame; db_backtrace(curthread, NULL, frame, callpc, 0, -1); } From owner-svn-src-all@freebsd.org Mon Apr 16 13:59:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 113ADF856F1; Mon, 16 Apr 2018 13:59:36 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw0-x241.google.com (mail-yw0-x241.google.com [IPv6:2607:f8b0:4002:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A0E9878F4; Mon, 16 Apr 2018 13:59:35 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yw0-x241.google.com with SMTP id q12so6642184ywj.0; Mon, 16 Apr 2018 06:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AcZn+xfACg8anY14gdY0BOMrslEVqv7vPKWDBzt76Dc=; b=XWJSUl9RfV7NbM28Bo0NKANjRSLAsbZJWNtjvKJ97vp8B9DdrBwBhj0sbGPUlujcrb TrM4IBDgYpO5/wFbu9DJ1sN7KiHfgKuDhteh6GGlGOil1kZhKoOlQFLeQg5uclut8Pfa +jfG6CFBYXdNslKxkbDFNka7oyFuzb7XGm/u/xYxv5b8eCxpdXi0ob/MgNTbRWuFQAzl qziANC7J8/f5QhAVY5QJWGPE6poaeRfY3mp2TSiTko9JIp9GUScqwf0GwaSs+8qX29K0 Y7QpveubfTh0XjwYY1i8mJM7I+ZTJtCvLpV1jJYWYKYJ+ZoVvnpG34PnK6E4IUyOU0hO /LNg== 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:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=AcZn+xfACg8anY14gdY0BOMrslEVqv7vPKWDBzt76Dc=; b=RATXgiiv53/tkXx67hiIW63dAyK87JLCYY1x91Ojhv48vLKctPwsFyr601jduPUilB 8HhHPP6t9PJGgmcMF4RsaRU1FdT1nb6YxF9dN/s6PGFFnZsFMPLnVi2sFzylEhoXyqI9 ydbl74kyOcLIl/Xn3EABON5KCTsG39giVZZiPi39uzQT4HEgsFKjToHGPPgZXClfmrhY uX7X9rq5dNjsvLIepM3/20ydKPb5kAn8MV5TVjU4JGDPg35rL70a0ApZEHNE2uJ8YfF/ u2O9uNoIKrwib0X8PbTSVJ/GmxVx9+fSGUO7BEJVBIOvOFzhrYrHSWlnnfSgpMWSXLsd wriw== X-Gm-Message-State: ALQs6tBlZ84Y90h8RDYOeLQUeL4QfNTC5n+XVXnwus0RS7xaU5FRBCC5 6qy5r2+8svsbEAS53Sx/TZCnfs1L X-Google-Smtp-Source: AIpwx48fgMFGHzRMz1WD4EgmWio4IJDQeuqT44Kk/YFkUq9lPvOBq+vfFs4ncYnloadjDMV4P19YcQ== X-Received: by 10.129.51.196 with SMTP id z187mr4261050ywz.512.1523887174733; Mon, 16 Apr 2018 06:59:34 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.164.17.129]) by smtp.gmail.com with ESMTPSA id p4sm5140018ywb.47.2018.04.16.06.59.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 06:59:34 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r332523 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201804160054.w3G0swF1030058@repo.freebsd.org> 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: <36d02ae2-0a99-6430-7244-46901268725c@FreeBSD.org> Date: Mon, 16 Apr 2018 09:59:33 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 13:59:36 -0000 Hi Steve, Yes, I am going to merge it in few days. I am trying to merge everything to keep code in sync. I am just rarely tagging ZFS commits with MFC, since it is hard to forget for too long about that exercise. :) On 16.04.2018 03:36, Steven Hartland wrote: > Hey Mav, this seems like an important one to get in for 11.2 so just > wanted to check if that was your intention as there's no MFC tag on the > commit? > > On 16/04/2018 01:54, Alexander Motin wrote: >> Author: mav >> Date: Mon Apr 16 00:54:58 2018 >> New Revision: 332523 >> URL: https://svnweb.freebsd.org/changeset/base/332523 >> >> Log: >> 9433 Fix ARC hit rate >> >> When the compressed ARC feature was added in commit d3c2ae1 >> the method of reference counting in the ARC was modified. As >> part of this accounting change the arc_buf_add_ref() function >> was removed entirely. >> >> This would have be fine but the arc_buf_add_ref() function >> served a second undocumented purpose of updating the ARC access >> information when taking a hold on a dbuf. Without this logic >> in place a cached dbuf would not migrate its associated >> arc_buf_hdr_t to the MFU list. This would negatively impact >> the ARC hit rate, particularly on systems with a small ARC. >> >> This change reinstates the missing call to arc_access() from >> dbuf_hold() by implementing a new arc_buf_access() function. >> >> Reviewed-by: Giuseppe Di Natale >> Reviewed-by: Tony Hutter >> Reviewed-by: Tim Chase >> Reviewed by: George Wilson >> Reviewed-by: George Melikov >> Signed-off-by: Brian Behlendorf >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 00:42:45 2018 (r332522) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 16 00:54:58 2018 (r332523) >> @@ -540,8 +540,13 @@ typedef struct arc_stats { >> */ >> kstat_named_t arcstat_mutex_miss; >> /* >> + * Number of buffers skipped when updating the access state due to the >> + * header having already been released after acquiring the hash lock. >> + */ >> + kstat_named_t arcstat_access_skip; >> + /* >> * Number of buffers skipped because they have I/O in progress, are >> - * indrect prefetch buffers that have not lived long enough, or are >> + * indirect prefetch buffers that have not lived long enough, or are >> * not from the spa we're trying to evict from. >> */ >> kstat_named_t arcstat_evict_skip; >> @@ -796,6 +801,7 @@ static arc_stats_t arc_stats = { >> { "allocated", KSTAT_DATA_UINT64 }, >> { "deleted", KSTAT_DATA_UINT64 }, >> { "mutex_miss", KSTAT_DATA_UINT64 }, >> + { "access_skip", KSTAT_DATA_UINT64 }, >> { "evict_skip", KSTAT_DATA_UINT64 }, >> { "evict_not_enough", KSTAT_DATA_UINT64 }, >> { "evict_l2_cached", KSTAT_DATA_UINT64 }, >> @@ -5063,6 +5069,51 @@ arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) >> } else { >> ASSERT(!"invalid arc state"); >> } >> +} >> + >> +/* >> + * This routine is called by dbuf_hold() to update the arc_access() state >> + * which otherwise would be skipped for entries in the dbuf cache. >> + */ >> +void >> +arc_buf_access(arc_buf_t *buf) >> +{ >> + mutex_enter(&buf->b_evict_lock); >> + arc_buf_hdr_t *hdr = buf->b_hdr; >> + >> + /* >> + * Avoid taking the hash_lock when possible as an optimization. >> + * The header must be checked again under the hash_lock in order >> + * to handle the case where it is concurrently being released. >> + */ >> + if (hdr->b_l1hdr.b_state == arc_anon || HDR_EMPTY(hdr)) { >> + mutex_exit(&buf->b_evict_lock); >> + ARCSTAT_BUMP(arcstat_access_skip); >> + return; >> + } >> + >> + kmutex_t *hash_lock = HDR_LOCK(hdr); >> + mutex_enter(hash_lock); >> + >> + if (hdr->b_l1hdr.b_state == arc_anon || HDR_EMPTY(hdr)) { >> + mutex_exit(hash_lock); >> + mutex_exit(&buf->b_evict_lock); >> + ARCSTAT_BUMP(arcstat_access_skip); >> + return; >> + } >> + >> + mutex_exit(&buf->b_evict_lock); >> + >> + ASSERT(hdr->b_l1hdr.b_state == arc_mru || >> + hdr->b_l1hdr.b_state == arc_mfu); >> + >> + DTRACE_PROBE1(arc__hit, arc_buf_hdr_t *, hdr); >> + arc_access(hdr, hash_lock); >> + mutex_exit(hash_lock); >> + >> + ARCSTAT_BUMP(arcstat_hits); >> + ARCSTAT_CONDSTAT(!HDR_PREFETCH(hdr), >> + demand, prefetch, !HDR_ISTYPE_METADATA(hdr), data, metadata, hits); >> } >> >> /* a generic arc_done_func_t which you can use */ >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 00:42:45 2018 (r332522) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Apr 16 00:54:58 2018 (r332523) >> @@ -2579,8 +2579,10 @@ top: >> return (SET_ERROR(ENOENT)); >> } >> >> - if (db->db_buf != NULL) >> + if (db->db_buf != NULL) { >> + arc_buf_access(db->db_buf); >> ASSERT3P(db->db.db_data, ==, db->db_buf->b_data); >> + } >> >> ASSERT(db->db_buf == NULL || arc_referenced(db->db_buf)); >> >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Mon Apr 16 00:42:45 2018 (r332522) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Mon Apr 16 00:54:58 2018 (r332523) >> @@ -169,6 +169,7 @@ void arc_loan_inuse_buf(arc_buf_t *buf, void *tag); >> void arc_buf_destroy(arc_buf_t *buf, void *tag); >> int arc_buf_size(arc_buf_t *buf); >> int arc_buf_lsize(arc_buf_t *buf); >> +void arc_buf_access(arc_buf_t *buf); >> void arc_release(arc_buf_t *buf, void *tag); >> int arc_released(arc_buf_t *buf); >> void arc_buf_freeze(arc_buf_t *buf); >> > -- Alexander Motin From owner-svn-src-all@freebsd.org Mon Apr 16 14:10:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1AFDF86275; Mon, 16 Apr 2018 14:10:19 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DCDD6A872; Mon, 16 Apr 2018 14:10:19 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F98F1E51B; Mon, 16 Apr 2018 14:10:19 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GEAJA8027200; Mon, 16 Apr 2018 14:10:19 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GEAJAL027199; Mon, 16 Apr 2018 14:10:19 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201804161410.w3GEAJAL027199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 16 Apr 2018 14:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332565 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 332565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 14:10:20 -0000 Author: tsoome Date: Mon Apr 16 14:10:19 2018 New Revision: 332565 URL: https://svnweb.freebsd.org/changeset/base/332565 Log: loader: cstyle cleanup of command.c just clean it up. no functional changes intended. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D15087 Modified: head/stand/common/commands.c Modified: head/stand/common/commands.c ============================================================================== --- head/stand/common/commands.c Mon Apr 16 13:52:40 2018 (r332564) +++ head/stand/common/commands.c Mon Apr 16 14:10:19 2018 (r332565) @@ -61,155 +61,160 @@ here COMMAND_SET(help, "help", "detailed help", command_help); static int -help_getnext(int fd, char **topic, char **subtopic, char **desc) +help_getnext(int fd, char **topic, char **subtopic, char **desc) { - char line[81], *cp, *ep; + char line[81], *cp, *ep; - /* Make sure we provide sane values. */ - *topic = *subtopic = *desc = NULL; - for (;;) { - if (fgetstr(line, 80, fd) < 0) - return(0); - - if ((strlen(line) < 3) || (line[0] != '#') || (line[1] != ' ')) - continue; + /* Make sure we provide sane values. */ + *topic = *subtopic = *desc = NULL; + for (;;) { + if (fgetstr(line, 80, fd) < 0) + return (0); - cp = line + 2; - while((cp != NULL) && (*cp != 0)) { - ep = strchr(cp, ' '); - if ((*cp == 'T') && (*topic == NULL)) { - if (ep != NULL) - *ep++ = 0; - *topic = strdup(cp + 1); - } else if ((*cp == 'S') && (*subtopic == NULL)) { - if (ep != NULL) - *ep++ = 0; - *subtopic = strdup(cp + 1); - } else if (*cp == 'D') { - *desc = strdup(cp + 1); - ep = NULL; - } - cp = ep; + if (strlen(line) < 3 || line[0] != '#' || line[1] != ' ') + continue; + + cp = line + 2; + while (cp != NULL && *cp != 0) { + ep = strchr(cp, ' '); + if (*cp == 'T' && *topic == NULL) { + if (ep != NULL) + *ep++ = 0; + *topic = strdup(cp + 1); + } else if (*cp == 'S' && *subtopic == NULL) { + if (ep != NULL) + *ep++ = 0; + *subtopic = strdup(cp + 1); + } else if (*cp == 'D') { + *desc = strdup(cp + 1); + ep = NULL; + } + cp = ep; + } + if (*topic == NULL) { + free(*subtopic); + free(*desc); + *subtopic = *desc = NULL; + continue; + } + return (1); } - if (*topic == NULL) { - free(*subtopic); - free(*desc); - *subtopic = *desc = NULL; - continue; - } - return(1); - } } static int help_emitsummary(char *topic, char *subtopic, char *desc) { - int i; - - pager_output(" "); - pager_output(topic); - i = strlen(topic); - if (subtopic != NULL) { - pager_output(" "); - pager_output(subtopic); - i += strlen(subtopic) + 1; - } - if (desc != NULL) { - do { - pager_output(" "); - } while (i++ < 30); - pager_output(desc); - } - return (pager_output("\n")); + int i; + + pager_output(" "); + pager_output(topic); + i = strlen(topic); + if (subtopic != NULL) { + pager_output(" "); + pager_output(subtopic); + i += strlen(subtopic) + 1; + } + if (desc != NULL) { + do { + pager_output(" "); + } while (i++ < 30); + pager_output(desc); + } + return (pager_output("\n")); } - + static int -command_help(int argc, char *argv[]) +command_help(int argc, char *argv[]) { - char buf[81]; /* XXX buffer size? */ - int hfd, matched, doindex; - char *topic, *subtopic, *t, *s, *d; + char buf[81]; /* XXX buffer size? */ + int hfd, matched, doindex; + char *topic, *subtopic, *t, *s, *d; - /* page the help text from our load path */ - snprintf(buf, sizeof(buf), "%s/boot/loader.help", getenv("loaddev")); - if ((hfd = open(buf, O_RDONLY)) < 0) { - printf("Verbose help not available, use '?' to list commands\n"); - return(CMD_OK); - } + /* page the help text from our load path */ + snprintf(buf, sizeof(buf), "%s/boot/loader.help", getenv("loaddev")); + if ((hfd = open(buf, O_RDONLY)) < 0) { + printf("Verbose help not available, " + "use '?' to list commands\n"); + return (CMD_OK); + } - /* pick up request from arguments */ - topic = subtopic = NULL; - switch(argc) { - case 3: - subtopic = strdup(argv[2]); - case 2: - topic = strdup(argv[1]); - break; - case 1: - topic = strdup("help"); - break; - default: - command_errmsg = "usage is 'help []"; - close(hfd); - return(CMD_ERROR); - } + /* pick up request from arguments */ + topic = subtopic = NULL; + switch (argc) { + case 3: + subtopic = strdup(argv[2]); + /* FALLTHROUGH */ + case 2: + topic = strdup(argv[1]); + break; + case 1: + topic = strdup("help"); + break; + default: + command_errmsg = "usage is 'help []"; + close(hfd); + return(CMD_ERROR); + } - /* magic "index" keyword */ - doindex = !strcmp(topic, "index"); - matched = doindex; - - /* Scan the helpfile looking for help matching the request */ - pager_open(); - while(help_getnext(hfd, &t, &s, &d)) { + /* magic "index" keyword */ + doindex = strcmp(topic, "index") == 0? 1 : 0; + matched = doindex; - if (doindex) { /* dink around formatting */ - if (help_emitsummary(t, s, d)) - break; + /* Scan the helpfile looking for help matching the request */ + pager_open(); + while (help_getnext(hfd, &t, &s, &d)) { - } else if (strcmp(topic, t)) { - /* topic mismatch */ - if (matched) /* nothing more on this topic, stop scanning */ - break; + if (doindex) { /* dink around formatting */ + if (help_emitsummary(t, s, d)) + break; - } else { - /* topic matched */ - matched = 1; - if (((subtopic == NULL) && (s == NULL)) || - ((subtopic != NULL) && (s != NULL) && !strcmp(subtopic, s))) { - /* exact match, print text */ - while ((fgetstr(buf, 80, hfd) >= 0) && (buf[0] != '#')) { - if (pager_output(buf)) - break; - if (pager_output("\n")) - break; + } else if (strcmp(topic, t)) { + /* topic mismatch */ + if (matched) { + /* nothing more on this topic, stop scanning */ + break; + } + } else { + /* topic matched */ + matched = 1; + if ((subtopic == NULL && s == NULL) || + (subtopic != NULL && s != NULL && + strcmp(subtopic, s) == 0)) { + /* exact match, print text */ + while (fgetstr(buf, 80, hfd) >= 0 && + buf[0] != '#') { + if (pager_output(buf)) + break; + if (pager_output("\n")) + break; + } + } else if (subtopic == NULL && s != NULL) { + /* topic match, list subtopics */ + if (help_emitsummary(t, s, d)) + break; + } } - } else if ((subtopic == NULL) && (s != NULL)) { - /* topic match, list subtopics */ - if (help_emitsummary(t, s, d)) - break; - } + free(t); + free(s); + free(d); + t = s = d = NULL; } free(t); free(s); free(d); - t = s = d = NULL; - } - free(t); - free(s); - free(d); - pager_close(); - close(hfd); - if (!matched) { - snprintf(command_errbuf, sizeof(command_errbuf), - "no help available for '%s'", topic); + pager_close(); + close(hfd); + if (!matched) { + snprintf(command_errbuf, sizeof(command_errbuf), + "no help available for '%s'", topic); + free(topic); + free(subtopic); + return (CMD_ERROR); + } free(topic); free(subtopic); - return(CMD_ERROR); - } - free(topic); - free(subtopic); - return(CMD_OK); + return (CMD_OK); } COMMAND_SET(commandlist, "?", "list commands", command_commandlist); @@ -223,27 +228,28 @@ COMMAND_SET(commandlist, "?", "list commands", command * fixing it. */ static int -command_commandlist(int argc, char *argv[]) +command_commandlist(int argc __unused, char *argv[] __unused) { - struct bootblk_command **cmdp; - int res; - char name[20]; + struct bootblk_command **cmdp; + int res; + char name[20]; - res = 0; - pager_open(); - res = pager_output("Available commands:\n"); - SET_FOREACH(cmdp, Xcommand_set) { - if (res) - break; - if (((*cmdp)->c_name != NULL) && ((*cmdp)->c_desc != NULL)) { - snprintf(name, sizeof(name), " %-15s ", (*cmdp)->c_name); - pager_output(name); - pager_output((*cmdp)->c_desc); - res = pager_output("\n"); + res = 0; + pager_open(); + res = pager_output("Available commands:\n"); + SET_FOREACH(cmdp, Xcommand_set) { + if (res) + break; + if ((*cmdp)->c_name != NULL && (*cmdp)->c_desc != NULL) { + snprintf(name, sizeof(name), " %-15s ", + (*cmdp)->c_name); + pager_output(name); + pager_output((*cmdp)->c_desc); + res = pager_output("\n"); + } } - } - pager_close(); - return(CMD_OK); + pager_close(); + return (CMD_OK); } /* @@ -256,35 +262,35 @@ COMMAND_SET(show, "show", "show variable(s)", command_ static int command_show(int argc, char *argv[]) { - struct env_var *ev; - char *cp; + struct env_var *ev; + char *cp; - if (argc < 2) { - /* - * With no arguments, print everything. - */ - pager_open(); - for (ev = environ; ev != NULL; ev = ev->ev_next) { - pager_output(ev->ev_name); - cp = getenv(ev->ev_name); - if (cp != NULL) { - pager_output("="); - pager_output(cp); - } - if (pager_output("\n")) - break; - } - pager_close(); - } else { - if ((cp = getenv(argv[1])) != NULL) { - printf("%s\n", cp); + if (argc < 2) { + /* + * With no arguments, print everything. + */ + pager_open(); + for (ev = environ; ev != NULL; ev = ev->ev_next) { + pager_output(ev->ev_name); + cp = getenv(ev->ev_name); + if (cp != NULL) { + pager_output("="); + pager_output(cp); + } + if (pager_output("\n")) + break; + } + pager_close(); } else { - snprintf(command_errbuf, sizeof(command_errbuf), - "variable '%s' not found", argv[1]); - return(CMD_ERROR); + if ((cp = getenv(argv[1])) != NULL) { + printf("%s\n", cp); + } else { + snprintf(command_errbuf, sizeof(command_errbuf), + "variable '%s' not found", argv[1]); + return (CMD_ERROR); + } } - } - return(CMD_OK); + return (CMD_OK); } COMMAND_SET(set, "set", "set a variable", command_set); @@ -292,37 +298,37 @@ COMMAND_SET(set, "set", "set a variable", command_set) static int command_set(int argc, char *argv[]) { - int err; - - if (argc != 2) { - command_errmsg = "wrong number of arguments"; - return(CMD_ERROR); - } else { - if ((err = putenv(argv[1])) != 0) { - command_errmsg = strerror(err); - return(CMD_ERROR); + int err; + + if (argc != 2) { + command_errmsg = "wrong number of arguments"; + return (CMD_ERROR); + } else { + if ((err = putenv(argv[1])) != 0) { + command_errmsg = strerror(err); + return (CMD_ERROR); + } } - } - return(CMD_OK); + return (CMD_OK); } COMMAND_SET(unset, "unset", "unset a variable", command_unset); static int -command_unset(int argc, char *argv[]) +command_unset(int argc, char *argv[]) { - int err; - - if (argc != 2) { - command_errmsg = "wrong number of arguments"; - return(CMD_ERROR); - } else { - if ((err = unsetenv(argv[1])) != 0) { - command_errmsg = strerror(err); - return(CMD_ERROR); + int err; + + if (argc != 2) { + command_errmsg = "wrong number of arguments"; + return (CMD_ERROR); + } else { + if ((err = unsetenv(argv[1])) != 0) { + command_errmsg = strerror(err); + return (CMD_ERROR); + } } - } - return(CMD_OK); + return (CMD_OK); } COMMAND_SET(echo, "echo", "echo arguments", command_echo); @@ -330,34 +336,34 @@ COMMAND_SET(echo, "echo", "echo arguments", command_ec static int command_echo(int argc, char *argv[]) { - char *s; - int nl, ch; - - nl = 0; - optind = 1; - optreset = 1; - while ((ch = getopt(argc, argv, "n")) != -1) { - switch(ch) { - case 'n': - nl = 1; - break; - case '?': - default: - /* getopt has already reported an error */ - return(CMD_OK); + char *s; + int nl, ch; + + nl = 0; + optind = 1; + optreset = 1; + while ((ch = getopt(argc, argv, "n")) != -1) { + switch (ch) { + case 'n': + nl = 1; + break; + case '?': + default: + /* getopt has already reported an error */ + return (CMD_OK); + } } - } - argv += (optind); - argc -= (optind); + argv += (optind); + argc -= (optind); - s = unargv(argc, argv); - if (s != NULL) { - printf("%s", s); - free(s); - } - if (!nl) - printf("\n"); - return(CMD_OK); + s = unargv(argc, argv); + if (s != NULL) { + printf("%s", s); + free(s); + } + if (!nl) + printf("\n"); + return (CMD_OK); } /* @@ -369,55 +375,55 @@ COMMAND_SET(read, "read", "read input from the termina static int command_read(int argc, char *argv[]) { - char *prompt; - int timeout; - time_t when; - char *cp; - char *name; - char buf[256]; /* XXX size? */ - int c; + char *prompt; + int timeout; + time_t when; + char *cp; + char *name; + char buf[256]; /* XXX size? */ + int c; - timeout = -1; - prompt = NULL; - optind = 1; - optreset = 1; - while ((c = getopt(argc, argv, "p:t:")) != -1) { - switch(c) { - - case 'p': - prompt = optarg; - break; - case 't': - timeout = strtol(optarg, &cp, 0); - if (cp == optarg) { - snprintf(command_errbuf, sizeof(command_errbuf), - "bad timeout '%s'", optarg); - return(CMD_ERROR); - } - break; - default: - return(CMD_OK); + timeout = -1; + prompt = NULL; + optind = 1; + optreset = 1; + while ((c = getopt(argc, argv, "p:t:")) != -1) { + switch (c) { + case 'p': + prompt = optarg; + break; + case 't': + timeout = strtol(optarg, &cp, 0); + if (cp == optarg) { + snprintf(command_errbuf, + sizeof(command_errbuf), + "bad timeout '%s'", optarg); + return (CMD_ERROR); + } + break; + default: + return (CMD_OK); + } } - } - argv += (optind); - argc -= (optind); - name = (argc > 0) ? argv[0]: NULL; - - if (prompt != NULL) - printf("%s", prompt); - if (timeout >= 0) { - when = time(NULL) + timeout; - while (!ischar()) - if (time(NULL) >= when) - return(CMD_OK); /* is timeout an error? */ - } + argv += (optind); + argc -= (optind); + name = (argc > 0) ? argv[0]: NULL; - ngets(buf, sizeof(buf)); + if (prompt != NULL) + printf("%s", prompt); + if (timeout >= 0) { + when = time(NULL) + timeout; + while (!ischar()) + if (time(NULL) >= when) + return (CMD_OK); /* is timeout an error? */ + } - if (name != NULL) - setenv(name, buf, 1); - return(CMD_OK); + ngets(buf, sizeof(buf)); + + if (name != NULL) + setenv(name, buf, 1); + return (CMD_OK); } /* @@ -428,44 +434,46 @@ COMMAND_SET(more, "more", "show contents of a file", c static int command_more(int argc, char *argv[]) { - int i; - int res; - char line[80]; + int i; + int res; + char line[80]; - res=0; - pager_open(); - for (i = 1; (i < argc) && (res == 0); i++) { - snprintf(line, sizeof(line), "*** FILE %s BEGIN ***\n", argv[i]); - if (pager_output(line)) - break; - res = page_file(argv[i]); - if (!res) { - snprintf(line, sizeof(line), "*** FILE %s END ***\n", argv[i]); - res = pager_output(line); + res = 0; + pager_open(); + for (i = 1; (i < argc) && (res == 0); i++) { + snprintf(line, sizeof(line), "*** FILE %s BEGIN ***\n", + argv[i]); + if (pager_output(line)) + break; + res = page_file(argv[i]); + if (!res) { + snprintf(line, sizeof(line), "*** FILE %s END ***\n", + argv[i]); + res = pager_output(line); + } } - } - pager_close(); + pager_close(); - if (res == 0) - return CMD_OK; - else - return CMD_ERROR; + if (res == 0) + return (CMD_OK); + else + return (CMD_ERROR); } static int page_file(char *filename) { - int result; + int result; - result = pager_file(filename); + result = pager_file(filename); - if (result == -1) { - snprintf(command_errbuf, sizeof(command_errbuf), - "error showing %s", filename); - } + if (result == -1) { + snprintf(command_errbuf, sizeof(command_errbuf), + "error showing %s", filename); + } - return result; -} + return (result); +} /* * List all disk-like devices @@ -475,38 +483,38 @@ COMMAND_SET(lsdev, "lsdev", "list all devices", comman static int command_lsdev(int argc, char *argv[]) { - int verbose, ch, i; - char line[80]; - - verbose = 0; - optind = 1; - optreset = 1; - while ((ch = getopt(argc, argv, "v")) != -1) { - switch(ch) { - case 'v': - verbose = 1; - break; - case '?': - default: - /* getopt has already reported an error */ - return(CMD_OK); + int verbose, ch, i; + char line[80]; + + verbose = 0; + optind = 1; + optreset = 1; + while ((ch = getopt(argc, argv, "v")) != -1) { + switch (ch) { + case 'v': + verbose = 1; + break; + case '?': + default: + /* getopt has already reported an error */ + return (CMD_OK); + } } - } - argv += (optind); - argc -= (optind); + argv += (optind); + argc -= (optind); - pager_open(); - for (i = 0; devsw[i] != NULL; i++) { - if (devsw[i]->dv_print != NULL){ - if (devsw[i]->dv_print(verbose)) - break; - } else { - snprintf(line, sizeof(line), "%s: (unknown)\n", devsw[i]->dv_name); - if (pager_output(line)) - break; + pager_open(); + for (i = 0; devsw[i] != NULL; i++) { + if (devsw[i]->dv_print != NULL) { + if (devsw[i]->dv_print(verbose)) + break; + } else { + snprintf(line, sizeof(line), "%s: (unknown)\n", + devsw[i]->dv_name); + if (pager_output(line)) + break; + } } - } - pager_close(); - return(CMD_OK); + pager_close(); + return (CMD_OK); } - From owner-svn-src-all@freebsd.org Mon Apr 16 14:39:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CE1CF88192; Mon, 16 Apr 2018 14:39:06 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07AD47350E; Mon, 16 Apr 2018 14:39:06 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED0921EA12; Mon, 16 Apr 2018 14:39:05 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GEd5Ip041814; Mon, 16 Apr 2018 14:39:05 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GEd5Eh041807; Mon, 16 Apr 2018 14:39:05 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201804161439.w3GEd5Eh041807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Mon, 16 Apr 2018 14:39:05 +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: r332566 - in stable/11/sys: cddl/dev/dtrace/mips cddl/dev/fbt/mips mips/conf modules/dtrace modules/dtrace/dtraceall X-SVN-Group: stable-11 X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: in stable/11/sys: cddl/dev/dtrace/mips cddl/dev/fbt/mips mips/conf modules/dtrace modules/dtrace/dtraceall X-SVN-Commit-Revision: 332566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 14:39:06 -0000 Author: lidl Date: Mon Apr 16 14:39:04 2018 New Revision: 332566 URL: https://svnweb.freebsd.org/changeset/base/332566 Log: MFC r323206: Enable dtrace support for mips64 and the ERL kernel config Turn on the required options in the ERL config file, and ensure that the fbt module is listed as a dependency for mips in the modules/dtrace/dtraceall/dtraceall.c file. Modified: stable/11/sys/cddl/dev/dtrace/mips/dtrace_asm.S stable/11/sys/cddl/dev/dtrace/mips/dtrace_subr.c stable/11/sys/cddl/dev/fbt/mips/fbt_isa.c stable/11/sys/mips/conf/ERL stable/11/sys/modules/dtrace/Makefile stable/11/sys/modules/dtrace/dtraceall/Makefile stable/11/sys/modules/dtrace/dtraceall/dtraceall.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/dtrace/mips/dtrace_asm.S ============================================================================== --- stable/11/sys/cddl/dev/dtrace/mips/dtrace_asm.S Mon Apr 16 14:10:19 2018 (r332565) +++ stable/11/sys/cddl/dev/dtrace/mips/dtrace_asm.S Mon Apr 16 14:39:04 2018 (r332566) @@ -37,8 +37,6 @@ #include #include -#include "assym.s" - .set noreorder # Noreorder is default style! /* Modified: stable/11/sys/cddl/dev/dtrace/mips/dtrace_subr.c ============================================================================== --- stable/11/sys/cddl/dev/dtrace/mips/dtrace_subr.c Mon Apr 16 14:10:19 2018 (r332565) +++ stable/11/sys/cddl/dev/dtrace/mips/dtrace_subr.c Mon Apr 16 14:39:04 2018 (r332566) @@ -50,6 +50,8 @@ extern int (*dtrace_invop_jump_addr)(struct trapframe extern dtrace_id_t dtrace_probeid_error; int dtrace_invop(uintptr_t, struct trapframe *, uintptr_t); +void dtrace_invop_init(void); +void dtrace_invop_uninit(void); typedef struct dtrace_invop_hdlr { int (*dtih_func)(uintptr_t, struct trapframe *, uintptr_t); Modified: stable/11/sys/cddl/dev/fbt/mips/fbt_isa.c ============================================================================== --- stable/11/sys/cddl/dev/fbt/mips/fbt_isa.c Mon Apr 16 14:10:19 2018 (r332565) +++ stable/11/sys/cddl/dev/fbt/mips/fbt_isa.c Mon Apr 16 14:39:04 2018 (r332566) @@ -82,7 +82,6 @@ fbt_provide_module_function(linker_file_t lf, int symi linker_symval_t *symval, void *opaque) { fbt_probe_t *fbt, *retfbt; - uint32_t *target, *start; uint32_t *instr, *limit; const char *name; char *modname; Modified: stable/11/sys/mips/conf/ERL ============================================================================== --- stable/11/sys/mips/conf/ERL Mon Apr 16 14:10:19 2018 (r332565) +++ stable/11/sys/mips/conf/ERL Mon Apr 16 14:39:04 2018 (r332566) @@ -85,15 +85,16 @@ options PRINTF_BUFR_SIZE=128 # Prevent printf output options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework -#options KDTRACE_FRAME # Ensure frames are compiled in -#options KDTRACE_HOOKS # Kernel DTrace hooks -options INCLUDE_CONFIG_FILE # Include this file in kernel +options KDTRACE_FRAME # Ensure frames are compiled in +options KDTRACE_HOOKS # Kernel DTrace hooks +options DDB_CTF # Kernel ELF linker loads CTF data +options INCLUDE_CONFIG_FILE # Include this file in kernel options NO_SWAPPING # Disable support for paging options TMPFS # Temporary file system # Debugging for use in -current #options KDB # Enable kernel debugger support. -#options DDB # Support DDB. +options DDB # Support DDB. #options GDB # Support remote GDB. #options DEADLKRES # Enable the deadlock resolver #options INVARIANTS # Enable calls of extra sanity checking Modified: stable/11/sys/modules/dtrace/Makefile ============================================================================== --- stable/11/sys/modules/dtrace/Makefile Mon Apr 16 14:10:19 2018 (r332565) +++ stable/11/sys/modules/dtrace/Makefile Mon Apr 16 14:39:04 2018 (r332566) @@ -21,10 +21,14 @@ SUBDIR+= systrace_linux32 .if ${MACHINE_CPUARCH} == "powerpc" SUBDIR+= fbt fasttrap .endif -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_ARCH} == "mips64" || \ + ${MACHINE_ARCH} == "powerpc64" SUBDIR+= systrace_freebsd32 .endif -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" +.if ${MACHINE_CPUARCH} == "aarch64" || \ + ${MACHINE_CPUARCH} == "arm" || \ + ${MACHINE_CPUARCH} == "mips" SUBDIR+= fbt .endif .include Modified: stable/11/sys/modules/dtrace/dtraceall/Makefile ============================================================================== --- stable/11/sys/modules/dtrace/dtraceall/Makefile Mon Apr 16 14:10:19 2018 (r332565) +++ stable/11/sys/modules/dtrace/dtraceall/Makefile Mon Apr 16 14:39:04 2018 (r332566) @@ -8,7 +8,7 @@ SRCS= dtraceall.c opt_compat.h opt_nfs.h CFLAGS+= -I${SYSDIR} .if !defined(KERNBUILDDIR) -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "mips64" opt_compat.h: echo "#define COMPAT_FREEBSD32 1" >> ${.TARGET} .endif Modified: stable/11/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- stable/11/sys/modules/dtrace/dtraceall/dtraceall.c Mon Apr 16 14:10:19 2018 (r332565) +++ stable/11/sys/modules/dtrace/dtraceall/dtraceall.c Mon Apr 16 14:39:04 2018 (r332566) @@ -70,7 +70,8 @@ MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); #endif #if defined(__aarch64__) || defined(__amd64__) || defined(__arm__) || \ - defined(__i386__) || defined(__powerpc__) + defined(__i386__) || defined(__mips__) || \ + defined(__powerpc__) MODULE_DEPEND(dtraceall, fbt, 1, 1, 1); #endif #if defined(__amd64__) || defined(__i386__) From owner-svn-src-all@freebsd.org Mon Apr 16 14:39:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CEB8F8823C; Mon, 16 Apr 2018 14:39:35 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADC95739D1; Mon, 16 Apr 2018 14:39:34 +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 A72A31EA13; Mon, 16 Apr 2018 14:39:34 +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 w3GEdY9m041895; Mon, 16 Apr 2018 14:39:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GEdYW6041888; Mon, 16 Apr 2018 14:39:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161439.w3GEdYW6041888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 14:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332567 - in stable/11: lib/libprocstat usr.bin/procstat X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/11: lib/libprocstat usr.bin/procstat X-SVN-Commit-Revision: 332567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 14:39:35 -0000 Author: trasz Date: Mon Apr 16 14:39:34 2018 New Revision: 332567 URL: https://svnweb.freebsd.org/changeset/base/332567 Log: MFC r324237: Make procstat(1) recognize process descriptors, so that it shows "P" instead of "?" in "procstat -af" output. Note that there are still a few more DTYPE_* kinds we don't decode yet. Sponsored by: DARPA, AFRL Modified: stable/11/lib/libprocstat/libprocstat.c stable/11/lib/libprocstat/libprocstat.h stable/11/usr.bin/procstat/procstat.1 stable/11/usr.bin/procstat/procstat_files.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libprocstat/libprocstat.c ============================================================================== --- stable/11/lib/libprocstat/libprocstat.c Mon Apr 16 14:39:04 2018 (r332566) +++ stable/11/lib/libprocstat/libprocstat.c Mon Apr 16 14:39:34 2018 (r332567) @@ -579,6 +579,10 @@ procstat_getfiles_kvm(struct procstat *procstat, struc type = PS_FST_TYPE_SHM; data = file.f_data; break; + case DTYPE_PROCDESC: + type = PS_FST_TYPE_PROCDESC; + data = file.f_data; + break; default: continue; } @@ -662,6 +666,7 @@ kinfo_type2fst(int kftype) int kf_type; int fst_type; } kftypes2fst[] = { + { KF_TYPE_PROCDESC, PS_FST_TYPE_PROCDESC }, { KF_TYPE_CRYPTO, PS_FST_TYPE_CRYPTO }, { KF_TYPE_FIFO, PS_FST_TYPE_FIFO }, { KF_TYPE_KQUEUE, PS_FST_TYPE_KQUEUE }, Modified: stable/11/lib/libprocstat/libprocstat.h ============================================================================== --- stable/11/lib/libprocstat/libprocstat.h Mon Apr 16 14:39:04 2018 (r332566) +++ stable/11/lib/libprocstat/libprocstat.h Mon Apr 16 14:39:34 2018 (r332567) @@ -68,6 +68,7 @@ #define PS_FST_TYPE_SEM 10 #define PS_FST_TYPE_UNKNOWN 11 #define PS_FST_TYPE_NONE 12 +#define PS_FST_TYPE_PROCDESC 13 /* * Special descriptor numbers. Modified: stable/11/usr.bin/procstat/procstat.1 ============================================================================== --- stable/11/usr.bin/procstat/procstat.1 Mon Apr 16 14:39:04 2018 (r332566) +++ stable/11/usr.bin/procstat/procstat.1 Mon Apr 16 14:39:34 2018 (r332567) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2017 +.Dd October 3, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -212,6 +212,8 @@ shared memory kqueue .It m message queue +.It P +process descriptor .It p pipe .It s Modified: stable/11/usr.bin/procstat/procstat_files.c ============================================================================== --- stable/11/usr.bin/procstat/procstat_files.c Mon Apr 16 14:39:04 2018 (r332566) +++ stable/11/usr.bin/procstat/procstat_files.c Mon Apr 16 14:39:34 2018 (r332567) @@ -402,6 +402,11 @@ procstat_files(struct procstat *procstat, struct kinfo xo_emit("{eq:fd_type/sem}"); break; + case PS_FST_TYPE_PROCDESC: + str = "P"; + xo_emit("{eq:fd_type/procdesc}"); + break; + case PS_FST_TYPE_NONE: str = "?"; xo_emit("{eq:fd_type/none}"); From owner-svn-src-all@freebsd.org Mon Apr 16 14:42:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97931F889AF; Mon, 16 Apr 2018 14:42:26 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3770675522; Mon, 16 Apr 2018 14:42:26 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 328561EBA0; Mon, 16 Apr 2018 14:42:26 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GEgQ5d046905; Mon, 16 Apr 2018 14:42:26 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GEgQa1046904; Mon, 16 Apr 2018 14:42:26 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201804161442.w3GEgQa1046904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Mon, 16 Apr 2018 14:42: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: r332569 - stable/11/sys/sparc64/sparc64 X-SVN-Group: stable-11 X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: stable/11/sys/sparc64/sparc64 X-SVN-Commit-Revision: 332569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 14:42:26 -0000 Author: lidl Date: Mon Apr 16 14:42:25 2018 New Revision: 332569 URL: https://svnweb.freebsd.org/changeset/base/332569 Log: MFC r324512: Don't use a non-zero argument for __builtin_frame_address Mirror the change made for powerpc64 in r323687. With this change, gcc 6.4.0 can successfully compile and link a kernel that runs on sparc64. Modified: stable/11/sys/sparc64/sparc64/stack_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sparc64/sparc64/stack_machdep.c ============================================================================== --- stable/11/sys/sparc64/sparc64/stack_machdep.c Mon Apr 16 14:41:12 2018 (r332568) +++ stable/11/sys/sparc64/sparc64/stack_machdep.c Mon Apr 16 14:42:25 2018 (r332569) @@ -93,5 +93,5 @@ void stack_save(struct stack *st) { - stack_capture(st, (struct frame *)__builtin_frame_address(1)); + stack_capture(st, (struct frame *)__builtin_frame_address(0)); } From owner-svn-src-all@freebsd.org Mon Apr 16 14:46:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BB9EF88F07; Mon, 16 Apr 2018 14:46:03 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AF59774FB; Mon, 16 Apr 2018 14:46:03 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F02A1EBAD; Mon, 16 Apr 2018 14:46:03 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GEk2pn047177; Mon, 16 Apr 2018 14:46:02 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GEk2cv047176; Mon, 16 Apr 2018 14:46:02 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201804161446.w3GEk2cv047176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Mon, 16 Apr 2018 14:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332571 - stable/11/contrib/blacklist/libexec X-SVN-Group: stable-11 X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: stable/11/contrib/blacklist/libexec X-SVN-Commit-Revision: 332571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 14:46:03 -0000 Author: lidl Date: Mon Apr 16 14:46:02 2018 New Revision: 332571 URL: https://svnweb.freebsd.org/changeset/base/332571 Log: MFC r328861: Update blacklist-helper to not emit messages from pf during operation. Use 'pfctl -k' when blocking a site to kill active tcp connections from the blocked address. Fix 'purge' operation for pf, which must dynamically determine which filters have been created, so the filters can be flushed by name. Modified: stable/11/contrib/blacklist/libexec/blacklistd-helper Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/libexec/blacklistd-helper ============================================================================== --- stable/11/contrib/blacklist/libexec/blacklistd-helper Mon Apr 16 14:43:01 2018 (r332570) +++ stable/11/contrib/blacklist/libexec/blacklistd-helper Mon Apr 16 14:46:02 2018 (r332571) @@ -80,8 +80,8 @@ add) echo "block in quick $proto from to any $port" | \ /sbin/pfctl -a "$2/$6" -f - # insert $ip/$mask into per-protocol/port anchored table - /sbin/pfctl -a "$2/$6" -t "port$6" -T add "$addr/$mask" && \ - echo OK + /sbin/pfctl -qa "$2/$6" -t "port$6" -T add "$addr/$mask" && \ + /sbin/pfctl -q -k $addr && echo OK ;; esac ;; @@ -101,7 +101,7 @@ rem) /sbin/npfctl rule "$2" rem-id "$7" ;; pf) - /sbin/pfctl -a "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ + /sbin/pfctl -qa "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ echo OK ;; esac @@ -118,7 +118,13 @@ flush) /sbin/npfctl rule "$2" flush ;; pf) - /sbin/pfctl -a "$2/$6" -t "port$6" -T flush && echo OK + # dynamically determine which anchors exist + anchors=$(/sbin/pfctl -a $2 -s Anchors) + for anchor in $anchors; do + /sbin/pfctl -a $anchor -t "port${anchor##*/}" -T flush + /sbin/pfctl -a $anchor -F rules + done + echo OK ;; esac ;; From owner-svn-src-all@freebsd.org Mon Apr 16 15:06:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2A23F8A593; Mon, 16 Apr 2018 15:06:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5052B7BE50; Mon, 16 Apr 2018 15:06:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x236.google.com with SMTP id d6so18461507iog.1; Mon, 16 Apr 2018 08:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=DRwxPxEZUtvzUlcnmMotLxEoMmcuG60Y8BGnE05BpbA=; b=gJvhlxVPEH2+daVqANyGYspXctRuBp8yAXeoAeH6pR12Lp4gBfnmy75+XGVwT1U+fZ /0Q74cpAoMUKz7ABT6ltcoZWa5rCwQnAIb4+yo4mD+5OWzQI+G7loocOv3pvafpcVc8O elphnAh+FSosMVxceXXwaRE51hYq25XE9zAst82JYqafjWcS13oqFrpP5/oax3qhrbh7 z+rhLcXRztKUiEuzwtSKyuAfujAZXdNB0meKdVjET7e5tpLPiFBrlJx/5q/g6iI/U9dF zgAX9nDwVgUvK8IAlFfTwWTYnX6kMWmgjmw5t1UT2iVmrQrnbclsKfMQKiEF4X96yvhi zsow== 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:in-reply-to:references:from :date:message-id:subject:to:cc; bh=DRwxPxEZUtvzUlcnmMotLxEoMmcuG60Y8BGnE05BpbA=; b=W+u9hu0+HUv6cUq2cG3t5QXVHUdDmYCHc542UGrI0/pcQf7NowB/jug5NEjxUOY1Zj tZLbokRHPyUghSZC6KuA/znVu4+TKjzK6CsEgFD8cOS1f4jU5ydCzZtYVqixRJsoRLkg qAoDMTLEEjmVY6EYVtBddfI2VIO/PWrOKbrJ82DGV97RkcZLi+fJJvcLJ6u307AnTwyh D5zF2b/0Cfbv5QV39DpuI4PtuTY6rIUt53LVPDN7Ew9OsIRCf8jai08PaWA/Nnild8ki fWKoULhvarDerpeC/H0aiqLUhomVXNRmwJUXYh047ziezdOSAvad6yYVyS+aoOz6CJJz +nhA== X-Gm-Message-State: ALQs6tB4EG2e2AP5fq8Vku7kvU5lAwbYONBhMVMUR9qKRPyu9ZnL6IzW FnDKlZm0jqHlhZfdFRqlWxBh++xniaUfz+owO71JEA== X-Google-Smtp-Source: AIpwx48JQE1GGUiLxkTVfnD51EUKDxExcyNRKzY+1CHjbBuei6yDHkiv4o3bO5/b+J57dTMseNxZfGu6jIVjUqDPCmA= X-Received: by 10.107.83.9 with SMTP id h9mr6391200iob.239.1523891174348; Mon, 16 Apr 2018 08:06:14 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.130.197 with HTTP; Mon, 16 Apr 2018 08:05:53 -0700 (PDT) In-Reply-To: <201804161318.w3GDIJl9002357@repo.freebsd.org> References: <201804161318.w3GDIJl9002357@repo.freebsd.org> From: Ed Maste Date: Mon, 16 Apr 2018 11:05:53 -0400 X-Google-Sender-Auth: SKXM-oNdrYfAUv5UIvtjeJnVP7A Message-ID: Subject: Re: svn commit: r332561 - head/stand/efi/boot1 To: Kyle Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:06:15 -0000 On 16 April 2018 at 09:18, Kyle Evans wrote: > Author: kevans > Date: Mon Apr 16 13:18:18 2018 > New Revision: 332561 > URL: https://svnweb.freebsd.org/changeset/base/332561 > > Log: > Rename volume label for ESP The desire to remove boot1.efifat notwithstanding, you'll also need to regenerate and commit the FAT templates for this change to take effect. From owner-svn-src-all@freebsd.org Mon Apr 16 15:07:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75193F8A6A4; Mon, 16 Apr 2018 15:07:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2230D7C890; Mon, 16 Apr 2018 15:07:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15D7B1EEF0; Mon, 16 Apr 2018 15:07:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GF7JMY057220; Mon, 16 Apr 2018 15:07:19 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GF7Je4057219; Mon, 16 Apr 2018 15:07:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201804161507.w3GF7Je4057219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 16 Apr 2018 15:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332572 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 332572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:07:20 -0000 Author: glebius Date: Mon Apr 16 15:07:19 2018 New Revision: 332572 URL: https://svnweb.freebsd.org/changeset/base/332572 Log: Merge r331871: Handle a special case when a slab can fit only one allocation, and zone has a large alignment. With alignment taken into account uk_rsize will be greater than space in a slab. However, since we have only one item per slab, it is always naturally aligned. Code that will panic before this change with 4k page: z = uma_zcreate("test", 3984, NULL, NULL, NULL, NULL, 31, 0); uma_zalloc(z, M_WAITOK); A practical scenario to hit the panic is a machine with 56 CPUs and 2 NUMA domains, which yields in zone size of 3984 (on head). PR: 227116 Modified: stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Mon Apr 16 14:46:02 2018 (r332571) +++ stable/11/sys/vm/uma_core.c Mon Apr 16 15:07:19 2018 (r332572) @@ -1249,7 +1249,15 @@ keg_small_init(uma_keg_t keg) else shsize = sizeof(struct uma_slab); - keg->uk_ipers = (slabsize - shsize) / rsize; + if (rsize <= slabsize - shsize) + keg->uk_ipers = (slabsize - shsize) / rsize; + else { + /* Handle special case when we have 1 item per slab, so + * alignment requirement can be relaxed. */ + KASSERT(keg->uk_size <= slabsize - shsize, + ("%s: size %u greater than slab", __func__, keg->uk_size)); + keg->uk_ipers = 1; + } KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= SLAB_SETSIZE, ("%s: keg->uk_ipers %u", __func__, keg->uk_ipers)); From owner-svn-src-all@freebsd.org Mon Apr 16 15:13:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A664F8AD6A; Mon, 16 Apr 2018 15:13:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D217E7EB5B; Mon, 16 Apr 2018 15:13:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCAC81F09E; Mon, 16 Apr 2018 15:13:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GFDIDT061901; Mon, 16 Apr 2018 15:13:18 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFDI2T061900; Mon, 16 Apr 2018 15:13:18 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804161513.w3GFDI2T061900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 16 Apr 2018 15:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332573 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 332573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:13:19 -0000 Author: kevans Date: Mon Apr 16 15:13:18 2018 New Revision: 332573 URL: https://svnweb.freebsd.org/changeset/base/332573 Log: Regenerate FAT templates after r332561 Modified: head/stand/efi/boot1/fat-amd64.tmpl.xz head/stand/efi/boot1/fat-arm.tmpl.xz head/stand/efi/boot1/fat-arm64.tmpl.xz head/stand/efi/boot1/fat-i386.tmpl.xz Modified: head/stand/efi/boot1/fat-amd64.tmpl.xz ============================================================================== Binary file (source and/or target). No diff available. Modified: head/stand/efi/boot1/fat-arm.tmpl.xz ============================================================================== Binary file (source and/or target). No diff available. Modified: head/stand/efi/boot1/fat-arm64.tmpl.xz ============================================================================== Binary file (source and/or target). No diff available. Modified: head/stand/efi/boot1/fat-i386.tmpl.xz ============================================================================== Binary file (source and/or target). No diff available. From owner-svn-src-all@freebsd.org Mon Apr 16 15:39:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF72AF8C8A3; Mon, 16 Apr 2018 15:39:35 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A65684DD7; Mon, 16 Apr 2018 15:39:35 +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 8FAF31F419; Mon, 16 Apr 2018 15:39:35 +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 w3GFdZj2072422; Mon, 16 Apr 2018 15:39:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFdYWl072415; Mon, 16 Apr 2018 15:39:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161539.w3GFdYWl072415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332574 - stable/11/sys/dev/usb/template X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/usb/template X-SVN-Commit-Revision: 332574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:39:36 -0000 Author: trasz Date: Mon Apr 16 15:39:34 2018 New Revision: 332574 URL: https://svnweb.freebsd.org/changeset/base/332574 Log: MFC r324626: Replace some magic numbers in usb_template(4) code with #defines. There should be no functional changes. Modified: stable/11/sys/dev/usb/template/usb_template_audio.c stable/11/sys/dev/usb/template/usb_template_kbd.c stable/11/sys/dev/usb/template/usb_template_midi.c stable/11/sys/dev/usb/template/usb_template_modem.c stable/11/sys/dev/usb/template/usb_template_mouse.c stable/11/sys/dev/usb/template/usb_template_phone.c stable/11/sys/dev/usb/template/usb_template_serialnet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/template/usb_template_audio.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_audio.c Mon Apr 16 15:13:18 2018 (r332573) +++ stable/11/sys/dev/usb/template/usb_template_audio.c Mon Apr 16 15:39:34 2018 (r332574) @@ -199,8 +199,8 @@ static const void *audio_raw_iface_0_desc[] = { static const struct usb_temp_interface_desc audio_iface_0 = { .ppEndpoints = NULL, /* no endpoints */ .ppRawDesc = audio_raw_iface_0_desc, - .bInterfaceClass = 1, - .bInterfaceSubClass = 1, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL, .bInterfaceProtocol = 0, .iInterface = INDEX_AUDIO_MIXER, }; @@ -257,8 +257,8 @@ static const struct usb_temp_endpoint_desc *audio_ifac static const struct usb_temp_interface_desc audio_iface_1_alt_0 = { .ppEndpoints = NULL, /* no endpoints */ .ppRawDesc = NULL, /* no raw descriptors */ - .bInterfaceClass = 1, - .bInterfaceSubClass = 2, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_AUDIO_PLAYBACK, }; @@ -266,8 +266,8 @@ static const struct usb_temp_interface_desc audio_ifac static const struct usb_temp_interface_desc audio_iface_1_alt_1 = { .ppEndpoints = audio_iface_1_ep, .ppRawDesc = audio_raw_iface_1_desc, - .bInterfaceClass = 1, - .bInterfaceSubClass = 2, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_AUDIO_PLAYBACK, .isAltInterface = 1, /* this is an alternate setting */ @@ -315,8 +315,8 @@ static const struct usb_temp_endpoint_desc *audio_ifac static const struct usb_temp_interface_desc audio_iface_2_alt_0 = { .ppEndpoints = NULL, /* no endpoints */ .ppRawDesc = NULL, /* no raw descriptors */ - .bInterfaceClass = 1, - .bInterfaceSubClass = 2, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_AUDIO_RECORD, }; @@ -324,8 +324,8 @@ static const struct usb_temp_interface_desc audio_ifac static const struct usb_temp_interface_desc audio_iface_2_alt_1 = { .ppEndpoints = audio_iface_2_ep, .ppRawDesc = audio_raw_iface_2_desc, - .bInterfaceClass = 1, - .bInterfaceSubClass = 2, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_AUDIO_RECORD, .isAltInterface = 1, /* this is an alternate setting */ Modified: stable/11/sys/dev/usb/template/usb_template_kbd.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_kbd.c Mon Apr 16 15:13:18 2018 (r332573) +++ stable/11/sys/dev/usb/template/usb_template_kbd.c Mon Apr 16 15:39:34 2018 (r332574) @@ -130,9 +130,9 @@ static const void *keyboard_iface_0_desc[] = { static const struct usb_temp_interface_desc keyboard_iface_0 = { .ppRawDesc = keyboard_iface_0_desc, .ppEndpoints = keyboard_endpoints, - .bInterfaceClass = 3, - .bInterfaceSubClass = 1, - .bInterfaceProtocol = 1, + .bInterfaceClass = UICLASS_HID, + .bInterfaceSubClass = UISUBCLASS_BOOT, + .bInterfaceProtocol = UIPROTO_BOOT_KEYBOARD, .iInterface = INDEX_KEYBOARD, }; Modified: stable/11/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_midi.c Mon Apr 16 15:13:18 2018 (r332573) +++ stable/11/sys/dev/usb/template/usb_template_midi.c Mon Apr 16 15:39:34 2018 (r332574) @@ -89,8 +89,8 @@ static const void *midi_descs_0[] = { static const struct usb_temp_interface_desc midi_iface_0 = { .ppEndpoints = NULL, /* no endpoints */ .ppRawDesc = midi_descs_0, - .bInterfaceClass = 1, - .bInterfaceSubClass = 1, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL, .bInterfaceProtocol = 0, .iInterface = INDEX_MIDI_IF, }; @@ -171,8 +171,8 @@ static const void *midi_descs_1[] = { static const struct usb_temp_interface_desc midi_iface_1 = { .ppRawDesc = midi_descs_1, .ppEndpoints = midi_iface_1_ep, - .bInterfaceClass = 0x01, /* MIDI */ - .bInterfaceSubClass = 3, /* MIDI streaming */ + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_MIDISTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_MIDI_IF, }; Modified: stable/11/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_modem.c Mon Apr 16 15:13:18 2018 (r332573) +++ stable/11/sys/dev/usb/template/usb_template_modem.c Mon Apr 16 15:39:34 2018 (r332574) @@ -156,17 +156,17 @@ static const void *modem_iface_0_desc[] = { static const struct usb_temp_interface_desc modem_iface_0 = { .ppRawDesc = modem_iface_0_desc, .ppEndpoints = modem_iface_0_ep, - .bInterfaceClass = 2, - .bInterfaceSubClass = 2, - .bInterfaceProtocol = 1, + .bInterfaceClass = UICLASS_CDC, + .bInterfaceSubClass = UISUBCLASS_ABSTRACT_CONTROL_MODEL, + .bInterfaceProtocol = UIPROTO_CDC_AT, .iInterface = INDEX_MODEM, }; static const struct usb_temp_interface_desc modem_iface_1 = { .ppEndpoints = modem_iface_1_ep, - .bInterfaceClass = 10, - .bInterfaceSubClass = 0, - .bInterfaceProtocol = 0, + .bInterfaceClass = UICLASS_CDC_DATA, + .bInterfaceSubClass = UISUBCLASS_DATA, + .bInterfaceProtocol = UIPROTO_CDC_NONE, .iInterface = INDEX_MODEM, }; Modified: stable/11/sys/dev/usb/template/usb_template_mouse.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_mouse.c Mon Apr 16 15:13:18 2018 (r332573) +++ stable/11/sys/dev/usb/template/usb_template_mouse.c Mon Apr 16 15:39:34 2018 (r332574) @@ -128,9 +128,9 @@ static const void *mouse_iface_0_desc[] = { static const struct usb_temp_interface_desc mouse_iface_0 = { .ppRawDesc = mouse_iface_0_desc, .ppEndpoints = mouse_endpoints, - .bInterfaceClass = 3, - .bInterfaceSubClass = 1, - .bInterfaceProtocol = 2, + .bInterfaceClass = UICLASS_HID, + .bInterfaceSubClass = UISUBCLASS_BOOT, + .bInterfaceProtocol = UIPROTO_MOUSE, .iInterface = INDEX_MOUSE, }; Modified: stable/11/sys/dev/usb/template/usb_template_phone.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_phone.c Mon Apr 16 15:13:18 2018 (r332573) +++ stable/11/sys/dev/usb/template/usb_template_phone.c Mon Apr 16 15:39:34 2018 (r332574) @@ -156,8 +156,8 @@ static const void *phone_raw_iface_0_desc[] = { static const struct usb_temp_interface_desc phone_iface_0 = { .ppEndpoints = NULL, /* no endpoints */ .ppRawDesc = phone_raw_iface_0_desc, - .bInterfaceClass = 1, - .bInterfaceSubClass = 1, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL, .bInterfaceProtocol = 0, .iInterface = INDEX_PHONE_MIXER, }; @@ -213,8 +213,8 @@ static const struct usb_temp_endpoint_desc *phone_ifac static const struct usb_temp_interface_desc phone_iface_1_alt_0 = { .ppEndpoints = NULL, /* no endpoints */ .ppRawDesc = NULL, /* no raw descriptors */ - .bInterfaceClass = 1, - .bInterfaceSubClass = 2, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_PHONE_PLAYBACK, }; @@ -222,8 +222,8 @@ static const struct usb_temp_interface_desc phone_ifac static const struct usb_temp_interface_desc phone_iface_1_alt_1 = { .ppEndpoints = phone_iface_1_ep, .ppRawDesc = phone_raw_iface_1_desc, - .bInterfaceClass = 1, - .bInterfaceSubClass = 2, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_PHONE_PLAYBACK, .isAltInterface = 1, /* this is an alternate setting */ @@ -270,8 +270,8 @@ static const struct usb_temp_endpoint_desc *phone_ifac static const struct usb_temp_interface_desc phone_iface_2_alt_0 = { .ppEndpoints = NULL, /* no endpoints */ .ppRawDesc = NULL, /* no raw descriptors */ - .bInterfaceClass = 1, - .bInterfaceSubClass = 2, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_PHONE_RECORD, }; @@ -279,8 +279,8 @@ static const struct usb_temp_interface_desc phone_ifac static const struct usb_temp_interface_desc phone_iface_2_alt_1 = { .ppEndpoints = phone_iface_2_ep, .ppRawDesc = phone_raw_iface_2_desc, - .bInterfaceClass = 1, - .bInterfaceSubClass = 2, + .bInterfaceClass = UICLASS_AUDIO, + .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, .iInterface = INDEX_PHONE_RECORD, .isAltInterface = 1, /* this is an alternate setting */ @@ -321,7 +321,7 @@ static const struct usb_temp_endpoint_desc *phone_ifac static const struct usb_temp_interface_desc phone_iface_3 = { .ppEndpoints = phone_iface_3_ep, .ppRawDesc = phone_hid_desc_0, - .bInterfaceClass = 3, + .bInterfaceClass = UICLASS_HID, .bInterfaceSubClass = 0, .bInterfaceProtocol = 0, .iInterface = INDEX_PHONE_HID, Modified: stable/11/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_serialnet.c Mon Apr 16 15:13:18 2018 (r332573) +++ stable/11/sys/dev/usb/template/usb_template_serialnet.c Mon Apr 16 15:39:34 2018 (r332574) @@ -202,7 +202,7 @@ static const struct usb_temp_interface_desc eth_contro .ppRawDesc = eth_control_if_desc, .bInterfaceClass = UICLASS_CDC, .bInterfaceSubClass = UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL, - .bInterfaceProtocol = 0, + .bInterfaceProtocol = UIPROTO_CDC_NONE, .iInterface = STRING_ETH_CONTROL_INDEX, }; @@ -215,7 +215,7 @@ static const struct usb_temp_endpoint_desc *eth_data_e static const struct usb_temp_interface_desc eth_data_null_interface = { .ppEndpoints = NULL, /* no endpoints */ .bInterfaceClass = UICLASS_CDC_DATA, - .bInterfaceSubClass = 0, + .bInterfaceSubClass = UISUBCLASS_DATA, .bInterfaceProtocol = 0, .iInterface = STRING_ETH_DATA_INDEX, }; @@ -304,16 +304,16 @@ static const void *modem_iface_0_desc[] = { static const struct usb_temp_interface_desc modem_iface_0 = { .ppRawDesc = modem_iface_0_desc, .ppEndpoints = modem_iface_0_ep, - .bInterfaceClass = 2, - .bInterfaceSubClass = 2, - .bInterfaceProtocol = 1, + .bInterfaceClass = UICLASS_CDC, + .bInterfaceSubClass = UISUBCLASS_ABSTRACT_CONTROL_MODEL, + .bInterfaceProtocol = UIPROTO_CDC_AT, .iInterface = STRING_MODEM_INDEX, }; static const struct usb_temp_interface_desc modem_iface_1 = { .ppEndpoints = modem_iface_1_ep, - .bInterfaceClass = 10, - .bInterfaceSubClass = 0, + .bInterfaceClass = UICLASS_CDC_DATA, + .bInterfaceSubClass = UISUBCLASS_DATA, .bInterfaceProtocol = 0, .iInterface = STRING_MODEM_INDEX, }; From owner-svn-src-all@freebsd.org Mon Apr 16 15:42:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E178BF8CDB8; Mon, 16 Apr 2018 15:42:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2C68521A; Mon, 16 Apr 2018 15:42:27 +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 6BD671F59D; Mon, 16 Apr 2018 15:42:27 +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 w3GFgRX5077241; Mon, 16 Apr 2018 15:42:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFgQSv077232; Mon, 16 Apr 2018 15:42:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161542.w3GFgQSv077232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:42: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: r332575 - in stable/11: share/man/man4 sys/dev/usb/template X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/dev/usb/template X-SVN-Commit-Revision: 332575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:42:28 -0000 Author: trasz Date: Mon Apr 16 15:42:26 2018 New Revision: 332575 URL: https://svnweb.freebsd.org/changeset/base/332575 Log: MFC r328194: Add sysctls to control device side USB identifiers. This makes it possible to change string and numeric vendor and product identifiers, as well as anything else there might be to change for a particular device side template, eg the MAC address. Relnotes: yes Modified: stable/11/share/man/man4/usb_template.4 stable/11/sys/dev/usb/template/usb_template.c stable/11/sys/dev/usb/template/usb_template.h stable/11/sys/dev/usb/template/usb_template_audio.c stable/11/sys/dev/usb/template/usb_template_cdce.c stable/11/sys/dev/usb/template/usb_template_kbd.c stable/11/sys/dev/usb/template/usb_template_midi.c stable/11/sys/dev/usb/template/usb_template_modem.c stable/11/sys/dev/usb/template/usb_template_mouse.c stable/11/sys/dev/usb/template/usb_template_msc.c stable/11/sys/dev/usb/template/usb_template_mtp.c stable/11/sys/dev/usb/template/usb_template_phone.c stable/11/sys/dev/usb/template/usb_template_serialnet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/usb_template.4 ============================================================================== --- stable/11/share/man/man4/usb_template.4 Mon Apr 16 15:39:34 2018 (r332574) +++ stable/11/share/man/man4/usb_template.4 Mon Apr 16 15:42:26 2018 (r332575) @@ -61,11 +61,12 @@ descriptors. . USB templates are selected using the .Va hw.usb.template -sysctl and tunable. -. -The -.Va hw.usb.template -value can be changed at any time, but will not +sysctl and tunable, +or by using the +.Xr usbconfig 8 +.Cm set_template +subcommand. +The sysctl values can be changed at any time, but will not have any effect until the USB device has been re-enumerated. . Available templates are: @@ -83,10 +84,32 @@ Available templates are: .It Dv 9 Ta USB MIDI .El . +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va hw.usb.template +Currently selected template. +.It Va hw.usb.templates.N +Configuration for template number +.Va N . +.It Va hw.usb.templates.N.vendor_id +16-bit vendor identifier (VID), usually assigned by USB-IF. +.It Va hw.usb.templates.N.product_id +16-bit product identifier (PID). +.It Va hw.usb.templates.N.manufacturer +String containing human-readable manufacturer name. +.It Va hw.usb.templates.N.product +String containing human-readable product name. +.El .Sh SEE ALSO .Xr cfumass 4 , .Xr usb 4 , -.Xr usfs 4 +.Xr usfs 4 , +.Xr usbconfig 8 .Sh STANDARDS The .Nm Modified: stable/11/sys/dev/usb/template/usb_template.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template.c Mon Apr 16 15:39:34 2018 (r332574) +++ stable/11/sys/dev/usb/template/usb_template.c Mon Apr 16 15:42:26 2018 (r332575) @@ -63,6 +63,7 @@ #include #include #include +#include #define USB_DEBUG_VAR usb_debug #include @@ -73,6 +74,9 @@ #include #endif /* USB_GLOBAL_INCLUDE_FILE */ +SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, 0, + "USB device side templates"); + MODULE_DEPEND(usb_template, usb, 1, 1, 1); MODULE_VERSION(usb_template, 1); @@ -110,6 +114,50 @@ static usb_error_t usb_temp_get_desc(struct usb_device static usb_error_t usb_temp_setup_by_index(struct usb_device *, uint16_t index); static void usb_temp_init(void *); + +/*------------------------------------------------------------------------* + * usb_decode_str_desc + * + * Helper function to decode string descriptors into a C string. + *------------------------------------------------------------------------*/ +void +usb_decode_str_desc(struct usb_string_descriptor *sd, char *buf, size_t buflen) +{ + size_t i; + + for (i = 0; i < buflen - 1 && i < sd->bLength / 2; i++) + buf[i] = UGETW(sd->bString[i]); + + buf[i] = '\0'; +} + +/*------------------------------------------------------------------------* + * usb_temp_sysctl + * + * Callback for SYSCTL_PROC(9), to set and retrieve template string + * descriptors. + *------------------------------------------------------------------------*/ +int +usb_temp_sysctl(SYSCTL_HANDLER_ARGS) +{ + char buf[128]; + struct usb_string_descriptor *sd = arg1; + size_t len, sdlen = arg2; + int error; + + usb_decode_str_desc(sd, buf, sizeof(buf)); + + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + if (error != 0 || req->newptr == NULL) + return (error); + + len = usb_make_str_desc(sd, sdlen, buf); + if (len == 0) + return (EINVAL); + + return (0); +} + /*------------------------------------------------------------------------* * usb_make_raw_desc Modified: stable/11/sys/dev/usb/template/usb_template.h ============================================================================== --- stable/11/sys/dev/usb/template/usb_template.h Mon Apr 16 15:39:34 2018 (r332574) +++ stable/11/sys/dev/usb/template/usb_template.h Mon Apr 16 15:42:26 2018 (r332575) @@ -98,19 +98,25 @@ struct usb_temp_data { /* prototypes */ -extern const struct usb_temp_device_desc usb_template_audio; -extern const struct usb_temp_device_desc usb_template_cdce; -extern const struct usb_temp_device_desc usb_template_kbd; -extern const struct usb_temp_device_desc usb_template_modem; -extern const struct usb_temp_device_desc usb_template_mouse; -extern const struct usb_temp_device_desc usb_template_msc; -extern const struct usb_temp_device_desc usb_template_mtp; -extern const struct usb_temp_device_desc usb_template_phone; -extern const struct usb_temp_device_desc usb_template_serialnet; -extern const struct usb_temp_device_desc usb_template_midi; +extern struct usb_temp_device_desc usb_template_audio; +extern struct usb_temp_device_desc usb_template_cdce; +extern struct usb_temp_device_desc usb_template_kbd; +extern struct usb_temp_device_desc usb_template_modem; +extern struct usb_temp_device_desc usb_template_mouse; +extern struct usb_temp_device_desc usb_template_msc; +extern struct usb_temp_device_desc usb_template_mtp; +extern struct usb_temp_device_desc usb_template_phone; +extern struct usb_temp_device_desc usb_template_serialnet; +extern struct usb_temp_device_desc usb_template_midi; + +void usb_decode_str_desc(struct usb_string_descriptor *sd, + char *buf, size_t buflen); usb_error_t usb_temp_setup(struct usb_device *, const struct usb_temp_device_desc *); -void usb_temp_unsetup(struct usb_device *); +void usb_temp_unsetup(struct usb_device *); +int usb_temp_sysctl(SYSCTL_HANDLER_ARGS); + +SYSCTL_DECL(_hw_usb_templates); #endif /* _USB_TEMPLATE_H_ */ Modified: stable/11/sys/dev/usb/template/usb_template_audio.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_audio.c Mon Apr 16 15:39:34 2018 (r332574) +++ stable/11/sys/dev/usb/template/usb_template_audio.c Mon Apr 16 15:42:26 2018 (r332575) @@ -1,7 +1,12 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2010 Hans Petter Selasky + * Copyright (c) 2018 The FreeBSD Foundation + * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -54,39 +59,33 @@ #include #include #include +#include +#include #include #endif /* USB_GLOBAL_INCLUDE_FILE */ enum { - INDEX_AUDIO_LANG, - INDEX_AUDIO_MIXER, - INDEX_AUDIO_RECORD, - INDEX_AUDIO_PLAYBACK, - INDEX_AUDIO_PRODUCT, - INDEX_AUDIO_MAX, + AUDIO_LANG_INDEX, + AUDIO_MIXER_INDEX, + AUDIO_RECORD_INDEX, + AUDIO_PLAYBACK_INDEX, + AUDIO_PRODUCT_INDEX, + AUDIO_MAX_INDEX, }; -#define STRING_AUDIO_PRODUCT \ - "A\0u\0d\0i\0o\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e" +#define AUDIO_DEFAULT_PRODUCT "Audio Test Device" +#define AUDIO_DEFAULT_MIXER "Mixer interface" +#define AUDIO_DEFAULT_RECORD "Record interface" +#define AUDIO_DEFAULT_PLAYBACK "Playback interface" -#define STRING_AUDIO_MIXER \ - "M\0i\0x\0e\0r\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" +static struct usb_string_descriptor audio_mixer; +static struct usb_string_descriptor audio_record; +static struct usb_string_descriptor audio_playback; +static struct usb_string_descriptor audio_product; -#define STRING_AUDIO_RECORD \ - "R\0e\0c\0o\0r\0d\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" +static struct sysctl_ctx_list audio_ctx_list; -#define STRING_AUDIO_PLAYBACK \ - "P\0l\0a\0y\0b\0a\0c\0k\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" - - -/* make the real string descriptors */ - -USB_MAKE_STRING_DESC(STRING_AUDIO_MIXER, string_audio_mixer); -USB_MAKE_STRING_DESC(STRING_AUDIO_RECORD, string_audio_record); -USB_MAKE_STRING_DESC(STRING_AUDIO_PLAYBACK, string_audio_playback); -USB_MAKE_STRING_DESC(STRING_AUDIO_PRODUCT, string_audio_product); - /* prototypes */ /* @@ -202,7 +201,7 @@ static const struct usb_temp_interface_desc audio_ifac .bInterfaceClass = UICLASS_AUDIO, .bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL, .bInterfaceProtocol = 0, - .iInterface = INDEX_AUDIO_MIXER, + .iInterface = AUDIO_MIXER_INDEX, }; static const uint8_t audio_raw_desc_20[] = { @@ -260,7 +259,7 @@ static const struct usb_temp_interface_desc audio_ifac .bInterfaceClass = UICLASS_AUDIO, .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, - .iInterface = INDEX_AUDIO_PLAYBACK, + .iInterface = AUDIO_PLAYBACK_INDEX, }; static const struct usb_temp_interface_desc audio_iface_1_alt_1 = { @@ -269,7 +268,7 @@ static const struct usb_temp_interface_desc audio_ifac .bInterfaceClass = UICLASS_AUDIO, .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, - .iInterface = INDEX_AUDIO_PLAYBACK, + .iInterface = AUDIO_PLAYBACK_INDEX, .isAltInterface = 1, /* this is an alternate setting */ }; @@ -318,7 +317,7 @@ static const struct usb_temp_interface_desc audio_ifac .bInterfaceClass = UICLASS_AUDIO, .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, - .iInterface = INDEX_AUDIO_RECORD, + .iInterface = AUDIO_RECORD_INDEX, }; static const struct usb_temp_interface_desc audio_iface_2_alt_1 = { @@ -327,7 +326,7 @@ static const struct usb_temp_interface_desc audio_ifac .bInterfaceClass = UICLASS_AUDIO, .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM, .bInterfaceProtocol = 0, - .iInterface = INDEX_AUDIO_RECORD, + .iInterface = AUDIO_RECORD_INDEX, .isAltInterface = 1, /* this is an alternate setting */ }; @@ -344,7 +343,7 @@ static const struct usb_temp_config_desc audio_config_ .ppIfaceDesc = audio_interfaces, .bmAttributes = UC_BUS_POWERED, .bMaxPower = 25, /* 50 mA */ - .iConfiguration = INDEX_AUDIO_PRODUCT, + .iConfiguration = AUDIO_PRODUCT_INDEX, }; static const struct usb_temp_config_desc *audio_configs[] = { @@ -354,7 +353,7 @@ static const struct usb_temp_config_desc *audio_config static usb_temp_get_string_desc_t audio_get_string_desc; -const struct usb_temp_device_desc usb_template_audio = { +struct usb_temp_device_desc usb_template_audio = { .getStringDesc = &audio_get_string_desc, .ppConfigDesc = audio_configs, .idVendor = USB_TEMPLATE_VENDOR, @@ -363,9 +362,7 @@ const struct usb_temp_device_desc usb_template_audio = .bDeviceClass = UDCLASS_COMM, .bDeviceSubClass = 0, .bDeviceProtocol = 0, - .iManufacturer = 0, - .iProduct = INDEX_AUDIO_PRODUCT, - .iSerialNumber = 0, + .iProduct = AUDIO_PRODUCT_INDEX, }; /*------------------------------------------------------------------------* @@ -378,12 +375,12 @@ const struct usb_temp_device_desc usb_template_audio = static const void * audio_get_string_desc(uint16_t lang_id, uint8_t string_index) { - static const void *ptr[INDEX_AUDIO_MAX] = { - [INDEX_AUDIO_LANG] = &usb_string_lang_en, - [INDEX_AUDIO_MIXER] = &string_audio_mixer, - [INDEX_AUDIO_RECORD] = &string_audio_record, - [INDEX_AUDIO_PLAYBACK] = &string_audio_playback, - [INDEX_AUDIO_PRODUCT] = &string_audio_product, + static const void *ptr[AUDIO_MAX_INDEX] = { + [AUDIO_LANG_INDEX] = &usb_string_lang_en, + [AUDIO_MIXER_INDEX] = &audio_mixer, + [AUDIO_RECORD_INDEX] = &audio_record, + [AUDIO_PLAYBACK_INDEX] = &audio_playback, + [AUDIO_PRODUCT_INDEX] = &audio_product, }; if (string_index == 0) { @@ -392,8 +389,66 @@ audio_get_string_desc(uint16_t lang_id, uint8_t string if (lang_id != 0x0409) { return (NULL); } - if (string_index < INDEX_AUDIO_MAX) { + if (string_index < AUDIO_MAX_INDEX) { return (ptr[string_index]); } return (NULL); } + +static void +audio_init(void *arg __unused) +{ + struct sysctl_oid *parent; + char parent_name[3]; + + usb_make_str_desc(&audio_mixer, sizeof(audio_mixer), + AUDIO_DEFAULT_MIXER); + usb_make_str_desc(&audio_record, sizeof(audio_record), + AUDIO_DEFAULT_RECORD); + usb_make_str_desc(&audio_playback, sizeof(audio_playback), + AUDIO_DEFAULT_PLAYBACK); + usb_make_str_desc(&audio_product, sizeof(audio_product), + AUDIO_DEFAULT_PRODUCT); + + snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_AUDIO); + sysctl_ctx_init(&audio_ctx_list); + + parent = SYSCTL_ADD_NODE(&audio_ctx_list, + SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, + parent_name, CTLFLAG_RW, + 0, "USB Audio Interface device side template"); + SYSCTL_ADD_U16(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "vendor_id", CTLFLAG_RWTUN, &usb_template_audio.idVendor, + 1, "Vendor identifier"); + SYSCTL_ADD_U16(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "product_id", CTLFLAG_RWTUN, &usb_template_audio.idProduct, + 1, "Product identifier"); +#if 0 + SYSCTL_ADD_PROC(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "mixer", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &audio_mixer, sizeof(audio_mixer), usb_temp_sysctl, + "A", "Mixer interface string"); + SYSCTL_ADD_PROC(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "record", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &audio_record, sizeof(audio_record), usb_temp_sysctl, + "A", "Record interface string"); + SYSCTL_ADD_PROC(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "playback", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &audio_playback, sizeof(audio_playback), usb_temp_sysctl, + "A", "Playback interface string"); +#endif + SYSCTL_ADD_PROC(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &audio_product, sizeof(audio_product), usb_temp_sysctl, + "A", "Product string"); +} + +static void +audio_uninit(void *arg __unused) +{ + + sysctl_ctx_free(&audio_ctx_list); +} + +SYSINIT(audio_init, SI_SUB_LOCK, SI_ORDER_FIRST, audio_init, NULL); +SYSUNINIT(audio_init, SI_SUB_LOCK, SI_ORDER_FIRST, audio_uninit, NULL); Modified: stable/11/sys/dev/usb/template/usb_template_cdce.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_cdce.c Mon Apr 16 15:39:34 2018 (r332574) +++ stable/11/sys/dev/usb/template/usb_template_cdce.c Mon Apr 16 15:42:26 2018 (r332575) @@ -1,8 +1,12 @@ /* $FreeBSD$ */ /*- * Copyright (c) 2007 Hans Petter Selasky + * Copyright (c) 2018 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -55,55 +59,42 @@ #include #include #include +#include +#include #include #endif /* USB_GLOBAL_INCLUDE_FILE */ enum { - STRING_LANG_INDEX, - STRING_MAC_INDEX, - STRING_ETH_CONTROL_INDEX, - STRING_ETH_DATA_INDEX, - STRING_ETH_CONFIG_INDEX, - STRING_ETH_VENDOR_INDEX, - STRING_ETH_PRODUCT_INDEX, - STRING_ETH_SERIAL_INDEX, - STRING_ETH_MAX, + ETH_LANG_INDEX, + ETH_MAC_INDEX, + ETH_CONTROL_INDEX, + ETH_DATA_INDEX, + ETH_CONFIGURATION_INDEX, + ETH_MANUFACTURER_INDEX, + ETH_PRODUCT_INDEX, + ETH_SERIAL_NUMBER_INDEX, + ETH_MAX_INDEX, }; -#define STRING_MAC \ - "2\0A\0002\0003\0004\0005\0006\0007\08\09\0A\0B" +#define ETH_DEFAULT_MAC "2A02030405060789AB" +#define ETH_DEFAULT_CONTROL "USB Ethernet Comm Interface" +#define ETH_DEFAULT_DATA "USB Ethernet Data Interface" +#define ETH_DEFAULT_CONFIG "Default Config" +#define ETH_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define ETH_DEFAULT_PRODUCT "USB Ethernet Adapter" +#define ETH_DEFAULT_SERIAL_NUMBER "December 2007" -#define STRING_ETH_CONTROL \ - "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 " \ - "\0C\0o\0m\0m\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e" +static struct usb_string_descriptor eth_mac; +static struct usb_string_descriptor eth_control; +static struct usb_string_descriptor eth_data; +static struct usb_string_descriptor eth_configuration; +static struct usb_string_descriptor eth_manufacturer; +static struct usb_string_descriptor eth_product; +static struct usb_string_descriptor eth_serial_number; -#define STRING_ETH_DATA \ - "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 \0D\0a\0t\0a\0 " \ - "\0I\0n\0t\0e\0r\0f\0a\0c\0e" +static struct sysctl_ctx_list eth_ctx_list; -#define STRING_ETH_CONFIG \ - "D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g" - -#define STRING_ETH_VENDOR \ - "F\0r\0e\0e\0B\0S\0D\0 \0f\0o\0u\0n\0d\0a\0t\0i\0o\0n" - -#define STRING_ETH_PRODUCT \ - "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 \0A\0d\0a\0p\0t\0e\0r" - -#define STRING_ETH_SERIAL \ - "D\0e\0c\0e\0m\0b\0e\0r\0 \0002\0000\0000\0007" - -/* make the real string descriptors */ - -USB_MAKE_STRING_DESC(STRING_MAC, string_mac); -USB_MAKE_STRING_DESC(STRING_ETH_CONTROL, string_eth_control); -USB_MAKE_STRING_DESC(STRING_ETH_DATA, string_eth_data); -USB_MAKE_STRING_DESC(STRING_ETH_CONFIG, string_eth_config); -USB_MAKE_STRING_DESC(STRING_ETH_VENDOR, string_eth_vendor); -USB_MAKE_STRING_DESC(STRING_ETH_PRODUCT, string_eth_product); -USB_MAKE_STRING_DESC(STRING_ETH_SERIAL, string_eth_serial); - /* prototypes */ static usb_temp_get_string_desc_t eth_get_string_desc; @@ -128,7 +119,7 @@ static const struct usb_cdc_ethernet_descriptor eth_en .bLength = sizeof(eth_enf_desc), .bDescriptorType = UDESC_CS_INTERFACE, .bDescriptorSubtype = UDESCSUB_CDC_ENF, - .iMacAddress = STRING_MAC_INDEX, + .iMacAddress = ETH_MAC_INDEX, .bmEthernetStatistics = {0, 0, 0, 0}, .wMaxSegmentSize = {0xEA, 0x05},/* 1514 bytes */ .wNumberMCFilters = {0, 0}, @@ -189,7 +180,7 @@ static const struct usb_temp_interface_desc eth_contro .bInterfaceClass = UICLASS_CDC, .bInterfaceSubClass = UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL, .bInterfaceProtocol = 0, - .iInterface = STRING_ETH_CONTROL_INDEX, + .iInterface = ETH_CONTROL_INDEX, }; static const struct usb_temp_endpoint_desc *eth_data_endpoints[] = { @@ -203,7 +194,7 @@ static const struct usb_temp_interface_desc eth_data_n .bInterfaceClass = UICLASS_CDC_DATA, .bInterfaceSubClass = 0, .bInterfaceProtocol = 0, - .iInterface = STRING_ETH_DATA_INDEX, + .iInterface = ETH_DATA_INDEX, }; static const struct usb_temp_interface_desc eth_data_interface = { @@ -211,7 +202,7 @@ static const struct usb_temp_interface_desc eth_data_i .bInterfaceClass = UICLASS_CDC_DATA, .bInterfaceSubClass = UISUBCLASS_DATA, .bInterfaceProtocol = 0, - .iInterface = STRING_ETH_DATA_INDEX, + .iInterface = ETH_DATA_INDEX, .isAltInterface = 1, /* this is an alternate setting */ }; @@ -226,7 +217,7 @@ static const struct usb_temp_config_desc eth_config_de .ppIfaceDesc = eth_interfaces, .bmAttributes = UC_BUS_POWERED, .bMaxPower = 25, /* 50 mA */ - .iConfiguration = STRING_ETH_CONFIG_INDEX, + .iConfiguration = ETH_CONFIGURATION_INDEX, }; static const struct usb_temp_config_desc *eth_configs[] = { @@ -234,7 +225,7 @@ static const struct usb_temp_config_desc *eth_configs[ NULL, }; -const struct usb_temp_device_desc usb_template_cdce = { +struct usb_temp_device_desc usb_template_cdce = { .getStringDesc = ð_get_string_desc, .ppConfigDesc = eth_configs, .idVendor = USB_TEMPLATE_VENDOR, @@ -243,9 +234,9 @@ const struct usb_temp_device_desc usb_template_cdce = .bDeviceClass = UDCLASS_COMM, .bDeviceSubClass = 0, .bDeviceProtocol = 0, - .iManufacturer = STRING_ETH_VENDOR_INDEX, - .iProduct = STRING_ETH_PRODUCT_INDEX, - .iSerialNumber = STRING_ETH_SERIAL_INDEX, + .iManufacturer = ETH_MANUFACTURER_INDEX, + .iProduct = ETH_PRODUCT_INDEX, + .iSerialNumber = ETH_SERIAL_NUMBER_INDEX, }; /*------------------------------------------------------------------------* @@ -258,15 +249,15 @@ const struct usb_temp_device_desc usb_template_cdce = static const void * eth_get_string_desc(uint16_t lang_id, uint8_t string_index) { - static const void *ptr[STRING_ETH_MAX] = { - [STRING_LANG_INDEX] = &usb_string_lang_en, - [STRING_MAC_INDEX] = &string_mac, - [STRING_ETH_CONTROL_INDEX] = &string_eth_control, - [STRING_ETH_DATA_INDEX] = &string_eth_data, - [STRING_ETH_CONFIG_INDEX] = &string_eth_config, - [STRING_ETH_VENDOR_INDEX] = &string_eth_vendor, - [STRING_ETH_PRODUCT_INDEX] = &string_eth_product, - [STRING_ETH_SERIAL_INDEX] = &string_eth_serial, + static const void *ptr[ETH_MAX_INDEX] = { + [ETH_LANG_INDEX] = &usb_string_lang_en, + [ETH_MAC_INDEX] = ð_mac, + [ETH_CONTROL_INDEX] = ð_control, + [ETH_DATA_INDEX] = ð_data, + [ETH_CONFIGURATION_INDEX] = ð_configuration, + [ETH_MANUFACTURER_INDEX] = ð_manufacturer, + [ETH_PRODUCT_INDEX] = ð_product, + [ETH_SERIAL_NUMBER_INDEX] = ð_serial_number, }; if (string_index == 0) { @@ -275,8 +266,84 @@ eth_get_string_desc(uint16_t lang_id, uint8_t string_i if (lang_id != 0x0409) { return (NULL); } - if (string_index < STRING_ETH_MAX) { + if (string_index < ETH_MAX_INDEX) { return (ptr[string_index]); } return (NULL); } + +static void +eth_init(void *arg __unused) +{ + struct sysctl_oid *parent; + char parent_name[3]; + + usb_make_str_desc(ð_mac, sizeof(eth_mac), + ETH_DEFAULT_MAC); + usb_make_str_desc(ð_control, sizeof(eth_control), + ETH_DEFAULT_CONTROL); + usb_make_str_desc(ð_data, sizeof(eth_data), + ETH_DEFAULT_DATA); + usb_make_str_desc(ð_configuration, sizeof(eth_configuration), + ETH_DEFAULT_CONFIG); + usb_make_str_desc(ð_manufacturer, sizeof(eth_manufacturer), + ETH_DEFAULT_MANUFACTURER); + usb_make_str_desc(ð_product, sizeof(eth_product), + ETH_DEFAULT_PRODUCT); + usb_make_str_desc(ð_serial_number, sizeof(eth_serial_number), + ETH_DEFAULT_SERIAL_NUMBER); + + snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_CDCE); + sysctl_ctx_init(ð_ctx_list); + + parent = SYSCTL_ADD_NODE(ð_ctx_list, + SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, + parent_name, CTLFLAG_RW, + 0, "USB CDC Ethernet device side template"); + SYSCTL_ADD_U16(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "vendor_id", CTLFLAG_RWTUN, + &usb_template_cdce.idVendor, 1, "Vendor identifier"); + SYSCTL_ADD_U16(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "product_id", CTLFLAG_RWTUN, + &usb_template_cdce.idProduct, 1, "Product identifier"); + SYSCTL_ADD_PROC(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "mac", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + ð_mac, sizeof(eth_mac), usb_temp_sysctl, + "A", "MAC address string"); +#if 0 + SYSCTL_ADD_PROC(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "control", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + ð_control, sizeof(eth_control), usb_temp_sysctl, + "A", "Control interface string"); + SYSCTL_ADD_PROC(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "data", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + ð_data, sizeof(eth_data), usb_temp_sysctl, + "A", "Data interface string"); + SYSCTL_ADD_PROC(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "configuration", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + ð_configuration, sizeof(eth_configuration), usb_temp_sysctl, + "A", "Configuration string"); +#endif + SYSCTL_ADD_PROC(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "manufacturer", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + ð_manufacturer, sizeof(eth_manufacturer), usb_temp_sysctl, + "A", "Manufacturer string"); + SYSCTL_ADD_PROC(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + ð_product, sizeof(eth_product), usb_temp_sysctl, + "A", "Product string"); + SYSCTL_ADD_PROC(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "serial_number", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + ð_serial_number, sizeof(eth_serial_number), usb_temp_sysctl, + "A", "Serial number string"); +} + +static void +eth_uninit(void *arg __unused) +{ + + sysctl_ctx_free(ð_ctx_list); +} + +SYSINIT(eth_init, SI_SUB_LOCK, SI_ORDER_FIRST, eth_init, NULL); +SYSUNINIT(eth_init, SI_SUB_LOCK, SI_ORDER_FIRST, eth_uninit, NULL); Modified: stable/11/sys/dev/usb/template/usb_template_kbd.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_kbd.c Mon Apr 16 15:39:34 2018 (r332574) +++ stable/11/sys/dev/usb/template/usb_template_kbd.c Mon Apr 16 15:42:26 2018 (r332575) @@ -1,7 +1,12 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2010 Hans Petter Selasky + * Copyright (c) 2018 The FreeBSD Foundation + * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -54,28 +59,27 @@ #include #include #include +#include +#include #include #endif /* USB_GLOBAL_INCLUDE_FILE */ enum { - INDEX_LANG, - INDEX_KEYBOARD, - INDEX_PRODUCT, - INDEX_MAX, + KBD_LANG_INDEX, + KBD_INTERFACE_INDEX, + KBD_PRODUCT_INDEX, + KBD_MAX_INDEX, }; -#define STRING_PRODUCT \ - "K\0e\0y\0b\0o\0a\0r\0d\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e" +#define KBD_DEFAULT_INTERFACE "Keyboard Interface" +#define KBD_DEFAULT_PRODUCT "Keyboard Test Device" -#define STRING_KEYBOARD \ - "K\0e\0y\0b\0o\0a\0r\0d\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" +static struct usb_string_descriptor kbd_interface; +static struct usb_string_descriptor kbd_product; -/* make the real string descriptors */ +static struct sysctl_ctx_list kbd_ctx_list; -USB_MAKE_STRING_DESC(STRING_KEYBOARD, string_keyboard); -USB_MAKE_STRING_DESC(STRING_PRODUCT, string_product); - /* prototypes */ static const struct usb_temp_packet_size keyboard_intr_mps = { @@ -133,7 +137,7 @@ static const struct usb_temp_interface_desc keyboard_i .bInterfaceClass = UICLASS_HID, .bInterfaceSubClass = UISUBCLASS_BOOT, .bInterfaceProtocol = UIPROTO_BOOT_KEYBOARD, - .iInterface = INDEX_KEYBOARD, + .iInterface = KBD_INTERFACE_INDEX, }; static const struct usb_temp_interface_desc *keyboard_interfaces[] = { @@ -145,7 +149,7 @@ static const struct usb_temp_config_desc keyboard_conf .ppIfaceDesc = keyboard_interfaces, .bmAttributes = UC_BUS_POWERED, .bMaxPower = 25, /* 50 mA */ - .iConfiguration = INDEX_PRODUCT, + .iConfiguration = KBD_PRODUCT_INDEX, }; static const struct usb_temp_config_desc *keyboard_configs[] = { @@ -156,7 +160,7 @@ static const struct usb_temp_config_desc *keyboard_con static usb_temp_get_string_desc_t keyboard_get_string_desc; static usb_temp_get_vendor_desc_t keyboard_get_vendor_desc; -const struct usb_temp_device_desc usb_template_kbd = { +struct usb_temp_device_desc usb_template_kbd = { .getStringDesc = &keyboard_get_string_desc, .getVendorDesc = &keyboard_get_vendor_desc, .ppConfigDesc = keyboard_configs, @@ -167,7 +171,7 @@ const struct usb_temp_device_desc usb_template_kbd = { .bDeviceSubClass = 0, .bDeviceProtocol = 0, .iManufacturer = 0, - .iProduct = INDEX_PRODUCT, + .iProduct = KBD_PRODUCT_INDEX, .iSerialNumber = 0, }; @@ -201,10 +205,10 @@ keyboard_get_vendor_desc(const struct usb_device_reque static const void * keyboard_get_string_desc(uint16_t lang_id, uint8_t string_index) { - static const void *ptr[INDEX_MAX] = { - [INDEX_LANG] = &usb_string_lang_en, - [INDEX_KEYBOARD] = &string_keyboard, - [INDEX_PRODUCT] = &string_product, + static const void *ptr[KBD_MAX_INDEX] = { + [KBD_LANG_INDEX] = &usb_string_lang_en, + [KBD_INTERFACE_INDEX] = &kbd_interface, + [KBD_PRODUCT_INDEX] = &kbd_product, }; if (string_index == 0) { @@ -213,8 +217,54 @@ keyboard_get_string_desc(uint16_t lang_id, uint8_t str if (lang_id != 0x0409) { return (NULL); } - if (string_index < INDEX_MAX) { + if (string_index < KBD_MAX_INDEX) { return (ptr[string_index]); } return (NULL); } + +static void +kbd_init(void *arg __unused) +{ + struct sysctl_oid *parent; + char parent_name[3]; + + usb_make_str_desc(&kbd_interface, sizeof(kbd_interface), + KBD_DEFAULT_INTERFACE); + usb_make_str_desc(&kbd_product, sizeof(kbd_product), + KBD_DEFAULT_PRODUCT); + + snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_KBD); + sysctl_ctx_init(&kbd_ctx_list); + + parent = SYSCTL_ADD_NODE(&kbd_ctx_list, + SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, + parent_name, CTLFLAG_RW, + 0, "USB Keyboard device side template"); + SYSCTL_ADD_U16(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "vendor_id", CTLFLAG_RWTUN, + &usb_template_kbd.idVendor, 1, "Vendor identifier"); + SYSCTL_ADD_U16(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "product_id", CTLFLAG_RWTUN, + &usb_template_kbd.idProduct, 1, "Product identifier"); +#if 0 + SYSCTL_ADD_PROC(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "interface", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &kbd_interface, sizeof(kbd_interface), usb_temp_sysctl, + "A", "Interface string"); +#endif + SYSCTL_ADD_PROC(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &kbd_product, sizeof(kbd_product), usb_temp_sysctl, + "A", "Product string"); +} + +static void +kbd_uninit(void *arg __unused) +{ + + sysctl_ctx_free(&kbd_ctx_list); +} + +SYSINIT(kbd_init, SI_SUB_LOCK, SI_ORDER_FIRST, kbd_init, NULL); +SYSUNINIT(kbd_init, SI_SUB_LOCK, SI_ORDER_FIRST, kbd_uninit, NULL); Modified: stable/11/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_midi.c Mon Apr 16 15:39:34 2018 (r332574) +++ stable/11/sys/dev/usb/template/usb_template_midi.c Mon Apr 16 15:42:26 2018 (r332575) @@ -1,7 +1,12 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2015 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2015 Hans Petter Selasky + * Copyright (c) 2018 The FreeBSD Foundation + * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -53,28 +58,27 @@ #include #include #include +#include +#include #include #endif /* USB_GLOBAL_INCLUDE_FILE */ enum { - INDEX_MIDI_LANG, - INDEX_MIDI_IF, - INDEX_MIDI_PRODUCT, - INDEX_MIDI_MAX, + MIDI_LANG_INDEX, + MIDI_INTERFACE_INDEX, + MIDI_PRODUCT_INDEX, + MIDI_MAX_INDEX, }; -#define STRING_MIDI_PRODUCT \ - "M\0I\0D\0I\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e" +#define MIDI_DEFAULT_INTERFACE "MIDI interface" +#define MIDI_DEFAULT_PRODUCT "MIDI Test Device" -#define STRING_MIDI_IF \ - "M\0I\0D\0I\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" +static struct usb_string_descriptor midi_interface; +static struct usb_string_descriptor midi_product; -/* make the real string descriptors */ +static struct sysctl_ctx_list midi_ctx_list; -USB_MAKE_STRING_DESC(STRING_MIDI_IF, string_midi_if); -USB_MAKE_STRING_DESC(STRING_MIDI_PRODUCT, string_midi_product); - /* prototypes */ static const uint8_t midi_desc_raw_0[9] = { @@ -92,7 +96,7 @@ static const struct usb_temp_interface_desc midi_iface .bInterfaceClass = UICLASS_AUDIO, .bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL, .bInterfaceProtocol = 0, - .iInterface = INDEX_MIDI_IF, + .iInterface = MIDI_INTERFACE_INDEX, }; static const struct usb_temp_packet_size midi_mps = { @@ -174,7 +178,7 @@ static const struct usb_temp_interface_desc midi_iface .bInterfaceClass = UICLASS_AUDIO, .bInterfaceSubClass = UISUBCLASS_MIDISTREAM, .bInterfaceProtocol = 0, - .iInterface = INDEX_MIDI_IF, + .iInterface = MIDI_INTERFACE_INDEX, }; static const struct usb_temp_interface_desc *midi_interfaces[] = { @@ -187,7 +191,7 @@ static const struct usb_temp_config_desc midi_config_d .ppIfaceDesc = midi_interfaces, .bmAttributes = UC_BUS_POWERED, .bMaxPower = 25, /* 50 mA */ - .iConfiguration = INDEX_MIDI_PRODUCT, + .iConfiguration = MIDI_PRODUCT_INDEX, }; static const struct usb_temp_config_desc *midi_configs[] = { @@ -197,7 +201,7 @@ static const struct usb_temp_config_desc *midi_configs static usb_temp_get_string_desc_t midi_get_string_desc; -const struct usb_temp_device_desc usb_template_midi = { +struct usb_temp_device_desc usb_template_midi = { .getStringDesc = &midi_get_string_desc, .ppConfigDesc = midi_configs, .idVendor = USB_TEMPLATE_VENDOR, @@ -207,7 +211,7 @@ const struct usb_temp_device_desc usb_template_midi = .bDeviceSubClass = 0, .bDeviceProtocol = 0, .iManufacturer = 0, - .iProduct = INDEX_MIDI_PRODUCT, + .iProduct = MIDI_PRODUCT_INDEX, .iSerialNumber = 0, }; @@ -221,10 +225,10 @@ const struct usb_temp_device_desc usb_template_midi = static const void * midi_get_string_desc(uint16_t lang_id, uint8_t string_index) { - static const void *ptr[INDEX_MIDI_MAX] = { - [INDEX_MIDI_LANG] = &usb_string_lang_en, - [INDEX_MIDI_IF] = &string_midi_if, - [INDEX_MIDI_PRODUCT] = &string_midi_product, + static const void *ptr[MIDI_MAX_INDEX] = { + [MIDI_LANG_INDEX] = &usb_string_lang_en, + [MIDI_INTERFACE_INDEX] = &midi_interface, + [MIDI_PRODUCT_INDEX] = &midi_product, }; if (string_index == 0) { @@ -233,8 +237,54 @@ midi_get_string_desc(uint16_t lang_id, uint8_t string_ if (lang_id != 0x0409) { return (NULL); } - if (string_index < INDEX_MIDI_MAX) { + if (string_index < MIDI_MAX_INDEX) { return (ptr[string_index]); } return (NULL); } + +static void +midi_init(void *arg __unused) +{ + struct sysctl_oid *parent; + char parent_name[3]; + + usb_make_str_desc(&midi_interface, sizeof(midi_interface), + MIDI_DEFAULT_INTERFACE); + usb_make_str_desc(&midi_product, sizeof(midi_product), + MIDI_DEFAULT_PRODUCT); + + snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_MIDI); + sysctl_ctx_init(&midi_ctx_list); + + parent = SYSCTL_ADD_NODE(&midi_ctx_list, + SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, + parent_name, CTLFLAG_RW, + 0, "USB MIDI device side template"); + SYSCTL_ADD_U16(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "vendor_id", CTLFLAG_RWTUN, + &usb_template_midi.idVendor, 1, "Vendor identifier"); + SYSCTL_ADD_U16(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "product_id", CTLFLAG_RWTUN, + &usb_template_midi.idProduct, 1, "Product identifier"); +#if 0 + SYSCTL_ADD_PROC(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "interface", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &midi_interface, sizeof(midi_interface), usb_temp_sysctl, + "A", "Interface string"); +#endif + SYSCTL_ADD_PROC(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &midi_product, sizeof(midi_product), usb_temp_sysctl, + "A", "Product string"); +} + +static void *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Apr 16 15:44:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C94E2F8CF5B; Mon, 16 Apr 2018 15:44:04 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74455853CB; Mon, 16 Apr 2018 15:44:04 +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 6F1191F5A6; Mon, 16 Apr 2018 15:44:04 +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 w3GFi4WO077367; Mon, 16 Apr 2018 15:44:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFi4UK077364; Mon, 16 Apr 2018 15:44:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161544.w3GFi4UK077364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332576 - stable/11/sys/dev/usb/template X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/usb/template X-SVN-Commit-Revision: 332576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:44:05 -0000 Author: trasz Date: Mon Apr 16 15:44:03 2018 New Revision: 332576 URL: https://svnweb.freebsd.org/changeset/base/332576 Log: MFC r328196: Add missing SPDX tags; the rest of the license text is the same as in other USB templates. Modified: stable/11/sys/dev/usb/template/usb_template_midi.c stable/11/sys/dev/usb/template/usb_template_phone.c stable/11/sys/dev/usb/template/usb_template_serialnet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_midi.c Mon Apr 16 15:42:26 2018 (r332575) +++ stable/11/sys/dev/usb/template/usb_template_midi.c Mon Apr 16 15:44:03 2018 (r332576) @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2015 Hans Petter Selasky * Copyright (c) 2018 The FreeBSD Foundation * All rights reserved. Modified: stable/11/sys/dev/usb/template/usb_template_phone.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_phone.c Mon Apr 16 15:42:26 2018 (r332575) +++ stable/11/sys/dev/usb/template/usb_template_phone.c Mon Apr 16 15:44:03 2018 (r332576) @@ -1,5 +1,7 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 Hans Petter Selasky * Copyright (c) 2018 The FreeBSD Foundation * All rights reserved. Modified: stable/11/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_serialnet.c Mon Apr 16 15:42:26 2018 (r332575) +++ stable/11/sys/dev/usb/template/usb_template_serialnet.c Mon Apr 16 15:44:03 2018 (r332576) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2015 Ruslan Bukin * Copyright (c) 2018 The FreeBSD Foundation * All rights reserved. From owner-svn-src-all@freebsd.org Mon Apr 16 15:46:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDFD9F8D196; Mon, 16 Apr 2018 15:46:25 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 716268601E; Mon, 16 Apr 2018 15:46:25 +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 657431F5A7; Mon, 16 Apr 2018 15:46:25 +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 w3GFkPrj077499; Mon, 16 Apr 2018 15:46:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFkPAe077498; Mon, 16 Apr 2018 15:46:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161546.w3GFkPAe077498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:46: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: r332577 - stable/11/sys/dev/usb/template X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/usb/template X-SVN-Commit-Revision: 332577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:46:25 -0000 Author: trasz Date: Mon Apr 16 15:46:24 2018 New Revision: 332577 URL: https://svnweb.freebsd.org/changeset/base/332577 Log: MFC r328197: Remove unused index. Modified: stable/11/sys/dev/usb/template/usb_template_serialnet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_serialnet.c Mon Apr 16 15:44:03 2018 (r332576) +++ stable/11/sys/dev/usb/template/usb_template_serialnet.c Mon Apr 16 15:46:24 2018 (r332577) @@ -81,7 +81,6 @@ enum { SERIALNET_ETH_MAC_INDEX, SERIALNET_ETH_CONTROL_INDEX, SERIALNET_ETH_DATA_INDEX, - SERIALNET_ETH_CONFIG_INDEX, SERIALNET_CONFIGURATION_INDEX, SERIALNET_MANUFACTURER_INDEX, SERIALNET_PRODUCT_INDEX, From owner-svn-src-all@freebsd.org Mon Apr 16 15:48:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9485F8D3A7; Mon, 16 Apr 2018 15:48: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DC3F870E1; Mon, 16 Apr 2018 15:48: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 62D411F5A8; Mon, 16 Apr 2018 15:48: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 w3GFmG8U077617; Mon, 16 Apr 2018 15:48:16 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFmFZT077611; Mon, 16 Apr 2018 15:48:15 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161548.w3GFmFZT077611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:48: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: r332578 - stable/11/sys/dev/usb/template X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/usb/template X-SVN-Commit-Revision: 332578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:48:17 -0000 Author: trasz Date: Mon Apr 16 15:48:15 2018 New Revision: 332578 URL: https://svnweb.freebsd.org/changeset/base/332578 Log: MFC r328219: Add missing manufacturer/serial number string descriptors. Modified: stable/11/sys/dev/usb/template/usb_template_audio.c stable/11/sys/dev/usb/template/usb_template_kbd.c stable/11/sys/dev/usb/template/usb_template_midi.c stable/11/sys/dev/usb/template/usb_template_modem.c stable/11/sys/dev/usb/template/usb_template_mouse.c stable/11/sys/dev/usb/template/usb_template_phone.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/template/usb_template_audio.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_audio.c Mon Apr 16 15:46:24 2018 (r332577) +++ stable/11/sys/dev/usb/template/usb_template_audio.c Mon Apr 16 15:48:15 2018 (r332578) @@ -70,19 +70,25 @@ enum { AUDIO_MIXER_INDEX, AUDIO_RECORD_INDEX, AUDIO_PLAYBACK_INDEX, + AUDIO_MANUFACTURER_INDEX, AUDIO_PRODUCT_INDEX, + AUDIO_SERIAL_NUMBER_INDEX, AUDIO_MAX_INDEX, }; -#define AUDIO_DEFAULT_PRODUCT "Audio Test Device" #define AUDIO_DEFAULT_MIXER "Mixer interface" #define AUDIO_DEFAULT_RECORD "Record interface" #define AUDIO_DEFAULT_PLAYBACK "Playback interface" +#define AUDIO_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define AUDIO_DEFAULT_PRODUCT "Audio Test Device" +#define AUDIO_DEFAULT_SERIAL_NUMBER "March 2008" static struct usb_string_descriptor audio_mixer; static struct usb_string_descriptor audio_record; static struct usb_string_descriptor audio_playback; +static struct usb_string_descriptor audio_manufacturer; static struct usb_string_descriptor audio_product; +static struct usb_string_descriptor audio_serial_number; static struct sysctl_ctx_list audio_ctx_list; @@ -362,7 +368,9 @@ struct usb_temp_device_desc usb_template_audio = { .bDeviceClass = UDCLASS_COMM, .bDeviceSubClass = 0, .bDeviceProtocol = 0, + .iManufacturer = AUDIO_MANUFACTURER_INDEX, .iProduct = AUDIO_PRODUCT_INDEX, + .iSerialNumber = AUDIO_SERIAL_NUMBER_INDEX, }; /*------------------------------------------------------------------------* @@ -380,7 +388,9 @@ audio_get_string_desc(uint16_t lang_id, uint8_t string [AUDIO_MIXER_INDEX] = &audio_mixer, [AUDIO_RECORD_INDEX] = &audio_record, [AUDIO_PLAYBACK_INDEX] = &audio_playback, + [AUDIO_MANUFACTURER_INDEX] = &audio_manufacturer, [AUDIO_PRODUCT_INDEX] = &audio_product, + [AUDIO_SERIAL_NUMBER_INDEX] = &audio_serial_number, }; if (string_index == 0) { @@ -407,8 +417,12 @@ audio_init(void *arg __unused) AUDIO_DEFAULT_RECORD); usb_make_str_desc(&audio_playback, sizeof(audio_playback), AUDIO_DEFAULT_PLAYBACK); + usb_make_str_desc(&audio_manufacturer, sizeof(audio_manufacturer), + AUDIO_DEFAULT_MANUFACTURER); usb_make_str_desc(&audio_product, sizeof(audio_product), AUDIO_DEFAULT_PRODUCT); + usb_make_str_desc(&audio_serial_number, sizeof(audio_serial_number), + AUDIO_DEFAULT_SERIAL_NUMBER); snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_AUDIO); sysctl_ctx_init(&audio_ctx_list); @@ -438,9 +452,17 @@ audio_init(void *arg __unused) "A", "Playback interface string"); #endif SYSCTL_ADD_PROC(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "manufacturer", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &audio_manufacturer, sizeof(audio_manufacturer), usb_temp_sysctl, + "A", "Manufacturer string"); + SYSCTL_ADD_PROC(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &audio_product, sizeof(audio_product), usb_temp_sysctl, "A", "Product string"); + SYSCTL_ADD_PROC(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "serial_number", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &audio_serial_number, sizeof(audio_serial_number), usb_temp_sysctl, + "A", "Serial number string"); } static void Modified: stable/11/sys/dev/usb/template/usb_template_kbd.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_kbd.c Mon Apr 16 15:46:24 2018 (r332577) +++ stable/11/sys/dev/usb/template/usb_template_kbd.c Mon Apr 16 15:48:15 2018 (r332578) @@ -68,15 +68,21 @@ enum { KBD_LANG_INDEX, KBD_INTERFACE_INDEX, + KBD_MANUFACTURER_INDEX, KBD_PRODUCT_INDEX, + KBD_SERIAL_NUMBER_INDEX, KBD_MAX_INDEX, }; #define KBD_DEFAULT_INTERFACE "Keyboard Interface" +#define KBD_DEFAULT_MANUFACTURER "FreeBSD foundation" #define KBD_DEFAULT_PRODUCT "Keyboard Test Device" +#define KBD_DEFAULT_SERIAL_NUMBER "March 2008" static struct usb_string_descriptor kbd_interface; +static struct usb_string_descriptor kbd_manufacturer; static struct usb_string_descriptor kbd_product; +static struct usb_string_descriptor kbd_serial_number; static struct sysctl_ctx_list kbd_ctx_list; @@ -170,9 +176,9 @@ struct usb_temp_device_desc usb_template_kbd = { .bDeviceClass = UDCLASS_COMM, .bDeviceSubClass = 0, .bDeviceProtocol = 0, - .iManufacturer = 0, + .iManufacturer = KBD_MANUFACTURER_INDEX, .iProduct = KBD_PRODUCT_INDEX, - .iSerialNumber = 0, + .iSerialNumber = KBD_SERIAL_NUMBER_INDEX, }; /*------------------------------------------------------------------------* @@ -208,7 +214,9 @@ keyboard_get_string_desc(uint16_t lang_id, uint8_t str static const void *ptr[KBD_MAX_INDEX] = { [KBD_LANG_INDEX] = &usb_string_lang_en, [KBD_INTERFACE_INDEX] = &kbd_interface, + [KBD_MANUFACTURER_INDEX] = &kbd_manufacturer, [KBD_PRODUCT_INDEX] = &kbd_product, + [KBD_SERIAL_NUMBER_INDEX] = &kbd_serial_number, }; if (string_index == 0) { @@ -231,8 +239,12 @@ kbd_init(void *arg __unused) usb_make_str_desc(&kbd_interface, sizeof(kbd_interface), KBD_DEFAULT_INTERFACE); + usb_make_str_desc(&kbd_manufacturer, sizeof(kbd_manufacturer), + KBD_DEFAULT_MANUFACTURER); usb_make_str_desc(&kbd_product, sizeof(kbd_product), KBD_DEFAULT_PRODUCT); + usb_make_str_desc(&kbd_serial_number, sizeof(kbd_serial_number), + KBD_DEFAULT_SERIAL_NUMBER); snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_KBD); sysctl_ctx_init(&kbd_ctx_list); @@ -254,9 +266,17 @@ kbd_init(void *arg __unused) "A", "Interface string"); #endif SYSCTL_ADD_PROC(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "manufacturer", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &kbd_manufacturer, sizeof(kbd_manufacturer), usb_temp_sysctl, + "A", "Manufacturer string"); + SYSCTL_ADD_PROC(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &kbd_product, sizeof(kbd_product), usb_temp_sysctl, "A", "Product string"); + SYSCTL_ADD_PROC(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "serial_number", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &kbd_serial_number, sizeof(kbd_serial_number), usb_temp_sysctl, + "A", "Serial number string"); } static void Modified: stable/11/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_midi.c Mon Apr 16 15:46:24 2018 (r332577) +++ stable/11/sys/dev/usb/template/usb_template_midi.c Mon Apr 16 15:48:15 2018 (r332578) @@ -69,15 +69,21 @@ enum { MIDI_LANG_INDEX, MIDI_INTERFACE_INDEX, + MIDI_MANUFACTURER_INDEX, MIDI_PRODUCT_INDEX, + MIDI_SERIAL_NUMBER_INDEX, MIDI_MAX_INDEX, }; #define MIDI_DEFAULT_INTERFACE "MIDI interface" +#define MIDI_DEFAULT_MANUFACTURER "FreeBSD foundation" #define MIDI_DEFAULT_PRODUCT "MIDI Test Device" +#define MIDI_DEFAULT_SERIAL_NUMBER "March 2008" static struct usb_string_descriptor midi_interface; +static struct usb_string_descriptor midi_manufacturer; static struct usb_string_descriptor midi_product; +static struct usb_string_descriptor midi_serial_number; static struct sysctl_ctx_list midi_ctx_list; @@ -212,9 +218,9 @@ struct usb_temp_device_desc usb_template_midi = { .bDeviceClass = 0, .bDeviceSubClass = 0, .bDeviceProtocol = 0, - .iManufacturer = 0, + .iManufacturer = MIDI_MANUFACTURER_INDEX, .iProduct = MIDI_PRODUCT_INDEX, - .iSerialNumber = 0, + .iSerialNumber = MIDI_SERIAL_NUMBER_INDEX, }; /*------------------------------------------------------------------------* @@ -230,7 +236,9 @@ midi_get_string_desc(uint16_t lang_id, uint8_t string_ static const void *ptr[MIDI_MAX_INDEX] = { [MIDI_LANG_INDEX] = &usb_string_lang_en, [MIDI_INTERFACE_INDEX] = &midi_interface, + [MIDI_MANUFACTURER_INDEX] = &midi_manufacturer, [MIDI_PRODUCT_INDEX] = &midi_product, + [MIDI_SERIAL_NUMBER_INDEX] = &midi_serial_number, }; if (string_index == 0) { @@ -253,8 +261,12 @@ midi_init(void *arg __unused) usb_make_str_desc(&midi_interface, sizeof(midi_interface), MIDI_DEFAULT_INTERFACE); + usb_make_str_desc(&midi_manufacturer, sizeof(midi_manufacturer), + MIDI_DEFAULT_MANUFACTURER); usb_make_str_desc(&midi_product, sizeof(midi_product), MIDI_DEFAULT_PRODUCT); + usb_make_str_desc(&midi_serial_number, sizeof(midi_serial_number), + MIDI_DEFAULT_SERIAL_NUMBER); snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_MIDI); sysctl_ctx_init(&midi_ctx_list); @@ -276,9 +288,17 @@ midi_init(void *arg __unused) "A", "Interface string"); #endif SYSCTL_ADD_PROC(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "manufacturer", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &midi_manufacturer, sizeof(midi_manufacturer), usb_temp_sysctl, + "A", "Manufacturer string"); + SYSCTL_ADD_PROC(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &midi_product, sizeof(midi_product), usb_temp_sysctl, "A", "Product string"); + SYSCTL_ADD_PROC(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "serial_number", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &midi_serial_number, sizeof(midi_serial_number), usb_temp_sysctl, + "A", "Serial number string"); } static void Modified: stable/11/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_modem.c Mon Apr 16 15:46:24 2018 (r332577) +++ stable/11/sys/dev/usb/template/usb_template_modem.c Mon Apr 16 15:48:15 2018 (r332578) @@ -68,15 +68,21 @@ enum { MODEM_LANG_INDEX, MODEM_INTERFACE_INDEX, + MODEM_MANUFACTURER_INDEX, MODEM_PRODUCT_INDEX, + MODEM_SERIAL_NUMBER_INDEX, MODEM_MAX_INDEX, }; #define MODEM_DEFAULT_INTERFACE "Modem interface" +#define MODEM_DEFAULT_MANUFACTURER "FreeBSD foundation" #define MODEM_DEFAULT_PRODUCT "Modem Test Device" +#define MODEM_DEFAULT_SERIAL_NUMBER "March 2008" static struct usb_string_descriptor modem_interface; +static struct usb_string_descriptor modem_manufacturer; static struct usb_string_descriptor modem_product; +static struct usb_string_descriptor modem_serial_number; static struct sysctl_ctx_list modem_ctx_list; @@ -205,9 +211,9 @@ struct usb_temp_device_desc usb_template_modem = { .bDeviceClass = UDCLASS_COMM, .bDeviceSubClass = 0, .bDeviceProtocol = 0, - .iManufacturer = 0, + .iManufacturer = MODEM_MANUFACTURER_INDEX, .iProduct = MODEM_PRODUCT_INDEX, - .iSerialNumber = 0, + .iSerialNumber = MODEM_SERIAL_NUMBER_INDEX, }; /*------------------------------------------------------------------------* @@ -236,7 +242,9 @@ modem_get_string_desc(uint16_t lang_id, uint8_t string static const void *ptr[MODEM_MAX_INDEX] = { [MODEM_LANG_INDEX] = &usb_string_lang_en, [MODEM_INTERFACE_INDEX] = &modem_interface, + [MODEM_MANUFACTURER_INDEX] = &modem_manufacturer, [MODEM_PRODUCT_INDEX] = &modem_product, + [MODEM_SERIAL_NUMBER_INDEX] = &modem_serial_number, }; if (string_index == 0) { @@ -259,8 +267,12 @@ modem_init(void *arg __unused) usb_make_str_desc(&modem_interface, sizeof(modem_interface), MODEM_DEFAULT_INTERFACE); + usb_make_str_desc(&modem_manufacturer, sizeof(modem_manufacturer), + MODEM_DEFAULT_MANUFACTURER); usb_make_str_desc(&modem_product, sizeof(modem_product), MODEM_DEFAULT_PRODUCT); + usb_make_str_desc(&modem_serial_number, sizeof(modem_serial_number), + MODEM_DEFAULT_SERIAL_NUMBER); snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_MODEM); sysctl_ctx_init(&modem_ctx_list); @@ -282,9 +294,17 @@ modem_init(void *arg __unused) "A", "Interface string"); #endif SYSCTL_ADD_PROC(&modem_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "manufacturer", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &modem_manufacturer, sizeof(modem_manufacturer), usb_temp_sysctl, + "A", "Manufacturer string"); + SYSCTL_ADD_PROC(&modem_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &modem_product, sizeof(modem_product), usb_temp_sysctl, "A", "Product string"); + SYSCTL_ADD_PROC(&modem_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "serial_number", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &modem_serial_number, sizeof(modem_serial_number), usb_temp_sysctl, + "A", "Serial number string"); } static void Modified: stable/11/sys/dev/usb/template/usb_template_mouse.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_mouse.c Mon Apr 16 15:46:24 2018 (r332577) +++ stable/11/sys/dev/usb/template/usb_template_mouse.c Mon Apr 16 15:48:15 2018 (r332578) @@ -68,15 +68,21 @@ enum { MOUSE_LANG_INDEX, MOUSE_INTERFACE_INDEX, + MOUSE_MANUFACTURER_INDEX, MOUSE_PRODUCT_INDEX, + MOUSE_SERIAL_NUMBER_INDEX, MOUSE_MAX_INDEX, }; #define MOUSE_DEFAULT_INTERFACE "Mouse interface" +#define MOUSE_DEFAULT_MANUFACTURER "FreeBSD foundation" #define MOUSE_DEFAULT_PRODUCT "Mouse Test Interface" +#define MOUSE_DEFAULT_SERIAL_NUMBER "March 2008" static struct usb_string_descriptor mouse_interface; +static struct usb_string_descriptor mouse_manufacturer; static struct usb_string_descriptor mouse_product; +static struct usb_string_descriptor mouse_serial_number; static struct sysctl_ctx_list mouse_ctx_list; @@ -168,9 +174,9 @@ struct usb_temp_device_desc usb_template_mouse = { .bDeviceClass = UDCLASS_COMM, .bDeviceSubClass = 0, .bDeviceProtocol = 0, - .iManufacturer = 0, + .iManufacturer = MOUSE_MANUFACTURER_INDEX, .iProduct = MOUSE_PRODUCT_INDEX, - .iSerialNumber = 0, + .iSerialNumber = MOUSE_SERIAL_NUMBER_INDEX, }; /*------------------------------------------------------------------------* @@ -206,7 +212,9 @@ mouse_get_string_desc(uint16_t lang_id, uint8_t string static const void *ptr[MOUSE_MAX_INDEX] = { [MOUSE_LANG_INDEX] = &usb_string_lang_en, [MOUSE_INTERFACE_INDEX] = &mouse_interface, + [MOUSE_MANUFACTURER_INDEX] = &mouse_manufacturer, [MOUSE_PRODUCT_INDEX] = &mouse_product, + [MOUSE_SERIAL_NUMBER_INDEX] = &mouse_serial_number, }; if (string_index == 0) { @@ -229,8 +237,12 @@ mouse_init(void *arg __unused) usb_make_str_desc(&mouse_interface, sizeof(mouse_interface), MOUSE_DEFAULT_INTERFACE); + usb_make_str_desc(&mouse_manufacturer, sizeof(mouse_manufacturer), + MOUSE_DEFAULT_MANUFACTURER); usb_make_str_desc(&mouse_product, sizeof(mouse_product), MOUSE_DEFAULT_PRODUCT); + usb_make_str_desc(&mouse_serial_number, sizeof(mouse_serial_number), + MOUSE_DEFAULT_SERIAL_NUMBER); snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_MOUSE); sysctl_ctx_init(&mouse_ctx_list); @@ -252,9 +264,17 @@ mouse_init(void *arg __unused) "A", "Interface string"); #endif SYSCTL_ADD_PROC(&mouse_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "manufacturer", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &mouse_manufacturer, sizeof(mouse_manufacturer), usb_temp_sysctl, + "A", "Manufacturer string"); + SYSCTL_ADD_PROC(&mouse_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &mouse_product, sizeof(mouse_product), usb_temp_sysctl, "A", "Product string"); + SYSCTL_ADD_PROC(&mouse_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "serial_number", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &mouse_serial_number, sizeof(mouse_serial_number), usb_temp_sysctl, + "A", "Serial number string"); } static void Modified: stable/11/sys/dev/usb/template/usb_template_phone.c ============================================================================== --- stable/11/sys/dev/usb/template/usb_template_phone.c Mon Apr 16 15:46:24 2018 (r332577) +++ stable/11/sys/dev/usb/template/usb_template_phone.c Mon Apr 16 15:48:15 2018 (r332578) @@ -72,22 +72,28 @@ enum { PHONE_MIXER_INDEX, PHONE_RECORD_INDEX, PHONE_PLAYBACK_INDEX, - PHONE_PRODUCT_INDEX, PHONE_HID_INDEX, + PHONE_MANUFACTURER_INDEX, + PHONE_PRODUCT_INDEX, + PHONE_SERIAL_NUMBER_INDEX, PHONE_MAX_INDEX, }; #define PHONE_DEFAULT_MIXER "Mixer interface" #define PHONE_DEFAULT_RECORD "Record interface" #define PHONE_DEFAULT_PLAYBACK "Playback interface" -#define PHONE_DEFAULT_PRODUCT "USB Phone Device" #define PHONE_DEFAULT_HID "HID interface" +#define PHONE_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define PHONE_DEFAULT_PRODUCT "USB Phone Device" +#define PHONE_DEFAULT_SERIAL_NUMBER "March 2008" static struct usb_string_descriptor phone_mixer; static struct usb_string_descriptor phone_record; static struct usb_string_descriptor phone_playback; -static struct usb_string_descriptor phone_product; static struct usb_string_descriptor phone_hid; +static struct usb_string_descriptor phone_manufacturer; +static struct usb_string_descriptor phone_product; +static struct usb_string_descriptor phone_serial_number; static struct sysctl_ctx_list phone_ctx_list; @@ -362,9 +368,9 @@ struct usb_temp_device_desc usb_template_phone = { .bDeviceClass = UDCLASS_IN_INTERFACE, .bDeviceSubClass = 0, .bDeviceProtocol = 0, - .iManufacturer = 0, + .iManufacturer = PHONE_MANUFACTURER_INDEX, .iProduct = PHONE_PRODUCT_INDEX, - .iSerialNumber = 0, + .iSerialNumber = PHONE_SERIAL_NUMBER_INDEX, }; /*------------------------------------------------------------------------* @@ -402,8 +408,10 @@ phone_get_string_desc(uint16_t lang_id, uint8_t string [PHONE_MIXER_INDEX] = &phone_mixer, [PHONE_RECORD_INDEX] = &phone_record, [PHONE_PLAYBACK_INDEX] = &phone_playback, - [PHONE_PRODUCT_INDEX] = &phone_product, [PHONE_HID_INDEX] = &phone_hid, + [PHONE_MANUFACTURER_INDEX] = &phone_manufacturer, + [PHONE_PRODUCT_INDEX] = &phone_product, + [PHONE_SERIAL_NUMBER_INDEX] = &phone_serial_number, }; if (string_index == 0) { @@ -430,10 +438,14 @@ phone_init(void *arg __unused) PHONE_DEFAULT_RECORD); usb_make_str_desc(&phone_playback, sizeof(phone_playback), PHONE_DEFAULT_PLAYBACK); - usb_make_str_desc(&phone_product, sizeof(phone_product), - PHONE_DEFAULT_PRODUCT); usb_make_str_desc(&phone_hid, sizeof(phone_hid), PHONE_DEFAULT_HID); + usb_make_str_desc(&phone_manufacturer, sizeof(phone_manufacturer), + PHONE_DEFAULT_MANUFACTURER); + usb_make_str_desc(&phone_product, sizeof(phone_product), + PHONE_DEFAULT_PRODUCT); + usb_make_str_desc(&phone_serial_number, sizeof(phone_serial_number), + PHONE_DEFAULT_SERIAL_NUMBER); snprintf(parent_name, sizeof(parent_name), "%d", USB_TEMP_PHONE); sysctl_ctx_init(&phone_ctx_list); @@ -461,15 +473,23 @@ phone_init(void *arg __unused) "playback", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &phone_playback, sizeof(phone_playback), usb_temp_sysctl, "A", "Playback interface string"); + SYSCTL_ADD_PROC(&phone_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "hid", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &phone_hid, sizeof(phone_hid), usb_temp_sysctl, + "A", "HID interface string"); #endif SYSCTL_ADD_PROC(&phone_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, + "manufacturer", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &phone_manufacturer, sizeof(phone_manufacturer), usb_temp_sysctl, + "A", "Manufacturer string"); + SYSCTL_ADD_PROC(&phone_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "product", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &phone_product, sizeof(phone_product), usb_temp_sysctl, "A", "Product string"); SYSCTL_ADD_PROC(&phone_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, - "hid", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, - &phone_hid, sizeof(phone_hid), usb_temp_sysctl, - "A", "HID interface string"); + "serial_number", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + &phone_serial_number, sizeof(phone_serial_number), usb_temp_sysctl, + "A", "Serial number string"); } static void From owner-svn-src-all@freebsd.org Mon Apr 16 15:49:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0D57F8D4D0; Mon, 16 Apr 2018 15:49:17 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62A6287A8C; Mon, 16 Apr 2018 15:49:17 +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 451F41F5A9; Mon, 16 Apr 2018 15:49:17 +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 w3GFnHEQ077706; Mon, 16 Apr 2018 15:49:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFnHn2077705; Mon, 16 Apr 2018 15:49:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161549.w3GFnHn2077705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:49: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: r332579 - stable/11/usr.sbin/usbconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.sbin/usbconfig X-SVN-Commit-Revision: 332579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:49:17 -0000 Author: trasz Date: Mon Apr 16 15:49:16 2018 New Revision: 332579 URL: https://svnweb.freebsd.org/changeset/base/332579 Log: MFC r327382: Improve usbconfig(8) manual page by adding descriptions for subcommands. Modified: stable/11/usr.sbin/usbconfig/usbconfig.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- stable/11/usr.sbin/usbconfig/usbconfig.8 Mon Apr 16 15:48:15 2018 (r332578) +++ stable/11/usr.sbin/usbconfig/usbconfig.8 Mon Apr 16 15:49:16 2018 (r332579) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 6, 2010 +.Dd December 30, 2017 .Dt USBCONFIG 8 .Os .Sh NAME @@ -56,45 +56,124 @@ The unit and address coordinates may be prefixed by th Show help and available commands. .El .Pp -When called without options, +The following commands may be used with +.Nm : +.Bl -tag -width indent +.It Cm set_config Ar cfg_index +Choose the configuration for the USB device. +Valid values range from zero to the number reported as the +.Ar bNumConfigurations +in +.Cm dump_device_desc +output. +The special value of 255 unconfigures the device, detaching +the interface drivers and reducing the power consumption to minimum, +but without going into power saving mode or detaching from the bus. +In some cases, it prevents the device from charging. +.It Cm set_alt Ar alt_index +Choose the alternate interface for the USB device. +Alternative settings for the current configuration are available as the +.Ar bAlternateSetting +in +.Cm dump_curr_config_desc +output. +Usually there is no need to adjust this setting. +.It Cm set_template Ar template +Set the global USB device side template. +See +.Xr usb_template 4 +for more information. +.It Cm get_template +Get the current USB device side template. +.It Cm add_dev_quirk_vplh Ar vid Ar pid Ar lo_rev Ar hi_rev Ar quirk_name +Add a quirk by specifying the Vendor ID, Product ID, low and high +revision numbers, and the quirk name. +See +.Xr usb_quirk 4 +for more information. +.It Cm remove_dev_quirk_vplh Ar vid Ar pid Ar lo_rev Ar hi_rev Ar quirk_name +Remove a quirk. +.It Cm add_quirk Ar quirk_name +Add quirk for the currently selected USB device. +.It Cm remove_quirk Ar quirk_name +Remove a quirk for the currently selected USB device. +.It Cm dump_quirk_names +Display the list of supported quirk names. +.It Cm dump_device_quirks +Display the list of current device quirks. +.It Cm dump_device_desc +Display the device descriptor. +.It Cm dump_curr_config_desc +Display current configuration descriptor. +.It Cm dump_all_config_desc +Display all the configuration descriptors. +.It Cm dump_string Ar index +Display string descriptor at selected index. +.It Cm dump_info +Display summary information about the device. +.It Cm show_ifdrv +Display the list of interface drivers (such as +.Xr ukbd 4 +or +.Xr u3g 4 ) +currently attached to the device. +.It Cm suspend +Force the device to suspend. +.It Cm resume +Force the device to resume. +.It Cm power_off +Turn the device off. +.It Cm power_save +Turn the automatic suspend and resume on. +This is the default for USB hubs. +.It Cm power_on +Turn the device on and disable automatic suspend and resume. +This is the default for non-hub devices. +.It Cm reset +Reset the device. +This forces the USB stack to reenumerate the bus. +.It Cm list +List all available USB devices. +This is the default if .Nm -prints a list of all available USB devices. +is called without specifying a command. +.It Cm do_request Ar bmReqTyp Ar bReq Ar wVal Ar wIdx Ar wLen Ar data... +Perform a synchronous control request on the specified device. +See +.Xr libusb20_dev_request_sync 3 +for more information. +.El .Sh EXAMPLES +.Pp Show information about the device on USB bus 1 at address 2: .Pp -.Dl usbconfig -u 1 -a 2 dump_info +.Dl usbconfig -d ugen1.2 dump_info .Pp Dump HID descriptor for device on USB bus 1 at address 2: .Pp -.Dl usbconfig -u 1 -a 2 do_request 0x81 0x06 0x2200 0 0x100 +.Dl usbconfig -d ugen1.2 do_request 0x81 0x06 0x2200 0 0x100 .Pp Dump string descriptor at index Z for device on USB bus 1 at address 2: .Pp -.Dl usbconfig -u 1 -a 2 dump_string Z +.Dl usbconfig -d ugen1.2 dump_string Z .Pp Dump current configuration descriptor for device on USB bus 1 at address 2: .Pp -.Dl usbconfig -u 1 -a 2 dump_curr_config_desc +.Dl usbconfig -d ugen1.2 dump_curr_config_desc .Pp Dump device descriptor for device on USB bus 1 at address 2: .Pp -.Dl usbconfig -u 1 -a 2 dump_device_desc +.Dl usbconfig -d ugen1.2 dump_device_desc .Pp Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on: .Pp -.Dl usbconfig -u 1 -a 2 suspend -.Dl usbconfig -u 1 -a 2 resume -.Dl usbconfig -u 1 -a 2 power_off -.Dl usbconfig -u 1 -a 2 power_save -.Dl usbconfig -u 1 -a 2 power_on +.Dl usbconfig -d ugen1.2 suspend +.Dl usbconfig -d ugen1.2 resume +.Dl usbconfig -d ugen1.2 power_off +.Dl usbconfig -d ugen1.2 power_save +.Dl usbconfig -d ugen1.2 power_on .Pp -Display a list of available quirk names: -.Pp -.Dl usbconfig dump_quirk_names -.Pp -See -.Xr usb_quirk 4 -for more information on quirks. .Sh SEE ALSO .Xr usb 4 , -.Xr usb_quirk 4 +.Xr usb_quirk 4 , +.Xr usb_template 4 From owner-svn-src-all@freebsd.org Mon Apr 16 15:50:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CB8EF8D66A; Mon, 16 Apr 2018 15:50:11 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A69D682E7; Mon, 16 Apr 2018 15:50:11 +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 3572E1F5AD; Mon, 16 Apr 2018 15:50:11 +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 w3GFoBRt077819; Mon, 16 Apr 2018 15:50:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFoBQD077818; Mon, 16 Apr 2018 15:50:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161550.w3GFoBQD077818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:50:11 +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: r332580 - stable/11/usr.sbin/usbconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.sbin/usbconfig X-SVN-Commit-Revision: 332580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:50:11 -0000 Author: trasz Date: Mon Apr 16 15:50:10 2018 New Revision: 332580 URL: https://svnweb.freebsd.org/changeset/base/332580 Log: MFC r327522: Fix warnings from "mandoc -Tlint -Wwarning". Modified: stable/11/usr.sbin/usbconfig/usbconfig.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- stable/11/usr.sbin/usbconfig/usbconfig.8 Mon Apr 16 15:49:16 2018 (r332579) +++ stable/11/usr.sbin/usbconfig/usbconfig.8 Mon Apr 16 15:50:10 2018 (r332580) @@ -144,7 +144,6 @@ See for more information. .El .Sh EXAMPLES -.Pp Show information about the device on USB bus 1 at address 2: .Pp .Dl usbconfig -d ugen1.2 dump_info @@ -172,7 +171,6 @@ Program the device on USB bus 1 at address 2 to suspen .Dl usbconfig -d ugen1.2 power_off .Dl usbconfig -d ugen1.2 power_save .Dl usbconfig -d ugen1.2 power_on -.Pp .Sh SEE ALSO .Xr usb 4 , .Xr usb_quirk 4 , From owner-svn-src-all@freebsd.org Mon Apr 16 15:51:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 000C8F8DAC8; Mon, 16 Apr 2018 15:51:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9ABC06865F; Mon, 16 Apr 2018 15:51:19 +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 95B991F5E9; Mon, 16 Apr 2018 15:51:19 +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 w3GFpJJm080103; Mon, 16 Apr 2018 15:51:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFpJBT080100; Mon, 16 Apr 2018 15:51:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161551.w3GFpJBT080100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332581 - stable/11/usr.sbin/usbconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.sbin/usbconfig X-SVN-Commit-Revision: 332581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:51:20 -0000 Author: trasz Date: Mon Apr 16 15:51:19 2018 New Revision: 332581 URL: https://svnweb.freebsd.org/changeset/base/332581 Log: MFC r330875: Add "usbconfig dump_all_desc", a subcommand to dump all device and config descriptors. Modified: stable/11/usr.sbin/usbconfig/usbconfig.8 stable/11/usr.sbin/usbconfig/usbconfig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- stable/11/usr.sbin/usbconfig/usbconfig.8 Mon Apr 16 15:50:10 2018 (r332580) +++ stable/11/usr.sbin/usbconfig/usbconfig.8 Mon Apr 16 15:51:19 2018 (r332581) @@ -97,6 +97,8 @@ Remove a quirk. Add quirk for the currently selected USB device. .It Cm remove_quirk Ar quirk_name Remove a quirk for the currently selected USB device. +.It Cm dump_all_desc +Display the device and configuration descriptors. .It Cm dump_quirk_names Display the list of supported quirk names. .It Cm dump_device_quirks Modified: stable/11/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- stable/11/usr.sbin/usbconfig/usbconfig.c Mon Apr 16 15:50:10 2018 (r332580) +++ stable/11/usr.sbin/usbconfig/usbconfig.c Mon Apr 16 15:51:19 2018 (r332581) @@ -77,6 +77,7 @@ struct options { uint8_t got_power_on:1; uint8_t got_dump_device_quirks:1; uint8_t got_dump_quirk_names:1; + uint8_t got_dump_all_desc:1; uint8_t got_dump_device_desc:1; uint8_t got_dump_curr_config:1; uint8_t got_dump_all_config:1; @@ -112,6 +113,7 @@ enum { T_SHOW_IFACE_DRIVER, T_DUMP_QUIRK_NAMES, T_DUMP_DEVICE_QUIRKS, + T_DUMP_ALL_DESC, T_DUMP_DEVICE_DESC, T_DUMP_CURR_CONFIG_DESC, T_DUMP_ALL_CONFIG_DESC, @@ -144,6 +146,7 @@ static const struct token token[] = { {"remove_quirk", T_REMOVE_QUIRK, 1}, {"dump_quirk_names", T_DUMP_QUIRK_NAMES, 0}, {"dump_device_quirks", T_DUMP_DEVICE_QUIRKS, 0}, + {"dump_all_desc", T_DUMP_ALL_DESC, 0}, {"dump_device_desc", T_DUMP_DEVICE_DESC, 0}, {"dump_curr_config_desc", T_DUMP_CURR_CONFIG_DESC, 0}, {"dump_all_config_desc", T_DUMP_ALL_CONFIG_DESC, 0}, @@ -283,6 +286,7 @@ usage(void) " remove_quirk " "\n" " dump_quirk_names" "\n" " dump_device_quirks" "\n" + " dump_all_desc" "\n" " dump_device_desc" "\n" " dump_curr_config_desc" "\n" " dump_all_config_desc" "\n" @@ -489,7 +493,8 @@ flush_command(struct libusb20_backend *pbe, struct opt } } dump_any = - (opt->got_dump_device_desc || + (opt->got_dump_all_desc || + opt->got_dump_device_desc || opt->got_dump_curr_config || opt->got_dump_all_config || opt->got_dump_info); @@ -508,6 +513,10 @@ flush_command(struct libusb20_backend *pbe, struct opt } else if (opt->got_dump_curr_config) { printf("\n"); dump_config(pdev, 0); + } else if (opt->got_dump_all_desc) { + printf("\n"); + dump_device_desc(pdev); + dump_config(pdev, 1); } if (dump_any) { printf("\n"); @@ -694,6 +703,12 @@ main(int argc, char **argv) if (opt->got_get_template) duplicate_option(argv[n]); opt->got_get_template = 1; + opt->got_any++; + break; + case T_DUMP_ALL_DESC: + if (opt->got_dump_all_desc) + duplicate_option(argv[n]); + opt->got_dump_all_desc = 1; opt->got_any++; break; case T_DUMP_DEVICE_DESC: From owner-svn-src-all@freebsd.org Mon Apr 16 15:52:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71E18F8DE6B; Mon, 16 Apr 2018 15:52:53 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BAA9689A6; Mon, 16 Apr 2018 15:52:53 +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 16A491F74C; Mon, 16 Apr 2018 15:52:53 +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 w3GFqqlW082566; Mon, 16 Apr 2018 15:52:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFqq7M082565; Mon, 16 Apr 2018 15:52:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161552.w3GFqq7M082565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:52:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332582 - stable/11/tools/tools/fetchbench X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/tools/tools/fetchbench X-SVN-Commit-Revision: 332582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:52:53 -0000 Author: trasz Date: Mon Apr 16 15:52:52 2018 New Revision: 332582 URL: https://svnweb.freebsd.org/changeset/base/332582 Log: MFC r325312: Add fetchbench, a trivial HTTP benchmark based on fetch(1). Added: stable/11/tools/tools/fetchbench/ - copied from r325312, head/tools/tools/fetchbench/ Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Mon Apr 16 15:53:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2D8CF8DF9C; Mon, 16 Apr 2018 15:53:44 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82F9C68AFA; Mon, 16 Apr 2018 15:53:44 +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 7DF3A1F751; Mon, 16 Apr 2018 15:53:44 +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 w3GFrihq082653; Mon, 16 Apr 2018 15:53:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFriOC082652; Mon, 16 Apr 2018 15:53:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161553.w3GFriOC082652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332583 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.sbin/ctld X-SVN-Commit-Revision: 332583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:53:45 -0000 Author: trasz Date: Mon Apr 16 15:53:44 2018 New Revision: 332583 URL: https://svnweb.freebsd.org/changeset/base/332583 Log: MFC r325390: Use proper naming in a debug message. Modified: stable/11/usr.sbin/ctld/login.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/login.c ============================================================================== --- stable/11/usr.sbin/ctld/login.c Mon Apr 16 15:52:52 2018 (r332582) +++ stable/11/usr.sbin/ctld/login.c Mon Apr 16 15:53:44 2018 (r332583) @@ -437,7 +437,7 @@ login_chap(struct connection *conn, struct auth_group * Yay, authentication succeeded! */ log_debugx("authentication succeeded for user \"%s\"; " - "transitioning to Negotiation Phase", auth->a_user); + "transitioning to operational parameter negotiation", auth->a_user); login_send_chap_success(request, auth); pdu_delete(request); From owner-svn-src-all@freebsd.org Mon Apr 16 15:54:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CF40F8E08E; Mon, 16 Apr 2018 15:54:39 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E5A068C65; Mon, 16 Apr 2018 15:54:39 +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 494641F753; Mon, 16 Apr 2018 15:54:39 +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 w3GFsdZQ082743; Mon, 16 Apr 2018 15:54:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFscB9082740; Mon, 16 Apr 2018 15:54:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161554.w3GFscB9082740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:54:38 +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: r332584 - stable/11/etc/rc.d X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/etc/rc.d X-SVN-Commit-Revision: 332584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:54:39 -0000 Author: trasz Date: Mon Apr 16 15:54:38 2018 New Revision: 332584 URL: https://svnweb.freebsd.org/changeset/base/332584 Log: MFC r325400: Make autofs(5) rc scripts run earlier, matching those for amd(8). This helps when you have some daemons that need to access automounted shares. PR: 221011 Modified: stable/11/etc/rc.d/automount stable/11/etc/rc.d/automountd stable/11/etc/rc.d/autounmountd Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.d/automount ============================================================================== --- stable/11/etc/rc.d/automount Mon Apr 16 15:53:44 2018 (r332583) +++ stable/11/etc/rc.d/automount Mon Apr 16 15:54:38 2018 (r332584) @@ -5,6 +5,7 @@ # PROVIDE: automount # REQUIRE: nfsclient automountd +# BEFORE: DAEMON # KEYWORD: nojail shutdown . /etc/rc.subr Modified: stable/11/etc/rc.d/automountd ============================================================================== --- stable/11/etc/rc.d/automountd Mon Apr 16 15:53:44 2018 (r332583) +++ stable/11/etc/rc.d/automountd Mon Apr 16 15:54:38 2018 (r332584) @@ -4,7 +4,8 @@ # # PROVIDE: automountd -# REQUIRE: DAEMON +# REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig +# BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr Modified: stable/11/etc/rc.d/autounmountd ============================================================================== --- stable/11/etc/rc.d/autounmountd Mon Apr 16 15:53:44 2018 (r332583) +++ stable/11/etc/rc.d/autounmountd Mon Apr 16 15:54:38 2018 (r332584) @@ -4,7 +4,8 @@ # # PROVIDE: autounmountd -# REQUIRE: DAEMON +# REQUIRE: FILESYSTEMS +# BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-all@freebsd.org Mon Apr 16 15:57:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94C7FF8E482; Mon, 16 Apr 2018 15:57:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3367468F03; Mon, 16 Apr 2018 15:57:19 +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 2E3E01F757; Mon, 16 Apr 2018 15:57:19 +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 w3GFvJTf082945; Mon, 16 Apr 2018 15:57:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFvILp082943; Mon, 16 Apr 2018 15:57:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161557.w3GFvILp082943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332585 - stable/11/etc/autofs X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/etc/autofs X-SVN-Commit-Revision: 332585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:57:20 -0000 Author: trasz Date: Mon Apr 16 15:57:18 2018 New Revision: 332585 URL: https://svnweb.freebsd.org/changeset/base/332585 Log: MFC r325392: Add NIS automounter map, which supports rewriting of self-hosted locations to make them nullfs. PR: 221010 Added: stable/11/etc/autofs/include_nis - copied unchanged from r325392, head/etc/autofs/include_nis Modified: stable/11/etc/autofs/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/Makefile ============================================================================== --- stable/11/etc/autofs/Makefile Mon Apr 16 15:54:38 2018 (r332584) +++ stable/11/etc/autofs/Makefile Mon Apr 16 15:57:18 2018 (r332585) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= include_ldap special_hosts special_media special_noauto special_null +FILES= include_ldap include_nis special_hosts special_media special_noauto special_null NO_OBJ= FILESDIR= /etc/autofs Copied: stable/11/etc/autofs/include_nis (from r325392, head/etc/autofs/include_nis) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/etc/autofs/include_nis Mon Apr 16 15:57:18 2018 (r332585, copy of r325392, head/etc/autofs/include_nis) @@ -0,0 +1,180 @@ +#!/usr/bin/awk -f +#- +# Copyright (c) 2017 G. Paul Ziemba +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# /etc/autofs/include_nis +# +# automountd Directory Services script for NIS +# +# SYNOPSIS +# include_nis +# +# include_nis +# +# DESCRIPTION +# +# This script provides a Directory Services map for automountd +# based on NIS. Please see auto_master(5) for general information. +# +# The first form, with one argument, emits the entire named NIS map. +# The second form, with two arguments, emits the map entry for the +# key given in the second argument. +# +# This script attempts to determine the names and IP addresses +# of the local host. Map entries matching the local host are +# rewritten to specify nullfs mounts (instead of the default +# NFS) to reduce access overhead in the kernel. +# +# If a map entry contains multiple location fields, it is not changed. +# + + +# Populate list of names and IP addrs thet mean "this host" +# into myhostnames array +BEGIN { + # + # Set self hostnames + # + + "hostname -s" | getline; + myhostnames[$0] = 1; + + "hostname -f" | getline; + myhostnames[$0] = 1; + + myhostnames["localhost"] = 1 + + "hostname -f" | getline; + localdomain=$0 + myhostnames["localhost."localdomain] = 1 + + while ("ifconfig" | getline) { + if ($1 == "inet") { + myhostnames[$2] = 1; + } + } + + # debug +# print "--- hostname list start ----" +# for (i in myhostnames) { +# print i +# } +# print "--- hostname list end ----" + + if (ARGC == 2) { + # mapname only + while ("ypcat -k " ARGV[1] | getline) { + proc_mapline(1) + } + } + if (ARGC == 3) { + # mapname and keyname + while ("ypmatch " ARGV[2] " " ARGV[1] | getline) { + proc_mapline(0) + } + } + exit 0 +} + +function is_self(hostname) +{ + if (myhostnames[hostname]) { + return 1 + } + return 0 +} + +# +# Lines are of the form [key] [-opts] location1 [... locationN] +# +# indicate index of key field with first positional parameter +# 1 means keyfield is the first field +# 0 means keyfield is not present +# +function proc_mapline(keyfield) +{ + optionsfield = 0 + locationfield = 0 + locationcount = 0 + + for (i=keyfield+1; i <= NF; ++i) { + if (!optionsfield) { + if ($i ~ /^-/) { + # the first options field found on the line + optionsfield = i; + continue + } + } + # Assumption: location contains colon (":") + if (optionsfield && ($i ~ /:/) && ($i !~ /^-/)) { + ++locationcount + if (!locationfield) { + # the first location field found on the line + locationfield = i + } + } + } + + # + # If location not found, do not modify. + # + # If there is more than one location, do not modify. Rationale: + # Options are applied to all locations. We ca not have "nullfs" + # for only some locations and "nfs" for others for a given + # map key (i.e., a line). The usual reason for multiple + # locations is for redundancy using replicated volumes on + # multiple hosts, so multiple hosts imply fstype=nfs (the + # FreeBSD default for automounter maps). + # + # Hypothetically there could be a map entry with multiple + # locations all with host parts matching "me". In that case, + # it would be safe to rewrite the locations and specify + # nullfs, but the code does not handle this case. + # + if (locationcount == 1) { + # + # We have a line with exactly one location field + # + # Assumption: location has no more than one colon (":") + # + n=split($locationfield,location,":") + if (is_self(location[1])) { + $locationfield = ":" location[2] + if (optionsfield) { + # append to existing options + $optionsfield = $optionsfield ",fstype=nullfs" + } else { + # sneak in ahead of location + $locationfield = "-fstype=nullfs " $locationfield + } + } + } + + print +} From owner-svn-src-all@freebsd.org Mon Apr 16 15:58:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 028AAF8E5D3; Mon, 16 Apr 2018 15:58:03 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9D7069060; Mon, 16 Apr 2018 15:58:02 +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 A451D1F75D; Mon, 16 Apr 2018 15:58:02 +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 w3GFw2Lk083038; Mon, 16 Apr 2018 15:58:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFw2DM083037; Mon, 16 Apr 2018 15:58:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161558.w3GFw2DM083037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332586 - stable/11/etc/autofs X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/etc/autofs X-SVN-Commit-Revision: 332586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:58:03 -0000 Author: trasz Date: Mon Apr 16 15:58:02 2018 New Revision: 332586 URL: https://svnweb.freebsd.org/changeset/base/332586 Log: MFC r326250: Change formatting; no functional changes. Modified: stable/11/etc/autofs/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/Makefile ============================================================================== --- stable/11/etc/autofs/Makefile Mon Apr 16 15:57:18 2018 (r332585) +++ stable/11/etc/autofs/Makefile Mon Apr 16 15:58:02 2018 (r332586) @@ -1,6 +1,11 @@ # $FreeBSD$ -FILES= include_ldap include_nis special_hosts special_media special_noauto special_null +FILES= include_ldap \ + include_nis \ + special_hosts \ + special_media \ + special_noauto \ + special_null NO_OBJ= FILESDIR= /etc/autofs From owner-svn-src-all@freebsd.org Mon Apr 16 15:58:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 768C1F8E734; Mon, 16 Apr 2018 15:58:54 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 197A4691E4; Mon, 16 Apr 2018 15:58:54 +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 1463D1F75E; Mon, 16 Apr 2018 15:58:54 +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 w3GFwr57083118; Mon, 16 Apr 2018 15:58:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFwrTh083116; Mon, 16 Apr 2018 15:58:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161558.w3GFwrTh083116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:58: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: r332587 - stable/11/etc/autofs X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/etc/autofs X-SVN-Commit-Revision: 332587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:58:54 -0000 Author: trasz Date: Mon Apr 16 15:58:53 2018 New Revision: 332587 URL: https://svnweb.freebsd.org/changeset/base/332587 Log: MFC r326251: Rename /etc/autofs/include_nis to /etc/autofs/include_nis_nullfs, to indicate that this script provides nullfs map rewriting for local mounts. Added: stable/11/etc/autofs/include_nis_nullfs - copied unchanged from r326251, head/etc/autofs/include_nis_nullfs Deleted: stable/11/etc/autofs/include_nis Modified: stable/11/etc/autofs/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/Makefile ============================================================================== --- stable/11/etc/autofs/Makefile Mon Apr 16 15:58:02 2018 (r332586) +++ stable/11/etc/autofs/Makefile Mon Apr 16 15:58:53 2018 (r332587) @@ -1,7 +1,7 @@ # $FreeBSD$ FILES= include_ldap \ - include_nis \ + include_nis_nullfs \ special_hosts \ special_media \ special_noauto \ Copied: stable/11/etc/autofs/include_nis_nullfs (from r326251, head/etc/autofs/include_nis_nullfs) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/etc/autofs/include_nis_nullfs Mon Apr 16 15:58:53 2018 (r332587, copy of r326251, head/etc/autofs/include_nis_nullfs) @@ -0,0 +1,180 @@ +#!/usr/bin/awk -f +#- +# Copyright (c) 2017 G. Paul Ziemba +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# /etc/autofs/include_nis_nullfs +# +# automountd Directory Services script for NIS +# +# SYNOPSIS +# include_nis_nullfs +# +# include_nis_nullfs +# +# DESCRIPTION +# +# This script provides a Directory Services map for automountd +# based on NIS. Please see auto_master(5) for general information. +# +# The first form, with one argument, emits the entire named NIS map. +# The second form, with two arguments, emits the map entry for the +# key given in the second argument. +# +# This script attempts to determine the names and IP addresses +# of the local host. Map entries matching the local host are +# rewritten to specify nullfs mounts (instead of the default +# NFS) to reduce access overhead in the kernel. +# +# If a map entry contains multiple location fields, it is not changed. +# + + +# Populate list of names and IP addrs thet mean "this host" +# into myhostnames array +BEGIN { + # + # Set self hostnames + # + + "hostname -s" | getline; + myhostnames[$0] = 1; + + "hostname -f" | getline; + myhostnames[$0] = 1; + + myhostnames["localhost"] = 1 + + "hostname -f" | getline; + localdomain=$0 + myhostnames["localhost."localdomain] = 1 + + while ("ifconfig" | getline) { + if ($1 == "inet") { + myhostnames[$2] = 1; + } + } + + # debug +# print "--- hostname list start ----" +# for (i in myhostnames) { +# print i +# } +# print "--- hostname list end ----" + + if (ARGC == 2) { + # mapname only + while ("ypcat -k " ARGV[1] | getline) { + proc_mapline(1) + } + } + if (ARGC == 3) { + # mapname and keyname + while ("ypmatch " ARGV[2] " " ARGV[1] | getline) { + proc_mapline(0) + } + } + exit 0 +} + +function is_self(hostname) +{ + if (myhostnames[hostname]) { + return 1 + } + return 0 +} + +# +# Lines are of the form [key] [-opts] location1 [... locationN] +# +# indicate index of key field with first positional parameter +# 1 means keyfield is the first field +# 0 means keyfield is not present +# +function proc_mapline(keyfield) +{ + optionsfield = 0 + locationfield = 0 + locationcount = 0 + + for (i=keyfield+1; i <= NF; ++i) { + if (!optionsfield) { + if ($i ~ /^-/) { + # the first options field found on the line + optionsfield = i; + continue + } + } + # Assumption: location contains colon (":") + if (optionsfield && ($i ~ /:/) && ($i !~ /^-/)) { + ++locationcount + if (!locationfield) { + # the first location field found on the line + locationfield = i + } + } + } + + # + # If location not found, do not modify. + # + # If there is more than one location, do not modify. Rationale: + # Options are applied to all locations. We ca not have "nullfs" + # for only some locations and "nfs" for others for a given + # map key (i.e., a line). The usual reason for multiple + # locations is for redundancy using replicated volumes on + # multiple hosts, so multiple hosts imply fstype=nfs (the + # FreeBSD default for automounter maps). + # + # Hypothetically there could be a map entry with multiple + # locations all with host parts matching "me". In that case, + # it would be safe to rewrite the locations and specify + # nullfs, but the code does not handle this case. + # + if (locationcount == 1) { + # + # We have a line with exactly one location field + # + # Assumption: location has no more than one colon (":") + # + n=split($locationfield,location,":") + if (is_self(location[1])) { + $locationfield = ":" location[2] + if (optionsfield) { + # append to existing options + $optionsfield = $optionsfield ",fstype=nullfs" + } else { + # sneak in ahead of location + $locationfield = "-fstype=nullfs " $locationfield + } + } + } + + print +} From owner-svn-src-all@freebsd.org Mon Apr 16 15:59:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0885F8E868; Mon, 16 Apr 2018 15:59:51 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9622369351; Mon, 16 Apr 2018 15:59:51 +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 912201F75F; Mon, 16 Apr 2018 15:59:51 +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 w3GFxpFK083211; Mon, 16 Apr 2018 15:59:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GFxpRB083209; Mon, 16 Apr 2018 15:59:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161559.w3GFxpRB083209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 15:59: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: r332588 - stable/11/etc/autofs X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/etc/autofs X-SVN-Commit-Revision: 332588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 15:59:52 -0000 Author: trasz Date: Mon Apr 16 15:59:51 2018 New Revision: 332588 URL: https://svnweb.freebsd.org/changeset/base/332588 Log: MFC r326252: Add /etc/autofs/include_nis, a non-rewriting NIS map. Added: stable/11/etc/autofs/include_nis - copied unchanged from r326252, head/etc/autofs/include_nis Modified: stable/11/etc/autofs/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/Makefile ============================================================================== --- stable/11/etc/autofs/Makefile Mon Apr 16 15:58:53 2018 (r332587) +++ stable/11/etc/autofs/Makefile Mon Apr 16 15:59:51 2018 (r332588) @@ -1,6 +1,7 @@ # $FreeBSD$ FILES= include_ldap \ + include_nis \ include_nis_nullfs \ special_hosts \ special_media \ Copied: stable/11/etc/autofs/include_nis (from r326252, head/etc/autofs/include_nis) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/etc/autofs/include_nis Mon Apr 16 15:59:51 2018 (r332588, copy of r326252, head/etc/autofs/include_nis) @@ -0,0 +1,14 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ -n "$2" ]; then + ypmatch $2 $1 + exit 0 +fi + +if [ -n "$1" ]; then + ypcat -k $1 + exit 0 +fi From owner-svn-src-all@freebsd.org Mon Apr 16 16:01:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2956F8EAE0; Mon, 16 Apr 2018 16:01:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9055169A50; Mon, 16 Apr 2018 16:01:06 +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 8B4F21F78F; Mon, 16 Apr 2018 16:01:06 +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 w3GG16DH084067; Mon, 16 Apr 2018 16:01:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GG16ag084066; Mon, 16 Apr 2018 16:01:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161601.w3GG16ag084066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:01: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: r332589 - stable/11/etc/autofs X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/etc/autofs X-SVN-Commit-Revision: 332589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:01:07 -0000 Author: trasz Date: Mon Apr 16 16:01:06 2018 New Revision: 332589 URL: https://svnweb.freebsd.org/changeset/base/332589 Log: MFC r329312 by eadler@: etc: clean up trailing whitespace in autofs Modified: stable/11/etc/autofs/special_media Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/special_media ============================================================================== --- stable/11/etc/autofs/special_media Mon Apr 16 15:59:51 2018 (r332588) +++ stable/11/etc/autofs/special_media Mon Apr 16 16:01:06 2018 (r332589) @@ -41,7 +41,7 @@ print_map_entry() { case "${_fstype}" in "exfat") if [ -f "/usr/local/sbin/mount.exfat" ]; then - echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid :/dev/${_p}" + echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid :/dev/${_p}" else /usr/bin/logger -p info -t "special_media[$$]" \ "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-exfat first" @@ -50,7 +50,7 @@ print_map_entry() { ;; "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then - echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" + echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" else /usr/bin/logger -p info -t "special_media[$$]" \ "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" @@ -58,10 +58,10 @@ print_map_entry() { fi ;; "ext2fs" | "msdosfs") - echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" ;; *) - echo "-fstype=${_fstype},nosuid :/dev/${_p}" + echo "-fstype=${_fstype},nosuid :/dev/${_p}" ;; esac } From owner-svn-src-all@freebsd.org Mon Apr 16 16:02:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69429F8ED75; Mon, 16 Apr 2018 16:02:10 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17A7C6A236; Mon, 16 Apr 2018 16:02:10 +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 10CB31F8CA; Mon, 16 Apr 2018 16:02:10 +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 w3GG297A088026; Mon, 16 Apr 2018 16:02:09 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GG29PW088025; Mon, 16 Apr 2018 16:02:09 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201804161602.w3GG29PW088025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 16 Apr 2018 16:02: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: r332590 - stable/11/etc/rc.d X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/etc/rc.d X-SVN-Commit-Revision: 332590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:02:10 -0000 Author: kp Date: Mon Apr 16 16:02:09 2018 New Revision: 332590 URL: https://svnweb.freebsd.org/changeset/base/332590 Log: MFC r331546: pf: reload and resync do the same thing The reload and resync commands for the startup script do exactly the same thing, so implement one as a call to the other. Modified: stable/11/etc/rc.d/pf Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.d/pf ============================================================================== --- stable/11/etc/rc.d/pf Mon Apr 16 16:01:06 2018 (r332589) +++ stable/11/etc/rc.d/pf Mon Apr 16 16:02:09 2018 (r332590) @@ -53,12 +53,12 @@ pf_check() pf_reload() { echo "Reloading pf rules." - $pf_program -n -f "$pf_rules" $pf_flags || return 1 - $pf_program -f "$pf_rules" $pf_flags + pf_resync } pf_resync() { + $pf_program -n -f "$pf_rules" $pf_flags || return 1 $pf_program -f "$pf_rules" $pf_flags } From owner-svn-src-all@freebsd.org Mon Apr 16 16:02:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88E0AF8EE71; Mon, 16 Apr 2018 16:02: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 358B86A8BC; Mon, 16 Apr 2018 16:02: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 2F90B1F8E8; Mon, 16 Apr 2018 16:02: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 w3GG2s6W088101; Mon, 16 Apr 2018 16:02:54 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GG2sNI088100; Mon, 16 Apr 2018 16:02:54 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201804161602.w3GG2sNI088100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 16 Apr 2018 16:02:54 +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: r332591 - stable/10/etc/rc.d X-SVN-Group: stable-10 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/10/etc/rc.d X-SVN-Commit-Revision: 332591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:02:55 -0000 Author: kp Date: Mon Apr 16 16:02:54 2018 New Revision: 332591 URL: https://svnweb.freebsd.org/changeset/base/332591 Log: MFC r331546: pf: reload and resync do the same thing The reload and resync commands for the startup script do exactly the same thing, so implement one as a call to the other. Modified: stable/10/etc/rc.d/pf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/pf ============================================================================== --- stable/10/etc/rc.d/pf Mon Apr 16 16:02:09 2018 (r332590) +++ stable/10/etc/rc.d/pf Mon Apr 16 16:02:54 2018 (r332591) @@ -52,12 +52,12 @@ pf_check() pf_reload() { echo "Reloading pf rules." - $pf_program -n -f "$pf_rules" $pf_flags || return 1 - $pf_program -f "$pf_rules" $pf_flags + pf_resync } pf_resync() { + $pf_program -n -f "$pf_rules" $pf_flags || return 1 $pf_program -f "$pf_rules" $pf_flags } From owner-svn-src-all@freebsd.org Mon Apr 16 16:06:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B19AAF8F20D; Mon, 16 Apr 2018 16:06:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C9286C5C0; Mon, 16 Apr 2018 16:06:27 +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 575D91F8EC; Mon, 16 Apr 2018 16:06:27 +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 w3GG6RLd088268; Mon, 16 Apr 2018 16:06:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GG6R5V088267; Mon, 16 Apr 2018 16:06:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161606.w3GG6R5V088267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:06: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: r332592 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 332592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:06:27 -0000 Author: trasz Date: Mon Apr 16 16:06:27 2018 New Revision: 332592 URL: https://svnweb.freebsd.org/changeset/base/332592 Log: MFC r325403: Add missing MLINKS for disk_add_alias(9). Modified: stable/11/share/man/man9/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Mon Apr 16 16:02:54 2018 (r332591) +++ stable/11/share/man/man9/Makefile Mon Apr 16 16:06:27 2018 (r332592) @@ -722,7 +722,8 @@ MLINKS+=devstat.9 devicestat.9 \ devstat.9 devstat_end_transaction.9 \ devstat.9 devstat_remove_entry.9 \ devstat.9 devstat_start_transaction.9 -MLINKS+=disk.9 disk_alloc.9 \ +MLINKS+=disk.9 disk_add_alias.9 \ + disk.9 disk_alloc.9 \ disk.9 disk_create.9 \ disk.9 disk_destroy.9 \ disk.9 disk_gone.9 \ From owner-svn-src-all@freebsd.org Mon Apr 16 16:10:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2E44F8F687; Mon, 16 Apr 2018 16:10: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FE426CA43; Mon, 16 Apr 2018 16:10: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 75F891F8F0; Mon, 16 Apr 2018 16:10: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 w3GGAGqc088492; Mon, 16 Apr 2018 16:10:16 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGAGVF088490; Mon, 16 Apr 2018 16:10:16 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161610.w3GGAGVF088490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:10: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: r332593 - in stable/11: usr.bin/gprof usr.sbin/kgmon X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/11: usr.bin/gprof usr.sbin/kgmon X-SVN-Commit-Revision: 332593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:10:17 -0000 Author: trasz Date: Mon Apr 16 16:10:16 2018 New Revision: 332593 URL: https://svnweb.freebsd.org/changeset/base/332593 Log: MFC r326248: .Xr pmcstat(8) from kgmon(8) and gprof(1). Modified: stable/11/usr.bin/gprof/gprof.1 stable/11/usr.sbin/kgmon/kgmon.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/gprof/gprof.1 ============================================================================== --- stable/11/usr.bin/gprof/gprof.1 Mon Apr 16 16:06:27 2018 (r332592) +++ stable/11/usr.bin/gprof/gprof.1 Mon Apr 16 16:10:16 2018 (r332593) @@ -28,7 +28,7 @@ .\" @(#)gprof.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 25, 2008 +.Dd November 27, 2017 .Dt GPROF 1 .Os .Sh NAME @@ -272,7 +272,8 @@ Summarized dynamic call graph and profile. .Sh SEE ALSO .Xr cc 1 , .Xr profil 2 , -.Xr clocks 7 +.Xr clocks 7 , +.Xr pmcstat 8 .\" .Xr monitor 3 , .\" .Xr prof 1 .Rs Modified: stable/11/usr.sbin/kgmon/kgmon.8 ============================================================================== --- stable/11/usr.sbin/kgmon/kgmon.8 Mon Apr 16 16:06:27 2018 (r332592) +++ stable/11/usr.sbin/kgmon/kgmon.8 Mon Apr 16 16:10:16 2018 (r332593) @@ -28,7 +28,7 @@ .\" @(#)kgmon.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd November 27, 2017 .Dt KGMON 8 .Os .Sh NAME @@ -121,7 +121,8 @@ file with the warning that the data may be inconsistent if profiling is in progress. .Sh SEE ALSO .Xr gprof 1 , -.Xr config 8 +.Xr config 8 , +.Xr pmcstat 8 .Sh HISTORY The .Nm From owner-svn-src-all@freebsd.org Mon Apr 16 16:12:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F2D1F8FAE5; Mon, 16 Apr 2018 16:12:31 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBB026CFBE; Mon, 16 Apr 2018 16:12:30 +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 D6C101FA73; Mon, 16 Apr 2018 16:12:30 +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 w3GGCUXb093227; Mon, 16 Apr 2018 16:12:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGCUCq093225; Mon, 16 Apr 2018 16:12:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161612.w3GGCUCq093225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:12: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: r332594 - stable/11/bin/ps X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/bin/ps X-SVN-Commit-Revision: 332594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:12:31 -0000 Author: trasz Date: Mon Apr 16 16:12:30 2018 New Revision: 332594 URL: https://svnweb.freebsd.org/changeset/base/332594 Log: MFC r326430: Add "vmaddr" ps(1) keyword. Modified: stable/11/bin/ps/keyword.c stable/11/bin/ps/ps.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ps/keyword.c ============================================================================== --- stable/11/bin/ps/keyword.c Mon Apr 16 16:10:16 2018 (r332593) +++ stable/11/bin/ps/keyword.c Mon Apr 16 16:12:30 2018 (r332594) @@ -225,6 +225,8 @@ static VAR var[] = { {"usertime", "USERTIME", NULL, "user-time", USER, usertime, 0, CHAR, NULL, 0}, {"usrpri", "", "upr", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"vmaddr", "VMADDR", NULL, "vmspace-address", 0, kvar, KOFF(ki_vmspace), + KPTR, "lx", 0}, {"vsize", "", "vsz", NULL, 0, NULL, 0, CHAR, NULL, 0}, {"vsz", "VSZ", NULL, "virtual-size", 0, vsize, 0, CHAR, NULL, 0}, {"wchan", "WCHAN", NULL, "wait-channel", LJUST, wchan, 0, CHAR, NULL, Modified: stable/11/bin/ps/ps.1 ============================================================================== --- stable/11/bin/ps/ps.1 Mon Apr 16 16:10:16 2018 (r332593) +++ stable/11/bin/ps/ps.1 Mon Apr 16 16:12:30 2018 (r332594) @@ -708,6 +708,8 @@ process pointer user name (from UID) .It Cm usertime accumulated user CPU time +.It Cm vmaddr +vmspace pointer .It Cm vsz virtual size in Kbytes (alias .Cm vsize ) From owner-svn-src-all@freebsd.org Mon Apr 16 16:14:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9208FF8FCCE; Mon, 16 Apr 2018 16:14:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 428E46D1C0; Mon, 16 Apr 2018 16:14:06 +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 3D7E01FA77; Mon, 16 Apr 2018 16:14:06 +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 w3GGE6EK093333; Mon, 16 Apr 2018 16:14:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGE570093329; Mon, 16 Apr 2018 16:14:05 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161614.w3GGE570093329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:14:05 +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: r332595 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.sbin/ctld X-SVN-Commit-Revision: 332595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:14:06 -0000 Author: trasz Date: Mon Apr 16 16:14:05 2018 New Revision: 332595 URL: https://svnweb.freebsd.org/changeset/base/332595 Log: MFC r328337: Add missing SPDX tags for ctld(8). Modified: stable/11/usr.sbin/ctld/chap.c stable/11/usr.sbin/ctld/isns.c stable/11/usr.sbin/ctld/uclparse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/chap.c ============================================================================== --- stable/11/usr.sbin/ctld/chap.c Mon Apr 16 16:12:30 2018 (r332594) +++ stable/11/usr.sbin/ctld/chap.c Mon Apr 16 16:14:05 2018 (r332595) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/ctld/isns.c ============================================================================== --- stable/11/usr.sbin/ctld/isns.c Mon Apr 16 16:12:30 2018 (r332594) +++ stable/11/usr.sbin/ctld/isns.c Mon Apr 16 16:14:05 2018 (r332595) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 Alexander Motin * All rights reserved. * Modified: stable/11/usr.sbin/ctld/uclparse.c ============================================================================== --- stable/11/usr.sbin/ctld/uclparse.c Mon Apr 16 16:12:30 2018 (r332594) +++ stable/11/usr.sbin/ctld/uclparse.c Mon Apr 16 16:14:05 2018 (r332595) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2015 iXsystems Inc. * All rights reserved. * From owner-svn-src-all@freebsd.org Mon Apr 16 16:15:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7359DF8FE80; Mon, 16 Apr 2018 16:15:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 207FB6D5C9; Mon, 16 Apr 2018 16:15:32 +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 1A11B1FA79; Mon, 16 Apr 2018 16:15:32 +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 w3GGFVAq093604; Mon, 16 Apr 2018 16:15:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGFVmn093599; Mon, 16 Apr 2018 16:15:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161615.w3GGFVmn093599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332596 - stable/11/sys/fs/autofs X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/fs/autofs X-SVN-Commit-Revision: 332596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:15:32 -0000 Author: trasz Date: Mon Apr 16 16:15:31 2018 New Revision: 332596 URL: https://svnweb.freebsd.org/changeset/base/332596 Log: MFC r328339: Add SPDX tags to autofs(5). Modified: stable/11/sys/fs/autofs/autofs.h stable/11/sys/fs/autofs/autofs_ioctl.h stable/11/sys/fs/autofs/autofs_vfsops.c stable/11/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/autofs/autofs.h ============================================================================== --- stable/11/sys/fs/autofs/autofs.h Mon Apr 16 16:14:05 2018 (r332595) +++ stable/11/sys/fs/autofs/autofs.h Mon Apr 16 16:15:31 2018 (r332596) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sys/fs/autofs/autofs_ioctl.h ============================================================================== --- stable/11/sys/fs/autofs/autofs_ioctl.h Mon Apr 16 16:14:05 2018 (r332595) +++ stable/11/sys/fs/autofs/autofs_ioctl.h Mon Apr 16 16:15:31 2018 (r332596) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- stable/11/sys/fs/autofs/autofs_vfsops.c Mon Apr 16 16:14:05 2018 (r332595) +++ stable/11/sys/fs/autofs/autofs_vfsops.c Mon Apr 16 16:15:31 2018 (r332596) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/11/sys/fs/autofs/autofs_vnops.c Mon Apr 16 16:14:05 2018 (r332595) +++ stable/11/sys/fs/autofs/autofs_vnops.c Mon Apr 16 16:15:31 2018 (r332596) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@freebsd.org Mon Apr 16 16:16:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FD15F8FF95; Mon, 16 Apr 2018 16:16:26 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F20EF6DE90; Mon, 16 Apr 2018 16:16:25 +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 EC4611FA7A; Mon, 16 Apr 2018 16:16:25 +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 w3GGGPjE093705; Mon, 16 Apr 2018 16:16:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGGOKB093695; Mon, 16 Apr 2018 16:16:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161616.w3GGGOKB093695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:16: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: r332597 - stable/11/usr.sbin/autofs X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.sbin/autofs X-SVN-Commit-Revision: 332597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:16:26 -0000 Author: trasz Date: Mon Apr 16 16:16:24 2018 New Revision: 332597 URL: https://svnweb.freebsd.org/changeset/base/332597 Log: MFC r328338: Add SPDX tags for automount(8) et al. Modified: stable/11/usr.sbin/autofs/automount.c stable/11/usr.sbin/autofs/automountd.c stable/11/usr.sbin/autofs/autounmountd.c stable/11/usr.sbin/autofs/common.c stable/11/usr.sbin/autofs/common.h stable/11/usr.sbin/autofs/defined.c stable/11/usr.sbin/autofs/log.c stable/11/usr.sbin/autofs/popen.c stable/11/usr.sbin/autofs/token.l Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/autofs/automount.c ============================================================================== --- stable/11/usr.sbin/autofs/automount.c Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/automount.c Mon Apr 16 16:16:24 2018 (r332597) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/autofs/automountd.c ============================================================================== --- stable/11/usr.sbin/autofs/automountd.c Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/automountd.c Mon Apr 16 16:16:24 2018 (r332597) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/autofs/autounmountd.c ============================================================================== --- stable/11/usr.sbin/autofs/autounmountd.c Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/autounmountd.c Mon Apr 16 16:16:24 2018 (r332597) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/autofs/common.c ============================================================================== --- stable/11/usr.sbin/autofs/common.c Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/common.c Mon Apr 16 16:16:24 2018 (r332597) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/autofs/common.h ============================================================================== --- stable/11/usr.sbin/autofs/common.h Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/common.h Mon Apr 16 16:16:24 2018 (r332597) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/autofs/defined.c ============================================================================== --- stable/11/usr.sbin/autofs/defined.c Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/defined.c Mon Apr 16 16:16:24 2018 (r332597) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/autofs/log.c ============================================================================== --- stable/11/usr.sbin/autofs/log.c Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/log.c Mon Apr 16 16:16:24 2018 (r332597) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/autofs/popen.c ============================================================================== --- stable/11/usr.sbin/autofs/popen.c Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/popen.c Mon Apr 16 16:16:24 2018 (r332597) @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * Copyright (c) 2014 The FreeBSD Foundation Modified: stable/11/usr.sbin/autofs/token.l ============================================================================== --- stable/11/usr.sbin/autofs/token.l Mon Apr 16 16:15:31 2018 (r332596) +++ stable/11/usr.sbin/autofs/token.l Mon Apr 16 16:16:24 2018 (r332597) @@ -1,5 +1,7 @@ %{ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@freebsd.org Mon Apr 16 16:19:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C771F90219; Mon, 16 Apr 2018 16:19:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1D8E6FB0B; Mon, 16 Apr 2018 16:19:31 +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 DC8D71FA8C; Mon, 16 Apr 2018 16:19:31 +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 w3GGJVLt093870; Mon, 16 Apr 2018 16:19:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGJVhg093869; Mon, 16 Apr 2018 16:19:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161619.w3GGJVhg093869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332598 - stable/11/sys/dev/usb X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/usb X-SVN-Commit-Revision: 332598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:19:32 -0000 Author: trasz Date: Mon Apr 16 16:19:31 2018 New Revision: 332598 URL: https://svnweb.freebsd.org/changeset/base/332598 Log: MFC r328589: Make the handler routine for the hw.usb.template sysctl trigger the USB host to reprobe the bus by switching the USB pull up resistors off and back on. In other words - when FreeBSD is configured as a USB device, changing the sysctl will be immediately noticed by the machine it's connected to. Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/usb/usb_device.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/usb_device.c ============================================================================== --- stable/11/sys/dev/usb/usb_device.c Mon Apr 16 16:16:24 2018 (r332597) +++ stable/11/sys/dev/usb/usb_device.c Mon Apr 16 16:19:31 2018 (r332598) @@ -85,6 +85,7 @@ /* function prototypes */ +static int sysctl_hw_usb_template(SYSCTL_HANDLER_ARGS); static void usb_init_endpoint(struct usb_device *, uint8_t, struct usb_endpoint_descriptor *, struct usb_endpoint_ss_comp_descriptor *, @@ -118,8 +119,137 @@ int usb_template = USB_TEMPLATE; int usb_template; #endif -SYSCTL_INT(_hw_usb, OID_AUTO, template, CTLFLAG_RWTUN, - &usb_template, 0, "Selected USB device side template"); +SYSCTL_PROC(_hw_usb, OID_AUTO, template, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + NULL, 0, sysctl_hw_usb_template, + "I", "Selected USB device side template"); + +/*------------------------------------------------------------------------* + * usb_trigger_reprobe_on_off + * + * This function sets the pull up resistors for all ports currently + * operating in device mode either on (when on_not_off is 1), or off + * (when it's 0). + *------------------------------------------------------------------------*/ +static void +usb_trigger_reprobe_on_off(int on_not_off) +{ + struct usb_port_status ps; + struct usb_bus *bus; + struct usb_device *udev; + usb_error_t err; + int do_unlock, max; + + max = devclass_get_maxunit(usb_devclass_ptr); + while (max >= 0) { + mtx_lock(&usb_ref_lock); + bus = devclass_get_softc(usb_devclass_ptr, max); + max--; + + if (bus == NULL || bus->devices == NULL || + bus->devices[USB_ROOT_HUB_ADDR] == NULL) { + mtx_unlock(&usb_ref_lock); + continue; + } + + udev = bus->devices[USB_ROOT_HUB_ADDR]; + + if (udev->refcount == USB_DEV_REF_MAX) { + mtx_unlock(&usb_ref_lock); + continue; + } + + udev->refcount++; + mtx_unlock(&usb_ref_lock); + + do_unlock = usbd_enum_lock(udev); + if (do_unlock > 1) { + do_unlock = 0; + goto next; + } + + err = usbd_req_get_port_status(udev, NULL, &ps, 1); + if (err != 0) { + DPRINTF("usbd_req_get_port_status() " + "failed: %s\n", usbd_errstr(err)); + goto next; + } + + if ((UGETW(ps.wPortStatus) & UPS_PORT_MODE_DEVICE) == 0) + goto next; + + if (on_not_off) { + err = usbd_req_set_port_feature(udev, NULL, 1, + UHF_PORT_POWER); + if (err != 0) { + DPRINTF("usbd_req_set_port_feature() " + "failed: %s\n", usbd_errstr(err)); + } + } else { + err = usbd_req_clear_port_feature(udev, NULL, 1, + UHF_PORT_POWER); + if (err != 0) { + DPRINTF("usbd_req_clear_port_feature() " + "failed: %s\n", usbd_errstr(err)); + } + } + +next: + mtx_lock(&usb_ref_lock); + if (do_unlock) + usbd_enum_unlock(udev); + if (--(udev->refcount) == 0) + cv_broadcast(&udev->ref_cv); + mtx_unlock(&usb_ref_lock); + } +} + +/*------------------------------------------------------------------------* + * usb_trigger_reprobe_all + * + * This function toggles the pull up resistors for all ports currently + * operating in device mode, causing the host machine to reenumerate them. + *------------------------------------------------------------------------*/ +static void +usb_trigger_reprobe_all(void) +{ + + /* + * Set the pull up resistors off for all ports in device mode. + */ + usb_trigger_reprobe_on_off(0); + + /* + * According to the DWC OTG spec this must be at least 3ms. + */ + usb_pause_mtx(NULL, USB_MS_TO_TICKS(USB_POWER_DOWN_TIME)); + + /* + * Set the pull up resistors back on. + */ + usb_trigger_reprobe_on_off(1); +} + +static int +sysctl_hw_usb_template(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val = usb_template; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL || usb_template == val) + return (error); + + usb_template = val; + + if (usb_template < 0) { + usb_trigger_reprobe_on_off(0); + } else { + usb_trigger_reprobe_all(); + } + + return (0); +} /* English is default language */ From owner-svn-src-all@freebsd.org Mon Apr 16 16:20:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3B6FF9031E; Mon, 16 Apr 2018 16:20:21 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76AF97013E; Mon, 16 Apr 2018 16:20:21 +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 711EE1FA90; Mon, 16 Apr 2018 16:20:21 +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 w3GGKLTn093999; Mon, 16 Apr 2018 16:20:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGKLvF093998; Mon, 16 Apr 2018 16:20:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161620.w3GGKLvF093998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:20: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: r332599 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 332599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:20:22 -0000 Author: trasz Date: Mon Apr 16 16:20:21 2018 New Revision: 332599 URL: https://svnweb.freebsd.org/changeset/base/332599 Log: MFC r328590: Document the new hw.usb.template behaviour. Modified: stable/11/share/man/man4/usb_template.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/usb_template.4 ============================================================================== --- stable/11/share/man/man4/usb_template.4 Mon Apr 16 16:19:31 2018 (r332598) +++ stable/11/share/man/man4/usb_template.4 Mon Apr 16 16:20:21 2018 (r332599) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 8, 2016 +.Dd January 30, 2018 .Dt USB_TEMPLATE 4 .Os . @@ -66,9 +66,11 @@ or by using the .Xr usbconfig 8 .Cm set_template subcommand. -The sysctl values can be changed at any time, but will not -have any effect until the USB device has been re-enumerated. -. +Changing the +.Va hw.usb.template +sysctl triggers reenumeration by the USB host; changes to other sysctls +may not be visible to the host until reenumeration is performed. +.Pp Available templates are: .Bl -column -offset 3n "Value" .It Em Value Ta Em Description @@ -93,6 +95,7 @@ tunables: .Bl -tag -width indent .It Va hw.usb.template Currently selected template. +Set to -1 to make the device disappear from the USB host point of view. .It Va hw.usb.templates.N Configuration for template number .Va N . From owner-svn-src-all@freebsd.org Mon Apr 16 16:20:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F21EF903A6; Mon, 16 Apr 2018 16:20:40 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B56D470299; Mon, 16 Apr 2018 16:20:39 +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 930491FA9A; Mon, 16 Apr 2018 16:20:39 +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 w3GGKd3U094061; Mon, 16 Apr 2018 16:20:39 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGKdUX094059; Mon, 16 Apr 2018 16:20:39 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161620.w3GGKdUX094059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:20: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: r332600 - in stable/11/usr.bin/tail: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11/usr.bin/tail: . tests X-SVN-Commit-Revision: 332600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:20:40 -0000 Author: asomers Date: Mon Apr 16 16:20:39 2018 New Revision: 332600 URL: https://svnweb.freebsd.org/changeset/base/332600 Log: MFC r329606: tail: fix "tail -r" for piped input that begins with '\n' A subtle logic bug, probably introduced in r311895, caused tail to print the first two lines of piped input in forward order, if the very first character was a newline. PR: 222671 Reported by: Jim Long , pprocacci@gmail.com Sponsored by: Spectra Logic Corp Modified: stable/11/usr.bin/tail/reverse.c stable/11/usr.bin/tail/tests/tail_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/tail/reverse.c ============================================================================== --- stable/11/usr.bin/tail/reverse.c Mon Apr 16 16:20:21 2018 (r332599) +++ stable/11/usr.bin/tail/reverse.c Mon Apr 16 16:20:39 2018 (r332600) @@ -255,10 +255,13 @@ r_buf(FILE *fp, const char *fn) if ((*p == '\n') || start) { struct bfelem *tr; - if (start && llen) + if (llen && start && *p != '\n') WR(p, llen + 1); - else if (llen) + else if (llen) { WR(p + 1, llen); + if (start && *p == '\n') + WR(p, 1); + } tr = TAILQ_NEXT(tl, entries); llen = 0; if (tr != NULL) { Modified: stable/11/usr.bin/tail/tests/tail_test.sh ============================================================================== --- stable/11/usr.bin/tail/tests/tail_test.sh Mon Apr 16 16:20:21 2018 (r332599) +++ stable/11/usr.bin/tail/tests/tail_test.sh Mon Apr 16 16:20:39 2018 (r332600) @@ -83,6 +83,27 @@ HERE atf_check cmp expectfile outpipe } +# Regression test for PR 222671 +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222671 +atf_test_case pipe_leading_newline_r +pipe_leading_newline_r_head() +{ + atf_set "descr" "Reverse a pipe whose first character is a newline" +} +pipe_leading_newline_r_body() +{ + cat > expectfile << HERE +3 +2 +1 + +HERE + printf '\n1\n2\n3\n' | tail -r > outfile + printf '\n1\n2\n3\n' | tail -r > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + atf_test_case file_rc28 file_rc28_head() { @@ -105,6 +126,28 @@ HERE atf_check cmp expectfile outpipe } +atf_test_case file_rc28 +file_rc28_head() +{ + atf_set "descr" "Reverse a file and display the last 28 characters" +} +file_rc28_body() +{ + cat > infile < expectfile << HERE +This is the third line +line +HERE + tail -rc28 infile > outfile + tail -rc28 < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + atf_test_case longfile_r longfile_r_head() { @@ -222,6 +265,7 @@ atf_init_test_cases() atf_add_test_case file_r atf_add_test_case file_rc28 atf_add_test_case file_rn2 + atf_add_test_case pipe_leading_newline_r # The longfile tests are designed to exercise behavior in r_buf(), # which operates on 128KB blocks atf_add_test_case longfile_r From owner-svn-src-all@freebsd.org Mon Apr 16 16:22:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24B6EF907D7; Mon, 16 Apr 2018 16:22:01 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDA3D70707; Mon, 16 Apr 2018 16:22:00 +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 C55C41FBF6; Mon, 16 Apr 2018 16:22:00 +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 w3GGM0FJ098848; Mon, 16 Apr 2018 16:22:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGM03E098844; Mon, 16 Apr 2018 16:22:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161622.w3GGM03E098844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 16:22: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: r332601 - stable/11/sys/dev/iscsi X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/iscsi X-SVN-Commit-Revision: 332601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:22:01 -0000 Author: trasz Date: Mon Apr 16 16:22:00 2018 New Revision: 332601 URL: https://svnweb.freebsd.org/changeset/base/332601 Log: MFC r328341: Add SPDX tags to iscsi(4). Modified: stable/11/sys/dev/iscsi/icl_conn_if.m stable/11/sys/dev/iscsi/icl_soft.c stable/11/sys/dev/iscsi/icl_wrappers.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iscsi/icl_conn_if.m ============================================================================== --- stable/11/sys/dev/iscsi/icl_conn_if.m Mon Apr 16 16:20:39 2018 (r332600) +++ stable/11/sys/dev/iscsi/icl_conn_if.m Mon Apr 16 16:22:00 2018 (r332601) @@ -1,4 +1,6 @@ #- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2014 The FreeBSD Foundation # All rights reserved. # Modified: stable/11/sys/dev/iscsi/icl_soft.c ============================================================================== --- stable/11/sys/dev/iscsi/icl_soft.c Mon Apr 16 16:20:39 2018 (r332600) +++ stable/11/sys/dev/iscsi/icl_soft.c Mon Apr 16 16:22:00 2018 (r332601) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sys/dev/iscsi/icl_wrappers.h ============================================================================== --- stable/11/sys/dev/iscsi/icl_wrappers.h Mon Apr 16 16:20:39 2018 (r332600) +++ stable/11/sys/dev/iscsi/icl_wrappers.h Mon Apr 16 16:22:00 2018 (r332601) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@freebsd.org Mon Apr 16 16:23:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3738F90A18; Mon, 16 Apr 2018 16:23:34 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DDDA709A2; Mon, 16 Apr 2018 16:23:34 +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 5F0FC1FC1C; Mon, 16 Apr 2018 16:23:34 +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 w3GGNYvt098978; Mon, 16 Apr 2018 16:23:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGNXkS098961; Mon, 16 Apr 2018 16:23:33 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161623.w3GGNXkS098961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332602 - in stable/11/sbin/dhclient: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11/sbin/dhclient: . tests X-SVN-Commit-Revision: 332602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:23:35 -0000 Author: asomers Date: Mon Apr 16 16:23:32 2018 New Revision: 332602 URL: https://svnweb.freebsd.org/changeset/base/332602 Log: MFC r329754: dhclient: raise WARNS to 4 Mostly const-correctness fixes. There were also some variable-shadowing, unused variable, and a couple of sockaddr type-correctness changes. I also had trouble with cast-align warnings. I was able to prove that one of them was a false positive. But ultimately I had to disable the warning program-wide to deal with the others. Reviewed by: cem Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14460 Modified: stable/11/sbin/dhclient/Makefile stable/11/sbin/dhclient/clparse.c stable/11/sbin/dhclient/conflex.c stable/11/sbin/dhclient/dhclient.c stable/11/sbin/dhclient/dhcpd.h stable/11/sbin/dhclient/dispatch.c stable/11/sbin/dhclient/errwarn.c stable/11/sbin/dhclient/hash.c stable/11/sbin/dhclient/options.c stable/11/sbin/dhclient/privsep.c stable/11/sbin/dhclient/privsep.h stable/11/sbin/dhclient/tables.c stable/11/sbin/dhclient/tests/fake.c stable/11/sbin/dhclient/tree.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/dhclient/Makefile ============================================================================== --- stable/11/sbin/dhclient/Makefile Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/Makefile Mon Apr 16 16:23:32 2018 (r332602) @@ -44,7 +44,8 @@ MAN= dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp dhclient-script.8 LIBADD= util -WARNS?= 3 +WARNS?= 4 +NO_WCAST_ALIGN= yes .if ${MK_TESTS} != "no" SUBDIR+= tests Modified: stable/11/sbin/dhclient/clparse.c ============================================================================== --- stable/11/sbin/dhclient/clparse.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/clparse.c Mon Apr 16 16:23:32 2018 (r332602) @@ -685,7 +685,7 @@ parse_option_decl(FILE *cfile, struct option_data *opt u_int8_t hunkbuf[1024]; unsigned hunkix = 0; char *vendor; - char *fmt; + const char *fmt; struct universe *universe; struct option *option; struct iaddr ip_addr; Modified: stable/11/sbin/dhclient/conflex.c ============================================================================== --- stable/11/sbin/dhclient/conflex.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/conflex.c Mon Apr 16 16:23:32 2018 (r332602) @@ -53,7 +53,7 @@ int lexchar; char *token_line; char *prev_line; char *cur_line; -char *tlname; +const char *tlname; int eol_token; static char line1[81]; @@ -76,7 +76,7 @@ static int read_num_or_name(int, FILE *); static int intern(char *, int); void -new_parse(char *name) +new_parse(const char *name) { tlname = name; lpos = line = 1; @@ -262,7 +262,7 @@ read_string(FILE *cfile) static int read_number(int c, FILE *cfile) { - int seenx = 0, token = NUMBER; + int seenx = 0, _token = NUMBER; unsigned i = 0; tokbuf[i++] = c; @@ -284,7 +284,7 @@ read_number(int c, FILE *cfile) tokbuf[i] = 0; tval = tokbuf; - return (token); + return (_token); } static int Modified: stable/11/sbin/dhclient/dhclient.c ============================================================================== --- stable/11/sbin/dhclient/dhclient.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/dhclient.c Mon Apr 16 16:23:32 2018 (r332602) @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); time_t cur_time; time_t default_lease_time = 43200; /* 12 hours... */ -char *path_dhclient_conf = _PATH_DHCLIENT_CONF; +const char *path_dhclient_conf = _PATH_DHCLIENT_CONF; char *path_dhclient_db = NULL; int log_perror = 1; @@ -127,10 +127,10 @@ void routehandler(struct protocol *); void usage(void); int check_option(struct client_lease *l, int option); int check_classless_option(unsigned char *data, int len); -int ipv4addrs(char * buf); +int ipv4addrs(const char * buf); int res_hnok(const char *dn); int check_search(const char *srch); -char *option_as_string(unsigned int code, unsigned char *data, int len); +const char *option_as_string(unsigned int code, unsigned char *data, int len); int fork_privchld(int, int); #define ROUNDUP(a) \ @@ -197,26 +197,25 @@ uint8_t curbssid[6]; static void disassoc(void *arg) { - struct interface_info *ifi = arg; + struct interface_info *_ifi = arg; /* * Clear existing state. */ - if (ifi->client->active != NULL) { + if (_ifi->client->active != NULL) { script_init("EXPIRE", NULL); script_write_params("old_", - ifi->client->active); - if (ifi->client->alias) + _ifi->client->active); + if (_ifi->client->alias) script_write_params("alias_", - ifi->client->alias); + _ifi->client->alias); script_go(); } - ifi->client->state = S_INIT; + _ifi->client->state = S_INIT; } -/* ARGSUSED */ void -routehandler(struct protocol *p) +routehandler(struct protocol *p __unused) { char msg[2048], *addr; struct rt_msghdr *rtm; @@ -226,7 +225,7 @@ routehandler(struct protocol *p) struct ieee80211_join_event *jev; struct client_lease *l; time_t t = time(NULL); - struct sockaddr *sa; + struct sockaddr_in *sa; struct iaddr a; ssize_t n; int linkstat; @@ -250,13 +249,13 @@ routehandler(struct protocol *p) if (scripttime == 0 || t < scripttime + 10) break; - sa = get_ifa((char *)(ifam + 1), ifam->ifam_addrs); + sa = (struct sockaddr_in*)get_ifa((char *)(ifam + 1), ifam->ifam_addrs); if (sa == NULL) break; if ((a.len = sizeof(struct in_addr)) > sizeof(a.iabuf)) error("king bula sez: len mismatch"); - memcpy(a.iabuf, &((struct sockaddr_in *)sa)->sin_addr, a.len); + memcpy(a.iabuf, &sa->sin_addr, a.len); if (addr_eq(a, defaddr)) break; @@ -267,7 +266,7 @@ routehandler(struct protocol *p) if (l == NULL) /* added/deleted addr is not the one we set */ break; - addr = inet_ntoa(((struct sockaddr_in *)sa)->sin_addr); + addr = inet_ntoa(sa->sin_addr); if (rtm->rtm_type == RTM_NEWADDR) { /* * XXX: If someone other than us adds our address, @@ -925,7 +924,7 @@ dhcp(struct packet *packet) { struct iaddrlist *ap; void (*handler)(struct packet *); - char *type; + const char *type; switch (packet->packet_type) { case DHCPOFFER: @@ -963,7 +962,7 @@ dhcpoffer(struct packet *packet) struct client_lease *lease, *lp; int i; int arp_timeout_needed, stop_selecting; - char *name = packet->options[DHO_DHCP_MESSAGE_TYPE].len ? + const char *name = packet->options[DHO_DHCP_MESSAGE_TYPE].len ? "DHCPOFFER" : "BOOTREPLY"; /* If we're not receptive to an offer right now, or if the offer @@ -1973,7 +1972,7 @@ write_client_lease(struct interface_info *ip, struct c } void -script_init(char *reason, struct string_list *medium) +script_init(const char *reason, struct string_list *medium) { size_t len, mediumlen = 0; struct imsg_hdr hdr; @@ -2008,7 +2007,7 @@ script_init(char *reason, struct string_list *medium) } void -priv_script_init(char *reason, char *medium) +priv_script_init(const char *reason, char *medium) { struct interface_info *ip = ifi; @@ -2036,7 +2035,7 @@ priv_script_init(char *reason, char *medium) } void -priv_script_write_params(char *prefix, struct client_lease *lease) +priv_script_write_params(const char *prefix, struct client_lease *lease) { struct interface_info *ip = ifi; u_int8_t dbuf[1500], *dp = NULL; @@ -2176,7 +2175,7 @@ supersede: } void -script_write_params(char *prefix, struct client_lease *lease) +script_write_params(const char *prefix, struct client_lease *lease) { size_t fn_len = 0, sn_len = 0, pr_len = 0; struct imsg_hdr hdr; @@ -2444,8 +2443,8 @@ go_daemon(void) int check_option(struct client_lease *l, int option) { - char *opbuf; - char *sbuf; + const char *opbuf; + const char *sbuf; /* we use this, since this is what gets passed to dhclient-script */ @@ -2705,7 +2704,7 @@ check_search(const char *srch) * otherwise, return 0 */ int -ipv4addrs(char * buf) +ipv4addrs(const char * buf) { struct in_addr jnk; int count = 0; @@ -2723,7 +2722,7 @@ ipv4addrs(char * buf) } -char * +const char * option_as_string(unsigned int code, unsigned char *data, int len) { static char optbuf[32768]; /* XXX */ Modified: stable/11/sbin/dhclient/dhcpd.h ============================================================================== --- stable/11/sbin/dhclient/dhcpd.h Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/dhcpd.h Mon Apr 16 16:23:32 2018 (r332602) @@ -230,7 +230,7 @@ struct protocol { struct hash_bucket { struct hash_bucket *next; - unsigned char *name; + const unsigned char *name; int len; unsigned char *value; }; @@ -253,26 +253,27 @@ struct hash_table { /* options.c */ int cons_options(struct packet *, struct dhcp_packet *, int, struct tree_cache **, int, int, int, u_int8_t *, int); -char *pretty_print_option(unsigned int, +const char *pretty_print_option(unsigned int, unsigned char *, int, int, int); void do_packet(struct interface_info *, struct dhcp_packet *, int, unsigned int, struct iaddr, struct hardware *); /* errwarn.c */ extern int warnings_occurred; -void error(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -int warning(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -int note(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -int debug(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -int parse_warn(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +void error(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +int warning(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +int note(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +int debug(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +int parse_warn(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); /* conflex.c */ extern int lexline, lexchar; -extern char *token_line, *tlname; +extern char *token_line; +extern const char *tlname; extern char comments[4096]; extern int comment_index; extern int eol_token; -void new_parse(char *); +void new_parse(const char *); int next_token(char **, FILE *); int peek_token(char **, FILE *); @@ -316,7 +317,7 @@ void dispatch(void); void got_one(struct protocol *); void add_timeout(time_t, void (*)(void *), void *); void cancel_timeout(void (*)(void *), void *); -void add_protocol(char *, int, void (*)(struct protocol *), void *); +void add_protocol(const char *, int, void (*)(struct protocol *), void *); void remove_protocol(struct protocol *); int interface_link_status(char *); void interface_set_mtu_unpriv(int, u_int16_t); @@ -324,8 +325,8 @@ void interface_set_mtu_priv(char *, u_int16_t); /* hash.c */ struct hash_table *new_hash(void); -void add_hash(struct hash_table *, unsigned char *, int, unsigned char *); -unsigned char *hash_lookup(struct hash_table *, unsigned char *, int); +void add_hash(struct hash_table *, const unsigned char *, int, unsigned char *); +void *hash_lookup(struct hash_table *, unsigned char *, int); /* tables.c */ extern struct option dhcp_options[256]; @@ -352,7 +353,7 @@ int addr_eq(struct iaddr, struct iaddr); char *piaddr(struct iaddr); /* dhclient.c */ -extern char *path_dhclient_conf; +extern const char *path_dhclient_conf; extern char *path_dhclient_db; extern time_t cur_time; extern int log_priority; @@ -387,12 +388,12 @@ void free_client_lease(struct client_lease *); void rewrite_client_leases(void); void write_client_lease(struct interface_info *, struct client_lease *, int); -void priv_script_init(char *, char *); -void priv_script_write_params(char *, struct client_lease *); +void priv_script_init(const char *, char *); +void priv_script_write_params(const char *, struct client_lease *); int priv_script_go(void); -void script_init(char *, struct string_list *); -void script_write_params(char *, struct client_lease *); +void script_init(const char *, struct string_list *); +void script_write_params(const char *, struct client_lease *); int script_go(void); void client_envadd(struct client_state *, const char *, const char *, const char *, ...); @@ -436,7 +437,7 @@ void parse_reject_statement(FILE *, struct client_conf /* privsep.c */ struct buf *buf_open(size_t); -int buf_add(struct buf *, void *, size_t); +int buf_add(struct buf *, const void *, size_t); int buf_close(int, struct buf *); ssize_t buf_read(int, void *, size_t); void dispatch_imsg(struct interface_info *, int); Modified: stable/11/sbin/dhclient/dispatch.c ============================================================================== --- stable/11/sbin/dhclient/dispatch.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/dispatch.c Mon Apr 16 16:23:32 2018 (r332602) @@ -47,10 +47,14 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include +/* Assert that pointer p is aligned to at least align bytes */ +#define assert_aligned(p, align) assert((((uintptr_t)p) & ((align) - 1)) == 0) + struct protocol *protocols; struct timeout *timeouts; static struct timeout *free_timeouts; @@ -71,7 +75,6 @@ void discover_interfaces(struct interface_info *iface) { struct ifaddrs *ifap, *ifa; - struct sockaddr_in foo; struct ifreq *tif; if (getifaddrs(&ifap) != 0) @@ -91,15 +94,30 @@ discover_interfaces(struct interface_info *iface) * and record it in a linked list. */ if (ifa->ifa_addr->sa_family == AF_LINK) { - struct sockaddr_dl *foo = - (struct sockaddr_dl *)ifa->ifa_addr; + struct sockaddr_dl *foo; + /* + * The implementation of getifaddrs should guarantee + * this alignment + */ + assert_aligned(ifa->ifa_addr, + _Alignof(struct sockaddr_dl)); +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-align" +#endif + foo = (struct sockaddr_dl *)ifa->ifa_addr; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + iface->index = foo->sdl_index; iface->hw_address.hlen = foo->sdl_alen; iface->hw_address.htype = HTYPE_ETHER; /* XXX */ memcpy(iface->hw_address.haddr, LLADDR(foo), foo->sdl_alen); } else if (ifa->ifa_addr->sa_family == AF_INET) { + struct sockaddr_in foo; struct iaddr addr; memcpy(&foo, ifa->ifa_addr, sizeof(foo)); @@ -435,7 +453,7 @@ cancel_timeout(void (*where)(void *), void *what) /* Add a protocol to the list of protocols... */ void -add_protocol(char *name, int fd, void (*handler)(struct protocol *), +add_protocol(const char *name, int fd, void (*handler)(struct protocol *), void *local) { struct protocol *p; Modified: stable/11/sbin/dhclient/errwarn.c ============================================================================== --- stable/11/sbin/dhclient/errwarn.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/errwarn.c Mon Apr 16 16:23:32 2018 (r332602) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include "dhcpd.h" -static void do_percentm(char *obuf, size_t size, char *ibuf); +static void do_percentm(char *obuf, size_t size, const char *ibuf); static char mbuf[1024]; static char fbuf[1024]; @@ -58,7 +58,7 @@ int warnings_occurred; * Log an error message, then exit. */ void -error(char *fmt, ...) +error(const char *fmt, ...) { va_list list; @@ -92,7 +92,7 @@ error(char *fmt, ...) * Log a warning message... */ int -warning(char *fmt, ...) +warning(const char *fmt, ...) { va_list list; @@ -118,7 +118,7 @@ warning(char *fmt, ...) * Log a note... */ int -note(char *fmt, ...) +note(const char *fmt, ...) { va_list list; @@ -144,7 +144,7 @@ note(char *fmt, ...) * Log a debug message... */ int -debug(char *fmt, ...) +debug(const char *fmt, ...) { va_list list; @@ -170,10 +170,10 @@ debug(char *fmt, ...) * Find %m in the input string and substitute an error message string. */ static void -do_percentm(char *obuf, size_t size, char *ibuf) +do_percentm(char *obuf, size_t size, const char *ibuf) { char ch; - char *s = ibuf; + const char *s = ibuf; char *t = obuf; size_t prlen; size_t fmt_left; @@ -203,7 +203,7 @@ do_percentm(char *obuf, size_t size, char *ibuf) } int -parse_warn(char *fmt, ...) +parse_warn(const char *fmt, ...) { va_list list; static char spaces[] = Modified: stable/11/sbin/dhclient/hash.c ============================================================================== --- stable/11/sbin/dhclient/hash.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/hash.c Mon Apr 16 16:23:32 2018 (r332602) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include "dhcpd.h" -static int do_hash(unsigned char *, int, int); +static int do_hash(const unsigned char *, int, int); struct hash_table * new_hash(void) @@ -60,9 +60,9 @@ new_hash(void) } static int -do_hash(unsigned char *name, int len, int size) +do_hash(const unsigned char *name, int len, int size) { - unsigned char *s = name; + const unsigned char *s = name; int accum = 0, i = len; while (i--) { @@ -75,7 +75,7 @@ do_hash(unsigned char *name, int len, int size) return (accum % size); } -void add_hash(struct hash_table *table, unsigned char *name, int len, +void add_hash(struct hash_table *table, const unsigned char *name, int len, unsigned char *pointer) { struct hash_bucket *bp; @@ -84,7 +84,7 @@ void add_hash(struct hash_table *table, unsigned char if (!table) return; if (!len) - len = strlen((char *)name); + len = strlen((const char *)name); hashno = do_hash(name, len, table->hash_count); bp = new_hash_bucket(); @@ -100,7 +100,7 @@ void add_hash(struct hash_table *table, unsigned char table->buckets[hashno] = bp; } -unsigned char * +void * hash_lookup(struct hash_table *table, unsigned char *name, int len) { struct hash_bucket *bp; Modified: stable/11/sbin/dhclient/options.c ============================================================================== --- stable/11/sbin/dhclient/options.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/options.c Mon Apr 16 16:23:32 2018 (r332602) @@ -626,7 +626,7 @@ store_options(unsigned char *buffer, int buflen, struc /* * Format the specified option so that a human can easily read it. */ -char * +const char * pretty_print_option(unsigned int code, unsigned char *data, int len, int emit_commas, int emit_quotes) { Modified: stable/11/sbin/dhclient/privsep.c ============================================================================== --- stable/11/sbin/dhclient/privsep.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/privsep.c Mon Apr 16 16:23:32 2018 (r332602) @@ -39,7 +39,7 @@ buf_open(size_t len) } int -buf_add(struct buf *buf, void *data, size_t len) +buf_add(struct buf *buf, const void *data, size_t len) { if (buf->wpos + len > buf->size) return (-1); Modified: stable/11/sbin/dhclient/privsep.h ============================================================================== --- stable/11/sbin/dhclient/privsep.h Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/privsep.h Mon Apr 16 16:23:32 2018 (r332602) @@ -46,6 +46,6 @@ struct imsg_hdr { }; struct buf *buf_open(size_t); -int buf_add(struct buf *, void *, size_t); +int buf_add(struct buf *, const void *, size_t); int buf_close(int, struct buf *); ssize_t buf_read(int sock, void *, size_t); Modified: stable/11/sbin/dhclient/tables.c ============================================================================== --- stable/11/sbin/dhclient/tables.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/tables.c Mon Apr 16 16:23:32 2018 (r332602) @@ -437,11 +437,11 @@ initialize_universes(void) for (i = 0; i < 256; i++) { dhcp_universe.options[i] = &dhcp_options[i]; add_hash(dhcp_universe.hash, - (unsigned char *)dhcp_options[i].name, 0, + (const unsigned char *)dhcp_options[i].name, 0, (unsigned char *)&dhcp_options[i]); } universe_hash.hash_count = DEFAULT_HASH_SIZE; add_hash(&universe_hash, - (unsigned char *)dhcp_universe.name, 0, + (const unsigned char *)dhcp_universe.name, 0, (unsigned char *)&dhcp_universe); } Modified: stable/11/sbin/dhclient/tests/fake.c ============================================================================== --- stable/11/sbin/dhclient/tests/fake.c Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/tests/fake.c Mon Apr 16 16:23:32 2018 (r332602) @@ -9,7 +9,7 @@ extern jmp_buf env; void -error(char *fmt, ...) +error(const char *fmt, ...) { va_list ap; @@ -22,7 +22,7 @@ error(char *fmt, ...) } int -warning(char *fmt, ...) +warning(const char *fmt, ...) { va_list ap; @@ -39,7 +39,7 @@ warning(char *fmt, ...) } int -note(char *fmt, ...) +note(const char *fmt, ...) { int ret; va_list ap; Modified: stable/11/sbin/dhclient/tree.h ============================================================================== --- stable/11/sbin/dhclient/tree.h Mon Apr 16 16:22:00 2018 (r332601) +++ stable/11/sbin/dhclient/tree.h Mon Apr 16 16:23:32 2018 (r332602) @@ -57,14 +57,14 @@ struct tree_cache { }; struct universe { - char *name; + const char *name; struct hash_table *hash; struct option *options[256]; }; struct option { - char *name; - char *format; + const char *name; + const char *format; struct universe *universe; unsigned char code; }; From owner-svn-src-all@freebsd.org Mon Apr 16 16:24:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24DBAF90B82; Mon, 16 Apr 2018 16:24:37 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA31570B47; Mon, 16 Apr 2018 16:24:36 +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 C4F041FC1D; Mon, 16 Apr 2018 16:24:36 +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 w3GGOaNa099069; Mon, 16 Apr 2018 16:24:36 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGOaoj099064; Mon, 16 Apr 2018 16:24:36 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161624.w3GGOaoj099064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:24:36 +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: r332603 - stable/11/usr.sbin/mptutil X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/usr.sbin/mptutil X-SVN-Commit-Revision: 332603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:24:37 -0000 Author: asomers Date: Mon Apr 16 16:24:36 2018 New Revision: 332603 URL: https://svnweb.freebsd.org/changeset/base/332603 Log: MFC r329845, r329872 r329845: Fix numerous Coverity issues in mptutil Most are memory or file descriptor leaks. Three were unannotated fallthroughs in a switch/case statement. One was an integer overflow before widen. Reported by: Coverity CID: 1007463 1007462 1007461 1007460 1007459 1007458 1007457 CID: 1006855 1006854 1006853 1006852 1006851 1006850 1006849 CID: 1006848 1006845 1006844 1006843 1006842 1006841 1006840 CID: 1006839 1006838 1006837 1006836 1006835 1006834 1006833 CID: 1006832 1006831 1006831 1006830 1006829 1008334 1008170 CID: 1008169 1008168 Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D11013 r329872: Delete copypasta Reported by: rpokala X-MFC-With: 329845 Sponsored by: Spectra Logic Corp Modified: stable/11/usr.sbin/mptutil/mpt_config.c stable/11/usr.sbin/mptutil/mpt_drive.c stable/11/usr.sbin/mptutil/mpt_evt.c stable/11/usr.sbin/mptutil/mpt_show.c stable/11/usr.sbin/mptutil/mpt_volume.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/mptutil/mpt_config.c ============================================================================== --- stable/11/usr.sbin/mptutil/mpt_config.c Mon Apr 16 16:23:32 2018 (r332602) +++ stable/11/usr.sbin/mptutil/mpt_config.c Mon Apr 16 16:24:36 2018 (r332603) @@ -65,12 +65,16 @@ dehumanize(const char *value) switch (vtp[0]) { case 't': case 'T': iv *= 1024; + /* FALLTHROUGH */ case 'g': case 'G': iv *= 1024; + /* FALLTHROUGH */ case 'm': case 'M': iv *= 1024; + /* FALLTHROUGH */ case 'k': case 'K': iv *= 1024; + /* FALLTHROUGH */ case '\0': break; default: @@ -242,6 +246,7 @@ clear_config(int ac, char **av) if (ioc2 == NULL) { error = errno; warn("Failed to fetch volume list"); + close(fd); return (error); } @@ -251,6 +256,8 @@ clear_config(int ac, char **av) if (mpt_lock_volume(vol->VolumeBus, vol->VolumeID) < 0) { warnx("Volume %s is busy and cannot be deleted", mpt_volume_name(vol->VolumeBus, vol->VolumeID)); + free(ioc2); + close(fd); return (EBUSY); } } @@ -261,6 +268,8 @@ clear_config(int ac, char **av) ch = getchar(); if (ch != 'y' && ch != 'Y') { printf("\nAborting\n"); + free(ioc2); + close(fd); return (0); } @@ -555,16 +564,16 @@ build_volume(int fd, struct volume_info *info, int rai case RT_RAID0: vol->VolumeType = MPI_RAID_VOL_TYPE_IS; vol->StripeSize = stripe_size / 512; - MaxLBA = MinLBA * info->drive_count; + MaxLBA = (uint64_t)MinLBA * info->drive_count; break; case RT_RAID1: vol->VolumeType = MPI_RAID_VOL_TYPE_IM; - MaxLBA = MinLBA * (info->drive_count / 2); + MaxLBA = (uint64_t)MinLBA * (info->drive_count / 2); break; case RT_RAID1E: vol->VolumeType = MPI_RAID_VOL_TYPE_IME; vol->StripeSize = stripe_size / 512; - MaxLBA = MinLBA * info->drive_count / 2; + MaxLBA = (uint64_t)MinLBA * info->drive_count / 2; break; default: /* Pacify gcc. */ @@ -643,6 +652,7 @@ create_volume(int ac, char **av) if (raid_type == -1) { warnx("Unknown or unsupported volume type %s", av[1]); + close(fd); return (EINVAL); } @@ -669,6 +679,7 @@ create_volume(int ac, char **av) stripe_size = dehumanize(optarg); if ((stripe_size < 512) || (!powerof2(stripe_size))) { warnx("Invalid stripe size %s", optarg); + close(fd); return (EINVAL); } break; @@ -677,6 +688,7 @@ create_volume(int ac, char **av) break; case '?': default: + close(fd); return (EINVAL); } } @@ -688,14 +700,18 @@ create_volume(int ac, char **av) if (state.ioc2 == NULL) { error = errno; warn("Failed to read volume list"); + close(fd); return (error); } state.list = mpt_pd_list(fd); - if (state.list == NULL) + if (state.list == NULL) { + close(fd); return (errno); + } error = mpt_fetch_disks(fd, &state.nsdisks, &state.sdisks); if (error) { warn("Failed to fetch standalone disk list"); + close(fd); return (error); } state.target_id = 0xff; @@ -703,24 +719,36 @@ create_volume(int ac, char **av) /* Parse the drive list. */ if (ac != 1) { warnx("Exactly one drive list is required"); + close(fd); return (EINVAL); } info = calloc(1, sizeof(*info)); - if (info == NULL) + if (info == NULL) { + close(fd); return (ENOMEM); + } error = parse_volume(fd, raid_type, &state, av[0], info); - if (error) + if (error) { + free(info); + close(fd); return (error); + } /* Create RAID physdisk pages for standalone disks. */ error = add_drives(fd, info, verbose); - if (error) + if (error) { + free(info); + close(fd); return (error); + } /* Build the volume. */ vol = build_volume(fd, info, raid_type, stripe_size, &state, verbose); - if (vol == NULL) + if (vol == NULL) { + free(info); + close(fd); return (errno); + } #ifdef DEBUG if (dump) { @@ -736,6 +764,8 @@ create_volume(int ac, char **av) if (error) { errno = error; warn("Failed to add volume"); + free(info); + close(fd); return (error); } @@ -777,11 +807,14 @@ delete_volume(int ac, char **av) error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); if (error) { warnc(error, "Invalid volume %s", av[1]); + close(fd); return (error); } - if (mpt_lock_volume(VolumeBus, VolumeID) < 0) + if (mpt_lock_volume(VolumeBus, VolumeID) < 0) { + close(fd); return (errno); + } error = mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, VolumeBus, VolumeID, 0, MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS | @@ -789,6 +822,7 @@ delete_volume(int ac, char **av) NULL, 0); if (error) { warnc(error, "Failed to delete volume"); + close(fd); return (error); } @@ -826,6 +860,7 @@ find_volume_spare_pool(int fd, const char *name, int * 0) { *pool = 1 << (ffs(info->VolumeSettings.HotSparePool & ~MPI_RAID_HOT_SPARE_POOL_0) - 1); + free(info); return (0); } free(info); @@ -871,6 +906,7 @@ find_volume_spare_pool(int fd, const char *name, int * if (error) { warnx("Failed to add spare pool %d to %s", new_pool, mpt_volume_name(VolumeBus, VolumeID)); + free(info); return (error); } free(info); @@ -906,8 +942,10 @@ add_spare(int ac, char **av) if (ac == 3) { error = find_volume_spare_pool(fd, av[2], &pool); - if (error) + if (error) { + close(fd); return (error); + } } else pool = MPI_RAID_HOT_SPARE_POOL_0; @@ -920,6 +958,8 @@ add_spare(int ac, char **av) error = mpt_fetch_disks(fd, &nsdisks, &sdisks); if (error != 0) { warn("Failed to fetch standalone disk list"); + mpt_free_pd_list(list); + close(fd); return (error); } @@ -927,15 +967,22 @@ add_spare(int ac, char **av) 0) { error = errno; warn("Unable to lookup drive %s", av[1]); + mpt_free_pd_list(list); + close(fd); return (error); } - if (mpt_lock_physdisk(&sdisks[i]) < 0) + if (mpt_lock_physdisk(&sdisks[i]) < 0) { + mpt_free_pd_list(list); + close(fd); return (errno); + } if (mpt_create_physdisk(fd, &sdisks[i], &PhysDiskNum) < 0) { error = errno; warn("Failed to create physical disk page"); + mpt_free_pd_list(list); + close(fd); return (error); } free(sdisks); @@ -946,6 +993,7 @@ add_spare(int ac, char **av) if (info == NULL) { error = errno; warn("Failed to fetch drive info"); + close(fd); return (error); } @@ -955,6 +1003,7 @@ add_spare(int ac, char **av) NULL, 0, NULL, NULL, 0); if (error) { warnc(error, "Failed to assign spare"); + close(fd); return (error); } @@ -986,12 +1035,15 @@ remove_spare(int ac, char **av) } list = mpt_pd_list(fd); - if (list == NULL) + if (list == NULL) { + close(fd); return (errno); + } error = mpt_lookup_drive(list, av[1], &PhysDiskNum); if (error) { warn("Failed to find drive %s", av[1]); + close(fd); return (error); } mpt_free_pd_list(list); @@ -1001,17 +1053,22 @@ remove_spare(int ac, char **av) if (info == NULL) { error = errno; warn("Failed to fetch drive info"); + close(fd); return (error); } if (info->PhysDiskSettings.HotSparePool == 0) { warnx("Drive %u is not a hot spare", PhysDiskNum); + free(info); + close(fd); return (EINVAL); } if (mpt_delete_physdisk(fd, PhysDiskNum) < 0) { error = errno; warn("Failed to delete physical disk page"); + free(info); + close(fd); return (error); } Modified: stable/11/usr.sbin/mptutil/mpt_drive.c ============================================================================== --- stable/11/usr.sbin/mptutil/mpt_drive.c Mon Apr 16 16:23:32 2018 (r332602) +++ stable/11/usr.sbin/mptutil/mpt_drive.c Mon Apr 16 16:24:36 2018 (r332603) @@ -147,6 +147,7 @@ mpt_pd_list(int fd) IOC_5_HOT_SPARE *spare; struct mpt_drive_list *list; int count, error, i, j; + size_t listsize; ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { @@ -189,6 +190,10 @@ mpt_pd_list(int fd) error = errno; warn("Failed to read volume info"); errno = error; + free(volumes); + free(ioc5); + free(ioc3); + free(ioc2); return (NULL); } count += volumes[i]->NumPhysDisks; @@ -197,15 +202,20 @@ mpt_pd_list(int fd) count += ioc5->NumHotSpares; /* Walk the various lists enumerating drives. */ - list = malloc(sizeof(*list) + sizeof(CONFIG_PAGE_RAID_PHYS_DISK_0) * - count); - list->ndrives = 0; + listsize = sizeof(*list) + sizeof(CONFIG_PAGE_RAID_PHYS_DISK_0) * count; + list = calloc(1, listsize); for (i = 0; i < ioc2->NumActiveVolumes; i++) { rdisk = volumes[i]->PhysDisk; for (j = 0; j < volumes[i]->NumPhysDisks; rdisk++, j++) - if (mpt_pd_insert(fd, list, rdisk->PhysDiskNum) < 0) + if (mpt_pd_insert(fd, list, rdisk->PhysDiskNum) < 0) { + mpt_free_pd_list(list); + free(volumes); + free(ioc5); + free(ioc3); + free(ioc2); return (NULL); + } free(volumes[i]); } free(ioc2); @@ -213,14 +223,21 @@ mpt_pd_list(int fd) spare = ioc5->HotSpare; for (i = 0; i < ioc5->NumHotSpares; spare++, i++) - if (mpt_pd_insert(fd, list, spare->PhysDiskNum) < 0) + if (mpt_pd_insert(fd, list, spare->PhysDiskNum) < 0) { + mpt_free_pd_list(list); + free(ioc5); + free(ioc3); return (NULL); + } free(ioc5); disk = ioc3->PhysDisk; for (i = 0; i < ioc3->NumPhysDisks; disk++, i++) - if (mpt_pd_insert(fd, list, disk->PhysDiskNum) < 0) + if (mpt_pd_insert(fd, list, disk->PhysDiskNum) < 0) { + mpt_free_pd_list(list); + free(ioc3); return (NULL); + } free(ioc3); return (list); @@ -322,12 +339,15 @@ drive_set_state(char *drive, U8 Action, U8 State, cons } list = mpt_pd_list(fd); - if (list == NULL) + if (list == NULL) { + close(fd); return (errno); + } if (mpt_lookup_drive(list, drive, &PhysDiskNum) < 0) { error = errno; warn("Failed to find drive %s", drive); + close(fd); return (error); } mpt_free_pd_list(list); @@ -337,12 +357,15 @@ drive_set_state(char *drive, U8 Action, U8 State, cons if (info == NULL) { error = errno; warn("Failed to fetch info for drive %u", PhysDiskNum); + close(fd); return (error); } /* Try to change the state. */ if (info->PhysDiskStatus.State == State) { warnx("Drive %u is already in the desired state", PhysDiskNum); + free(info); + close(fd); return (EINVAL); } @@ -350,6 +373,8 @@ drive_set_state(char *drive, U8 Action, U8 State, cons NULL, 0, NULL, NULL, 0); if (error) { warnc(error, "Failed to set drive %u to %s", PhysDiskNum, name); + free(info); + close(fd); return (error); } Modified: stable/11/usr.sbin/mptutil/mpt_evt.c ============================================================================== --- stable/11/usr.sbin/mptutil/mpt_evt.c Mon Apr 16 16:23:32 2018 (r332602) +++ stable/11/usr.sbin/mptutil/mpt_evt.c Mon Apr 16 16:24:36 2018 (r332603) @@ -122,6 +122,8 @@ show_events(int ac, char **av) break; case '?': default: + free(log); + close(fd); return (EINVAL); } } @@ -130,8 +132,11 @@ show_events(int ac, char **av) /* Build a list of valid entries and sort them by sequence. */ entries = malloc(sizeof(MPI_LOG_0_ENTRY *) * log->NumLogEntries); - if (entries == NULL) + if (entries == NULL) { + free(log); + close(fd); return (ENOMEM); + } num_events = 0; for (i = 0; i < log->NumLogEntries; i++) { if (log->LogEntry[i].LogEntryQualifier == @@ -152,6 +157,7 @@ show_events(int ac, char **av) } free(entries); + free(log); close(fd); return (0); Modified: stable/11/usr.sbin/mptutil/mpt_show.c ============================================================================== --- stable/11/usr.sbin/mptutil/mpt_show.c Mon Apr 16 16:23:32 2018 (r332602) +++ stable/11/usr.sbin/mptutil/mpt_show.c Mon Apr 16 16:24:36 2018 (r332603) @@ -97,10 +97,13 @@ show_adapter(int ac, char **av) if (man0 == NULL) { error = errno; warn("Failed to get controller info"); + close(fd); return (error); } if (man0->Header.PageLength < sizeof(*man0) / 4) { warnx("Invalid controller info"); + free(man0); + close(fd); return (EINVAL); } printf("mpt%d Adapter:\n", mpt_unit); @@ -305,11 +308,16 @@ show_config(int ac, char **av) if (ioc2 == NULL || ioc5 == NULL) { error = errno; warn("Failed to get config"); + free(ioc2); + close(fd); return (error); } if (mpt_fetch_disks(fd, &nsdisks, &sdisks) < 0) { error = errno; warn("Failed to get standalone drive list"); + free(ioc5); + free(ioc2); + close(fd); return (error); } @@ -461,6 +469,7 @@ show_volumes(int ac, char **av) } printf("\n"); } + free(volumes); free(ioc2); close(fd); @@ -491,6 +500,7 @@ show_drives(int ac, char **av) list = mpt_pd_list(fd); if (list == NULL) { error = errno; + close(fd); warn("Failed to get drive list"); return (error); } Modified: stable/11/usr.sbin/mptutil/mpt_volume.c ============================================================================== --- stable/11/usr.sbin/mptutil/mpt_volume.c Mon Apr 16 16:23:32 2018 (r332602) +++ stable/11/usr.sbin/mptutil/mpt_volume.c Mon Apr 16 16:24:36 2018 (r332603) @@ -98,11 +98,14 @@ volume_name(int ac, char **av) if (vnames == NULL) { error = errno; warn("Failed to fetch volume names"); + close(fd); return (error); } if (vnames->Header.PageType != MPI_CONFIG_PAGEATTR_CHANGEABLE) { warnx("Volume name is read only"); + free(vnames); + close(fd); return (EOPNOTSUPP); } printf("mpt%u changing volume %s name from \"%s\" to \"%s\"\n", @@ -114,6 +117,8 @@ volume_name(int ac, char **av) if (mpt_write_config_page(fd, vnames, NULL) < 0) { error = errno; warn("Failed to set volume name"); + free(vnames); + close(fd); return (error); } @@ -150,6 +155,7 @@ volume_status(int ac, char **av) error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); if (error) { warnc(error, "Invalid volume: %s", av[1]); + close(fd); return (error); } @@ -158,6 +164,7 @@ volume_status(int ac, char **av) NULL, NULL, 0); if (error) { warnc(error, "Fetching volume status failed"); + close(fd); return (error); } @@ -224,12 +231,15 @@ volume_cache(int ac, char **av) error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); if (error) { warnc(error, "Invalid volume: %s", av[1]); + close(fd); return (error); } volume = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); - if (volume == NULL) + if (volume == NULL) { + close(fd); return (errno); + } Settings = volume->VolumeSettings.Settings; @@ -241,6 +251,7 @@ volume_cache(int ac, char **av) if (NewSettings == Settings) { warnx("volume cache unchanged"); + free(volume); close(fd); return (0); } From owner-svn-src-all@freebsd.org Mon Apr 16 16:25:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30633F90CE8; Mon, 16 Apr 2018 16:25:43 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D398E70FB2; Mon, 16 Apr 2018 16:25:42 +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 CE7201FC1E; Mon, 16 Apr 2018 16:25:42 +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 w3GGPg2p099178; Mon, 16 Apr 2018 16:25:42 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGPg5i099177; Mon, 16 Apr 2018 16:25:42 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161625.w3GGPg5i099177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:25: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: r332604 - in stable/11: etc/mtree tests/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: etc/mtree tests/sys/net X-SVN-Commit-Revision: 332604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:25:43 -0000 Author: asomers Date: Mon Apr 16 16:25:42 2018 New Revision: 332604 URL: https://svnweb.freebsd.org/changeset/base/332604 Log: MFC r329874: Add tests for lagg(4) and other cloned network interfaces Unfortunately, most of the tests are disabled because they fairly frequently trigger panics. Sponsored by: Spectra Logic Corp Added: stable/11/tests/sys/net/ - copied from r329874, head/tests/sys/net/ Modified: stable/11/etc/mtree/BSD.tests.dist Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Mon Apr 16 16:24:36 2018 (r332603) +++ stable/11/etc/mtree/BSD.tests.dist Mon Apr 16 16:25:42 2018 (r332604) @@ -474,6 +474,8 @@ .. mqueue .. + net + .. netinet .. opencrypto From owner-svn-src-all@freebsd.org Mon Apr 16 16:27:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEC10F90EFE; Mon, 16 Apr 2018 16:27:08 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AFED71D41; Mon, 16 Apr 2018 16:27:08 +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 740EE1FC1F; Mon, 16 Apr 2018 16:27:08 +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 w3GGR8fl099283; Mon, 16 Apr 2018 16:27:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGR8nw099281; Mon, 16 Apr 2018 16:27:08 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161627.w3GGR8nw099281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:27: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: r332605 - stable/11/libexec/rpc.sprayd X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/libexec/rpc.sprayd X-SVN-Commit-Revision: 332605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:27:09 -0000 Author: asomers Date: Mon Apr 16 16:27:08 2018 New Revision: 332605 URL: https://svnweb.freebsd.org/changeset/base/332605 Log: MFC r330514: rpc.sprayd: raise WARNS to 6 Modified: stable/11/libexec/rpc.sprayd/Makefile stable/11/libexec/rpc.sprayd/sprayd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rpc.sprayd/Makefile ============================================================================== --- stable/11/libexec/rpc.sprayd/Makefile Mon Apr 16 16:25:42 2018 (r332604) +++ stable/11/libexec/rpc.sprayd/Makefile Mon Apr 16 16:27:08 2018 (r332605) @@ -6,6 +6,4 @@ MAN = rpc.sprayd.8 LIBADD= rpcsvc -WARNS?= 2 - .include Modified: stable/11/libexec/rpc.sprayd/sprayd.c ============================================================================== --- stable/11/libexec/rpc.sprayd/sprayd.c Mon Apr 16 16:25:42 2018 (r332604) +++ stable/11/libexec/rpc.sprayd/sprayd.c Mon Apr 16 16:27:08 2018 (r332605) @@ -61,21 +61,21 @@ static int from_inetd = 1; #define TIMEOUT 120 -void +static void cleanup(int sig __unused) { (void)rpcb_unset(SPRAYPROG, SPRAYVERS, NULL); exit(0); } -void +static void die(int sig __unused) { exit(0); } int -main(int argc, char *argv[]) +main(int argc __unused, char *argv[] __unused) { SVCXPRT *transp; int ok; From owner-svn-src-all@freebsd.org Mon Apr 16 16:28:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44995F910C3; Mon, 16 Apr 2018 16:28:24 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E292B7236A; Mon, 16 Apr 2018 16:28:23 +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 DD9F41FC20; Mon, 16 Apr 2018 16:28:23 +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 w3GGSNis099377; Mon, 16 Apr 2018 16:28:23 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGSN2A099376; Mon, 16 Apr 2018 16:28:23 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161628.w3GGSN2A099376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332606 - stable/11/usr.sbin/spray X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/usr.sbin/spray X-SVN-Commit-Revision: 332606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:28:24 -0000 Author: asomers Date: Mon Apr 16 16:28:23 2018 New Revision: 332606 URL: https://svnweb.freebsd.org/changeset/base/332606 Log: MFC r330515: spray: fix the spelling in an output string Modified: stable/11/usr.sbin/spray/spray.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/spray/spray.c ============================================================================== --- stable/11/usr.sbin/spray/spray.c Mon Apr 16 16:27:08 2018 (r332605) +++ stable/11/usr.sbin/spray/spray.c Mon Apr 16 16:28:23 2018 (r332606) @@ -145,7 +145,7 @@ main(int argc, char *argv[]) /* Spray server with packets */ - printf ("sending %u packets of lnth %d to %s ...", count, length, + printf ("sending %u packets of length %d to %s ...", count, length, *argv); fflush (stdout); From owner-svn-src-all@freebsd.org Mon Apr 16 16:29:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58ADAF912B9; Mon, 16 Apr 2018 16:29:49 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0887272560; Mon, 16 Apr 2018 16:29:49 +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 039291FC21; Mon, 16 Apr 2018 16:29:49 +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 w3GGTm0f099479; Mon, 16 Apr 2018 16:29:48 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGTmwr099478; Mon, 16 Apr 2018 16:29:48 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161629.w3GGTmwr099478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 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: r332607 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 332607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:29:49 -0000 Author: asomers Date: Mon Apr 16 16:29:48 2018 New Revision: 332607 URL: https://svnweb.freebsd.org/changeset/base/332607 Log: MFC r330627: g_bio(9): fix a documentation oversight from r163870 Modified: stable/11/share/man/man9/g_bio.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/g_bio.9 ============================================================================== --- stable/11/share/man/man9/g_bio.9 Mon Apr 16 16:28:23 2018 (r332606) +++ stable/11/share/man/man9/g_bio.9 Mon Apr 16 16:29:48 2018 (r332607) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2016 +.Dd Mar 7, 2018 .Dt G_BIO 9 .Os .Sh NAME @@ -59,7 +59,7 @@ most important fields are described below: .Bl -tag -width ".Va bio_attribute" .It Va bio_cmd I/O request command. -There are four I/O requests available in GEOM: +There are five I/O requests available in GEOM: .Bl -tag -width ".Dv BIO_GETATTR" .It Dv BIO_READ A read request. From owner-svn-src-all@freebsd.org Mon Apr 16 16:32:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECF2BF91725; Mon, 16 Apr 2018 16:32:01 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AB87729F4; Mon, 16 Apr 2018 16:32:01 +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 7BFF01FC9B; Mon, 16 Apr 2018 16:32:01 +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 w3GGW1At002869; Mon, 16 Apr 2018 16:32:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGW144002866; Mon, 16 Apr 2018 16:32:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161632.w3GGW144002866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:32: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: r332608 - in stable/11: etc/mtree libexec/tftpd libexec/tftpd/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: etc/mtree libexec/tftpd libexec/tftpd/tests X-SVN-Commit-Revision: 332608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:32:02 -0000 Author: asomers Date: Mon Apr 16 16:32:00 2018 New Revision: 332608 URL: https://svnweb.freebsd.org/changeset/base/332608 Log: MFC r330696, r330709, r330742, r331358 r330696: Add some functional tests for tftpd(8) tftpd(8) is difficult to test in isolation due to its relationship with inetd. Create a test program that mimics the behavior of tftp(1) and inetd(8) and verifies tftpd's response in several different scenarios. These test cases cover all of the basic TFTP protocol, but not the optional parts. PR: 157700 PR: 225996 PR: 226004 PR: 226005 Differential Revision: https://reviews.freebsd.org/D14310 r330709: Commit missing file from r330696 X-MFC-With: 330696 r330742: tftpd: fix the build of tests on i386 after 330696 It's those darn printf format specifiers again Reported by: cy, kibab X-MFC-With: 330696 r331358: tftpd: misc Coverity cleanup in the tests A bunch of unchecked return values from open(2) and read(2) Reported by: Coverity CID: 1386900, 1386911, 1386926, 1386928, 1386932, 1386942 CID: 1386961, 1386979 X-MFC-With: 330696 Added: stable/11/libexec/tftpd/tests/ - copied from r330696, head/libexec/tftpd/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/libexec/tftpd/Makefile stable/11/libexec/tftpd/tests/functional.c Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Mon Apr 16 16:29:48 2018 (r332607) +++ stable/11/etc/mtree/BSD.tests.dist Mon Apr 16 16:32:00 2018 (r332608) @@ -376,6 +376,8 @@ .. rtld-elf .. + tftpd + .. .. sbin dhclient Modified: stable/11/libexec/tftpd/Makefile ============================================================================== --- stable/11/libexec/tftpd/Makefile Mon Apr 16 16:29:48 2018 (r332607) +++ stable/11/libexec/tftpd/Makefile Mon Apr 16 16:32:00 2018 (r332608) @@ -14,4 +14,7 @@ CFLAGS+= -DLIBWRAP LIBADD= wrap .endif +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include Modified: stable/11/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Fri Mar 9 15:30:20 2018 (r330696) +++ stable/11/libexec/tftpd/tests/functional.c Mon Apr 16 16:32:00 2018 (r332608) @@ -224,19 +224,17 @@ do { \ static void cleanup(void) { - int fd = -1; - char buffer[80] = {0}; + FILE *f; pid_t pid; - fd = open(pidfile, O_RDONLY); - if (fd < 0) + f = fopen(pidfile, "r"); + if (f == NULL) return; - if (read(fd, buffer, sizeof(buffer)) > 0) { - sscanf(buffer, "%d", &pid); + if (fscanf(f, "%d", &pid) == 1) { kill(pid, SIGTERM); waitpid(pid, NULL, 0); } - close(fd); + fclose(f); unlink(pidfile); } @@ -248,10 +246,10 @@ require_bufeq(const char *expected, ssize_t expected_l ssize_t i; ATF_REQUIRE_EQ_MSG(expected_len, len, - "Expected %ld bytes but got %ld", expected_len, len); + "Expected %zd bytes but got %zd", expected_len, len); for (i = 0; i < len; i++) { ATF_REQUIRE_EQ_MSG(actual[i], expected[i], - "Expected %#hhx at position %ld; got %hhx instead", + "Expected %#hhx at position %zd; got %hhx instead", expected[i], i, actual[i]); } } @@ -696,6 +694,7 @@ TFTPD_TC_DEFINE(w_flag,, w_flag = 1;) atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); close(fd); require_bufeq(contents, contents_len, buffer, r); @@ -733,6 +732,7 @@ TFTPD_TC_DEFINE(wrq_dropped_ack,) atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); close(fd); require_bufeq((const char*)contents, 768, buffer, r); @@ -766,6 +766,7 @@ TFTPD_TC_DEFINE(wrq_dropped_data,) atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); close(fd); require_bufeq(contents, contents_len, buffer, r); @@ -800,6 +801,7 @@ TFTPD_TC_DEFINE(wrq_duped_data,) atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); close(fd); require_bufeq((const char*)contents, 768, buffer, r); @@ -867,6 +869,7 @@ TFTPD_TC_DEFINE(wrq_medium,) atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); close(fd); require_bufeq((const char*)contents, 768, buffer, r); @@ -900,6 +903,7 @@ TFTPD_TC_DEFINE(wrq_netascii,) atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("unix.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); close(fd); require_bufeq(expected, sizeof(expected), buffer, r); @@ -940,6 +944,7 @@ TFTPD_TC_DEFINE(wrq_small,) atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); close(fd); require_bufeq(contents, contents_len, buffer, r); From owner-svn-src-all@freebsd.org Mon Apr 16 16:33:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61AF1F9190C; Mon, 16 Apr 2018 16:33:36 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F56A72C09; Mon, 16 Apr 2018 16:33:36 +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 0A4091FDC4; Mon, 16 Apr 2018 16:33:36 +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 w3GGXZEp004714; Mon, 16 Apr 2018 16:33:35 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGXZxk004710; Mon, 16 Apr 2018 16:33:35 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161633.w3GGXZxk004710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:33:35 +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: r332609 - in stable/11: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Commit-Revision: 332609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:33:36 -0000 Author: asomers Date: Mon Apr 16 16:33:35 2018 New Revision: 332609 URL: https://svnweb.freebsd.org/changeset/base/332609 Log: MFC r330710, r330718-r330720 r330710: tftpd: Flush files as soon as they are fully received On an RRQ, tftpd doesn't exit as soon as it's finished receiving a file. Instead, it waits five seconds just in case the client didn't receive the server's last ACK and decides to resend the final DATA packet. Unfortunately, this created a 5 second delay from when the client thinks it's done sending the file, and when the file is available for other processes. Fix this bug by closing the file as soon as receipt is finished. PR: 157700 Reported by: Barry Mishler r330718: tftpd: Verify world-writability for WRQ when using relative paths tftpd(8) says that files may only be written if they already exist and are publicly writable. tftpd.c verifies that a file is publicly writable if it uses an absolute pathname. However, if the pathname is relative, that check is skipped. Fix it. Note that this is not a security vulnerability, because the transfer ultimately doesn't work unless the file already exists and is owned by user nobody. Also, this bug does not affect the default configuration, because the default uses the "-s" option which makes all pathnames absolute. PR: 226004 r330719: tftpd: Abort on an WRQ access violation On a WRQ (write request) tftpd checks whether the client has access permission for the file in question. If not, then the write is prevented. However, tftpd doesn't reply with an ERROR packet, nor does it abort. Instead, it tries to receive the packet anyway. The symptom is slightly different depending on the nature of the error. If the target file is nonexistent and tftpd lacks permission to create it, then tftpd will willingly receive the file, but not write it anywhere. If the file exists but is not writable, then tftpd will fail to ACK to WRQ. PR: 225996 r330720: tftpd: reject unknown opcodes If tftpd receives a command with an unknown opcode, it simply exits 1. It doesn't send an ERROR packet, and the client will hang waiting for one. Fix it. PR: 226005 Modified: stable/11/libexec/tftpd/tests/functional.c stable/11/libexec/tftpd/tftp-transfer.c stable/11/libexec/tftpd/tftpd.c stable/11/usr.bin/tftp/tftp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/tftpd/tests/functional.c ============================================================================== --- stable/11/libexec/tftpd/tests/functional.c Mon Apr 16 16:32:00 2018 (r332608) +++ stable/11/libexec/tftpd/tests/functional.c Mon Apr 16 16:33:35 2018 (r332609) @@ -348,6 +348,10 @@ setup(struct sockaddr_storage *to, uint16_t idx) ATF_REQUIRE((client_s = socket(protocol, SOCK_DGRAM, 0)) > 0); break; } + + /* Clear the client's umask. Test cases will specify exact modes */ + umask(0000); + return (client_s); } @@ -671,7 +675,6 @@ TFTPD_TC_DEFINE(unknown_opcode,) { /* Looks like an RRQ or WRQ request, but with a bad opcode */ SEND_STR("\0\007foo.txt\0octet\0"); - atf_tc_expect_timeout("PR 226005 tftpd ignores bad opcodes but doesn't reject them"); RECV_ERROR(4, "Illegal TFTP operation"); } @@ -692,7 +695,6 @@ TFTPD_TC_DEFINE(w_flag,, w_flag = 1;) send_data(1, contents, contents_len); recv_ack(1); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); @@ -714,7 +716,7 @@ TFTPD_TC_DEFINE(wrq_dropped_ack,) for (i = 0; i < nitems(contents); i++) contents[i] = i; - fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); ATF_REQUIRE(fd >= 0); close(fd); @@ -730,7 +732,6 @@ TFTPD_TC_DEFINE(wrq_dropped_ack,) send_data(2, (const char*)&contents[128], 256); recv_ack(2); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); @@ -749,7 +750,7 @@ TFTPD_TC_DEFINE(wrq_dropped_data,) size_t contents_len; char buffer[1024]; - fd = open("small.txt", O_RDWR | O_CREAT, 0644); + fd = open("small.txt", O_RDWR | O_CREAT, 0666); ATF_REQUIRE(fd >= 0); close(fd); contents_len = strlen(contents) + 1; @@ -764,7 +765,6 @@ TFTPD_TC_DEFINE(wrq_dropped_data,) send_data(1, contents, contents_len); recv_ack(1); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); @@ -786,7 +786,7 @@ TFTPD_TC_DEFINE(wrq_duped_data,) for (i = 0; i < nitems(contents); i++) contents[i] = i; - fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); ATF_REQUIRE(fd >= 0); close(fd); @@ -799,7 +799,6 @@ TFTPD_TC_DEFINE(wrq_duped_data,) send_data(2, (const char*)&contents[128], 256); recv_ack(2); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); @@ -819,8 +818,6 @@ TFTPD_TC_DEFINE(wrq_eaccess,) close(fd); SEND_WRQ("empty.txt", "octet"); - atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " - "violation"); RECV_ERROR(2, "Access violation"); } @@ -837,7 +834,6 @@ TFTPD_TC_DEFINE(wrq_eaccess_world_readable,) close(fd); SEND_WRQ("empty.txt", "octet"); - atf_tc_expect_fail("PR 226004 with relative pathnames, tftpd doesn't validate world writability"); RECV_ERROR(2, "Access violation"); } @@ -867,7 +863,6 @@ TFTPD_TC_DEFINE(wrq_medium,) send_data(2, (const char*)&contents[128], 256); recv_ack(2); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); @@ -894,14 +889,13 @@ TFTPD_TC_DEFINE(wrq_netascii,) fd = open("unix.txt", O_RDWR | O_CREAT, 0666); ATF_REQUIRE(fd >= 0); close(fd); - contents_len = strlen(contents) + 1; + contents_len = sizeof(contents); SEND_WRQ("unix.txt", "netascii"); recv_ack(0); send_data(1, contents, contents_len); recv_ack(1); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("unix.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); @@ -916,8 +910,6 @@ TFTPD_TC_DEFINE(wrq_netascii,) TFTPD_TC_DEFINE(wrq_nonexistent,) { SEND_WRQ("nonexistent.txt", "octet"); - atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " - "violation"); RECV_ERROR(1, "File not found"); } @@ -942,7 +934,6 @@ TFTPD_TC_DEFINE(wrq_small,) send_data(1, contents, contents_len); recv_ack(1); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); ATF_REQUIRE(fd >= 0); r = read(fd, buffer, sizeof(buffer)); Modified: stable/11/libexec/tftpd/tftp-transfer.c ============================================================================== --- stable/11/libexec/tftpd/tftp-transfer.c Mon Apr 16 16:32:00 2018 (r332608) +++ stable/11/libexec/tftpd/tftp-transfer.c Mon Apr 16 16:33:35 2018 (r332609) @@ -302,6 +302,8 @@ send_ack: gettimeofday(&(ts->tstop), NULL); } while (n_data == segsize); + write_close(); + /* Don't do late packet management for the client implementation */ if (acting_as_client) return; Modified: stable/11/libexec/tftpd/tftpd.c ============================================================================== --- stable/11/libexec/tftpd/tftpd.c Mon Apr 16 16:32:00 2018 (r332608) +++ stable/11/libexec/tftpd/tftpd.c Mon Apr 16 16:33:35 2018 (r332609) @@ -419,8 +419,7 @@ main(int argc, char *argv[]) "%s read access denied", peername); exit(1); } - } - if (tp->th_opcode == WRQ) { + } else if (tp->th_opcode == WRQ) { if (allow_wo) tftp_wrq(peer, tp->th_stuff, n - 1); else { @@ -428,7 +427,8 @@ main(int argc, char *argv[]) "%s write access denied", peername); exit(1); } - } + } else + send_error(peer, EBADOP); exit(1); } @@ -543,6 +543,10 @@ tftp_wrq(int peer, char *recvbuffer, ssize_t size) filename, errtomsg(ecode)); } + if (ecode) { + send_error(peer, ecode); + exit(1); + } tftp_recvfile(peer, mode); exit(0); } @@ -741,8 +745,12 @@ validate_access(int peer, char **filep, int mode) dirp->name, filename); if (stat(pathname, &stbuf) == 0 && (stbuf.st_mode & S_IFMT) == S_IFREG) { - if ((stbuf.st_mode & S_IROTH) != 0) { - break; + if (mode == RRQ) { + if ((stbuf.st_mode & S_IROTH) != 0) + break; + } else { + if ((stbuf.st_mode & S_IWOTH) != 0) + break; } err = EACCESS; } @@ -751,6 +759,8 @@ validate_access(int peer, char **filep, int mode) *filep = filename = pathname; else if (mode == RRQ) return (err); + else if (err != ENOTFOUND || !create_new) + return (err); } /* @@ -821,7 +831,6 @@ tftp_recvfile(int peer, const char *mode) block = 0; tftp_receive(peer, &block, &ts, NULL, 0); - write_close(); gettimeofday(&now2, NULL); if (debug&DEBUG_SIMPLE) { Modified: stable/11/usr.bin/tftp/tftp.c ============================================================================== --- stable/11/usr.bin/tftp/tftp.c Mon Apr 16 16:32:00 2018 (r332608) +++ stable/11/usr.bin/tftp/tftp.c Mon Apr 16 16:33:35 2018 (r332609) @@ -263,7 +263,6 @@ recvfile(int peer, char *port, int fd, char *name, cha tftp_receive(peer, &block, &tftp_stats, rp, n); } - write_close(); if (tftp_stats.amount > 0) printstats("Received", verbose, &tftp_stats); return; From owner-svn-src-all@freebsd.org Mon Apr 16 16:42:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C506AF9241B; Mon, 16 Apr 2018 16:42:17 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 776E675B26; Mon, 16 Apr 2018 16:42:17 +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 59BEF1FF43; Mon, 16 Apr 2018 16:42:17 +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 w3GGgHF4009602; Mon, 16 Apr 2018 16:42:17 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GGgH4e009600; Mon, 16 Apr 2018 16:42:17 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161642.w3GGgH4e009600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 16:42:17 +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: r332610 - in stable/10/usr.bin/tail: . tests X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/10/usr.bin/tail: . tests X-SVN-Commit-Revision: 332610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 16:42:18 -0000 Author: asomers Date: Mon Apr 16 16:42:16 2018 New Revision: 332610 URL: https://svnweb.freebsd.org/changeset/base/332610 Log: MFC r329606: tail: fix "tail -r" for piped input that begins with '\n' A subtle logic bug, probably introduced in r311895, caused tail to print the first two lines of piped input in forward order, if the very first character was a newline. PR: 222671 Reported by: Jim Long , pprocacci@gmail.com Sponsored by: Spectra Logic Corp Modified: stable/10/usr.bin/tail/reverse.c stable/10/usr.bin/tail/tests/tail_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/tail/reverse.c ============================================================================== --- stable/10/usr.bin/tail/reverse.c Mon Apr 16 16:33:35 2018 (r332609) +++ stable/10/usr.bin/tail/reverse.c Mon Apr 16 16:42:16 2018 (r332610) @@ -255,10 +255,13 @@ r_buf(FILE *fp, const char *fn) if ((*p == '\n') || start) { struct bfelem *tr; - if (start && llen) + if (llen && start && *p != '\n') WR(p, llen + 1); - else if (llen) + else if (llen) { WR(p + 1, llen); + if (start && *p == '\n') + WR(p, 1); + } tr = TAILQ_NEXT(tl, entries); llen = 0; if (tr != NULL) { Modified: stable/10/usr.bin/tail/tests/tail_test.sh ============================================================================== --- stable/10/usr.bin/tail/tests/tail_test.sh Mon Apr 16 16:33:35 2018 (r332609) +++ stable/10/usr.bin/tail/tests/tail_test.sh Mon Apr 16 16:42:16 2018 (r332610) @@ -83,6 +83,27 @@ HERE atf_check cmp expectfile outpipe } +# Regression test for PR 222671 +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222671 +atf_test_case pipe_leading_newline_r +pipe_leading_newline_r_head() +{ + atf_set "descr" "Reverse a pipe whose first character is a newline" +} +pipe_leading_newline_r_body() +{ + cat > expectfile << HERE +3 +2 +1 + +HERE + printf '\n1\n2\n3\n' | tail -r > outfile + printf '\n1\n2\n3\n' | tail -r > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + atf_test_case file_rc28 file_rc28_head() { @@ -105,6 +126,28 @@ HERE atf_check cmp expectfile outpipe } +atf_test_case file_rc28 +file_rc28_head() +{ + atf_set "descr" "Reverse a file and display the last 28 characters" +} +file_rc28_body() +{ + cat > infile < expectfile << HERE +This is the third line +line +HERE + tail -rc28 infile > outfile + tail -rc28 < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + atf_test_case longfile_r longfile_r_head() { @@ -222,6 +265,7 @@ atf_init_test_cases() atf_add_test_case file_r atf_add_test_case file_rc28 atf_add_test_case file_rn2 + atf_add_test_case pipe_leading_newline_r # The longfile tests are designed to exercise behavior in r_buf(), # which operates on 128KB blocks atf_add_test_case longfile_r From owner-svn-src-all@freebsd.org Mon Apr 16 17:06:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70609F94146; Mon, 16 Apr 2018 17:06:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 222917BC9E; Mon, 16 Apr 2018 17:06:19 +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 1D0F12026E; Mon, 16 Apr 2018 17:06:19 +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 w3GH6Ifl020555; Mon, 16 Apr 2018 17:06:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GH6I8j020554; Mon, 16 Apr 2018 17:06:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161706.w3GH6I8j020554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332611 - stable/11/share/man/man5 X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/share/man/man5 X-SVN-Commit-Revision: 332611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:06:19 -0000 Author: trasz Date: Mon Apr 16 17:06:18 2018 New Revision: 332611 URL: https://svnweb.freebsd.org/changeset/base/332611 Log: MFC r326471: Document autofs(6) sysctl variables. PR: 219414 Modified: stable/11/share/man/man5/autofs.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man5/autofs.5 ============================================================================== --- stable/11/share/man/man5/autofs.5 Mon Apr 16 16:42:16 2018 (r332610) +++ stable/11/share/man/man5/autofs.5 Mon Apr 16 17:06:18 2018 (r332611) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 3, 2014 +.Dd December 2, 2017 .Dt AUTOFS 5 .Os .Sh NAME @@ -67,6 +67,45 @@ file systems: Mount options for all filesystems specified in the map entry. .It Cm master_prefix Filesystem mountpoint prefix. +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va vfs.autofs.debug +Verbosity level for log messages from the +.Nm +driver. +Set to 0 to disable logging or 1 to warn about potential problems. +Larger values enable debugging output. +Defaults to 1. +.It Va vfs.autofs.interruptible +Set to 1 to allow mount requests to be interrupted by signal. +Defaults to 1. +.It Va vfs.autofs.retry_delay +Number of seconds before retrying mount requests. +Defaults to 1. +.It Va vfs.autofs.retry_attempts +Number of attempts before failing mount. +Defaults to 3. +.It Va vfs.autofs.cache +Number of seconds to wait before reinvoking +.Xr automountd 8 +for any given file or directory. +Defaults to 600. +.It Va vfs.autofs.timeout +Number of seconds to wait for +.Xr automountd 8 +to handle the mount request. +Defaults to 30. +.It Va vfs.autofs.mount_on_stat +Set to 1 to trigger mount on +.Xr stat 2 +on mountpoint. +Defaults to 0. .El .Sh EXAMPLES To unmount all mounted From owner-svn-src-all@freebsd.org Mon Apr 16 17:08:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71C19F944AB; Mon, 16 Apr 2018 17:08:59 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 209067BF23; Mon, 16 Apr 2018 17:08:59 +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 16BC720270; Mon, 16 Apr 2018 17:08:59 +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 w3GH8wVC020700; Mon, 16 Apr 2018 17:08:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GH8wUN020699; Mon, 16 Apr 2018 17:08:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161708.w3GH8wUN020699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:08: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: r332612 - stable/11/sys/dev/iscsi X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/iscsi X-SVN-Commit-Revision: 332612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:08:59 -0000 Author: trasz Date: Mon Apr 16 17:08:58 2018 New Revision: 332612 URL: https://svnweb.freebsd.org/changeset/base/332612 Log: MFC r326730: Move the DIAGNOSTIC check for lost iSCSI PDUs from icl_conn_close() to icl_conn_free(). It's perfectly valid for the counter to be non-zero in the former. Sponsored by: playkey.net Modified: stable/11/sys/dev/iscsi/icl_soft.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iscsi/icl_soft.c ============================================================================== --- stable/11/sys/dev/iscsi/icl_soft.c Mon Apr 16 17:06:18 2018 (r332611) +++ stable/11/sys/dev/iscsi/icl_soft.c Mon Apr 16 17:08:58 2018 (r332612) @@ -1172,6 +1172,11 @@ void icl_soft_conn_free(struct icl_conn *ic) { +#ifdef DIAGNOSTIC + KASSERT(ic->ic_outstanding_pdus == 0, + ("destroying session with %d outstanding PDUs", + ic->ic_outstanding_pdus)); +#endif cv_destroy(&ic->ic_send_cv); cv_destroy(&ic->ic_receive_cv); kobj_delete((struct kobj *)ic, M_ICL_SOFT); @@ -1412,11 +1417,6 @@ icl_soft_conn_close(struct icl_conn *ic) KASSERT(STAILQ_EMPTY(&ic->ic_to_send), ("destroying session with non-empty send queue")); -#ifdef DIAGNOSTIC - KASSERT(ic->ic_outstanding_pdus == 0, - ("destroying session with %d outstanding PDUs", - ic->ic_outstanding_pdus)); -#endif ICL_CONN_UNLOCK(ic); } From owner-svn-src-all@freebsd.org Mon Apr 16 17:12:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 676F3F9493A; Mon, 16 Apr 2018 17:12:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 178C27D3FE; Mon, 16 Apr 2018 17:12:19 +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 0F310203F5; Mon, 16 Apr 2018 17:12:19 +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 w3GHCIUU023302; Mon, 16 Apr 2018 17:12:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHCIvs023301; Mon, 16 Apr 2018 17:12:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161712.w3GHCIvs023301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332613 - stable/11/sys/fs/nullfs X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/fs/nullfs X-SVN-Commit-Revision: 332613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:12:19 -0000 Author: trasz Date: Mon Apr 16 17:12:18 2018 New Revision: 332613 URL: https://svnweb.freebsd.org/changeset/base/332613 Log: MFC r327777: Make nullfs properly report MNT_AUTOMOUNTED set on the nullfs mount itself, instead of copying from the underlying filesystem. PR: 224851 Modified: stable/11/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/11/sys/fs/nullfs/null_vfsops.c Mon Apr 16 17:08:58 2018 (r332612) +++ stable/11/sys/fs/nullfs/null_vfsops.c Mon Apr 16 17:12:18 2018 (r332613) @@ -318,7 +318,8 @@ nullfs_statfs(mp, sbp) /* now copy across the "interesting" information and fake the rest */ sbp->f_type = mstat->f_type; sbp->f_flags = (sbp->f_flags & (MNT_RDONLY | MNT_NOEXEC | MNT_NOSUID | - MNT_UNION | MNT_NOSYMFOLLOW)) | (mstat->f_flags & ~MNT_ROOTFS); + MNT_UNION | MNT_NOSYMFOLLOW | MNT_AUTOMOUNTED)) | + (mstat->f_flags & ~(MNT_ROOTFS | MNT_AUTOMOUNTED)); sbp->f_bsize = mstat->f_bsize; sbp->f_iosize = mstat->f_iosize; sbp->f_blocks = mstat->f_blocks; From owner-svn-src-all@freebsd.org Mon Apr 16 17:13:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CA3CF94A57; Mon, 16 Apr 2018 17:13:10 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E51957DC1F; Mon, 16 Apr 2018 17:13:09 +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 DED9020410; Mon, 16 Apr 2018 17:13:09 +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 w3GHD9VC025583; Mon, 16 Apr 2018 17:13:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHD9g7025582; Mon, 16 Apr 2018 17:13:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161713.w3GHD9g7025582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:13: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: r332614 - stable/11/sys/arm/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/arm/conf X-SVN-Commit-Revision: 332614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:13:10 -0000 Author: trasz Date: Mon Apr 16 17:13:09 2018 New Revision: 332614 URL: https://svnweb.freebsd.org/changeset/base/332614 Log: MFC r328195: Add usb_template(4) to RPI-B kernel config. This is to support the USB OTG functionality on Raspberry Pi 0. Modified: stable/11/sys/arm/conf/RPI-B Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/conf/RPI-B ============================================================================== --- stable/11/sys/arm/conf/RPI-B Mon Apr 16 17:12:18 2018 (r332613) +++ stable/11/sys/arm/conf/RPI-B Mon Apr 16 17:13:09 2018 (r332614) @@ -47,6 +47,9 @@ device pty device snp device pl011 +# Device mode support +device usb_template # Control of the gadget + # Comment following lines for boot console on serial port device vt device kbdmux From owner-svn-src-all@freebsd.org Mon Apr 16 17:13:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F50BF94B3B; Mon, 16 Apr 2018 17:13:55 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FFAF7E382; Mon, 16 Apr 2018 17:13:55 +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 2296D20411; Mon, 16 Apr 2018 17:13:55 +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 w3GHDtxF025668; Mon, 16 Apr 2018 17:13:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHDscW025663; Mon, 16 Apr 2018 17:13:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161713.w3GHDscW025663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:13: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: r332615 - stable/11/usr.sbin/uefisign X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.sbin/uefisign X-SVN-Commit-Revision: 332615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:13:55 -0000 Author: trasz Date: Mon Apr 16 17:13:54 2018 New Revision: 332615 URL: https://svnweb.freebsd.org/changeset/base/332615 Log: MFC r328335: Add SPDX identifiers for uefisign(8) sources. Modified: stable/11/usr.sbin/uefisign/child.c stable/11/usr.sbin/uefisign/magic.h stable/11/usr.sbin/uefisign/pe.c stable/11/usr.sbin/uefisign/uefisign.c stable/11/usr.sbin/uefisign/uefisign.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/uefisign/child.c ============================================================================== --- stable/11/usr.sbin/uefisign/child.c Mon Apr 16 17:13:09 2018 (r332614) +++ stable/11/usr.sbin/uefisign/child.c Mon Apr 16 17:13:54 2018 (r332615) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/uefisign/magic.h ============================================================================== --- stable/11/usr.sbin/uefisign/magic.h Mon Apr 16 17:13:09 2018 (r332614) +++ stable/11/usr.sbin/uefisign/magic.h Mon Apr 16 17:13:54 2018 (r332615) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/uefisign/pe.c ============================================================================== --- stable/11/usr.sbin/uefisign/pe.c Mon Apr 16 17:13:09 2018 (r332614) +++ stable/11/usr.sbin/uefisign/pe.c Mon Apr 16 17:13:54 2018 (r332615) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/uefisign/uefisign.c ============================================================================== --- stable/11/usr.sbin/uefisign/uefisign.c Mon Apr 16 17:13:09 2018 (r332614) +++ stable/11/usr.sbin/uefisign/uefisign.c Mon Apr 16 17:13:54 2018 (r332615) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/usr.sbin/uefisign/uefisign.h ============================================================================== --- stable/11/usr.sbin/uefisign/uefisign.h Mon Apr 16 17:13:09 2018 (r332614) +++ stable/11/usr.sbin/uefisign/uefisign.h Mon Apr 16 17:13:54 2018 (r332615) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@freebsd.org Mon Apr 16 17:14:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00BC2F94C53; Mon, 16 Apr 2018 17:14:43 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A32C27EB29; Mon, 16 Apr 2018 17:14:42 +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 9E25D20413; Mon, 16 Apr 2018 17:14:42 +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 w3GHEgR2025751; Mon, 16 Apr 2018 17:14:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHEgGq025750; Mon, 16 Apr 2018 17:14:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161714.w3GHEgGq025750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:14: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: r332616 - stable/11/usr.sbin/iscsid X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.sbin/iscsid X-SVN-Commit-Revision: 332616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:14:43 -0000 Author: trasz Date: Mon Apr 16 17:14:42 2018 New Revision: 332616 URL: https://svnweb.freebsd.org/changeset/base/332616 Log: MFC r328336: Add missing SPDX identifier in iscsid(8). Modified: stable/11/usr.sbin/iscsid/chap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/iscsid/chap.c ============================================================================== --- stable/11/usr.sbin/iscsid/chap.c Mon Apr 16 17:13:54 2018 (r332615) +++ stable/11/usr.sbin/iscsid/chap.c Mon Apr 16 17:14:42 2018 (r332616) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@freebsd.org Mon Apr 16 17:15:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56C1AF94DBB; Mon, 16 Apr 2018 17:15:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BA617F061; Mon, 16 Apr 2018 17:15:27 +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 06A4A20414; Mon, 16 Apr 2018 17:15:27 +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 w3GHFQdW025853; Mon, 16 Apr 2018 17:15:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHFQb7025851; Mon, 16 Apr 2018 17:15:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161715.w3GHFQb7025851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:15: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: r332617 - in stable/11/sys: amd64/linux dev/usb/storage X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/11/sys: amd64/linux dev/usb/storage X-SVN-Commit-Revision: 332617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:15:27 -0000 Author: trasz Date: Mon Apr 16 17:15:26 2018 New Revision: 332617 URL: https://svnweb.freebsd.org/changeset/base/332617 Log: MFC r328342: Add SPDX identifiers to linux_ptrace.c and cfumass.c. Modified: stable/11/sys/amd64/linux/linux_ptrace.c stable/11/sys/dev/usb/storage/cfumass.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux/linux_ptrace.c ============================================================================== --- stable/11/sys/amd64/linux/linux_ptrace.c Mon Apr 16 17:14:42 2018 (r332616) +++ stable/11/sys/amd64/linux/linux_ptrace.c Mon Apr 16 17:15:26 2018 (r332617) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2017 Edward Tomasz Napierala * All rights reserved. * Modified: stable/11/sys/dev/usb/storage/cfumass.c ============================================================================== --- stable/11/sys/dev/usb/storage/cfumass.c Mon Apr 16 17:14:42 2018 (r332616) +++ stable/11/sys/dev/usb/storage/cfumass.c Mon Apr 16 17:15:26 2018 (r332617) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2016 The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@freebsd.org Mon Apr 16 17:18:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDE93F95108; Mon, 16 Apr 2018 17:18:08 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1C087F305; Mon, 16 Apr 2018 17:18:07 +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 83F5B2041D; Mon, 16 Apr 2018 17:18:07 +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 w3GHI7Wr026165; Mon, 16 Apr 2018 17:18:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHI7DT026163; Mon, 16 Apr 2018 17:18:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161718.w3GHI7DT026163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:18: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: r332618 - in stable/11/usr.bin: cpuset rctl X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/11/usr.bin: cpuset rctl X-SVN-Commit-Revision: 332618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:18:09 -0000 Author: trasz Date: Mon Apr 16 17:18:06 2018 New Revision: 332618 URL: https://svnweb.freebsd.org/changeset/base/332618 Log: MFC r330024: .Xr rctl(8) and cpuset(1). PR: 225935 Modified: stable/11/usr.bin/cpuset/cpuset.1 stable/11/usr.bin/rctl/rctl.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/cpuset/cpuset.1 ============================================================================== --- stable/11/usr.bin/cpuset/cpuset.1 Mon Apr 16 17:15:26 2018 (r332617) +++ stable/11/usr.bin/cpuset/cpuset.1 Mon Apr 16 17:18:06 2018 (r332618) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 1, 2016 +.Dd February 26, 2018 .Dt CPUSET 1 .Os .Sh NAME @@ -187,7 +187,8 @@ Create a new cpuset that is restricted to CPUs 0 and 2 into the new set: .Dl cpuset -C -c -l 0,2 -p .Sh SEE ALSO -.Xr cpuset 2 +.Xr cpuset 2 , +.Xr rctl 8 .Sh HISTORY The .Nm Modified: stable/11/usr.bin/rctl/rctl.8 ============================================================================== --- stable/11/usr.bin/rctl/rctl.8 Mon Apr 16 17:15:26 2018 (r332617) +++ stable/11/usr.bin/rctl/rctl.8 Mon Apr 16 17:18:06 2018 (r332618) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2017 +.Dd February 26, 2018 .Dt RCTL 8 .Os .Sh NAME @@ -261,6 +261,7 @@ Display all rules matching user "joe": Display all rules matching login classes: .Dl Nm Ar loginclass: .Sh SEE ALSO +.Xr cpuset 1 , .Xr rctl 4 , .Xr rctl.conf 5 .Sh HISTORY From owner-svn-src-all@freebsd.org Mon Apr 16 17:21:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A01B5F9579D; Mon, 16 Apr 2018 17:21:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 500537F8F3; Mon, 16 Apr 2018 17:21:27 +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 4B1602054F; Mon, 16 Apr 2018 17:21:27 +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 w3GHLROo027333; Mon, 16 Apr 2018 17:21:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHLR8T027332; Mon, 16 Apr 2018 17:21:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161721.w3GHLR8T027332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:21: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: r332619 - stable/11/sys/dev/iscsi X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/iscsi X-SVN-Commit-Revision: 332619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:21:27 -0000 Author: trasz Date: Mon Apr 16 17:21:26 2018 New Revision: 332619 URL: https://svnweb.freebsd.org/changeset/base/332619 Log: MFC r330740: Check for duplicates when modifying an iSCSI session. Previously we did this check on open, but "iscsictl -M", or an iSCSI redirect received by iscsid(8) could end up with two sessions with the same target name and portal. Modified: stable/11/sys/dev/iscsi/iscsi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/11/sys/dev/iscsi/iscsi.c Mon Apr 16 17:18:06 2018 (r332618) +++ stable/11/sys/dev/iscsi/iscsi.c Mon Apr 16 17:21:26 2018 (r332619) @@ -1960,6 +1960,7 @@ iscsi_ioctl_session_modify(struct iscsi_softc *sc, struct iscsi_session_modify *ism) { struct iscsi_session *is; + const struct iscsi_session *is2; iscsi_sanitize_session_conf(&ism->ism_conf); if (iscsi_valid_session_conf(&ism->ism_conf) == false) @@ -1968,14 +1969,42 @@ iscsi_ioctl_session_modify(struct iscsi_softc *sc, sx_xlock(&sc->sc_lock); TAILQ_FOREACH(is, &sc->sc_sessions, is_next) { ISCSI_SESSION_LOCK(is); - if (is->is_id == ism->ism_session_id) + if (is->is_id == ism->ism_session_id) { + /* Note that the session remains locked. */ break; + } ISCSI_SESSION_UNLOCK(is); } if (is == NULL) { sx_xunlock(&sc->sc_lock); return (ESRCH); } + + /* + * Prevent duplicates. + */ + TAILQ_FOREACH(is2, &sc->sc_sessions, is_next) { + if (is == is2) + continue; + + if (!!ism->ism_conf.isc_discovery != + !!is2->is_conf.isc_discovery) + continue; + + if (strcmp(ism->ism_conf.isc_target_addr, + is2->is_conf.isc_target_addr) != 0) + continue; + + if (ism->ism_conf.isc_discovery == 0 && + strcmp(ism->ism_conf.isc_target, + is2->is_conf.isc_target) != 0) + continue; + + ISCSI_SESSION_UNLOCK(is); + sx_xunlock(&sc->sc_lock); + return (EBUSY); + } + sx_xunlock(&sc->sc_lock); memcpy(&is->is_conf, &ism->ism_conf, sizeof(is->is_conf)); From owner-svn-src-all@freebsd.org Mon Apr 16 17:22:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECE18F9592E; Mon, 16 Apr 2018 17:22:09 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AB367FAEB; Mon, 16 Apr 2018 17:22:09 +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 95A0E20583; Mon, 16 Apr 2018 17:22:09 +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 w3GHM9AP028578; Mon, 16 Apr 2018 17:22:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHM9GJ028563; Mon, 16 Apr 2018 17:22:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161722.w3GHM9GJ028563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:22: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: r332620 - stable/11/usr.bin/iscsictl X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/usr.bin/iscsictl X-SVN-Commit-Revision: 332620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:22:10 -0000 Author: trasz Date: Mon Apr 16 17:22:09 2018 New Revision: 332620 URL: https://svnweb.freebsd.org/changeset/base/332620 Log: MFC r330741: Make iscsictl(1) display "Disabled" status for disabled sessions. Modified: stable/11/usr.bin/iscsictl/iscsictl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/iscsictl/iscsictl.c ============================================================================== --- stable/11/usr.bin/iscsictl/iscsictl.c Mon Apr 16 17:21:26 2018 (r332619) +++ stable/11/usr.bin/iscsictl/iscsictl.c Mon Apr 16 17:22:09 2018 (r332620) @@ -601,7 +601,8 @@ kernel_list(int iscsi_fd, const struct target *targ __ xo_emit("{V:name/%-36s/%s} {V:portal/%-16s/%s} ", conf->isc_target, conf->isc_target_addr); - if (state->iss_reason[0] != '\0') { + if (state->iss_reason[0] != '\0' && + conf->isc_enable != 0) { xo_emit("{V:state/%s}\n", state->iss_reason); } else { if (conf->isc_discovery) { From owner-svn-src-all@freebsd.org Mon Apr 16 17:22:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D771F95A1E; Mon, 16 Apr 2018 17:22:52 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 521D57FC6A; Mon, 16 Apr 2018 17:22:52 +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 4CA32205AA; Mon, 16 Apr 2018 17:22:52 +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 w3GHMqEf031386; Mon, 16 Apr 2018 17:22:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHMqsF031385; Mon, 16 Apr 2018 17:22:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161722.w3GHMqsF031385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332621 - stable/11/sys/dev/iscsi X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/dev/iscsi X-SVN-Commit-Revision: 332621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:22:52 -0000 Author: trasz Date: Mon Apr 16 17:22:51 2018 New Revision: 332621 URL: https://svnweb.freebsd.org/changeset/base/332621 Log: MFC r330937: Fix typo in a warning message. Modified: stable/11/sys/dev/iscsi/iscsi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/11/sys/dev/iscsi/iscsi.c Mon Apr 16 17:22:09 2018 (r332620) +++ stable/11/sys/dev/iscsi/iscsi.c Mon Apr 16 17:22:51 2018 (r332621) @@ -1279,10 +1279,10 @@ iscsi_pdu_handle_async_message(struct icl_pdu *respons iscsi_session_terminate(is); break; case BHSAM_EVENT_TARGET_TERMINATES_CONNECTION: - ISCSI_SESSION_WARN(is, "target indicates it will drop drop the connection"); + ISCSI_SESSION_WARN(is, "target indicates it will drop the connection"); break; case BHSAM_EVENT_TARGET_TERMINATES_SESSION: - ISCSI_SESSION_WARN(is, "target indicates it will drop drop the session"); + ISCSI_SESSION_WARN(is, "target indicates it will drop the session"); break; default: /* From owner-svn-src-all@freebsd.org Mon Apr 16 17:24:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30EBDF95CE6; Mon, 16 Apr 2018 17:24:34 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D20017FECA; Mon, 16 Apr 2018 17:24:33 +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 C8D9A205AB; Mon, 16 Apr 2018 17:24:33 +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 w3GHOXfp031503; Mon, 16 Apr 2018 17:24:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHOXcE031501; Mon, 16 Apr 2018 17:24:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161724.w3GHOXcE031501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332622 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 332622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:24:34 -0000 Author: trasz Date: Mon Apr 16 17:24:33 2018 New Revision: 332622 URL: https://svnweb.freebsd.org/changeset/base/332622 Log: MFC r331013: Fix iSCSI target crash on session reinstation. The crash scenario goes like this: there's a thread waiting on "reinstate"; because it doesn't update the timeout counter it gets terminated by the callout; at this point the maintenance thread starts the termination routine. The first thread finishes waiting, proceeds to icl_conn_handoff(), and drops the refcount, which allows the maintenance thread to free its resources. At this point another thread receives a PDU. Boom. PR: 222898, 219866 Sponsored by: playkey.net Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c stable/11/sys/cam/ctl/ctl_frontend_iscsi.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Mon Apr 16 17:22:51 2018 (r332621) +++ stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Mon Apr 16 17:24:33 2018 (r332622) @@ -1162,11 +1162,11 @@ cfiscsi_maintenance_thread(void *arg) for (;;) { CFISCSI_SESSION_LOCK(cs); - if (cs->cs_terminating == false) + if (cs->cs_terminating == false || cs->cs_handoff_in_progress) cv_wait(&cs->cs_maintenance_cv, &cs->cs_lock); CFISCSI_SESSION_UNLOCK(cs); - if (cs->cs_terminating) { + if (cs->cs_terminating && cs->cs_handoff_in_progress == false) { /* * We used to wait up to 30 seconds to deliver queued @@ -1194,8 +1194,6 @@ static void cfiscsi_session_terminate(struct cfiscsi_session *cs) { - if (cs->cs_terminating) - return; cs->cs_terminating = true; cv_signal(&cs->cs_maintenance_cv); #ifdef ICL_KERNEL_PROXY @@ -1266,6 +1264,13 @@ cfiscsi_session_new(struct cfiscsi_softc *softc, const cv_init(&cs->cs_login_cv, "cfiscsi_login"); #endif + /* + * The purpose of this is to avoid racing with session shutdown. + * Otherwise we could have the maintenance thread call icl_conn_close() + * before we call icl_conn_handoff(). + */ + cs->cs_handoff_in_progress = true; + cs->cs_conn = icl_new_conn(offload, false, "cfiscsi", &cs->cs_lock); if (cs->cs_conn == NULL) { free(cs, M_CFISCSI); @@ -1376,8 +1381,18 @@ cfiscsi_accept(struct socket *so, struct sockaddr *sa, icl_conn_handoff_sock(cs->cs_conn, so); cs->cs_initiator_sa = sa; cs->cs_portal_id = portal_id; + cs->cs_handoff_in_progress = false; cs->cs_waiting_for_ctld = true; cv_signal(&cfiscsi_softc.accept_cv); + + CFISCSI_SESSION_LOCK(cs); + /* + * Wake up the maintenance thread if we got scheduled for termination + * somewhere between cfiscsi_session_new() and icl_conn_handoff_sock(). + */ + if (cs->cs_terminating) + cfiscsi_session_terminate(cs); + CFISCSI_SESSION_UNLOCK(cs); } #endif @@ -1556,6 +1571,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) mtx_lock(&softc->lock); if (ct->ct_online == 0) { mtx_unlock(&softc->lock); + cs->cs_handoff_in_progress = false; cfiscsi_session_terminate(cs); cfiscsi_target_release(ct); ci->status = CTL_ISCSI_ERROR; @@ -1566,7 +1582,6 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) cs->cs_target = ct; mtx_unlock(&softc->lock); - refcount_acquire(&cs->cs_outstanding_ctl_pdus); restart: if (!cs->cs_terminating) { mtx_lock(&softc->lock); @@ -1603,8 +1618,8 @@ restart: #endif error = icl_conn_handoff(cs->cs_conn, cihp->socket); if (error != 0) { + cs->cs_handoff_in_progress = false; cfiscsi_session_terminate(cs); - refcount_release(&cs->cs_outstanding_ctl_pdus); ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), "%s: icl_conn_handoff failed with error %d", @@ -1629,7 +1644,16 @@ restart: } #endif - refcount_release(&cs->cs_outstanding_ctl_pdus); + CFISCSI_SESSION_LOCK(cs); + cs->cs_handoff_in_progress = false; + + /* + * Wake up the maintenance thread if we got scheduled for termination. + */ + if (cs->cs_terminating) + cfiscsi_session_terminate(cs); + CFISCSI_SESSION_UNLOCK(cs); + ci->status = CTL_ISCSI_OK; } Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_iscsi.h Mon Apr 16 17:22:51 2018 (r332621) +++ stable/11/sys/cam/ctl/ctl_frontend_iscsi.h Mon Apr 16 17:24:33 2018 (r332622) @@ -83,6 +83,7 @@ struct cfiscsi_session { int cs_timeout; struct cv cs_maintenance_cv; bool cs_terminating; + bool cs_handoff_in_progress; bool cs_tasks_aborted; size_t cs_max_data_segment_length; size_t cs_max_burst_length; From owner-svn-src-all@freebsd.org Mon Apr 16 17:25:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59E4CF95EDF; Mon, 16 Apr 2018 17:25:53 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F41ED8011B; Mon, 16 Apr 2018 17:25:52 +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 EE9E0205B0; Mon, 16 Apr 2018 17:25:52 +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 w3GHPqAq031752; Mon, 16 Apr 2018 17:25:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHPqWJ031751; Mon, 16 Apr 2018 17:25:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161725.w3GHPqWJ031751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332623 - stable/11/tools/tools/syscall_timing X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/tools/tools/syscall_timing X-SVN-Commit-Revision: 332623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:25:53 -0000 Author: trasz Date: Mon Apr 16 17:25:52 2018 New Revision: 332623 URL: https://svnweb.freebsd.org/changeset/base/332623 Log: MFC r325317: Add bad_open benchmark, which measures failed opens by calling open("", O_RDONLY);. Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c ============================================================================== --- stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:24:33 2018 (r332622) +++ stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:25:52 2018 (r332623) @@ -334,6 +334,21 @@ test_open_close(uintmax_t num, uintmax_t int_arg, cons } uintmax_t +test_bad_open(uintmax_t num, uintmax_t int_arg, const char *path) +{ + uintmax_t i; + + benchmark_start(); + for (i = 0; i < num; i++) { + if (alarm_fired) + break; + open("", O_RDONLY); + } + benchmark_stop(); + return (i); +} + +uintmax_t test_read(uintmax_t num, uintmax_t int_arg, const char *path) { char buf[int_arg]; @@ -641,6 +656,7 @@ static const struct test tests[] = { { "socket_tcp", test_socket_stream, .t_int = PF_INET }, { "socket_udp", test_socket_dgram, .t_int = PF_INET }, { "create_unlink", test_create_unlink, .t_flags = FLAG_PATH }, + { "bad_open", test_bad_open }, { "open_close", test_open_close, .t_flags = FLAG_PATH }, { "open_read_close_1", test_open_read_close, .t_flags = FLAG_PATH, .t_int = 1 }, From owner-svn-src-all@freebsd.org Mon Apr 16 17:26:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8A03F95FB9; Mon, 16 Apr 2018 17:26:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7D580255; Mon, 16 Apr 2018 17:26:32 +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 786EA205B1; Mon, 16 Apr 2018 17:26:32 +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 w3GHQWM8031837; Mon, 16 Apr 2018 17:26:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHQWmG031836; Mon, 16 Apr 2018 17:26:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161726.w3GHQWmG031836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:26: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: r332624 - stable/11/tools/tools/syscall_timing X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/tools/tools/syscall_timing X-SVN-Commit-Revision: 332624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:26:33 -0000 Author: trasz Date: Mon Apr 16 17:26:32 2018 New Revision: 332624 URL: https://svnweb.freebsd.org/changeset/base/332624 Log: MFC r325314: Add getpriority(2) benchmark; it's a lightweight syscall which does pretty much nothing - just like getuid(2) - but takes arguments. Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c ============================================================================== --- stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:25:52 2018 (r332623) +++ stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:26:32 2018 (r332624) @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -162,6 +163,22 @@ test_gettimeofday(uintmax_t num, uintmax_t int_arg, co } uintmax_t +test_getpriority(uintmax_t num, uintmax_t int_arg, const char *path) +{ + uintmax_t i; + + benchmark_start(); + for (i = 0; i < num; i++) { + if (alarm_fired) + break; + (void)getpriority(PRIO_PROCESS, 0); + } + benchmark_stop(); + return (i); +} + + +uintmax_t test_pipe(uintmax_t num, uintmax_t int_arg, const char *path) { int fd[2], i; @@ -648,6 +665,7 @@ static const struct test tests[] = { { "getppid", test_getppid }, { "clock_gettime", test_clock_gettime }, { "gettimeofday", test_gettimeofday }, + { "getpriority", test_getpriority }, { "pipe", test_pipe }, { "socket_local_stream", test_socket_stream, .t_int = PF_LOCAL }, { "socket_local_dgram", test_socket_dgram, .t_int = PF_LOCAL }, From owner-svn-src-all@freebsd.org Mon Apr 16 17:27:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A68B2F96104; Mon, 16 Apr 2018 17:27:13 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D03080396; Mon, 16 Apr 2018 17:27:13 +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 7723E205B2; Mon, 16 Apr 2018 17:27:13 +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 w3GHRDqf031917; Mon, 16 Apr 2018 17:27:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHRDnn031916; Mon, 16 Apr 2018 17:27:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161727.w3GHRDnn031916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:27: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: r332625 - stable/11/tools/tools/syscall_timing X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/tools/tools/syscall_timing X-SVN-Commit-Revision: 332625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:27:13 -0000 Author: trasz Date: Mon Apr 16 17:27:13 2018 New Revision: 332625 URL: https://svnweb.freebsd.org/changeset/base/332625 Log: MFC r325315: Add select(2) benchmark. It takes four pointers; unfortunately it's somewhat heavy. Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c ============================================================================== --- stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:26:32 2018 (r332624) +++ stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:27:13 2018 (r332625) @@ -177,7 +177,6 @@ test_getpriority(uintmax_t num, uintmax_t int_arg, con return (i); } - uintmax_t test_pipe(uintmax_t num, uintmax_t int_arg, const char *path) { @@ -207,6 +206,31 @@ test_pipe(uintmax_t num, uintmax_t int_arg, const char } uintmax_t +test_select(uintmax_t num, uintmax_t int_arg, const char *path) +{ + fd_set readfds, writefds, exceptfds; + struct timeval tv; + uintmax_t i; + int error; + + FD_ZERO(&readfds); + FD_ZERO(&writefds); + FD_ZERO(&exceptfds); + + tv.tv_sec = 0; + tv.tv_usec = 0; + + benchmark_start(); + for (i = 0; i < num; i++) { + if (alarm_fired) + break; + (void)select(0, &readfds, &writefds, &exceptfds, &tv); + } + benchmark_stop(); + return (i); +} + +uintmax_t test_socket_stream(uintmax_t num, uintmax_t int_arg, const char *path) { uintmax_t i; @@ -667,6 +691,7 @@ static const struct test tests[] = { { "gettimeofday", test_gettimeofday }, { "getpriority", test_getpriority }, { "pipe", test_pipe }, + { "select", test_select }, { "socket_local_stream", test_socket_stream, .t_int = PF_LOCAL }, { "socket_local_dgram", test_socket_dgram, .t_int = PF_LOCAL }, { "socketpair_stream", test_socketpair_stream }, From owner-svn-src-all@freebsd.org Mon Apr 16 17:28:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE55EF963AD; Mon, 16 Apr 2018 17:28:59 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 705648067B; Mon, 16 Apr 2018 17:28:59 +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 6B28C205B4; Mon, 16 Apr 2018 17:28:59 +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 w3GHSxbK032427; Mon, 16 Apr 2018 17:28:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHSxTo032426; Mon, 16 Apr 2018 17:28:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161728.w3GHSxTo032426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:28: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: r332626 - stable/11/tools/tools/syscall_timing X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/tools/tools/syscall_timing X-SVN-Commit-Revision: 332626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:28:59 -0000 Author: trasz Date: Mon Apr 16 17:28:59 2018 New Revision: 332626 URL: https://svnweb.freebsd.org/changeset/base/332626 Log: MFC r325316: Add benchmark for getresuid(2) - three pointers, although only "output" ones, and quite lightwait. The purpose of this commit, and the previous one, is to be able to measure overhead of pointer arguments - in case you're running a strange architecture where pointers and integers are quite different things at the hardware level. Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c ============================================================================== --- stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:27:13 2018 (r332625) +++ stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:28:59 2018 (r332626) @@ -131,6 +131,22 @@ test_getppid(uintmax_t num, uintmax_t int_arg, const c } uintmax_t +test_getresuid(uintmax_t num, uintmax_t int_arg, const char *path) +{ + uid_t ruid, euid, suid; + uintmax_t i; + + benchmark_start(); + for (i = 0; i < num; i++) { + if (alarm_fired) + break; + (void)getresuid(&ruid, &euid, &suid); + } + benchmark_stop(); + return (i); +} + +uintmax_t test_clock_gettime(uintmax_t num, uintmax_t int_arg, const char *path) { struct timespec ts; @@ -687,6 +703,7 @@ struct test { static const struct test tests[] = { { "getuid", test_getuid }, { "getppid", test_getppid }, + { "getresuid", test_getresuid }, { "clock_gettime", test_clock_gettime }, { "gettimeofday", test_gettimeofday }, { "getpriority", test_getpriority }, From owner-svn-src-all@freebsd.org Mon Apr 16 17:29:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D411F964F6; Mon, 16 Apr 2018 17:29:51 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB89180862; Mon, 16 Apr 2018 17:29:50 +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 D689C205B6; Mon, 16 Apr 2018 17:29:50 +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 w3GHTowS032700; Mon, 16 Apr 2018 17:29:50 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHToXI032699; Mon, 16 Apr 2018 17:29:50 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161729.w3GHToXI032699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332627 - stable/11/tools/tools/syscall_timing X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/tools/tools/syscall_timing X-SVN-Commit-Revision: 332627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:29:51 -0000 Author: trasz Date: Mon Apr 16 17:29:50 2018 New Revision: 332627 URL: https://svnweb.freebsd.org/changeset/base/332627 Log: MFC r325318: Add benchmark for access(2). Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c ============================================================================== --- stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:28:59 2018 (r332626) +++ stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:29:50 2018 (r332627) @@ -339,6 +339,28 @@ test_socketpair_dgram(uintmax_t num, uintmax_t int_arg } uintmax_t +test_access(uintmax_t num, uintmax_t int_arg, const char *path) +{ + uintmax_t i; + int fd; + + fd = access(path, O_RDONLY); + if (fd < 0) + err(-1, "test_access: %s", path); + close(fd); + + benchmark_start(); + for (i = 0; i < num; i++) { + if (alarm_fired) + break; + access(path, O_RDONLY); + close(fd); + } + benchmark_stop(); + return (i); +} + +uintmax_t test_create_unlink(uintmax_t num, uintmax_t int_arg, const char *path) { uintmax_t i; @@ -715,6 +737,7 @@ static const struct test tests[] = { { "socketpair_dgram", test_socketpair_dgram }, { "socket_tcp", test_socket_stream, .t_int = PF_INET }, { "socket_udp", test_socket_dgram, .t_int = PF_INET }, + { "access", test_access, .t_flags = FLAG_PATH }, { "create_unlink", test_create_unlink, .t_flags = FLAG_PATH }, { "bad_open", test_bad_open }, { "open_close", test_open_close, .t_flags = FLAG_PATH }, From owner-svn-src-all@freebsd.org Mon Apr 16 17:30:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A833DF9663A; Mon, 16 Apr 2018 17:30:34 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C72B80BD1; Mon, 16 Apr 2018 17:30:34 +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 3E2E5205BA; Mon, 16 Apr 2018 17:30:34 +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 w3GHUY0H032971; Mon, 16 Apr 2018 17:30:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHUYiF032970; Mon, 16 Apr 2018 17:30:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804161730.w3GHUYiF032970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 17:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332628 - stable/11/tools/tools/syscall_timing X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/tools/tools/syscall_timing X-SVN-Commit-Revision: 332628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:30:34 -0000 Author: trasz Date: Mon Apr 16 17:30:33 2018 New Revision: 332628 URL: https://svnweb.freebsd.org/changeset/base/332628 Log: MFC r325313: Make syscall_timing(1) default to a temporary file when run without -p. Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/syscall_timing/syscall_timing.c ============================================================================== --- stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:29:50 2018 (r332627) +++ stable/11/tools/tools/syscall_timing/syscall_timing.c Mon Apr 16 17:30:33 2018 (r332628) @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -792,15 +793,17 @@ main(int argc, char *argv[]) struct timespec ts_res; const struct test *the_test; const char *path; + char *tmp_dir, *tmp_path; long long ll; char *endp; - int ch, error, i, j, k; + int ch, fd, error, i, j, k, rv; uintmax_t iterations, loops; alarm_timeout = 1; iterations = 0; loops = 10; path = NULL; + tmp_path = NULL; while ((ch = getopt(argc, argv, "i:l:p:s:")) != -1) { switch (ch) { case 'i': @@ -859,7 +862,15 @@ main(int argc, char *argv[]) if (the_test == NULL) usage(); if ((the_test->t_flags & FLAG_PATH) && (path == NULL)) { - errx(-1, "%s requires -p", the_test->t_name); + tmp_dir = strdup("/tmp/syscall_timing.XXXXXXXX"); + if (tmp_dir == NULL) + err(1, "strdup"); + tmp_dir = mkdtemp(tmp_dir); + if (tmp_dir == NULL) + err(1, "mkdtemp"); + rv = asprintf(&tmp_path, "%s/testfile", tmp_dir); + if (rv <= 0) + err(1, "asprintf"); } } @@ -878,6 +889,19 @@ main(int argc, char *argv[]) the_test = &tests[i]; } + if (tmp_path != NULL) { + fd = open(tmp_path, O_WRONLY | O_CREAT, 0700); + if (fd < 0) + err(1, "cannot open %s", tmp_path); + error = ftruncate(fd, 1000000); + if (error != 0) + err(1, "ftruncate"); + error = close(fd); + if (error != 0) + err(1, "close"); + path = tmp_path; + } + /* * Run one warmup, then do the real thing (loops) times. */ @@ -903,5 +927,15 @@ main(int argc, char *argv[]) printf("0.%09ju\n", (uintmax_t)nsecsperit); } } + + if (tmp_path != NULL) { + error = unlink(tmp_path); + if (error != 0 && errno != ENOENT) + warn("cannot unlink %s", tmp_path); + error = rmdir(tmp_dir); + if (error != 0) + warn("cannot rmdir %s", tmp_dir); + } + return (0); } From owner-svn-src-all@freebsd.org Mon Apr 16 17:43:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A701F97879; Mon, 16 Apr 2018 17:43:27 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1F8F83A93; Mon, 16 Apr 2018 17:43:26 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCFB2208C9; Mon, 16 Apr 2018 17:43:26 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GHhQZT043010; Mon, 16 Apr 2018 17:43:26 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GHhQhU043009; Mon, 16 Apr 2018 17:43:26 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804161743.w3GHhQhU043009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 16 Apr 2018 17:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332629 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 332629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:43:27 -0000 Author: brooks Date: Mon Apr 16 17:43:26 2018 New Revision: 332629 URL: https://svnweb.freebsd.org/changeset/base/332629 Log: Remove unused badaddr() function. Reviewed by: jmallett Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15078 Modified: head/sys/mips/mips/support.S Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Mon Apr 16 17:30:33 2018 (r332628) +++ head/sys/mips/mips/support.S Mon Apr 16 17:43:26 2018 (r332629) @@ -105,38 +105,6 @@ .text /* - * See if access to addr with a len type instruction causes a machine check. - * len is length of access (1=byte, 2=short, 4=int) - * - * badaddr(addr, len) - * char *addr; - * int len; - */ -LEAF(badaddr) - PTR_LA v0, baderr - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - bne a1, 1, 2f - PTR_S v0, U_PCB_ONFAULT(v1) - b 5f - lbu v0, (a0) -2: - bne a1, 2, 4f - nop - b 5f - lhu v0, (a0) -4: - lw v0, (a0) -5: - PTR_S zero, U_PCB_ONFAULT(v1) - j ra - move v0, zero # made it w/o errors -baderr: - j ra - li v0, 1 # trap sends us here -END(badaddr) - -/* * int copystr(void *kfaddr, void *kdaddr, size_t maxlen, size_t *lencopied) * Copy a NIL-terminated string, at most maxlen characters long. Return the * number of characters copied (including the NIL) in *lencopied. If the From owner-svn-src-all@freebsd.org Mon Apr 16 17:44:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CEE2F97966 for ; Mon, 16 Apr 2018 17:44:18 +0000 (UTC) (envelope-from neha@credible.com) Received: from mail-qk0-x242.google.com (mail-qk0-x242.google.com [IPv6:2607:f8b0:400d:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7B0083C2B for ; Mon, 16 Apr 2018 17:44:17 +0000 (UTC) (envelope-from neha@credible.com) Received: by mail-qk0-x242.google.com with SMTP id c188so17476632qkg.2 for ; Mon, 16 Apr 2018 10:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=credible-com.20150623.gappssmtp.com; s=20150623; h=date:to:from:reply-to:subject:message-id:mime-version :content-transfer-encoding; bh=hzvMW2VpzWniLInAdL4m0jBtcOl7rtwB9jkPmHenA+E=; b=OuzSnYQn3K1RW4yqjszfps4mM0LR6fbSGrhTtoJAj+tRxcZF621d2wr3FxkDuNRLbs YIxB3oDGvJ6TLOL3F+RnR4JJWObsv/Y654OJlrTcUM8D7d26Yo6hMOFwXf6o7gjpI3Lc ZVMoSp5GFzvaNITxk+LCnQtaBYbcLwbWaqP05kVbIMJuqvq6pdGIT9b1xonQGLafUS5U eBeFT8pGDqpRyWxRzsfsq0ANPMBEIaTu01I+woTYpGWoS8liyGeUIvu5/IMBykmNH9Ta 4yhF0K+7ANYXUtqAqsLDpNQ2OqHfYpAnlJvgbRLlEbYX7sGZYEZK+XUif/P00/En9LpS ib9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:to:from:reply-to:subject:message-id :mime-version:content-transfer-encoding; bh=hzvMW2VpzWniLInAdL4m0jBtcOl7rtwB9jkPmHenA+E=; b=V1MrG11ih/MbHbpd684hNspH/vgx8oZcF025L5mdO8mi4mgW6+3pplG3l34abXtC+s 7HroIrLG6TgVg+/zAbTDIGdiUaBH6vfHaWPJWq1epmisT1LLA3ttUMz/KH/D7YX0IkJG Ho40F1O1JT6ylCG/F0FImOYFracdXVlert6N9l4m6AP4n9SIwEplLjvAPkZwo73FuFmE 3P3utsqILW47Yax8cC8/Y9cMntOohEZg8EYiT9QD0qm6VCYMAX28pFa/2oeo+wbxN+BH SWjroiEXZq13FQ1uqRqDCGyOaRcD4/f/xQL3ADyKGj1n/TgOkHgTWlNZDE0tDLqoYUFp Zzkg== X-Gm-Message-State: ALQs6tCOiF6GxOMxo/W77En80+0nPg9nYpibmyzZ28XBdjc7sS5VOb/H oXqsXRS0ytJG8wq5OTA+vKlUrKuE9tgwx8Uqns25yTgUzquEdRKnjFcroYllis3RqRM32yY+5E/ xX5BSRTpCGxi0q63sPOAOH5sESTPBOrJxB0QqluBabVGSM5NQbJ3m2P0xLTmIE99FYg== X-Google-Smtp-Source: AIpwx4+O80nsPTYZX1qYPoFSmDvDLGFEOxMQiZWDhm4yhxks1k3cbDqTo1TLqdmjnNrkVM0M/8BsEQ== X-Received: by 10.55.71.210 with SMTP id u201mr17218763qka.255.1523900656590; Mon, 16 Apr 2018 10:44:16 -0700 (PDT) Received: from credible.com (ec2-54-81-0-34.compute-1.amazonaws.com. [54.81.0.34]) by smtp.gmail.com with ESMTPSA id o67sm8507640qte.75.2018.04.16.10.44.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 10:44:15 -0700 (PDT) Date: Mon, 16 Apr 2018 17:44:15 +0000 To: svn-src-all@freebsd.org From: Neha Chhabdiya Reply-To: Neha Chhabdiya Subject: Re: New study: the best & worst states at managing debt Message-ID: <16973372.or_mail@credible.com> X-Priority: 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 17:44:18 -0000 Hey there, I’ve sent you a couple emails now and 1 of 2 things happened: It went to spam You’ve been busy I totally get it, but I’d still love to hear from you when you get a chance :) Please let me know what you think of the results! Thanks, Neha ----------- Neha Chhabdiya Community Manager p: 866-540-6005 e: neha@credible.com w: credible.com On Tue, Apr 10, 2018 at 5:42 PM, Neha Chhabdiya wrote: Hi there, Just following up because I didn’t hear back from you. Do you have a quick minute to check out our report? Here it is: https://www.credible.com/blog/best-worst-states-managing-debt/ I’m trying to spread the word and would love to share it with your audience. If you're interested, I could even write a personalized introduction to pair with it for you. What do you think of these survey results? Thanks, Neha -------- Community Manager p: 866-540-6005 e: neha@credible.com w: credible.com On Fri, Apr 6, 2018 at 5:45 PM, Neha Chhabdiya wrote: Hi there, Debt is a major issue many Americans face today and we wanted to find out where people are faring the worst. I wanted to share this new analysis from Credible because you’ve touched on debt in the past. Here are a few highlights of the best and worst states at managing debt: On average, people in Michigan have the least debt relative to the income they make Hawaii has the highest average debt-to-income ratio of all states On average, borrowers are paying nearly $1,500 on monthly credit card bills, student loan debt, and housing costs I think it would be really interesting to see how your audience would respond to that. Will you let me know what you think of this piece? :) I can even send you a quick line of code to embed a map on your site if you’re interested. Thanks, Neha -------- Neha Chhabdiya Community Manager p: 866-540-6005 e: neha@credible.com w: credible.comDon't want emails from us anymore? Reply to this email with the word "UNSUBSCRIBE" in the subject line. Credible Labs Inc., 101 Green Street Level 2, San Francisco California, 94111, United States Don't want emails from us anymore? Reply to this email with the word "UNSUBSCRIBE" in the subject line. Credible Labs Inc., 101 Green Street Level 2, San Francisco California, 94111, United States Don't want emails from us anymore? Reply to this email with the word "UNSUBSCRIBE" in the subject line. Credible Labs Inc., 101 Green Street Level 2, San Francisco California, 94111, United States From owner-svn-src-all@freebsd.org Mon Apr 16 18:07:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B94CF98F14; Mon, 16 Apr 2018 18:07:52 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BDD78720E; Mon, 16 Apr 2018 18:07:52 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C11320C23; Mon, 16 Apr 2018 18:07:52 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GI7pdf053268; Mon, 16 Apr 2018 18:07:51 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GI7p9M053264; Mon, 16 Apr 2018 18:07:51 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804161807.w3GI7p9M053264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 16 Apr 2018 18:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332630 - in head: lib/libifconfig sbin/devd sbin/etherswitchcfg sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: lib/libifconfig sbin/devd sbin/etherswitchcfg sbin/ifconfig X-SVN-Commit-Revision: 332630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 18:07:52 -0000 Author: brooks Date: Mon Apr 16 18:07:51 2018 New Revision: 332630 URL: https://svnweb.freebsd.org/changeset/base/332630 Log: Remove support for FDDI and token ring media types in userland utilities. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15077 Modified: head/lib/libifconfig/libifconfig_media.c head/sbin/devd/devd.cc head/sbin/etherswitchcfg/ifmedia.c head/sbin/ifconfig/ifmedia.c Modified: head/lib/libifconfig/libifconfig_media.c ============================================================================== --- head/lib/libifconfig/libifconfig_media.c Mon Apr 16 17:43:26 2018 (r332629) +++ head/lib/libifconfig/libifconfig_media.c Mon Apr 16 18:07:51 2018 (r332630) @@ -373,15 +373,6 @@ ifconfig_media_get_status(const struct ifmediareq *ifm } break; - case IFM_FDDI: - case IFM_TOKEN: - if (ifmr->ifm_status & IFM_ACTIVE) { - return ("inserted"); - } else { - return ("no ring"); - } - break; - case IFM_IEEE80211: if (ifmr->ifm_status & IFM_ACTIVE) { /* NB: only sta mode associates */ Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Mon Apr 16 17:43:26 2018 (r332629) +++ head/sbin/devd/devd.cc Mon Apr 16 18:07:51 2018 (r332630) @@ -333,8 +333,6 @@ media::media(config &, const char *var, const char *ty { static struct ifmedia_description media_types[] = { { IFM_ETHER, "Ethernet" }, - { IFM_TOKEN, "Tokenring" }, - { IFM_FDDI, "FDDI" }, { IFM_IEEE80211, "802.11" }, { IFM_ATM, "ATM" }, { -1, "unknown" }, Modified: head/sbin/etherswitchcfg/ifmedia.c ============================================================================== --- head/sbin/etherswitchcfg/ifmedia.c Mon Apr 16 17:43:26 2018 (r332629) +++ head/sbin/etherswitchcfg/ifmedia.c Mon Apr 16 18:07:51 2018 (r332630) @@ -159,14 +159,6 @@ media_status(int s) printf("no carrier"); break; - case IFM_FDDI: - case IFM_TOKEN: - if (ifmr.ifm_status & IFM_ACTIVE) - printf("inserted"); - else - printf("no ring"); - break; - case IFM_IEEE80211: if (ifmr.ifm_status & IFM_ACTIVE) { /* NB: only sta mode associates */ Modified: head/sbin/ifconfig/ifmedia.c ============================================================================== --- head/sbin/ifconfig/ifmedia.c Mon Apr 16 17:43:26 2018 (r332629) +++ head/sbin/ifconfig/ifmedia.c Mon Apr 16 18:07:51 2018 (r332630) @@ -168,14 +168,6 @@ media_status(int s) printf("no carrier"); break; - case IFM_FDDI: - case IFM_TOKEN: - if (ifmr.ifm_status & IFM_ACTIVE) - printf("inserted"); - else - printf("no ring"); - break; - case IFM_IEEE80211: if (ifmr.ifm_status & IFM_ACTIVE) { /* NB: only sta mode associates */ From owner-svn-src-all@freebsd.org Mon Apr 16 18:12:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA4B8F998A5; Mon, 16 Apr 2018 18:12:16 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 574578791F; Mon, 16 Apr 2018 18:12:16 +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 524CE20DA4; Mon, 16 Apr 2018 18:12:16 +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 w3GICGDG058177; Mon, 16 Apr 2018 18:12:16 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GICGZS058174; Mon, 16 Apr 2018 18:12:16 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201804161812.w3GICGZS058174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 16 Apr 2018 18:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332631 - in head: sys/kern tests/sys/aio X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: sys/kern tests/sys/aio X-SVN-Commit-Revision: 332631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 18:12:16 -0000 Author: asomers Date: Mon Apr 16 18:12:15 2018 New Revision: 332631 URL: https://svnweb.freebsd.org/changeset/base/332631 Log: lio_listio: return EAGAIN instead of EIO when out of resources This behavior is already documented by the man page, and suggested by POSIX. Reviewed by: jhb MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D15099 Modified: head/sys/kern/vfs_aio.c head/tests/sys/aio/Makefile head/tests/sys/aio/lio_test.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Mon Apr 16 18:07:51 2018 (r332630) +++ head/sys/kern/vfs_aio.c Mon Apr 16 18:12:15 2018 (r332631) @@ -2131,7 +2131,7 @@ kern_lio_listio(struct thread *td, int mode, struct ai struct aioliojob *lj; struct kevent kev; int error; - int nerror; + int nagain, nerror; int i; if ((mode != LIO_NOWAIT) && (mode != LIO_WAIT)) @@ -2200,12 +2200,15 @@ kern_lio_listio(struct thread *td, int mode, struct ai /* * Get pointers to the list of I/O requests. */ + nagain = 0; nerror = 0; for (i = 0; i < nent; i++) { job = acb_list[i]; if (job != NULL) { error = aio_aqueue(td, job, lj, LIO_NOP, ops); - if (error != 0) + if (error == EAGAIN) + nagain++; + else if (error != 0) nerror++; } } @@ -2252,7 +2255,10 @@ kern_lio_listio(struct thread *td, int mode, struct ai if (nerror) return (EIO); - return (error); + else if (nagain) + return (EAGAIN); + else + return (error); } /* syscall - list directed I/O (REALTIME) */ Modified: head/tests/sys/aio/Makefile ============================================================================== --- head/tests/sys/aio/Makefile Mon Apr 16 18:07:51 2018 (r332630) +++ head/tests/sys/aio/Makefile Mon Apr 16 18:12:15 2018 (r332631) @@ -6,6 +6,8 @@ ATF_TESTS_C+= aio_test ATF_TESTS_C+= lio_test TEST_METADATA.aio_test+= timeout="30" TEST_METADATA.lio_test+= timeout="10" +# Some lio_test testcases involve system resource limitations, so cannot run concurrently +TEST_METADATA.lio_test+= is_exclusive=true PLAIN_TESTS_C+= aio_kqueue_test PLAIN_TESTS_C+= lio_kqueue_test Modified: head/tests/sys/aio/lio_test.c ============================================================================== --- head/tests/sys/aio/lio_test.c Mon Apr 16 18:07:51 2018 (r332630) +++ head/tests/sys/aio/lio_test.c Mon Apr 16 18:12:15 2018 (r332631) @@ -30,10 +30,13 @@ #include #include +#include #include +#include #include +#include "local.h" #include "freebsd_test_suite/macros.h" static sem_t completions; @@ -51,6 +54,73 @@ thr_handler(union sigval sv __unused) ATF_REQUIRE_EQ(0, sem_post(&completions)); } +/* + * If lio_listio is unable to enqueue any requests at all, it should return + * EAGAIN. + */ +ATF_TC_WITHOUT_HEAD(lio_listio_eagain_kevent); +ATF_TC_BODY(lio_listio_eagain_kevent, tc) +{ + int fd, i, j, kq, max_queue_per_proc, ios_per_call; + size_t max_queue_per_proc_size; + struct aiocb *aiocbs[2]; + struct aiocb **list[2]; + struct sigevent sev[2]; + char *buffer; + const char *path="tempfile"; + void *udata[2]; + + ATF_REQUIRE_KERNEL_MODULE("aio"); + ATF_REQUIRE_UNSAFE_AIO(); + + max_queue_per_proc_size = sizeof(max_queue_per_proc); + ATF_REQUIRE_EQ(sysctlbyname("vfs.aio.max_aio_queue_per_proc", + &max_queue_per_proc, &max_queue_per_proc_size, NULL, 0), 0); + ios_per_call = max_queue_per_proc; + + fd = open(path, O_RDWR|O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + + kq = kqueue(); + ATF_REQUIRE(kq > 0); + + buffer = calloc(1, 4096); + ATF_REQUIRE(buffer != NULL); + + /* + * Call lio_listio twice, each with the maximum number of operations. + * The first call should succeed and the second should fail. + */ + for (i = 0; i < 2; i++) { + aiocbs[i] = calloc(ios_per_call, sizeof(struct aiocb)); + ATF_REQUIRE(aiocbs[i] != NULL); + list[i] = calloc(ios_per_call, sizeof(struct aiocb*)); + ATF_REQUIRE(list[i] != NULL); + udata[i] = (void*)((caddr_t)0xdead0000 + i); + sev[i].sigev_notify = SIGEV_KEVENT; + sev[i].sigev_notify_kqueue = kq; + sev[i].sigev_value.sival_ptr = udata[i]; + for (j = 0; j < ios_per_call; j++) { + aiocbs[i][j].aio_fildes = fd; + aiocbs[i][j].aio_offset = (i * ios_per_call + j) * 4096; + aiocbs[i][j].aio_buf = buffer; + aiocbs[i][j].aio_nbytes = 4096; + aiocbs[i][j].aio_lio_opcode = LIO_WRITE; + list[i][j] = &aiocbs[i][j]; + } + } + + ATF_REQUIRE_EQ(0, lio_listio(LIO_NOWAIT, list[0], ios_per_call, &sev[0])); + ATF_REQUIRE_EQ(-1, lio_listio(LIO_NOWAIT, list[1], ios_per_call, &sev[1])); + /* + * The second lio_listio call should fail with EAGAIN. Bad timing may + * mean that some requests did get enqueued, but the result should + * still be EAGAIN. + */ + ATF_REQUIRE_EQ(errno, EAGAIN); +} + + /* With LIO_WAIT, an empty lio_listio should return immediately */ ATF_TC_WITHOUT_HEAD(lio_listio_empty_wait); ATF_TC_BODY(lio_listio_empty_wait, tc) @@ -136,6 +206,7 @@ ATF_TC_BODY(lio_listio_empty_nowait_thread, tc) ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, lio_listio_eagain_kevent); ATF_TP_ADD_TC(tp, lio_listio_empty_nowait_kevent); ATF_TP_ADD_TC(tp, lio_listio_empty_nowait_signal); ATF_TP_ADD_TC(tp, lio_listio_empty_nowait_thread); From owner-svn-src-all@freebsd.org Mon Apr 16 18:46:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8EF0F9C045; Mon, 16 Apr 2018 18:46:07 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 A4FBD6BF00; Mon, 16 Apr 2018 18:46:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3GIjw7I052368; Mon, 16 Apr 2018 11:45:58 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3GIjwZg052367; Mon, 16 Apr 2018 11:45:58 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804161845.w3GIjwZg052367@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r332596 - stable/11/sys/fs/autofs In-Reply-To: <201804161615.w3GGFVmn093599@repo.freebsd.org> To: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 11:45:58 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 18:46:07 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: trasz > Date: Mon Apr 16 16:15:31 2018 > New Revision: 332596 > URL: https://svnweb.freebsd.org/changeset/base/332596 > > Log: > MFC r328339: > > Add SPDX tags to autofs(5). > Please until I resolve the eadler miss merge/revirt mess with SPDX do NOT touch any SPDX stuff in 11/stable. This is probably a remerge of what is already in those patches. Thanks, > Modified: > stable/11/sys/fs/autofs/autofs.h > stable/11/sys/fs/autofs/autofs_ioctl.h > stable/11/sys/fs/autofs/autofs_vfsops.c > stable/11/sys/fs/autofs/autofs_vnops.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sys/fs/autofs/autofs.h > ============================================================================== > --- stable/11/sys/fs/autofs/autofs.h Mon Apr 16 16:14:05 2018 (r332595) > +++ stable/11/sys/fs/autofs/autofs.h Mon Apr 16 16:15:31 2018 (r332596) > @@ -1,4 +1,6 @@ > /*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > * Copyright (c) 2014 The FreeBSD Foundation > * All rights reserved. > * > > Modified: stable/11/sys/fs/autofs/autofs_ioctl.h > ============================================================================== > --- stable/11/sys/fs/autofs/autofs_ioctl.h Mon Apr 16 16:14:05 2018 (r332595) > +++ stable/11/sys/fs/autofs/autofs_ioctl.h Mon Apr 16 16:15:31 2018 (r332596) > @@ -1,4 +1,6 @@ > /*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > * Copyright (c) 2013 The FreeBSD Foundation > * All rights reserved. > * > > Modified: stable/11/sys/fs/autofs/autofs_vfsops.c > ============================================================================== > --- stable/11/sys/fs/autofs/autofs_vfsops.c Mon Apr 16 16:14:05 2018 (r332595) > +++ stable/11/sys/fs/autofs/autofs_vfsops.c Mon Apr 16 16:15:31 2018 (r332596) > @@ -1,4 +1,6 @@ > /*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > * Copyright (c) 2014 The FreeBSD Foundation > * All rights reserved. > * > > Modified: stable/11/sys/fs/autofs/autofs_vnops.c > ============================================================================== > --- stable/11/sys/fs/autofs/autofs_vnops.c Mon Apr 16 16:14:05 2018 (r332595) > +++ stable/11/sys/fs/autofs/autofs_vnops.c Mon Apr 16 16:15:31 2018 (r332596) > @@ -1,4 +1,6 @@ > /*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > * Copyright (c) 2014 The FreeBSD Foundation > * All rights reserved. > * > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Apr 16 18:57:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CD4EF9CCAD; Mon, 16 Apr 2018 18:57:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497E56D5FC; Mon, 16 Apr 2018 18:57:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 0979810AFD2; Mon, 16 Apr 2018 14:57:10 -0400 (EDT) From: John Baldwin To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332498 - head/sys/x86/cpufreq Date: Mon, 16 Apr 2018 10:11:16 -0700 Message-ID: <3726806.j2KQuIGiZ0@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201804140315.w3E3F5Id058802@repo.freebsd.org> References: <201804140315.w3E3F5Id058802@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 16 Apr 2018 14:57:10 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 18:57:17 -0000 On Saturday, April 14, 2018 03:15:05 AM Conrad Meyer wrote: > Author: cem > Date: Sat Apr 14 03:15:05 2018 > New Revision: 332498 > URL: https://svnweb.freebsd.org/changeset/base/332498 > > Log: > cpufreq: Remove error-prone table terminators in favor of automatic sizing > > PR: 227388 > Reported by: Vladimir Machulsky > Sponsored by: Dell EMC Isilon Presumably you could use nitems() on ESTprocs as well rather than a terminator? -- John Baldwin From owner-svn-src-all@freebsd.org Mon Apr 16 19:00:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30F51F9D068 for ; Mon, 16 Apr 2018 19:00:32 +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 9BF7B6DC11 for ; Mon, 16 Apr 2018 19:00:31 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6d6f4ec0-41a8-11e8-91c6-33ffc249f3e8 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 outbound1.eu.mailhop.org (Halon) with ESMTPSA id 6d6f4ec0-41a8-11e8-91c6-33ffc249f3e8; Mon, 16 Apr 2018 19:00:29 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w3GJ0LZj018507; Mon, 16 Apr 2018 13:00:21 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1523905221.69449.14.camel@freebsd.org> Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... From: Ian Lepore To: Eitan Adler , Kyle Evans Cc: "Rodney W. Grimes" , Glen Barber , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Mon, 16 Apr 2018 13:00:21 -0600 In-Reply-To: References: <1523837543.69449.8.camel@freebsd.org> <201804160028.w3G0S58v048517@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 19:00:32 -0000 On Sun, 2018-04-15 at 18:08 -0700, Eitan Adler wrote: > On 15 April 2018 at 17:53, Kyle Evans wrote: > > > > On Sun, Apr 15, 2018 at 7:28 PM, Rodney W. Grimes > > wrote: > > > > > > > > > > > On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: > > > > > > > > > > [...] > > > > > I tried to get this slowed down until we could get to a concenses, > > > > > I think our mess is as big now as it was before. > > > > > > > > > Or bigger. I've just discovered this commit reverted stuff that wasn't > > > > part of the bad original MFC commit. Things I MFC'd to 11 before this > > > > revert are now missing changes and the symptoms don't show up until a > > > > module fails to load due to missing symbols. > > > > > > > > I guess every change on the stable-11 branch between r330897 and > > > > r331722 needs to be audited to see if MFC'd or changed code has been > > > > unintentionally reverted. > > > > > > > > Here's the example I've just run across... > > > > > > > > r330897 merged this: > > > > > > > > https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=302408&r2=330897 > > > > > > > > Then I did some MFCing, then r331722 "reverted" this: > > > > > > > > https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spibus.c?r1=331506&r2=331722 > > > *sigh*  Ok, I can at least do an audit of the r331722 > > > that was suppose to be a revert and see what else I find. > > > > > > I'll start on this tomarrow and get the first pass audit out fairly early > > > in the morning my time (PST) > > > > > > Do we revert the attempted revert, then properly revert the original? > I am beyond confused. How did > svn merge -c-r330897 . > fail? > If that's literally the command you entered, it may have been the extra '-r' that caused a problem. To backout a single changelist, the command is   svn merge -c -330897 . I wonder if that extra -r separated the changelist number from the -c option, and in effect did a reverse-merge by revision number of everything back to r330897? -- Ian From owner-svn-src-all@freebsd.org Mon Apr 16 19:04:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84A4EF9D59F; Mon, 16 Apr 2018 19:04:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.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 CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 204666F20E; Mon, 16 Apr 2018 19:04:12 +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 7ED0233B7; Mon, 16 Apr 2018 19:04:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Mon, 16 Apr 2018 19:04:09 +0000 From: Glen Barber To: Ian Lepore Cc: Eitan Adler , Kyle Evans , "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r331722 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... Message-ID: <20180416190409.GG63343@FreeBSD.org> References: <1523837543.69449.8.camel@freebsd.org> <201804160028.w3G0S58v048517@pdx.rh.CN85.dnsmgr.net> <1523905221.69449.14.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="df+09Je9rNq3P+GE" Content-Disposition: inline In-Reply-To: <1523905221.69449.14.camel@freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 19:04:12 -0000 --df+09Je9rNq3P+GE Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 16, 2018 at 01:00:21PM -0600, Ian Lepore wrote: > On Sun, 2018-04-15 at 18:08 -0700, Eitan Adler wrote: > > On 15 April 2018 at 17:53, Kyle Evans wrote: > > >=20 > > > On Sun, Apr 15, 2018 at 7:28 PM, Rodney W. Grimes > > > wrote: > > > >=20 > > > > >=20 > > > > > On Wed, 2018-03-28 at 20:17 -0700, Rodney W. Grimes wrote: > > > > > >=20 > > > > > > [...] > > > > > > I tried to get this slowed down until we could get to a concens= es, > > > > > > I think our mess is as big now as it was before. > > > > > >=20 > > > > > Or bigger. I've just discovered this commit reverted stuff that w= asn't > > > > > part of the bad original MFC commit. Things I MFC'd to 11 before = this > > > > > revert are now missing changes and the symptoms don't show up unt= il a > > > > > module fails to load due to missing symbols. > > > > >=20 > > > > > I guess every change on the stable-11 branch between r330897 and > > > > > r331722 needs to be audited to see if MFC'd or changed code has b= een > > > > > unintentionally reverted. > > > > >=20 > > > > > Here's the example I've just run across... > > > > >=20 > > > > > r330897 merged this: > > > > >=20 > > > > > https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spib= us.c?r1=3D302408&r2=3D330897 > > > > >=20 > > > > > Then I did some MFCing, then r331722 "reverted" this: > > > > >=20 > > > > > https://svnweb.freebsd.org/base/stable/11/sys/dev/spibus/ofw_spib= us.c?r1=3D331506&r2=3D331722 > > > > *sigh*=A0=A0Ok, I can at least do an audit of the r331722 > > > > that was suppose to be a revert and see what else I find. > > > >=20 > > > > I'll start on this tomarrow and get the first pass audit out fairly= early > > > > in the morning my time (PST) > > > >=20 > > > > Do we revert the attempted revert, then properly revert the origina= l? > > I am beyond confused. How did > > svn merge -c-r330897 . > > fail? > >=20 >=20 > If that's literally the command you entered, it may have been the extra > '-r' that caused a problem. To backout a single changelist, the command > is >=20 > =A0 svn merge -c -330897 . >=20 > I wonder if that extra -r separated the changelist number from the -c > option, and in effect did a reverse-merge by revision number of > everything back to r330897? >=20 In this example, both '-rNNNNNN' and '-NNNNNN' are synonymous. Glen --df+09Je9rNq3P+GE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlrU86QACgkQAxRYpUeP 4pPJmg//QlNBvV7jI5wYie+2E0e6Xhb8SGaD6NBRY9OsgYHKGct7Xrnd9xgZ/LvZ 3ifmWs3dqboLDC6BPvAF33mIUt+CTUzcXApoctudaC6KYWA71O7YFfXPvPQo7VWk W6g6Ee3mqC5FgJmcBCOo5BOrVzk6knJ27n9r29pjd3S99B37Ll0xLf8V1ZmMtIB0 j8PAdo86F/aMNsBve6HLa+SRtsAA7s/WDIUsw+89ag+mWc/wPPegtWIVvNAO2ZdJ A5Z5v+uZM3uyetAaYL34WXusi5qvBHrfkatbzKyQe5KoA0yTDt5GkAI07VbCwsZc yqkJIvKOFNdGU1xOEir2m1iVVRd5Lo687j17FmbakIH1L+Ib+O4OAg2qfxOpzF0f 5jdksqZqfA3Fu+F0d+8Vl5PklH04qbxkwqMOrv2j2KJ5a7CwmQL4HC3EJAAte5zr rfj4NK70SlRvKfwCt+Z4+L4tyMrz5IVGX1tZ2NeMZTiJa+AwZfNoAReF+IeY5B5p R1Lqa5l3LEL1qrqlrgrK69e8xWxV3f0+c+VvN5AfszjBPY2TsS7xSkMCM8J25VHS HTu0kTAzTXYYMJ96UGPp34RbFPg9kRXuFVavZ4UuzjBquy1X00rzfcAJDFlHq7bA P5JoItrtsd2dVtprJ0SwMjz2pa8LIoq9oMOg737Hcb85CfB2/eU= =5JUl -----END PGP SIGNATURE----- --df+09Je9rNq3P+GE-- From owner-svn-src-all@freebsd.org Mon Apr 16 19:12:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA866F9DF51; Mon, 16 Apr 2018 19:12:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 72C416FC76; Mon, 16 Apr 2018 19:12:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f43.google.com with SMTP id q85-v6so13019829itc.0; Mon, 16 Apr 2018 12:12:53 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=/hzMjtVg/3c8TAsjmul7YHUki0psZLE3SkecfpBd6lg=; b=oJ0Pn8SGVYegLAieKQ8Owt4rNzhc6Cz6J6ph7B2819GzcwCMDqi/BCNwuhOeMGnGOF OkoJ6UwPNt0eSJeREi5xrr39rh9rR33vLwQ+gPHcPw6CAZykaoOLOR8IBmdM1UyoL85G BRq0CO2iwwAej7XI5PGxX8cyMhbJe3XT3Px7618I83EeimObdQpphJyqRSc5rGm9xXBp iNhTjp6o3SYQ9FIXDmgDgCmuTc/qnY7riIFqayyPn020wIRRJVrP2gUWydoJM6xh6xw9 cLAr4kJ4ztdNQ34c3TA1Ch4fMSKm5RzyB1ukhCLn88XuW7SaRjjTCEZSKwUskombkaJ3 U+9g== X-Gm-Message-State: ALQs6tBQU0+tkzumA3BLm8daa7vnrORwB7wnQo4nd8DgmtkS+tMy3PQ4 QdLLfFg/BAd8wcyWTVLG4qYqmXzq X-Google-Smtp-Source: AIpwx48dGsq2Aez2W1GFPrebM8LW40YkoVx8KewfUNz/JAgpQQcoafLud6kU6OM6Dx46cLTpVB4E8g== X-Received: by 2002:a24:57ce:: with SMTP id u197-v6mr15513648ita.133.1523905972335; Mon, 16 Apr 2018 12:12:52 -0700 (PDT) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com. [209.85.214.47]) by smtp.gmail.com with ESMTPSA id j20sm6254250ioe.67.2018.04.16.12.12.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 12:12:52 -0700 (PDT) Received: by mail-it0-f47.google.com with SMTP id 71-v6so13006530ith.2; Mon, 16 Apr 2018 12:12:52 -0700 (PDT) X-Received: by 2002:a24:5352:: with SMTP id n79-v6mr17556802itb.61.1523905971931; Mon, 16 Apr 2018 12:12:51 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.34.77 with HTTP; Mon, 16 Apr 2018 12:12:51 -0700 (PDT) In-Reply-To: <3726806.j2KQuIGiZ0@ralph.baldwin.cx> References: <201804140315.w3E3F5Id058802@repo.freebsd.org> <3726806.j2KQuIGiZ0@ralph.baldwin.cx> From: Conrad Meyer Date: Mon, 16 Apr 2018 12:12:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332498 - head/sys/x86/cpufreq To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 19:12:54 -0000 On Mon, Apr 16, 2018 at 10:11 AM, John Baldwin wrote: > On Saturday, April 14, 2018 03:15:05 AM Conrad Meyer wrote: >> Author: cem >> Date: Sat Apr 14 03:15:05 2018 >> New Revision: 332498 >> URL: https://svnweb.freebsd.org/changeset/base/332498 >> >> Log: >> cpufreq: Remove error-prone table terminators in favor of automatic sizing >> >> PR: 227388 >> Reported by: Vladimir Machulsky >> Sponsored by: Dell EMC Isilon > > Presumably you could use nitems() on ESTprocs as well rather than a terminator? Yep. From owner-svn-src-all@freebsd.org Mon Apr 16 19:26:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43FF8F9F3CE; Mon, 16 Apr 2018 19:26:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x232.google.com (mail-wr0-x232.google.com [IPv6:2a00:1450:400c:c0c::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA9E671B46; Mon, 16 Apr 2018 19:26:52 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x232.google.com with SMTP id l49so29102784wrl.4; Mon, 16 Apr 2018 12:26:52 -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:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=uDOm20L4G7dIRVcmgWWjtjf84W94IyuawC3BEDLt2xg=; b=pmIMkmLZLJ//ZG208UNAuYMqSzwF0eH0yiBsuyVyXIxHcJq3M5o9hCyJGEzBIn5G6z bqrZGsZbU6x9JZZ+m4aH4Uny8xNZfbxCxE8o9laUE+8wJGNPddvaFSbbo61rpABxfJlq E82e9U4NESF96jL7LXBEAaoPaws/MCoOk5PTLjGuejk16sdKrfdOadjMoneAagOoJmDq GGdByEO152G/CxZBGaTrpGio6hls+LxnarJ6+Zo/J/Pw5+VEFtUx1fW2ujSw/lhwQR45 TCOuShcYQsaPVltnREagQufPWoV1ul2UXHZ2Fx/pU4Gkb40Bd34RvPPSb3IMQCGvb/Vk c4QA== 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=uDOm20L4G7dIRVcmgWWjtjf84W94IyuawC3BEDLt2xg=; b=I55jt7IgIIk3vn/Na0OwGq3ewkcirz9R+FfSXEQm4rAdpkKWGPb+f7hYeuaoQ69MT6 kLxE0I2DsKJLMF5tu0jxd9OXzCuuvUlbcnLo1UvXXt9VGTgMV7j88aWxTpQWeP2SejMT BQGONuYHiHjxzdXe0oZCEgfqdt2zE/yHH0P8xgL6aclSj49C9qValqDZZfavVIO7X79l kZlaCjhqMRiMaUicxdETmcgXwQ+gtD7Szz+0pwDFOaGntPn5sAyEmIX2+I5RzXdcceaX dCXliPEMC+EgKRua1LKfklzzmKEscEUIu0UNM1iKgHGjO/5UF0xfxfccEWdmjTyJLwZD IldQ== X-Gm-Message-State: ALQs6tDhAC1oruchJx7KWBoFEIz7vqGLy3srB4sWnCOLTsreUGJM39/4 hD95n3nkhJfj6SlOT3kwsMzwuA== X-Google-Smtp-Source: AIpwx4+GM1xW9STCophIWvhVf86V6QjiXyQixFgv5AdH0C+QOzzT6jr+5LHUleF7JAQ90/QLmwVlfg== X-Received: by 10.28.20.140 with SMTP id 134mr10556896wmu.87.1523906809888; Mon, 16 Apr 2018 12:26:49 -0700 (PDT) Received: from brick (cpc92302-cmbg19-2-0-cust461.5-4.cable.virginm.net. [82.1.209.206]) by smtp.gmail.com with ESMTPSA id u14sm12171756wri.31.2018.04.16.12.26.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 12:26:49 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 16 Apr 2018 20:26:46 +0100 From: Edward Tomasz Napierala To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r332596 - stable/11/sys/fs/autofs Message-ID: <20180416192646.GA79786@brick> Mail-Followup-To: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201804161615.w3GGFVmn093599@repo.freebsd.org> <201804161845.w3GIjwZg052367@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201804161845.w3GIjwZg052367@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 19:26:53 -0000 On 0416T1145, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: trasz > > Date: Mon Apr 16 16:15:31 2018 > > New Revision: 332596 > > URL: https://svnweb.freebsd.org/changeset/base/332596 > > > > Log: > > MFC r328339: > > > > Add SPDX tags to autofs(5). > > > > Please until I resolve the eadler miss merge/revirt mess with > SPDX do NOT touch any SPDX stuff in 11/stable. Ok. Although, to be honest, I think I've already MFC-ed all the SPDX stuff I had in my queue before seeing your mail, sorry for that. From owner-svn-src-all@freebsd.org Mon Apr 16 19:33:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66045F9F9F0; Mon, 16 Apr 2018 19:33: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 091DD7336B; Mon, 16 Apr 2018 19:33:05 +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 0084821AB3; Mon, 16 Apr 2018 19:33:05 +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 w3GJX41C001629; Mon, 16 Apr 2018 19:33:04 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GJX4Yj001628; Mon, 16 Apr 2018 19:33:04 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201804161933.w3GJX4Yj001628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 16 Apr 2018 19:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332632 - head/usr.bin/quota X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.bin/quota X-SVN-Commit-Revision: 332632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 19:33:05 -0000 Author: cem Date: Mon Apr 16 19:33:04 2018 New Revision: 332632 URL: https://svnweb.freebsd.org/changeset/base/332632 Log: quota(1): Fix calculation overflow and underflow For very large quotas, do the multiplication as a 64 bit value to avoid overflow. For very small block sizes (smaller than DEV_BSIZE), multiple first before dividing by block size to avoid underflow. PR: 227496 Submitted by: Per Andersson Sponsored by: Dell EMC Isilon Modified: head/usr.bin/quota/quota.c Modified: head/usr.bin/quota/quota.c ============================================================================== --- head/usr.bin/quota/quota.c Mon Apr 16 18:12:15 2018 (r332631) +++ head/usr.bin/quota/quota.c Mon Apr 16 19:33:04 2018 (r332632) @@ -621,14 +621,14 @@ getnfsquota(struct statfs *fst, struct quotause *qup, gettimeofday(&tv, NULL); /* blocks*/ dqp->dqb_bhardlimit = - gq_rslt.getquota_rslt_u.gqr_rquota.rq_bhardlimit * - (gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE); + ((uint64_t)gq_rslt.getquota_rslt_u.gqr_rquota.rq_bhardlimit * + gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize) / DEV_BSIZE; dqp->dqb_bsoftlimit = - gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsoftlimit * - (gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE); + ((uint64_t)gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsoftlimit * + gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize) / DEV_BSIZE; dqp->dqb_curblocks = - gq_rslt.getquota_rslt_u.gqr_rquota.rq_curblocks * - (gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE); + ((uint64_t)gq_rslt.getquota_rslt_u.gqr_rquota.rq_curblocks * + gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize) / DEV_BSIZE; /* inodes */ dqp->dqb_ihardlimit = gq_rslt.getquota_rslt_u.gqr_rquota.rq_fhardlimit; From owner-svn-src-all@freebsd.org Mon Apr 16 20:37:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5656CFA3EB5; Mon, 16 Apr 2018 20:37:00 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 574937C0C7; Mon, 16 Apr 2018 20:36:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3GKatQ3052822; Mon, 16 Apr 2018 13:36:55 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3GKatqh052821; Mon, 16 Apr 2018 13:36:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804162036.w3GKatqh052821@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r332596 - stable/11/sys/fs/autofs In-Reply-To: <20180416192646.GA79786@brick> To: Edward Tomasz Napierala Date: Mon, 16 Apr 2018 13:36:55 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 20:37:00 -0000 > On 0416T1145, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > Author: trasz > > > Date: Mon Apr 16 16:15:31 2018 > > > New Revision: 332596 > > > URL: https://svnweb.freebsd.org/changeset/base/332596 > > > > > > Log: > > > MFC r328339: > > > > > > Add SPDX tags to autofs(5). > > > > > > > Please until I resolve the eadler miss merge/revirt mess with > > SPDX do NOT touch any SPDX stuff in 11/stable. > > Ok. Although, to be honest, I think I've already MFC-ed all the SPDX stuff > I had in my queue before seeing your mail, sorry for that. Could you do me a really big favor and see if any of the mfc's you did is in this list: Merged /head:r325966,326022-326025,326027,326192-326193,326219,326255-326261 If they are could you list them. That should save me some time on the clean up process as likely if you merged something in that list I am going to revert it when r330897 is reverted, so I need to know to reapply it. Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Apr 16 20:45:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37E76FA46C1; Mon, 16 Apr 2018 20:45:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E06EB7E51F; Mon, 16 Apr 2018 20:45:21 +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 D726E225A8; Mon, 16 Apr 2018 20:45:21 +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 w3GKjLTk036571; Mon, 16 Apr 2018 20:45:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GKjLIx036570; Mon, 16 Apr 2018 20:45:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201804162045.w3GKjLIx036570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 16 Apr 2018 20:45:21 +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: r332633 - in stable: 10/lib/libthr/thread 11/lib/libthr/thread X-SVN-Group: stable-10 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/lib/libthr/thread 11/lib/libthr/thread X-SVN-Commit-Revision: 332633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 20:45:22 -0000 Author: jhb Date: Mon Apr 16 20:45:21 2018 New Revision: 332633 URL: https://svnweb.freebsd.org/changeset/base/332633 Log: MFC 331324: Ensure thread library is initialized in pthread_testcancel(). Call _thr_check_init() before reading curthread in pthread_testcancel(). If a constructor in a library creates a semaphore via sem_init() and then waits for it via sem_wait(), the program can core dump in _pthread_testcancel() called from sem_wait(). This is because the semaphore implementation lives in libc, so the library's constructors can be run before libthr's constructors. Sponsored by: DARPA / AFRL Modified: stable/10/lib/libthr/thread/thr_cancel.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libthr/thread/thr_cancel.c Directory Properties: stable/11/ (props changed) Modified: stable/10/lib/libthr/thread/thr_cancel.c ============================================================================== --- stable/10/lib/libthr/thread/thr_cancel.c Mon Apr 16 19:33:04 2018 (r332632) +++ stable/10/lib/libthr/thread/thr_cancel.c Mon Apr 16 20:45:21 2018 (r332633) @@ -130,8 +130,10 @@ _pthread_setcanceltype(int type, int *oldtype) void _pthread_testcancel(void) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread; + _thr_check_init(); + curthread = _get_curthread(); testcancel(curthread); } From owner-svn-src-all@freebsd.org Mon Apr 16 20:45:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D11AFA46C2; Mon, 16 Apr 2018 20:45:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12DD17E522; Mon, 16 Apr 2018 20:45:22 +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 0DCC8225A9; Mon, 16 Apr 2018 20:45:22 +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 w3GKjLdn036577; Mon, 16 Apr 2018 20:45:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GKjLom036576; Mon, 16 Apr 2018 20:45:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201804162045.w3GKjLom036576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 16 Apr 2018 20:45: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: r332633 - in stable: 10/lib/libthr/thread 11/lib/libthr/thread X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/lib/libthr/thread 11/lib/libthr/thread X-SVN-Commit-Revision: 332633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 20:45:22 -0000 Author: jhb Date: Mon Apr 16 20:45:21 2018 New Revision: 332633 URL: https://svnweb.freebsd.org/changeset/base/332633 Log: MFC 331324: Ensure thread library is initialized in pthread_testcancel(). Call _thr_check_init() before reading curthread in pthread_testcancel(). If a constructor in a library creates a semaphore via sem_init() and then waits for it via sem_wait(), the program can core dump in _pthread_testcancel() called from sem_wait(). This is because the semaphore implementation lives in libc, so the library's constructors can be run before libthr's constructors. Sponsored by: DARPA / AFRL Modified: stable/11/lib/libthr/thread/thr_cancel.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libthr/thread/thr_cancel.c Directory Properties: stable/10/ (props changed) Modified: stable/11/lib/libthr/thread/thr_cancel.c ============================================================================== --- stable/11/lib/libthr/thread/thr_cancel.c Mon Apr 16 19:33:04 2018 (r332632) +++ stable/11/lib/libthr/thread/thr_cancel.c Mon Apr 16 20:45:21 2018 (r332633) @@ -130,8 +130,10 @@ _pthread_setcanceltype(int type, int *oldtype) void _pthread_testcancel(void) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread; + _thr_check_init(); + curthread = _get_curthread(); testcancel(curthread); } From owner-svn-src-all@freebsd.org Mon Apr 16 21:17:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D31ACFA641C; Mon, 16 Apr 2018 21:17:18 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A42A8459F; Mon, 16 Apr 2018 21:17:18 +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 6DC9D22A84; Mon, 16 Apr 2018 21:17:18 +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 w3GLHILF051705; Mon, 16 Apr 2018 21:17:18 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GLHINU051704; Mon, 16 Apr 2018 21:17:18 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201804162117.w3GLHINU051704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 16 Apr 2018 21:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332634 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 332634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 21:17:19 -0000 Author: tuexen Date: Mon Apr 16 21:17:18 2018 New Revision: 332634 URL: https://svnweb.freebsd.org/changeset/base/332634 Log: MFC r332269: Fix a signed/unsigned warning showing up for the userland stack on some platforms. Thanks to Felix Weinrank for reporting the issue. Modified: stable/11/sys/netinet/sctp_input.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_input.c ============================================================================== --- stable/11/sys/netinet/sctp_input.c Mon Apr 16 20:45:21 2018 (r332633) +++ stable/11/sys/netinet/sctp_input.c Mon Apr 16 21:17:18 2018 (r332634) @@ -2617,7 +2617,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in (sizeof(uint32_t)))); diff = now; timevalsub(&diff, &time_expires); - if (diff.tv_sec > UINT32_MAX / 1000000) { + if ((uint32_t)diff.tv_sec > UINT32_MAX / 1000000) { staleness = UINT32_MAX; } else { staleness = diff.tv_sec * 1000000; From owner-svn-src-all@freebsd.org Mon Apr 16 21:18:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EF18FA65AA; Mon, 16 Apr 2018 21:18:45 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F31588474E; Mon, 16 Apr 2018 21:18:44 +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 EDF9C22A8A; Mon, 16 Apr 2018 21:18:44 +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 w3GLIi4i051816; Mon, 16 Apr 2018 21:18:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GLIi4w051815; Mon, 16 Apr 2018 21:18:44 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201804162118.w3GLIi4w051815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 16 Apr 2018 21:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332635 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 332635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 21:18:45 -0000 Author: tuexen Date: Mon Apr 16 21:18:44 2018 New Revision: 332635 URL: https://svnweb.freebsd.org/changeset/base/332635 Log: MFC r332271: Small cleanup, no functional change. Modified: stable/11/sys/netinet/sctp_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/11/sys/netinet/sctp_usrreq.c Mon Apr 16 21:17:18 2018 (r332634) +++ stable/11/sys/netinet/sctp_usrreq.c Mon Apr 16 21:18:44 2018 (r332635) @@ -703,22 +703,10 @@ sctp_disconnect(struct socket *so) if (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) { /* Left with Data unread */ - struct mbuf *err; + struct mbuf *op_err; - err = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_NOWAIT, 1, MT_DATA); - if (err) { - /* - * Fill in the user - * initiated abort - */ - struct sctp_paramhdr *ph; - - ph = mtod(err, struct sctp_paramhdr *); - SCTP_BUF_LEN(err) = sizeof(struct sctp_paramhdr); - ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); - ph->param_length = htons(SCTP_BUF_LEN(err)); - } - sctp_send_abort_tcb(stcb, err, SCTP_SO_LOCKED); + op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); + sctp_send_abort_tcb(stcb, op_err, SCTP_SO_LOCKED); SCTP_STAT_INCR_COUNTER32(sctps_aborted); } SCTP_INP_RUNLOCK(inp); From owner-svn-src-all@freebsd.org Mon Apr 16 21:20:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30C78FA675E; Mon, 16 Apr 2018 21:20:35 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7586784A83; Mon, 16 Apr 2018 21:20:34 +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 7079022A92; Mon, 16 Apr 2018 21:20:34 +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 w3GLKYdK051960; Mon, 16 Apr 2018 21:20:34 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GLKYmU051958; Mon, 16 Apr 2018 21:20:34 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201804162120.w3GLKYmU051958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 16 Apr 2018 21:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332636 - in stable/11/sys: netinet netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/11/sys: netinet netinet6 X-SVN-Commit-Revision: 332636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 21:20:35 -0000 Author: tuexen Date: Mon Apr 16 21:20:34 2018 New Revision: 332636 URL: https://svnweb.freebsd.org/changeset/base/332636 Log: MFC r332273: Fix a logical inversion bug. Thanks to Irene Ruengeler for finding and reporting this bug. Modified: stable/11/sys/netinet/sctp_usrreq.c stable/11/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/11/sys/netinet/sctp_usrreq.c Mon Apr 16 21:18:44 2018 (r332635) +++ stable/11/sys/netinet/sctp_usrreq.c Mon Apr 16 21:20:34 2018 (r332636) @@ -202,7 +202,7 @@ sctp_notify(struct sctp_inpcb *inp, #endif /* no need to unlock here, since the TCB is gone */ } else if (icmp_code == ICMP_UNREACH_NEEDFRAG) { - if ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0) { + if (net->dest_state & SCTP_ADDR_NO_PMTUD) { SCTP_TCB_UNLOCK(stcb); return; } Modified: stable/11/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/11/sys/netinet6/sctp6_usrreq.c Mon Apr 16 21:18:44 2018 (r332635) +++ stable/11/sys/netinet6/sctp6_usrreq.c Mon Apr 16 21:20:34 2018 (r332636) @@ -221,7 +221,7 @@ sctp6_notify(struct sctp_inpcb *inp, } break; case ICMP6_PACKET_TOO_BIG: - if ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0) { + if (net->dest_state & SCTP_ADDR_NO_PMTUD) { SCTP_TCB_UNLOCK(stcb); break; } From owner-svn-src-all@freebsd.org Mon Apr 16 21:22:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EA2EFA69BB; Mon, 16 Apr 2018 21:22:13 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42E3A85D72; Mon, 16 Apr 2018 21:22:13 +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 3DCD722C08; Mon, 16 Apr 2018 21:22:13 +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 w3GLMDH1055728; Mon, 16 Apr 2018 21:22:13 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GLMDlj055727; Mon, 16 Apr 2018 21:22:13 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201804162122.w3GLMDlj055727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 16 Apr 2018 21:22: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: r332637 - stable/11/usr.bin/systat X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/11/usr.bin/systat X-SVN-Commit-Revision: 332637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2018 21:22:13 -0000 Author: tuexen Date: Mon Apr 16 21:22:12 2018 New Revision: 332637 URL: https://svnweb.freebsd.org/changeset/base/332637 Log: MFC r332353: Don't show the number of currently established SCTP associations, since this is not monotonically increasing. It's number can be derived from the other counters shown. Modified: stable/11/usr.bin/systat/sctp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/systat/sctp.c ============================================================================== --- stable/11/usr.bin/systat/sctp.c Mon Apr 16 21:20:34 2018 (r332636) +++ stable/11/usr.bin/systat/sctp.c Mon Apr 16 21:22:12 2018 (r332637) @@ -53,24 +53,23 @@ static struct sctpstat curstat, initstat, oldstat; 00 SCTP Associations SCTP Packets 01999999999999 associations initiated 999999999999 packets sent 02999999999999 associations accepted 999999999999 packets received -03999999999999 associations established 999999999999 - out of the blue -04999999999999 associations restarted 999999999999 - bad vtag -05999999999999 associations terminated 999999999999 - bad crc32c -06999999999999 associations aborted -07 -08 SCTP Timers SCTP Chunks -09999999999999 init timeouts 999999999999 control chunks sent -10999999999999 cookie timeouts 999999999999 data chunks sent -11999999999999 data timeouts 999999999999 - ordered -12999999999999 delayed sack timeouts 999999999999 - unordered -13999999999999 shutdown timeouts 999999999999 control chunks received -14999999999999 shutdown-ack timeouts 999999999999 data chunks received -15999999999999 shutdown guard timeouts 999999999999 - ordered -16999999999999 heartbeat timeouts 999999999999 - unordered -17999999999999 path MTU timeouts -18999999999999 autoclose timeouts SCTP user messages -19999999999999 asconf timeouts 999999999999 fragmented -20999999999999 stream reset timeouts 999999999999 reassembled +03999999999999 associations restarted 999999999999 - out of the blue +04999999999999 associations terminated 999999999999 - bad vtag +05999999999999 associations aborted 999999999999 - bad crc32c +06 +07 SCTP Timers SCTP Chunks +08999999999999 init timeouts 999999999999 control chunks sent +09999999999999 cookie timeouts 999999999999 data chunks sent +10999999999999 data timeouts 999999999999 - ordered +11999999999999 delayed sack timeouts 999999999999 - unordered +12999999999999 shutdown timeouts 999999999999 control chunks received +13999999999999 shutdown-ack timeouts 999999999999 data chunks received +14999999999999 shutdown guard timeouts 999999999999 - ordered +15999999999999 heartbeat timeouts 999999999999 - unordered +16999999999999 path MTU timeouts +17999999999999 autoclose timeouts SCTP user messages +18999999999999 asconf timeouts 999999999999 fragmented +19999999999999 stream reset timeouts 999999999999 reassembled --0123456789012345678901234567890123456789012345678901234567890123456789012345 --0 1 2 3 4 5 6 7 */ @@ -100,24 +99,23 @@ labelsctp(void) L(0, "SCTP Associations"); R(0, "SCTP Packets"); L(1, "associations initiated"); R(1, "packets sent"); L(2, "associations accepted"); R(2, "packets received"); - L(3, "associations established"); R(3, "- out of the blue"); - L(4, "associations restarted"); R(4, "- bad vtag"); - L(5, "associations terminated"); R(5, "- bad crc32c"); - L(6, "associations aborted"); + L(3, "associations restarted"); R(3, "- out of the blue"); + L(4, "associations terminated"); R(4, "- bad vtag"); + L(5, "associations aborted"); R(5, "- bad crc32c"); - L(8, "SCTP Timers"); R(8, "SCTP Chunks"); - L(9, "init timeouts"); R(9, "control chunks sent"); - L(10, "cookie timeouts"); R(10, "data chunks sent"); - L(11, "data timeouts"); R(11, "- ordered"); - L(12, "delayed sack timeouts"); R(12, "- unordered"); - L(13, "shutdown timeouts"); R(13, "control chunks received"); - L(14, "shutdown-ack timeouts"); R(14, "data chunks received"); - L(15, "shutdown guard timeouts"); R(15, "- ordered"); - L(16, "heartbeat timeouts"); R(16, "- unordered"); - L(17, "path MTU timeouts"); - L(18, "autoclose timeouts"); R(18, "SCTP User Messages"); - L(19, "asconf timeouts"); R(19, "fragmented"); - L(20, "stream reset timeouts"); R(20, "reassembled"); + L(7, "SCTP Timers"); R(7, "SCTP Chunks"); + L(8, "init timeouts"); R(8, "control chunks sent"); + L(9, "cookie timeouts"); R(9, "data chunks sent"); + L(10, "data timeouts"); R(10, "- ordered"); + L(11, "delayed sack timeouts"); R(11, "- unordered"); + L(12, "shutdown timeouts"); R(12, "control chunks received"); + L(13, "shutdown-ack timeouts"); R(13, "data chunks received"); + L(14, "shutdown guard timeouts"); R(14, "- ordered"); + L(15, "heartbeat timeouts"); R(15, "- unordered"); + L(16, "path MTU timeouts"); + L(17, "autoclose timeouts"); R(17, "SCTP User Messages"); + L(18, "asconf timeouts"); R(18, "fragmented"); + L(19, "stream reset timeouts"); R(19, "reassembled"); #undef L #undef R } @@ -286,24 +284,23 @@ showsctp(void) #define R(row, stat) DO(stat, row, 38) L(1, sctps_activeestab); R(1, sctps_outpackets); L(2, sctps_passiveestab); R(2, sctps_inpackets); - L(3, sctps_currestab); R(3, sctps_outoftheblue); - L(4, sctps_restartestab); R(4, sctps_badvtag); - L(5, sctps_shutdown); R(5, sctps_checksumerrors); - L(6, sctps_aborted); + L(3, sctps_restartestab); R(3, sctps_outoftheblue); + L(4, sctps_shutdown); R(4, sctps_badvtag); + L(5, sctps_aborted); R(5, sctps_checksumerrors); - L(9, sctps_timoinit); R(9, sctps_outcontrolchunks); - L(10, sctps_timocookie); R(10, sctps_senddata); - L(11, sctps_timodata); R(11, sctps_outorderchunks); - L(12, sctps_timosack); R(12, sctps_outunorderchunks); - L(13, sctps_timoshutdown); R(13, sctps_incontrolchunks); - L(14, sctps_timoshutdownack); R(14, sctps_recvdata); - L(15, sctps_timoshutdownguard); R(15, sctps_inorderchunks); - L(16, sctps_timoheartbeat); R(16, sctps_inunorderchunks); - L(17, sctps_timopathmtu); - L(18, sctps_timoautoclose); - L(19, sctps_timoasconf); R(19, sctps_fragusrmsgs); - L(20, sctps_timostrmrst); R(20, sctps_reasmusrmsgs); + L(8, sctps_timoinit); R(8, sctps_outcontrolchunks); + L(9, sctps_timocookie); R(9, sctps_senddata); + L(10, sctps_timodata); R(10, sctps_outorderchunks); + L(11, sctps_timosack); R(11, sctps_outunorderchunks); + L(12, sctps_timoshutdown); R(12, sctps_incontrolchunks); + L(13, sctps_timoshutdownack); R(13, sctps_recvdata); + L(14, sctps_timoshutdownguard); R(14, sctps_inorderchunks); + L(15, sctps_timoheartbeat); R(15, sctps_inunorderchunks); + L(16, sctps_timopathmtu); + L(17, sctps_timoautoclose); + L(18, sctps_timoasconf); R(18, sctps_fragusrmsgs); + L(19, sctps_timostrmrst); R(19, sctps_reasmusrmsgs); #undef DO #undef L #undef R From owner-svn-src-all@freebsd.org Tue Apr 17 00:02:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D74AF886BB; Tue, 17 Apr 2018 00:02:08 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670089.outbound.protection.outlook.com [40.107.67.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2548469326; Tue, 17 Apr 2018 00:02:05 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM (52.132.66.153) by YQBPR0101MB1538.CANPRD01.PROD.OUTLOOK.COM (52.132.69.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.9; Tue, 17 Apr 2018 00:02:04 +0000 Received: from YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM ([fe80::893c:efc2:d71f:945a]) by YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM ([fe80::893c:efc2:d71f:945a%13]) with mapi id 15.20.0675.015; Tue, 17 Apr 2018 00:02:04 +0000 From: Rick Macklem To: Julian Elischer , Konstantin Belousov , Andriy Gapon CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r332559 - head/usr.sbin/mountd Thread-Topic: svn commit: r332559 - head/usr.sbin/mountd Thread-Index: AQHT1d2LvqfGyf/rSkGmX+1c3ssiQQ== Date: Tue, 17 Apr 2018 00:02:04 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YQBPR0101MB1538; 7:/Sm3G+mb+OkUPB+A5r50daALVkqrGa7coSrUa1XZG6iI/d8dteiACea8ffg3uR4P9eiA58XEQjP2fMN677DZ8rUJqlmCz7ptGZxfKEv9aXbygMEwrLsepJj/W7KmtiaA0YWfH/eNeboJ4eb6bDPfWfmiQBuDLl6Wmw9+l0seQOQhKvUL4j6CKfL//c8PMFsFr0Nj+jORWNghfq8zmUxAgzk5O9eVlV8n7p5OoX8QsHa4b/BbqBgaP8FZ/qq61MHs x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YQBPR0101MB1538; x-ms-traffictypediagnostic: YQBPR0101MB1538: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231232)(944501351)(52105095)(10201501046)(6041310)(20161123564045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:YQBPR0101MB1538; BCL:0; PCL:0; RULEID:; SRVR:YQBPR0101MB1538; x-forefront-prvs: 0645BEB7AA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39380400002)(396003)(39860400002)(376002)(189003)(199004)(110136005)(54906003)(6246003)(97736004)(106356001)(486006)(316002)(39060400002)(53936002)(786003)(14454004)(81156014)(81166006)(8676002)(2900100001)(9686003)(8936002)(55016002)(33656002)(68736007)(74482002)(105586002)(186003)(86362001)(6436002)(4326008)(5660300001)(5250100002)(99286004)(478600001)(7696005)(25786009)(102836004)(229853002)(59450400001)(26005)(6346003)(305945005)(74316002)(2906002)(476003)(3660700001)(6506007)(3280700002)(299355004); DIR:OUT; SFP:1101; SCL:1; SRVR:YQBPR0101MB1538; H:YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-microsoft-antispam-message-info: yGi9dmIPN5AnSKcGhbKKFuOzf7uNUN1GUZ0yTUh9vi8knJ6bKs3kJM3GgyfS3FxH4OYH2XqoKNH3QxOB+lsNk2Rl0oYVJ6H3bOeVvedcoTdsDKbdSmFQxw3d8W/qNP7ye6KJYZ0co8wsnsxKq2PSAgq7I+kKafI4lbElD08MahZPmuBPKlgszEuFT5KX8KEY spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 48b5e24a-aa9f-4df5-ad43-08d5a3f67418 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 48b5e24a-aa9f-4df5-ad43-08d5a3f67418 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2018 00:02:04.7537 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB1538 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 00:02:08 -0000 I wrote: >Julian Elischer wrote: >>On 16/4/18 6:56 pm, Konstantin Belousov wrote: >[stuff snipped] >>>> + ngroups =3D3D XU_NGROUPS + 1; >>> Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? >>valid question.. because that is how many are allocated? >>it was a "minimally invasive patch".. whoever used XU_NGROUPS before >>should have fixed it. >>Having said that, thanks for drawing out attention to it.. will >>probably fix. >16 is the limit specified in the RFCs for Sun RPC, so that is the "on the = wire" limit. >I haven't looked at the code. It might make sense to handle more here and = then >set the limit at 16 after getting rid of duplicates, but I have no idea if= =3D >it matters? > >rick Correcting my own post. Now that I've looked at the code, this doesn't go o= n the wire. It does go in the exports structure, which means that this struct= ure would have to be revised (along with the syscall and VOP calls and the kern= el code that uses it). These credentials are for the "maproot/mapall" export option and revising the export structure seems like quite a bit of work for= this case. (Until revised XU_NGROUPS is the correct value to set it to, since th= ere is a "struct xucred" in the exports structure.) Since Julian Elischer has been emailing me about adding a "fsid" export opt= ion which allows /etc/exports to set the FSID of the exported fs (which would a= lso need to go in the exports structure), it might be about time to rev. the ex= ports structure? rick= From owner-svn-src-all@freebsd.org Tue Apr 17 00:03:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C7A6F88985; Tue, 17 Apr 2018 00:03:33 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0FC66A106; Tue, 17 Apr 2018 00:03:32 +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 DBB32245C8; Tue, 17 Apr 2018 00:03:32 +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 w3H03WZu036794; Tue, 17 Apr 2018 00:03:32 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3H03Wnm036792; Tue, 17 Apr 2018 00:03:32 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201804170003.w3H03Wnm036792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 17 Apr 2018 00: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: r332638 - stable/11/lib/libufs X-SVN-Group: stable-11 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/11/lib/libufs X-SVN-Commit-Revision: 332638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 00:03:33 -0000 Author: mckusick Date: Tue Apr 17 00:03:32 2018 New Revision: 332638 URL: https://svnweb.freebsd.org/changeset/base/332638 Log: MFC of 332264, 332266, 332415: Check for errors in libufs getino() and gracefully fail descriptor upgrade request in ufs_disk_write(). Modified: stable/11/lib/libufs/inode.c stable/11/lib/libufs/type.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libufs/inode.c ============================================================================== --- stable/11/lib/libufs/inode.c Mon Apr 16 21:22:12 2018 (r332637) +++ stable/11/lib/libufs/inode.c Tue Apr 17 00:03:32 2018 (r332638) @@ -58,6 +58,10 @@ getino(struct uufsd *disk, void **dino, ino_t inode, i ERROR(disk, NULL); fs = &disk->d_fs; + if (inode >= (ino_t)fs->fs_ipg * fs->fs_ncg) { + ERROR(disk, "inode number out of range"); + return (-1); + } inoblock = disk->d_inoblock; min = disk->d_inomin; max = disk->d_inomax; @@ -79,13 +83,17 @@ getino(struct uufsd *disk, void **dino, ino_t inode, i gotit: switch (disk->d_ufs) { case 1: dp1 = &((struct ufs1_dinode *)inoblock)[inode - min]; - *mode = dp1->di_mode & IFMT; - *dino = dp1; + if (mode != NULL) + *mode = dp1->di_mode & IFMT; + if (dino != NULL) + *dino = dp1; return (0); case 2: dp2 = &((struct ufs2_dinode *)inoblock)[inode - min]; - *mode = dp2->di_mode & IFMT; - *dino = dp2; + if (mode != NULL) + *mode = dp2->di_mode & IFMT; + if (dino != NULL) + *dino = dp2; return (0); default: break; Modified: stable/11/lib/libufs/type.c ============================================================================== --- stable/11/lib/libufs/type.c Mon Apr 16 21:22:12 2018 (r332637) +++ stable/11/lib/libufs/type.c Tue Apr 17 00:03:32 2018 (r332638) @@ -58,6 +58,7 @@ ufs_disk_close(struct uufsd *disk) { ERROR(disk, NULL); close(disk->d_fd); + disk->d_fd = -1; if (disk->d_inoblock != NULL) { free(disk->d_inoblock); disk->d_inoblock = NULL; @@ -178,19 +179,21 @@ again: if ((ret = stat(name, &st)) < 0) { int ufs_disk_write(struct uufsd *disk) { + int fd; + ERROR(disk, NULL); if (disk->d_mine & MINE_WRITE) return (0); - close(disk->d_fd); - - disk->d_fd = open(disk->d_name, O_RDWR); - if (disk->d_fd < 0) { + fd = open(disk->d_name, O_RDWR); + if (fd < 0) { ERROR(disk, "failed to open disk for writing"); return (-1); } + close(disk->d_fd); + disk->d_fd = fd; disk->d_mine |= MINE_WRITE; return (0); From owner-svn-src-all@freebsd.org Tue Apr 17 00:46:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66B20F8B718; Tue, 17 Apr 2018 00:46:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A6BB749EF; Tue, 17 Apr 2018 00:46:22 +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 1558A24C4D; Tue, 17 Apr 2018 00:46:22 +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 w3H0kLGk057698; Tue, 17 Apr 2018 00:46:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3H0kLvj057693; Tue, 17 Apr 2018 00:46:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804170046.w3H0kLvj057693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Apr 2018 00:46: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: r332639 - in stable/11/release: amd64 arm64 i386 powerpc X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11/release: amd64 arm64 i386 powerpc X-SVN-Commit-Revision: 332639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 00:46:22 -0000 Author: emaste Date: Tue Apr 17 00:46:21 2018 New Revision: 332639 URL: https://svnweb.freebsd.org/changeset/base/332639 Log: MFC r332390: make-memstick.sh: put partition args on separate lines This makes it easier to identify the individual partition types and facilitates comparisons across architectures. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/amd64/make-memstick.sh stable/11/release/arm64/make-memstick.sh stable/11/release/i386/make-memstick.sh stable/11/release/powerpc/make-memstick.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/release/amd64/make-memstick.sh ============================================================================== --- stable/11/release/amd64/make-memstick.sh Tue Apr 17 00:03:32 2018 (r332638) +++ stable/11/release/amd64/make-memstick.sh Tue Apr 17 00:46:21 2018 (r332639) @@ -36,6 +36,12 @@ makefs -B little -o label=FreeBSD_Install -o version=2 rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s gpt -b ${1}/boot/pmbr -p efi:=${1}/boot/boot1.efifat -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +mkimg -s gpt \ + -b ${1}/boot/pmbr \ + -p efi:=${1}/boot/boot1.efifat \ + -p freebsd-boot:=${1}/boot/gptboot \ + -p freebsd-ufs:=${2}.part \ + -p freebsd-swap::1M \ + -o ${2} rm ${2}.part Modified: stable/11/release/arm64/make-memstick.sh ============================================================================== --- stable/11/release/arm64/make-memstick.sh Tue Apr 17 00:03:32 2018 (r332638) +++ stable/11/release/arm64/make-memstick.sh Tue Apr 17 00:46:21 2018 (r332639) @@ -36,6 +36,9 @@ makefs -B little -o label=FreeBSD_Install -o version=2 rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.part -o ${2} +mkimg -s gpt \ + -p efi:=${1}/boot/boot1.efifat \ + -p freebsd:=${2}.part \ + -o ${2} rm ${2}.part Modified: stable/11/release/i386/make-memstick.sh ============================================================================== --- stable/11/release/i386/make-memstick.sh Tue Apr 17 00:03:32 2018 (r332638) +++ stable/11/release/i386/make-memstick.sh Tue Apr 17 00:46:21 2018 (r332639) @@ -36,6 +36,11 @@ makefs -B little -o label=FreeBSD_Install -o version=2 rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s gpt -b ${1}/boot/pmbr -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +mkimg -s gpt \ + -b ${1}/boot/pmbr \ + -p freebsd-boot:=${1}/boot/gptboot \ + -p freebsd-ufs:=${2}.part \ + -p freebsd-swap::1M \ + -o ${2} rm ${2}.part Modified: stable/11/release/powerpc/make-memstick.sh ============================================================================== --- stable/11/release/powerpc/make-memstick.sh Tue Apr 17 00:03:32 2018 (r332638) +++ stable/11/release/powerpc/make-memstick.sh Tue Apr 17 00:46:21 2018 (r332639) @@ -41,7 +41,10 @@ makefs -B big -o version=2 ${tempfile} ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s apm -p freebsd-boot:=${1}/boot/boot1.hfs -p freebsd-ufs/FreeBSD_Install:=${tempfile} -o ${2} +mkimg -s apm \ + -p freebsd-boot:=${1}/boot/boot1.hfs \ + -p freebsd-ufs/FreeBSD_Install:=${tempfile} \ + -o ${2} rm -f ${tempfile} From owner-svn-src-all@freebsd.org Tue Apr 17 02:18:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2F6DF97D48; Tue, 17 Apr 2018 02:18:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 609A26B902; Tue, 17 Apr 2018 02:18:08 +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 5B4D325E40; Tue, 17 Apr 2018 02:18: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 w3H2I89G002501; Tue, 17 Apr 2018 02:18:08 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3H2I4Z3002464; Tue, 17 Apr 2018 02:18:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804170218.w3H2I4Z3002464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 17 Apr 2018 02:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332640 - in stable/11/sys/geom: . bde cache concat eli gate journal label linux_lvm mirror mountver multipath nop part raid3 shsec stripe uzip vinum virstor zero X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys/geom: . bde cache concat eli gate journal label linux_lvm mirror mountver multipath nop part raid3 shsec stripe uzip vinum virstor zero X-SVN-Commit-Revision: 332640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 02:18:09 -0000 Author: kevans Date: Tue Apr 17 02:18:04 2018 New Revision: 332640 URL: https://svnweb.freebsd.org/changeset/base/332640 Log: MFC r332387: Annotate geom modules with MODULE_VERSION GEOM ELI may double ask the password during boot. Once at loader time, and once at init time. This happens due a module loading bug. By default GEOM ELI caches the password in the kernel, but without the MODULE_VERSION annotation, the kernel loads over the kernel module, even if the GEOM ELI was compiled into the kernel. In this case, the newly loaded module purges/invalidates/overwrites the GEOM ELI's password cache, which causes the double asking. This MFC commit differs slightly from head, due to pc98 removal. These changes were trivial and should be obvious. Modified: stable/11/sys/geom/bde/g_bde.c stable/11/sys/geom/cache/g_cache.c stable/11/sys/geom/concat/g_concat.c stable/11/sys/geom/eli/g_eli.c stable/11/sys/geom/gate/g_gate.c stable/11/sys/geom/geom_bsd.c stable/11/sys/geom/geom_ccd.c stable/11/sys/geom/geom_fox.c stable/11/sys/geom/geom_map.c stable/11/sys/geom/geom_mbr.c stable/11/sys/geom/geom_pc98.c stable/11/sys/geom/geom_redboot.c stable/11/sys/geom/geom_sunlabel.c stable/11/sys/geom/geom_vol_ffs.c stable/11/sys/geom/journal/g_journal_ufs.c stable/11/sys/geom/label/g_label.c stable/11/sys/geom/linux_lvm/g_linux_lvm.c stable/11/sys/geom/mirror/g_mirror.c stable/11/sys/geom/mountver/g_mountver.c stable/11/sys/geom/multipath/g_multipath.c stable/11/sys/geom/nop/g_nop.c stable/11/sys/geom/part/g_part_apm.c stable/11/sys/geom/part/g_part_bsd.c stable/11/sys/geom/part/g_part_bsd64.c stable/11/sys/geom/part/g_part_ebr.c stable/11/sys/geom/part/g_part_gpt.c stable/11/sys/geom/part/g_part_ldm.c stable/11/sys/geom/part/g_part_mbr.c stable/11/sys/geom/part/g_part_pc98.c stable/11/sys/geom/part/g_part_vtoc8.c stable/11/sys/geom/raid3/g_raid3.c stable/11/sys/geom/shsec/g_shsec.c stable/11/sys/geom/stripe/g_stripe.c stable/11/sys/geom/uzip/g_uzip.c stable/11/sys/geom/vinum/geom_vinum.c stable/11/sys/geom/virstor/g_virstor.c stable/11/sys/geom/zero/g_zero.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/bde/g_bde.c ============================================================================== --- stable/11/sys/geom/bde/g_bde.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/bde/g_bde.c Tue Apr 17 02:18:04 2018 (r332640) @@ -290,3 +290,4 @@ static struct g_class g_bde_class = { }; DECLARE_GEOM_CLASS(g_bde_class, g_bde); +MODULE_VERSION(geom_bde, 0); Modified: stable/11/sys/geom/cache/g_cache.c ============================================================================== --- stable/11/sys/geom/cache/g_cache.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/cache/g_cache.c Tue Apr 17 02:18:04 2018 (r332640) @@ -1014,3 +1014,4 @@ g_cache_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_cache_class, g_cache); +MODULE_VERSION(geom_cache, 0); Modified: stable/11/sys/geom/concat/g_concat.c ============================================================================== --- stable/11/sys/geom/concat/g_concat.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/concat/g_concat.c Tue Apr 17 02:18:04 2018 (r332640) @@ -991,3 +991,4 @@ g_concat_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_concat_class, g_concat); +MODULE_VERSION(geom_concat, 0); Modified: stable/11/sys/geom/eli/g_eli.c ============================================================================== --- stable/11/sys/geom/eli/g_eli.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/eli/g_eli.c Tue Apr 17 02:18:04 2018 (r332640) @@ -1331,3 +1331,4 @@ g_eli_fini(struct g_class *mp) DECLARE_GEOM_CLASS(g_eli_class, g_eli); MODULE_DEPEND(g_eli, crypto, 1, 1, 1); +MODULE_VERSION(geom_eli, 0); Modified: stable/11/sys/geom/gate/g_gate.c ============================================================================== --- stable/11/sys/geom/gate/g_gate.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/gate/g_gate.c Tue Apr 17 02:18:04 2018 (r332640) @@ -962,3 +962,4 @@ static moduledata_t g_gate_module = { }; DECLARE_MODULE(geom_gate, g_gate_module, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); DECLARE_GEOM_CLASS(g_gate_class, g_gate); +MODULE_VERSION(geom_gate, 0); Modified: stable/11/sys/geom/geom_bsd.c ============================================================================== --- stable/11/sys/geom/geom_bsd.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_bsd.c Tue Apr 17 02:18:04 2018 (r332640) @@ -622,3 +622,4 @@ static struct g_class g_bsd_class = { }; DECLARE_GEOM_CLASS(g_bsd_class, g_bsd); +MODULE_VERSION(geom_bsd, 0); Modified: stable/11/sys/geom/geom_ccd.c ============================================================================== --- stable/11/sys/geom/geom_ccd.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_ccd.c Tue Apr 17 02:18:04 2018 (r332640) @@ -906,3 +906,4 @@ static struct g_class g_ccd_class = { }; DECLARE_GEOM_CLASS(g_ccd_class, g_ccd); +MODULE_VERSION(geom_ccd, 0); Modified: stable/11/sys/geom/geom_fox.c ============================================================================== --- stable/11/sys/geom/geom_fox.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_fox.c Tue Apr 17 02:18:04 2018 (r332640) @@ -483,3 +483,4 @@ static struct g_class g_fox_class = { }; DECLARE_GEOM_CLASS(g_fox_class, g_fox); +MODULE_VERSION(geom_fox, 0); Modified: stable/11/sys/geom/geom_map.c ============================================================================== --- stable/11/sys/geom/geom_map.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_map.c Tue Apr 17 02:18:04 2018 (r332640) @@ -405,3 +405,4 @@ static struct g_class g_map_class = { .ctlreq = g_map_config, }; DECLARE_GEOM_CLASS(g_map_class, g_map); +MODULE_VERSION(geom_map, 0); Modified: stable/11/sys/geom/geom_mbr.c ============================================================================== --- stable/11/sys/geom/geom_mbr.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_mbr.c Tue Apr 17 02:18:04 2018 (r332640) @@ -526,3 +526,4 @@ static struct g_class g_mbrext_class = { }; DECLARE_GEOM_CLASS(g_mbrext_class, g_mbrext); +MODULE_VERSION(geom_mbr, 0); Modified: stable/11/sys/geom/geom_pc98.c ============================================================================== --- stable/11/sys/geom/geom_pc98.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_pc98.c Tue Apr 17 02:18:04 2018 (r332640) @@ -370,3 +370,4 @@ static struct g_class g_pc98_class = { }; DECLARE_GEOM_CLASS(g_pc98_class, g_pc98); +MODULE_VERSION(geom_pc98, 0); Modified: stable/11/sys/geom/geom_redboot.c ============================================================================== --- stable/11/sys/geom/geom_redboot.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_redboot.c Tue Apr 17 02:18:04 2018 (r332640) @@ -343,3 +343,4 @@ static struct g_class g_redboot_class = { .ioctl = g_redboot_ioctl, }; DECLARE_GEOM_CLASS(g_redboot_class, g_redboot); +MODULE_VERSION(geom_redboot, 0); Modified: stable/11/sys/geom/geom_sunlabel.c ============================================================================== --- stable/11/sys/geom/geom_sunlabel.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_sunlabel.c Tue Apr 17 02:18:04 2018 (r332640) @@ -332,3 +332,4 @@ static struct g_class g_sunlabel_class = { }; DECLARE_GEOM_CLASS(g_sunlabel_class, g_sunlabel); +MODULE_VERSION(geom_sunlabel, 0); Modified: stable/11/sys/geom/geom_vol_ffs.c ============================================================================== --- stable/11/sys/geom/geom_vol_ffs.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/geom_vol_ffs.c Tue Apr 17 02:18:04 2018 (r332640) @@ -162,3 +162,4 @@ static struct g_class g_vol_ffs_class = { }; DECLARE_GEOM_CLASS(g_vol_ffs_class, g_vol_ffs); +MODULE_VERSION(geom_vol_ffs, 0); Modified: stable/11/sys/geom/journal/g_journal_ufs.c ============================================================================== --- stable/11/sys/geom/journal/g_journal_ufs.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/journal/g_journal_ufs.c Tue Apr 17 02:18:04 2018 (r332640) @@ -105,3 +105,4 @@ const struct g_journal_desc g_journal_ufs = { }; MODULE_DEPEND(g_journal, ufs, 1, 1, 1); +MODULE_VERSION(geom_journal, 0); Modified: stable/11/sys/geom/label/g_label.c ============================================================================== --- stable/11/sys/geom/label/g_label.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/label/g_label.c Tue Apr 17 02:18:04 2018 (r332640) @@ -550,3 +550,4 @@ g_label_config(struct gctl_req *req, struct g_class *m } DECLARE_GEOM_CLASS(g_label_class, g_label); +MODULE_VERSION(geom_label, 0); Modified: stable/11/sys/geom/linux_lvm/g_linux_lvm.c ============================================================================== --- stable/11/sys/geom/linux_lvm/g_linux_lvm.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/linux_lvm/g_linux_lvm.c Tue Apr 17 02:18:04 2018 (r332640) @@ -1188,3 +1188,4 @@ static struct g_class g_llvm_class = { }; DECLARE_GEOM_CLASS(g_llvm_class, g_linux_lvm); +MODULE_VERSION(geom_linux_lvm, 0); Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/mirror/g_mirror.c Tue Apr 17 02:18:04 2018 (r332640) @@ -3490,3 +3490,4 @@ g_mirror_fini(struct g_class *mp) } DECLARE_GEOM_CLASS(g_mirror_class, g_mirror); +MODULE_VERSION(geom_mirror, 0); Modified: stable/11/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/11/sys/geom/mountver/g_mountver.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/mountver/g_mountver.c Tue Apr 17 02:18:04 2018 (r332640) @@ -658,3 +658,4 @@ g_mountver_fini(struct g_class *mp) } DECLARE_GEOM_CLASS(g_mountver_class, g_mountver); +MODULE_VERSION(geom_mountver, 0); Modified: stable/11/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/11/sys/geom/multipath/g_multipath.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/multipath/g_multipath.c Tue Apr 17 02:18:04 2018 (r332640) @@ -1530,3 +1530,4 @@ g_multipath_dumpconf(struct sbuf *sb, const char *inde } DECLARE_GEOM_CLASS(g_multipath_class, g_multipath); +MODULE_VERSION(geom_multipath, 0); Modified: stable/11/sys/geom/nop/g_nop.c ============================================================================== --- stable/11/sys/geom/nop/g_nop.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/nop/g_nop.c Tue Apr 17 02:18:04 2018 (r332640) @@ -715,3 +715,4 @@ g_nop_dumpconf(struct sbuf *sb, const char *indent, st } DECLARE_GEOM_CLASS(g_nop_class, g_nop); +MODULE_VERSION(geom_nop, 0); Modified: stable/11/sys/geom/part/g_part_apm.c ============================================================================== --- stable/11/sys/geom/part/g_part_apm.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_apm.c Tue Apr 17 02:18:04 2018 (r332640) @@ -105,6 +105,7 @@ static struct g_part_scheme g_part_apm_scheme = { .gps_maxent = 4096, }; G_PART_SCHEME_DECLARE(g_part_apm); +MODULE_VERSION(geom_part_apm, 0); static void swab(char *buf, size_t bufsz) Modified: stable/11/sys/geom/part/g_part_bsd.c ============================================================================== --- stable/11/sys/geom/part/g_part_bsd.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_bsd.c Tue Apr 17 02:18:04 2018 (r332640) @@ -111,6 +111,7 @@ static struct g_part_scheme g_part_bsd_scheme = { .gps_bootcodesz = BBSIZE, }; G_PART_SCHEME_DECLARE(g_part_bsd); +MODULE_VERSION(geom_part_bsd, 0); static struct g_part_bsd_alias { uint8_t type; Modified: stable/11/sys/geom/part/g_part_bsd64.c ============================================================================== --- stable/11/sys/geom/part/g_part_bsd64.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_bsd64.c Tue Apr 17 02:18:04 2018 (r332640) @@ -165,6 +165,7 @@ static struct g_part_scheme g_part_bsd64_scheme = { .gps_maxent = MAXPARTITIONS64 }; G_PART_SCHEME_DECLARE(g_part_bsd64); +MODULE_VERSION(geom_part_bsd64, 0); #define EQUUID(a, b) (memcmp(a, b, sizeof(struct uuid)) == 0) static struct uuid bsd64_uuid_unused = GPT_ENT_TYPE_UNUSED; Modified: stable/11/sys/geom/part/g_part_ebr.c ============================================================================== --- stable/11/sys/geom/part/g_part_ebr.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_ebr.c Tue Apr 17 02:18:04 2018 (r332640) @@ -126,6 +126,7 @@ static struct g_part_scheme g_part_ebr_scheme = { .gps_maxent = INT_MAX, }; G_PART_SCHEME_DECLARE(g_part_ebr); +MODULE_VERSION(geom_part_ebr, 0); static struct g_part_ebr_alias { u_char typ; Modified: stable/11/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/11/sys/geom/part/g_part_gpt.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_gpt.c Tue Apr 17 02:18:04 2018 (r332640) @@ -144,6 +144,7 @@ static struct g_part_scheme g_part_gpt_scheme = { .gps_bootcodesz = MBRSIZE, }; G_PART_SCHEME_DECLARE(g_part_gpt); +MODULE_VERSION(geom_part_gpt, 0); static struct uuid gpt_uuid_apple_boot = GPT_ENT_TYPE_APPLE_BOOT; static struct uuid gpt_uuid_apple_core_storage = Modified: stable/11/sys/geom/part/g_part_ldm.c ============================================================================== --- stable/11/sys/geom/part/g_part_ldm.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_ldm.c Tue Apr 17 02:18:04 2018 (r332640) @@ -361,6 +361,7 @@ static struct g_part_scheme g_part_ldm_scheme = { .gps_entrysz = sizeof(struct g_part_ldm_entry) }; G_PART_SCHEME_DECLARE(g_part_ldm); +MODULE_VERSION(geom_part_ldm, 0); static struct g_part_ldm_alias { u_char typ; Modified: stable/11/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/11/sys/geom/part/g_part_mbr.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_mbr.c Tue Apr 17 02:18:04 2018 (r332640) @@ -119,6 +119,7 @@ static struct g_part_scheme g_part_mbr_scheme = { .gps_bootcodesz = MBRSIZE, }; G_PART_SCHEME_DECLARE(g_part_mbr); +MODULE_VERSION(geom_part_mbr, 0); static struct g_part_mbr_alias { u_char typ; Modified: stable/11/sys/geom/part/g_part_pc98.c ============================================================================== --- stable/11/sys/geom/part/g_part_pc98.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_pc98.c Tue Apr 17 02:18:04 2018 (r332640) @@ -115,6 +115,7 @@ static struct g_part_scheme g_part_pc98_scheme = { .gps_bootcodesz = BOOTSIZE, }; G_PART_SCHEME_DECLARE(g_part_pc98); +MODULE_VERSION(geom_part_pc98, 0); static int pc98_parse_type(const char *type, u_char *dp_mid, u_char *dp_sid) Modified: stable/11/sys/geom/part/g_part_vtoc8.c ============================================================================== --- stable/11/sys/geom/part/g_part_vtoc8.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/part/g_part_vtoc8.c Tue Apr 17 02:18:04 2018 (r332640) @@ -99,6 +99,7 @@ static struct g_part_scheme g_part_vtoc8_scheme = { .gps_maxent = VTOC8_NPARTS, }; G_PART_SCHEME_DECLARE(g_part_vtoc8); +MODULE_VERSION(geom_part_vtoc8, 0); static int vtoc8_parse_type(const char *type, uint16_t *tag) Modified: stable/11/sys/geom/raid3/g_raid3.c ============================================================================== --- stable/11/sys/geom/raid3/g_raid3.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/raid3/g_raid3.c Tue Apr 17 02:18:04 2018 (r332640) @@ -3581,3 +3581,4 @@ g_raid3_fini(struct g_class *mp) } DECLARE_GEOM_CLASS(g_raid3_class, g_raid3); +MODULE_VERSION(geom_raid3, 0); Modified: stable/11/sys/geom/shsec/g_shsec.c ============================================================================== --- stable/11/sys/geom/shsec/g_shsec.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/shsec/g_shsec.c Tue Apr 17 02:18:04 2018 (r332640) @@ -834,3 +834,4 @@ g_shsec_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_shsec_class, g_shsec); +MODULE_VERSION(geom_shsec, 0); Modified: stable/11/sys/geom/stripe/g_stripe.c ============================================================================== --- stable/11/sys/geom/stripe/g_stripe.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/stripe/g_stripe.c Tue Apr 17 02:18:04 2018 (r332640) @@ -1268,3 +1268,4 @@ g_stripe_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_stripe_class, g_stripe); +MODULE_VERSION(geom_stripe, 0); Modified: stable/11/sys/geom/uzip/g_uzip.c ============================================================================== --- stable/11/sys/geom/uzip/g_uzip.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/uzip/g_uzip.c Tue Apr 17 02:18:04 2018 (r332640) @@ -899,3 +899,4 @@ static struct g_class g_uzip_class = { DECLARE_GEOM_CLASS(g_uzip_class, g_uzip); MODULE_DEPEND(g_uzip, zlib, 1, 1, 1); +MODULE_VERSION(geom_uzip, 0); Modified: stable/11/sys/geom/vinum/geom_vinum.c ============================================================================== --- stable/11/sys/geom/vinum/geom_vinum.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/vinum/geom_vinum.c Tue Apr 17 02:18:04 2018 (r332640) @@ -1046,3 +1046,4 @@ static struct g_class g_vinum_class = { }; DECLARE_GEOM_CLASS(g_vinum_class, g_vinum); +MODULE_VERSION(geom_vinum, 0); Modified: stable/11/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/11/sys/geom/virstor/g_virstor.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/virstor/g_virstor.c Tue Apr 17 02:18:04 2018 (r332640) @@ -1889,3 +1889,4 @@ invalid_call(void) } DECLARE_GEOM_CLASS(g_virstor_class, g_virstor); /* Let there be light */ +MODULE_VERSION(geom_virstor, 0); Modified: stable/11/sys/geom/zero/g_zero.c ============================================================================== --- stable/11/sys/geom/zero/g_zero.c Tue Apr 17 00:46:21 2018 (r332639) +++ stable/11/sys/geom/zero/g_zero.c Tue Apr 17 02:18:04 2018 (r332640) @@ -141,3 +141,4 @@ static struct g_class g_zero_class = { }; DECLARE_GEOM_CLASS(g_zero_class, g_zero); +MODULE_VERSION(geom_zero, 0); From owner-svn-src-all@freebsd.org Tue Apr 17 02:33:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30C6BF99D6F; Tue, 17 Apr 2018 02:33:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D71416EE9F; Tue, 17 Apr 2018 02:33: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 D2120261BF; Tue, 17 Apr 2018 02:33:54 +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 w3H2XsPJ012303; Tue, 17 Apr 2018 02:33:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3H2XsZw012300; Tue, 17 Apr 2018 02:33:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804170233.w3H2XsZw012300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 17 Apr 2018 02:33:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332641 - in head/cddl/contrib/opensolaris/cmd: zfs zpool X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/cddl/contrib/opensolaris/cmd: zfs zpool X-SVN-Commit-Revision: 332641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 02:33:55 -0000 Author: mav Date: Tue Apr 17 02:33:54 2018 New Revision: 332641 URL: https://svnweb.freebsd.org/changeset/base/332641 Log: MFV man pages update from r329502: 7614 zfs device evacuation/removal. MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 17 02:18:04 2018 (r332640) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 17 02:33:54 2018 (r332641) @@ -116,6 +116,9 @@ .Oo Fl S Ar property Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | Ns Ar bookmark Ns ... .Nm +.Cm remap +.Ar filesystem Ns | Ns Ar volume +.Nm .Cm set .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... @@ -2266,6 +2269,17 @@ if the .Fl S option was not specified. .El +.It Xo +.Nm +.Cm remap +.Ar filesystem Ns | Ns Ar volume +.Xc +.Pp +Remap the indirect blocks in the given fileystem or volume so that they no +longer reference blocks on previously removed vdevs and we can eventually +shrink the size of the indirect mapping objects for the previously removed +vdevs. Note that remapping all blocks might not be possible and that +references from snapshots will still exist and cannot be remapped. .It Xo .Nm .Cm upgrade Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Apr 17 02:18:04 2018 (r332640) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Apr 17 02:33:54 2018 (r332641) @@ -448,6 +448,40 @@ when the "zpool checkpoint" command is used to checkpo The feature will only return back to being .Sy enabled when the pool is rewound or the checkpoint has been discarded. +.It Sy device_removal +.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:device_removal" +.It GUID Ta com.delphix:device_removal +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +This feature enables the "zpool remove" subcommand to remove top-level +vdevs, evacuating them to reduce the total size of the pool. +.Pp +This feature becomes +.Sy active +when the "zpool remove" command is used +on a top-level vdev, and will never return to being +.Sy enabled . +.It Sy obsolete_counts +.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:obsolete_counts" +.It GUID Ta com.delphix:obsolete_counts +.It READ\-ONLY COMPATIBLE Ta yes +.It DEPENDENCIES Ta device_removal +.El +.Pp +This feature is an enhancement of device_removal, which will over time +reduce the memory used to track removed devices. When indirect blocks +are freed or remapped, we note that their part of the indirect mapping +is "obsolete", i.e. no longer needed. See also the "zfs remap" +subcommand in +.Xr zfs 8 . + +This feature becomes +.Sy active +when the "zpool remove" command is +used on a top-level vdev, and will never return to being +.Sy enabled . .It Sy large_blocks .Bl -column "READ\-ONLY COMPATIBLE" "org.open-zfs:large_block" .It GUID Ta org.open-zfs:large_block Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Apr 17 02:18:04 2018 (r332640) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Apr 17 02:33:54 2018 (r332641) @@ -21,7 +21,7 @@ .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2011, Justin T. Gibbs .\" Copyright (c) 2012, Glen Barber -.\" Copyright (c) 2013 by Delphix. All Rights Reserved. +.\" Copyright (c) 2012, 2017 by Delphix. All Rights Reserved. .\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright (c) 2017 Datto Inc. .\" @@ -151,8 +151,13 @@ .Ar pool .Nm .Cm remove +.Op Fl np .Ar pool device ... .Nm +.Cm remove +.Fl s +.Ar pool +.Nm .Cm reopen .Ar pool .Nm @@ -510,8 +515,8 @@ Multiple log devices can also be specified, and they c section for an example of mirroring multiple log devices. .Pp Log devices can be added, replaced, attached, detached, imported and exported -as part of the larger pool. Mirrored log devices can be removed by specifying -the top-level mirror for the log. +as part of the larger pool. +Mirrored devices can be removed by specifying the top-level mirror vdev. .Ss Cache devices Devices can be added to a storage pool as "cache devices." These devices provide an additional layer of caching between main memory and disk. For @@ -1604,19 +1609,55 @@ devices in this pool are online and healthy before per .It Xo .Nm .Cm remove +.Op Fl np .Ar pool device ... .Xc .Pp -Removes the specified device from the pool. This command currently only -supports removing hot spares, cache, and log devices. A mirrored log device can -be removed by specifying the top-level mirror for the log. Non-log devices that -are part of a mirrored configuration can be removed using the +Removes the specified device from the pool. +This command currently only supports removing hot spares, cache, log +devices and mirrored top-level vdevs (mirror of leaf devices); but not raidz. +.sp +Removing a top-level vdev reduces the total amount of space in the storage pool. +The specified device will be evacuated by copying all allocated space from it to +the other devices in the pool. +In this case, the +.Nm zpool Cm remove +command initiates the removal and returns, while the evacuation continues in +the background. +The removal progress can be monitored with +.Nm zpool Cm status. +This feature must be enabled to be used, see +.Xr zpool-features 5 +.Pp +A mirrored top-level device (log or data) can be removed by specifying the +top-level mirror for the same. +Non-log devices or data devices that are part of a mirrored configuration can +be removed using the .Qq Nm Cm detach -command. Non-redundant and -.No raidz -devices cannot be removed from a pool. +command. +.Bl -tag -width Ds +.It Fl n +Do not actually perform the removal ("no-op"). +Instead, print the estimated amount of memory that will be used by the +mapping table after the removal completes. +This is nonzero only for top-level vdevs. +.El +.Bl -tag -width Ds +.It Fl p +Used in conjunction with the +.Fl n +flag, displays numbers as parsable (exact) values. +.El .It Xo .Nm +.Cm remove +.Fl s +.Ar pool +.Xc +.Pp +Stops and cancels an in-progress removal of a top-level vdev. +.It Xo +.Nm .Cm reopen .Ar pool .Xc @@ -2098,11 +2139,13 @@ data 23.9G 14.6G 9.30G 48% - 61% .Ed .It Xo .Sy Example 16 -Removing a Mirrored Log Device +Removing a Mirrored top-level (Log or Data) Device .Xc .Pp -The following command removes the mirrored log device -.Em mirror-2 . +The following commands remove the mirrored log device +.Sy mirror-2 +and mirrored top-level data device +.Sy mirror-1 . .Pp Given this configuration: .Bd -literal -offset 2n @@ -2130,6 +2173,13 @@ The command to remove the mirrored log is: .Bd -literal -offset 2n .Li # Ic zpool remove tank mirror-2 +.Ed +.Pp +The command to remove the mirrored data +.Em mirror-1 +is: +.Bd -literal -offset 2n +.Li # Ic zpool remove tank mirror-1 .Ed .It Xo .Sy Example 17 From owner-svn-src-all@freebsd.org Tue Apr 17 09:05:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE066F911B0; Tue, 17 Apr 2018 09:05:48 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F9976F4B7; Tue, 17 Apr 2018 09:05:48 +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 5A8CC2391; Tue, 17 Apr 2018 09:05:48 +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 w3H95mvZ009209; Tue, 17 Apr 2018 09:05:48 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3H95ljl009197; Tue, 17 Apr 2018 09:05:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804170905.w3H95ljl009197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 17 Apr 2018 09:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332642 - in head: contrib/bsnmp/snmpd lib/libc/locale lib/libc/stdio lib/libc/stdlib lib/libc/string lib/libc/sys lib/libufs share/man/man7 share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: contrib/bsnmp/snmpd lib/libc/locale lib/libc/stdio lib/libc/stdlib lib/libc/string lib/libc/sys lib/libufs share/man/man7 share/man/man9 X-SVN-Commit-Revision: 332642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 09:05:49 -0000 Author: trasz Date: Tue Apr 17 09:05:46 2018 New Revision: 332642 URL: https://svnweb.freebsd.org/changeset/base/332642 Log: Don't put multiple names on a single .Nm line. This fixes apropos(1) output, from this: strnlen, strlen, strlen,(3) - find length of string │······· ... to this: strlen, strnlen(3) - find length of string PR: 223525 MFC after: 2 weeks Modified: head/contrib/bsnmp/snmpd/snmpmod.3 head/lib/libc/locale/isdigit.3 head/lib/libc/locale/isxdigit.3 head/lib/libc/stdio/printf.3 head/lib/libc/stdlib/qsort.3 head/lib/libc/string/strcpy.3 head/lib/libc/string/strlen.3 head/lib/libc/sys/fsync.2 head/lib/libufs/ufs_disk_close.3 head/share/man/man7/c99.7 head/share/man/man9/OF_device_from_xref.9 head/share/man/man9/printf.9 Modified: head/contrib/bsnmp/snmpd/snmpmod.3 ============================================================================== --- head/contrib/bsnmp/snmpd/snmpmod.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/contrib/bsnmp/snmpd/snmpmod.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -102,35 +102,35 @@ .Nm index_compare , .Nm index_compare_off , .Nm index_append , -.Nm index_append_off, -.Nm snmpd_usmstats, -.Nm bsnmpd_get_usm_stats, -.Nm bsnmpd_reset_usm_stats, -.Nm usm_first_user, -.Nm usm_next_user, -.Nm usm_find_user, -.Nm usm_new_user, -.Nm usm_delete_user, -.Nm usm_flush_users, -.Nm usm_user -.Nm snmpd_target_stat -.Nm bsnmpd_get_target_stats -.Nm target_first_address -.Nm target_next_address -.Nm target_new_address -.Nm target_activate_address -.Nm target_delete_address -.Nm target_first_param -.Nm target_next_param -.Nm target_new_param -.Nm target_delete_param -.Nm target_first_notify -.Nm target_next_notify -.Nm target_new_notify -.Nm target_delete_notify -.Nm target_flush_all -.Nm target_address -.Nm target_param +.Nm index_append_off , +.Nm snmpd_usmstats , +.Nm bsnmpd_get_usm_stats , +.Nm bsnmpd_reset_usm_stats , +.Nm usm_first_user , +.Nm usm_next_user , +.Nm usm_find_user , +.Nm usm_new_user , +.Nm usm_delete_user , +.Nm usm_flush_users , +.Nm usm_user , +.Nm snmpd_target_stat , +.Nm bsnmpd_get_target_stats , +.Nm target_first_address , +.Nm target_next_address , +.Nm target_new_address , +.Nm target_activate_address , +.Nm target_delete_address , +.Nm target_first_param , +.Nm target_next_param , +.Nm target_new_param , +.Nm target_delete_param , +.Nm target_first_notify , +.Nm target_next_notify , +.Nm target_new_notify , +.Nm target_delete_notify , +.Nm target_flush_all , +.Nm target_address , +.Nm target_param , .Nm target_notify .Nd "SNMP daemon loadable module interface" .Sh LIBRARY Modified: head/lib/libc/locale/isdigit.3 ============================================================================== --- head/lib/libc/locale/isdigit.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/locale/isdigit.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -36,7 +36,8 @@ .Dt ISDIGIT 3 .Os .Sh NAME -.Nm isdigit, isnumber +.Nm isdigit , +.Nm isnumber .Nd decimal-digit character test .Sh LIBRARY .Lb libc Modified: head/lib/libc/locale/isxdigit.3 ============================================================================== --- head/lib/libc/locale/isxdigit.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/locale/isxdigit.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -36,7 +36,8 @@ .Dt ISXDIGIT 3 .Os .Sh NAME -.Nm isxdigit, ishexnumber +.Nm isxdigit , +.Nm ishexnumber .Nd hexadecimal-digit character test .Sh LIBRARY .Lb libc Modified: head/lib/libc/stdio/printf.3 ============================================================================== --- head/lib/libc/stdio/printf.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/stdio/printf.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -36,8 +36,18 @@ .Dt PRINTF 3 .Os .Sh NAME -.Nm printf , fprintf , sprintf , snprintf , asprintf , dprintf , -.Nm vprintf , vfprintf, vsprintf , vsnprintf , vasprintf, vdprintf +.Nm printf , +.Nm fprintf , +.Nm sprintf , +.Nm snprintf , +.Nm asprintf , +.Nm dprintf , +.Nm vprintf , +.Nm vfprintf , +.Nm vsprintf , +.Nm vsnprintf , +.Nm vasprintf , +.Nm vdprintf .Nd formatted output conversion .Sh LIBRARY .Lb libc Modified: head/lib/libc/stdlib/qsort.3 ============================================================================== --- head/lib/libc/stdlib/qsort.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/stdlib/qsort.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -36,7 +36,13 @@ .Dt QSORT 3 .Os .Sh NAME -.Nm qsort , qsort_b , qsort_r , heapsort , heapsort_b , mergesort, mergesort_b +.Nm qsort , +.Nm qsort_b , +.Nm qsort_r , +.Nm heapsort , +.Nm heapsort_b , +.Nm mergesort , +.Nm mergesort_b .Nd sort functions .Sh LIBRARY .Lb libc Modified: head/lib/libc/string/strcpy.3 ============================================================================== --- head/lib/libc/string/strcpy.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/string/strcpy.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -36,7 +36,10 @@ .Dt STRCPY 3 .Os .Sh NAME -.Nm stpcpy, stpncpy, strcpy , strncpy +.Nm stpcpy , +.Nm stpncpy , +.Nm strcpy , +.Nm strncpy .Nd copy strings .Sh LIBRARY .Lb libc Modified: head/lib/libc/string/strlen.3 ============================================================================== --- head/lib/libc/string/strlen.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/string/strlen.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -36,7 +36,8 @@ .Dt STRLEN 3 .Os .Sh NAME -.Nm strlen, strnlen +.Nm strlen , +.Nm strnlen .Nd find length of string .Sh LIBRARY .Lb libc Modified: head/lib/libc/sys/fsync.2 ============================================================================== --- head/lib/libc/sys/fsync.2 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/sys/fsync.2 Tue Apr 17 09:05:46 2018 (r332642) @@ -38,7 +38,8 @@ .Dt FSYNC 2 .Os .Sh NAME -.Nm fdatasync, fsync +.Nm fdatasync , +.Nm fsync .Nd "synchronise changes to a file" .Sh LIBRARY .Lb libc Modified: head/lib/libufs/ufs_disk_close.3 ============================================================================== --- head/lib/libufs/ufs_disk_close.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libufs/ufs_disk_close.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -15,7 +15,10 @@ .Dt UFS_DISK_CLOSE 3 .Os .Sh NAME -.Nm ufs_disk_close , ufs_disk_fillout , ufs_disk_fillout_blank, ufs_disk_write +.Nm ufs_disk_close , +.Nm ufs_disk_fillout , +.Nm ufs_disk_fillout_blank , +.Nm ufs_disk_write .Nd open and close userland UFS disks .Sh LIBRARY .Lb libufs Modified: head/share/man/man7/c99.7 ============================================================================== --- head/share/man/man7/c99.7 Tue Apr 17 02:33:54 2018 (r332641) +++ head/share/man/man7/c99.7 Tue Apr 17 09:05:46 2018 (r332642) @@ -27,7 +27,11 @@ .Dt C 7 .Os .Sh NAME -.Nm c, c78, c89, c90, c99 +.Nm c , +.Nm c78 , +.Nm c89 , +.Nm c90 , +.Nm c99 .Nd The C programming language .Sh DESCRIPTION C is a general purpose programming language, which has a strong connection Modified: head/share/man/man9/OF_device_from_xref.9 ============================================================================== --- head/share/man/man9/OF_device_from_xref.9 Tue Apr 17 02:33:54 2018 (r332641) +++ head/share/man/man9/OF_device_from_xref.9 Tue Apr 17 09:05:46 2018 (r332642) @@ -30,7 +30,7 @@ .Os .Sh NAME .Nm OF_device_from_xref , -.Nm OF_xref_from_device, +.Nm OF_xref_from_device , .Nm OF_device_register_xref .Nd "manage mappings between xrefs and devices" .Sh SYNOPSIS Modified: head/share/man/man9/printf.9 ============================================================================== --- head/share/man/man9/printf.9 Tue Apr 17 02:33:54 2018 (r332641) +++ head/share/man/man9/printf.9 Tue Apr 17 09:05:46 2018 (r332642) @@ -30,7 +30,10 @@ .Dt PRINTF 9 .Os .Sh NAME -.Nm printf , uprintf , tprintf, log +.Nm printf , +.Nm uprintf , +.Nm tprintf , +.Nm log .Nd formatted output conversion .Sh SYNOPSIS .In sys/types.h From owner-svn-src-all@freebsd.org Tue Apr 17 11:58:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC57FF9DACB; Tue, 17 Apr 2018 11:58:42 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ua0-x230.google.com (mail-ua0-x230.google.com [IPv6:2607:f8b0:400c:c08::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 540B578558; Tue, 17 Apr 2018 11:58:42 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ua0-x230.google.com with SMTP id q38so12263588uad.5; Tue, 17 Apr 2018 04:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=F5UYqsgRWNTLf/pKDDjnYBD03vZhSOUoHHnV5SsmO/g=; b=WJRYk9hCnbAoZuwuC+iCbQ6hGk9zNzzkjAELLOqHyujJbOpL8wIbg1pIQFTawTTeL+ U1BKI5WhL8zqzELIq/OBeB8cULXY2tOZ3FVGOiuGJ6eLvj08lMwhIqrmcWJfO3rsAYul wvrL7YJdXMVBo78YXGKKF3Hf59UodycMBMMH2P7rKkWzuKlU08N+WGi5tj3RdSIdBUzL bU/36nYeYMRTS7VcqGU/OpL9NtEhz/AgmSK7Bj22osQzS4Z+dlJNDx0bk5WD7uS8fjrS 2gigZNougWlTuvxXj9PDAlw4sdIc4FlHKLNUlTTL2Itr8DDGP1+25Um17IFAh5wgMHyO 1cjQ== 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:in-reply-to:references:from :date:message-id:subject:to:cc; bh=F5UYqsgRWNTLf/pKDDjnYBD03vZhSOUoHHnV5SsmO/g=; b=A8fvo5/iTLCOGOJt2/MEisd059a/ZYGI/mv2h+KRSHOV+XoBJV9RLXe7JuKbjvymkA dV1SU+auzlrp68i5OPbrVm9NIKRFFyZCLx2zqWC9lAGurqPDLMG2Svw+4f1cAauY2cCN 3T9LwaG/Hv2JoZ6/HsxOnppGdLmpmtHccXfyf9zOL/zcs3R8TMx8m3KHqDSNf/aXs33K cYK4LU3opO1YDiIjT3JTgoY8qEgmaC8xa+kwOhX/pxxaDphV4rSUyL8xmXfGbFDBvUSj B74Vtf1DefA+o54xAW2Ed80qOu510vrj/iu8bUt32kkmettF+jxkpBVrMo4sJHQ2RM1I r5DQ== X-Gm-Message-State: ALQs6tBhtPA7pQekIJ1wxmY/Wt8zACCsM4v+EGRz2AaqTwFjbaRRDb/G DLAX3nPNpmbsNh5yA+Dn+BJZ7nc/TXyt9nfI5YrXlg== X-Google-Smtp-Source: AIpwx482gpvk+Lq9blEC1xaxj681Hcvb3ES1PEPAFs758pxD9R39Ey2dR+iMnj4eaaoZKGyCSMSAyIHiQHvFRpf+6Wg= X-Received: by 10.176.73.50 with SMTP id z47mr1126883uac.59.1523966321605; Tue, 17 Apr 2018 04:58:41 -0700 (PDT) MIME-Version: 1.0 Sender: etnapierala@gmail.com Received: by 10.176.69.147 with HTTP; Tue, 17 Apr 2018 04:58:41 -0700 (PDT) In-Reply-To: <201804162036.w3GKatqh052821@pdx.rh.CN85.dnsmgr.net> References: <20180416192646.GA79786@brick> <201804162036.w3GKatqh052821@pdx.rh.CN85.dnsmgr.net> From: Edward Napierala Date: Tue, 17 Apr 2018 12:58:41 +0100 X-Google-Sender-Auth: dwwE-8NUeiyl3-bavyhI0U103VI Message-ID: Subject: Re: svn commit: r332596 - stable/11/sys/fs/autofs To: rgrimes@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 11:58:43 -0000 2018-04-16 21:36 GMT+01:00 Rodney W. Grimes : > > On 0416T1145, Rodney W. Grimes wrote: > > > [ Charset UTF-8 unsupported, converting... ] > > > > Author: trasz > > > > Date: Mon Apr 16 16:15:31 2018 > > > > New Revision: 332596 > > > > URL: https://svnweb.freebsd.org/changeset/base/332596 > > > > > > > > Log: > > > > MFC r328339: > > > > > > > > Add SPDX tags to autofs(5). > > > > > > > > > > Please until I resolve the eadler miss merge/revirt mess with > > > SPDX do NOT touch any SPDX stuff in 11/stable. > > > > Ok. Although, to be honest, I think I've already MFC-ed all the SPDX > stuff > > I had in my queue before seeing your mail, sorry for that. > > Could you do me a really big favor and see if any of the mfc's you > did is in this list: > Merged /head:r325966,326022-326025,326027,326192-326193,326219, > 326255-326261 > No, my SPDX MFCs were (HEAD revisions): r328342, r328336, r328335, r328341, r328338, r328339, r328337, and r328196. From owner-svn-src-all@freebsd.org Tue Apr 17 12:32:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D87EFA064E; Tue, 17 Apr 2018 12:32:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 D8B4C7E9A7; Tue, 17 Apr 2018 12:32:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w3HCWDWK076412 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Apr 2018 15:32:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w3HCWDWK076412 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w3HCWCw8076411; Tue, 17 Apr 2018 15:32:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 17 Apr 2018 15:32:12 +0300 From: Konstantin Belousov To: Rick Macklem Cc: Julian Elischer , Andriy Gapon , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r332559 - head/usr.sbin/mountd Message-ID: <20180417123212.GM1774@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 12:32:25 -0000 On Tue, Apr 17, 2018 at 12:02:04AM +0000, Rick Macklem wrote: > I wrote: > >Julian Elischer wrote: > >>On 16/4/18 6:56 pm, Konstantin Belousov wrote: > >[stuff snipped] > >>>> + ngroups =3D XU_NGROUPS + 1; > >>> Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? > >>valid question.. because that is how many are allocated? > >>it was a "minimally invasive patch".. whoever used XU_NGROUPS before > >>should have fixed it. > >>Having said that, thanks for drawing out attention to it.. will > >>probably fix. > >16 is the limit specified in the RFCs for Sun RPC, so that is the "on the wire" limit. > >I haven't looked at the code. It might make sense to handle more here and then > >set the limit at 16 after getting rid of duplicates, but I have no idea if = > >it matters? > > > >rick > Correcting my own post. Now that I've looked at the code, this doesn't go on > the wire. It does go in the exports structure, which means that this structure > would have to be revised (along with the syscall and VOP calls and the kernel > code that uses it). These credentials are for the "maproot/mapall" export > option and revising the export structure seems like quite a bit of work for this > case. (Until revised XU_NGROUPS is the correct value to set it to, since there > is a "struct xucred" in the exports structure.) > > Since Julian Elischer has been emailing me about adding a "fsid" export option > which allows /etc/exports to set the FSID of the exported fs (which would also > need to go in the exports structure), it might be about time to rev. the exports > structure? Probably yes, we would need a new variant of the nmount(2) syscall. Existing syscall should use the old layout for compatibility (we care about nmount and COMPAT32 as well). From owner-svn-src-all@freebsd.org Tue Apr 17 12:47:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98A7DFA13B9; Tue, 17 Apr 2018 12:47:24 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 79B6A82957; Tue, 17 Apr 2018 12:47:23 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3HClJwV056066; Tue, 17 Apr 2018 05:47:19 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3HClIxS056065; Tue, 17 Apr 2018 05:47:18 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804171247.w3HClIxS056065@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r332596 - stable/11/sys/fs/autofs In-Reply-To: To: Edward Napierala Date: Tue, 17 Apr 2018 05:47:18 -0700 (PDT) CC: rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 12:47:24 -0000 > 2018-04-16 21:36 GMT+01:00 Rodney W. Grimes > : > > > > On 0416T1145, Rodney W. Grimes wrote: > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > Author: trasz > > > > > Date: Mon Apr 16 16:15:31 2018 > > > > > New Revision: 332596 > > > > > URL: https://svnweb.freebsd.org/changeset/base/332596 > > > > > > > > > > Log: > > > > > MFC r328339: > > > > > > > > > > Add SPDX tags to autofs(5). > > > > > > > > > > > > > Please until I resolve the eadler miss merge/revirt mess with > > > > SPDX do NOT touch any SPDX stuff in 11/stable. > > > > > > Ok. Although, to be honest, I think I've already MFC-ed all the SPDX > > stuff > > > I had in my queue before seeing your mail, sorry for that. > > > > Could you do me a really big favor and see if any of the mfc's you > > did is in this list: > > Merged /head:r325966,326022-326025,326027,326192-326193,326219, > > 326255-326261 > > > > No, my SPDX MFCs were (HEAD revisions): r328342, r328336, r328335, > r328341, r328338, r328339, r328337, and r328196. I have moved far enough into the process of cleanup of r330897/331722 that I can verify so far I only have a small handfull of conflicts that are managable. Some of your commits are going to temporarily need to be reverted, the cleanup work I am doing done, and then your commits re-applied. The only reason for the temporary revert/reapply is to allow the larger revert(s) of 330897 and 331722 to be done with 0 conflicts. Revert log message: The intent is to use 1 or 2 line log messages of the form: Revert rXXXXXX,XXXXXX,.. to clear path for Revert of r331722. This revert shall be reverted shortly making this a NOP. Revert of Revert log message: Reapply rXXXXXX,XXXXXX after revert of r331722. I would like to ask for your approval to revert the following commits that are in conflict with reverting r331722: svn merge -c-332599 . #trasz svn merge -c-332578 . #trasz svn merge -c-332577 . #trasz svn merge -c-332576 . #trasz svn merge -c-332575 . #trasz This block of 5 commits shall be reverted in 1 commit, and reapplied in a second commit. At present these are the only blocking commits to revert r331722, I am still working out the path to revert r330897, at present it is at 5 commits needing reverted with 1 conflict left to figure out. Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Apr 17 12:51:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8AB3FA181E; Tue, 17 Apr 2018 12:51:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68DF2842D6; Tue, 17 Apr 2018 12:51:28 +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 63B344CAC; Tue, 17 Apr 2018 12:51:28 +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 w3HCpSmL021937; Tue, 17 Apr 2018 12:51:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HCpSBA021936; Tue, 17 Apr 2018 12:51:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804171251.w3HCpSBA021936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Apr 2018 12:51: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: r332643 - stable/11/sys/dev/vt/hw/vga X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/vt/hw/vga X-SVN-Commit-Revision: 332643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 12:51:28 -0000 Author: emaste Date: Tue Apr 17 12:51:28 2018 New Revision: 332643 URL: https://svnweb.freebsd.org/changeset/base/332643 Log: MFC r332421: vt: add three more cp437 mappings for vga textmode In UTF-8 locales mandoc uses a number of characters outside of the Basic Latin group, e.g. from general punctuation or miscellaneous mathematical symbols, and these rendered as ? in text mode. This change adds (char, replacement, code point, description): – - U+2013 En Dash ⟨ < U+27E8 Mathematical Left Angle Bracket ⟩ > U+27E9 Mathematical Right Angle Bracket This change addresses some common cases; there are others that still need to be added after a more thorough review. PR: 227409 Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/vt/hw/vga/vt_vga.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/11/sys/dev/vt/hw/vga/vt_vga.c Tue Apr 17 09:05:46 2018 (r332642) +++ stable/11/sys/dev/vt/hw/vga/vt_vga.c Tue Apr 17 12:51:28 2018 (r332643) @@ -237,6 +237,7 @@ static const struct unicp437 cp437table[] = { { 0x03c0, 0xe3, 0x00 }, { 0x03c3, 0xe5, 0x00 }, { 0x03c4, 0xe7, 0x00 }, { 0x03c6, 0xed, 0x00 }, { 0x03d5, 0xed, 0x00 }, { 0x2010, 0x2d, 0x00 }, + { 0x2013, 0x2d, 0x00 }, { 0x2014, 0x2d, 0x00 }, { 0x2018, 0x60, 0x00 }, { 0x2019, 0x27, 0x00 }, { 0x201c, 0x22, 0x00 }, { 0x201d, 0x22, 0x00 }, { 0x2022, 0x07, 0x00 }, @@ -285,7 +286,8 @@ static const struct unicp437 cp437table[] = { { 0x2640, 0x0c, 0x00 }, { 0x2642, 0x0b, 0x00 }, { 0x2660, 0x06, 0x00 }, { 0x2663, 0x05, 0x00 }, { 0x2665, 0x03, 0x01 }, { 0x266a, 0x0d, 0x00 }, - { 0x266c, 0x0e, 0x00 }, + { 0x266c, 0x0e, 0x00 }, { 0x27e8, 0x3c, 0x00 }, + { 0x27e9, 0x3e, 0x00 }, }; static uint8_t From owner-svn-src-all@freebsd.org Tue Apr 17 12:52:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68DC8FA195B; Tue, 17 Apr 2018 12:52: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 108CA844E8; Tue, 17 Apr 2018 12:52:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B73D4D05; Tue, 17 Apr 2018 12:52:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3HCqUUj024221; Tue, 17 Apr 2018 12:52:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HCqUp4024220; Tue, 17 Apr 2018 12:52:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804171252.w3HCqUp4024220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Apr 2018 12:52:30 +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: r332644 - stable/10/sys/dev/vt/hw/vga X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/dev/vt/hw/vga X-SVN-Commit-Revision: 332644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 12:52:31 -0000 Author: emaste Date: Tue Apr 17 12:52:30 2018 New Revision: 332644 URL: https://svnweb.freebsd.org/changeset/base/332644 Log: MFC r332421: vt: add three more cp437 mappings for vga textmode In UTF-8 locales mandoc uses a number of characters outside of the Basic Latin group, e.g. from general punctuation or miscellaneous mathematical symbols, and these rendered as ? in text mode. This change adds (char, replacement, code point, description): – - U+2013 En Dash ⟨ < U+27E8 Mathematical Left Angle Bracket ⟩ > U+27E9 Mathematical Right Angle Bracket This change addresses some common cases; there are others that still need to be added after a more thorough review. PR: 227409 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vt_vga.c Tue Apr 17 12:51:28 2018 (r332643) +++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Tue Apr 17 12:52:30 2018 (r332644) @@ -226,6 +226,7 @@ static const struct unicp437 cp437table[] = { { 0x03c0, 0xe3, 0x00 }, { 0x03c3, 0xe5, 0x00 }, { 0x03c4, 0xe7, 0x00 }, { 0x03c6, 0xed, 0x00 }, { 0x03d5, 0xed, 0x00 }, { 0x2010, 0x2d, 0x00 }, + { 0x2013, 0x2d, 0x00 }, { 0x2014, 0x2d, 0x00 }, { 0x2018, 0x60, 0x00 }, { 0x2019, 0x27, 0x00 }, { 0x201c, 0x22, 0x00 }, { 0x201d, 0x22, 0x00 }, { 0x2022, 0x07, 0x00 }, @@ -274,7 +275,8 @@ static const struct unicp437 cp437table[] = { { 0x2640, 0x0c, 0x00 }, { 0x2642, 0x0b, 0x00 }, { 0x2660, 0x06, 0x00 }, { 0x2663, 0x05, 0x00 }, { 0x2665, 0x03, 0x01 }, { 0x266a, 0x0d, 0x00 }, - { 0x266c, 0x0e, 0x00 }, + { 0x266c, 0x0e, 0x00 }, { 0x27e8, 0x3c, 0x00 }, + { 0x27e9, 0x3e, 0x00 }, }; static uint8_t From owner-svn-src-all@freebsd.org Tue Apr 17 12:55:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16D11FA1B94; Tue, 17 Apr 2018 12:55:00 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA9C384712; Tue, 17 Apr 2018 12:54:59 +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 B15724D0B; Tue, 17 Apr 2018 12:54:59 +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 w3HCsxmm024354; Tue, 17 Apr 2018 12:54:59 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HCsxPx024349; Tue, 17 Apr 2018 12:54:59 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201804171254.w3HCsxPx024349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Tue, 17 Apr 2018 12:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332645 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 332645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 12:55:00 -0000 Author: gallatin Date: Tue Apr 17 12:54:58 2018 New Revision: 332645 URL: https://svnweb.freebsd.org/changeset/base/332645 Log: Make lagg creation more fault tolerant - Warn, don't exit, when SIOCSLAGGPORT returns an error. When we exit with an error during lagg creation, a single failed NIC (which no longer attaches) can prevent lagg creation and other configuration, such as adding an IPv4 address, and thus leave a machine unreachable. - Preserve non-EEXISTS errors for exit status from SIOCSLAGGPORT, in case scripts are looking for it. Hopefully this can be extended if other parts of ifconfig can allow a "soft" failure. - Improve the warning message to mention what lagg and what member are problematic. Reviewed by: jtl, glebius Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D15046 Modified: head/sbin/ifconfig/ifclone.c head/sbin/ifconfig/ifconfig.c head/sbin/ifconfig/ifconfig.h head/sbin/ifconfig/ifgroup.c head/sbin/ifconfig/iflagg.c Modified: head/sbin/ifconfig/ifclone.c ============================================================================== --- head/sbin/ifconfig/ifclone.c Tue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/ifclone.c Tue Apr 17 12:54:58 2018 (r332645) @@ -181,7 +181,7 @@ static void clone_Copt_cb(const char *optarg __unused) { list_cloners(); - exit(0); + exit(exit_code); } static struct option clone_Copt = { .opt = "C", .opt_usage = "[-C]", .cb = clone_Copt_cb }; Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Tue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/ifconfig.c Tue Apr 17 12:54:58 2018 (r332645) @@ -99,6 +99,7 @@ int printifname = 0; int supmedia = 0; int printkeys = 0; /* Print keying material for interfaces. */ +int exit_code = 0; /* Formatter Strings */ char *f_inet, *f_inet6, *f_ether, *f_addr; @@ -485,7 +486,7 @@ main(int argc, char *argv[]) errx(1, "%s: cloning name too long", ifname); ifconfig(argc, argv, 1, NULL); - exit(0); + exit(exit_code); } #ifdef JAIL /* @@ -499,7 +500,7 @@ main(int argc, char *argv[]) errx(1, "%s: interface name too long", ifname); ifconfig(argc, argv, 0, NULL); - exit(0); + exit(exit_code); } #endif errx(1, "interface %s does not exist", ifname); @@ -597,7 +598,7 @@ main(int argc, char *argv[]) freeifaddrs(ifap); freeformat(); - exit(0); + exit(exit_code); } static struct afswtch *afs = NULL; Modified: head/sbin/ifconfig/ifconfig.h ============================================================================== --- head/sbin/ifconfig/ifconfig.h Tue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/ifconfig.h Tue Apr 17 12:54:58 2018 (r332645) @@ -136,6 +136,7 @@ extern int printkeys; extern int newaddr; extern int verbose; extern int printifname; +extern int exit_code; void setifcap(const char *, int value, int s, const struct afswtch *); Modified: head/sbin/ifconfig/ifgroup.c ============================================================================== --- head/sbin/ifconfig/ifgroup.c Tue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/ifgroup.c Tue Apr 17 12:54:58 2018 (r332645) @@ -140,7 +140,7 @@ printgroup(const char *groupname) if (ioctl(s, SIOCGIFGMEMB, (caddr_t)&ifgr) == -1) { if (errno == EINVAL || errno == ENOTTY || errno == ENOENT) - exit(0); + exit(exit_code); else err(1, "SIOCGIFGMEMB"); } @@ -159,7 +159,7 @@ printgroup(const char *groupname) } free(ifgr.ifgr_groups); - exit(0); + exit(exit_code); } static struct cmd group_cmds[] = { Modified: head/sbin/ifconfig/iflagg.c ============================================================================== --- head/sbin/ifconfig/iflagg.c Tue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/iflagg.c Tue Apr 17 12:54:58 2018 (r332645) @@ -41,9 +41,17 @@ setlaggport(const char *val, int d, int s, const struc strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname)); strlcpy(rp.rp_portname, val, sizeof(rp.rp_portname)); - /* Don't choke if the port is already in this lagg. */ - if (ioctl(s, SIOCSLAGGPORT, &rp) && errno != EEXIST) - err(1, "SIOCSLAGGPORT"); + /* + * Do not exit with an error here. Doing so permits a + * failed NIC to take down an entire lagg. + * + * Don't error at all if the port is already in the lagg. + */ + if (ioctl(s, SIOCSLAGGPORT, &rp) && errno != EEXIST) { + warnx("%s %s: SIOCSLAGGPORT: %s", + name, val, strerror(errno)); + exit_code = 1; + } } static void From owner-svn-src-all@freebsd.org Tue Apr 17 13:47:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ED8AFA4CC9; Tue, 17 Apr 2018 13:47:49 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pl0-x242.google.com (mail-pl0-x242.google.com [IPv6:2607:f8b0:400e:c01::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0739270994; Tue, 17 Apr 2018 13:47:49 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pl0-x242.google.com with SMTP id w12-v6so11099199plp.0; Tue, 17 Apr 2018 06:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:openpgp:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Pvm5yiIzcT/AyjHAODlI6YCdYAwjRZdMlXnNKO0g+XU=; b=ZA1u9F016L5AphpUutfa2NW0F11pIVArUgxms+57CLtmb6DJyCUKvBBvywPgWfnn0g iS+0TnEzPCytXl0sLNfx7BDOG1FXq+yeu10yf3FNii94Mktskw1hn1jbB2IWND1ff8jz GGaKnVmfDVzMnw7SFvmyNvebKhwTr9drTqBgUeBu0tqfga0mPtBA3/FYfX2m/PqM9urQ kS/5wIcUtgWsMBZbH2OR/Bcfc6GPCuqMTrX0Fa0e/oKsXWGLp3Dxh0pqZi66iBEgtlmG RnNRG50ZhLz4k+VQjay5EUrkuIhSw/KQsk2GdnrRHGu6iMNTlcm653kpdIe9HDs2wf0+ vMIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :openpgp:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Pvm5yiIzcT/AyjHAODlI6YCdYAwjRZdMlXnNKO0g+XU=; b=IuofoVql0GEe0M40BstF1MSnE84otT4rbKCaIA32HOPdlGdnSePWzDqLsazo6oyOW3 bv1kQU2LhT72Cd9gi84+4/XVTF9CSbAlxv5gPOnBR0fKNxBnIutFyaE7vJEvBgOk65Sp kVzbQWKhjmc82fOKqeAaEmYnlEORi/9l7rGyGMnpqDR5pdjeWp3zj7/zqdqnWokuMnYB cnOqOcMdqZZQu1093Q940tpcFO9mwIvAR1022h8BGdD5fjHTZJNASJVO0+96F6AAJztb 0fy4lVhpLLJGgeGcrHxhANZZv+XfzfjGjxDY9d5BsnsaxfKLKOZC9J9yEuQLGABXTF4/ 5bcg== X-Gm-Message-State: ALQs6tBS3Fmrv9Zl91f2ZEEBKblYDk3c/ZzR8S7s/n63VXSoIdvOWwd2 eMeHhDtsAqAighjY/qSc5Kx+lcV2 X-Google-Smtp-Source: AIpwx49nv4pdDoDqN2GHkra1TsLFTLz/P00N4/Tw1do7sNhq/Yo8pKEviLvTK4gKp+Eki22Dan5/bg== X-Received: by 2002:a17:902:8f95:: with SMTP id z21-v6mr2126931plo.304.1523972867822; Tue, 17 Apr 2018 06:47:47 -0700 (PDT) Received: from [192.168.1.135] (7.69.220.111.sta.wbroadband.net.au. [111.220.69.7]) by smtp.gmail.com with ESMTPSA id f69sm20256257pgc.27.2018.04.17.06.47.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 06:47:47 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r332645 - head/sbin/ifconfig To: Andrew Gallatin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201804171254.w3HCsxPx024349@repo.freebsd.org> From: Kubilay Kocak Openpgp: preference=signencrypt Message-ID: Date: Tue, 17 Apr 2018 23:47:19 +1000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <201804171254.w3HCsxPx024349@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 13:47:49 -0000 On 17/04/2018 10:54 pm, Andrew Gallatin wrote: > Author: gallatin > Date: Tue Apr 17 12:54:58 2018 > New Revision: 332645 > URL: https://svnweb.freebsd.org/changeset/base/332645 > > Log: > Make lagg creation more fault tolerant > > - Warn, don't exit, when SIOCSLAGGPORT returns an error. > > When we exit with an error during lagg creation, a single > failed NIC (which no longer attaches) can prevent lagg > creation and other configuration, such as adding an IPv4 > address, and thus leave a machine unreachable. > > - Preserve non-EEXISTS errors for exit status from SIOCSLAGGPORT, > in case scripts are looking for it. Hopefully this can be > extended if other parts of ifconfig can allow a "soft" failure. > > - Improve the warning message to mention what lagg and what > member are problematic. > > Reviewed by: jtl, glebius > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D15046 MFC please? > Modified: > head/sbin/ifconfig/ifclone.c > head/sbin/ifconfig/ifconfig.c > head/sbin/ifconfig/ifconfig.h > head/sbin/ifconfig/ifgroup.c > head/sbin/ifconfig/iflagg.c > > Modified: head/sbin/ifconfig/ifclone.c > ============================================================================== > --- head/sbin/ifconfig/ifclone.c Tue Apr 17 12:52:30 2018 (r332644) > +++ head/sbin/ifconfig/ifclone.c Tue Apr 17 12:54:58 2018 (r332645) > @@ -181,7 +181,7 @@ static void > clone_Copt_cb(const char *optarg __unused) > { > list_cloners(); > - exit(0); > + exit(exit_code); > } > static struct option clone_Copt = { .opt = "C", .opt_usage = "[-C]", .cb = clone_Copt_cb }; > > > Modified: head/sbin/ifconfig/ifconfig.c > ============================================================================== > --- head/sbin/ifconfig/ifconfig.c Tue Apr 17 12:52:30 2018 (r332644) > +++ head/sbin/ifconfig/ifconfig.c Tue Apr 17 12:54:58 2018 (r332645) > @@ -99,6 +99,7 @@ int printifname = 0; > > int supmedia = 0; > int printkeys = 0; /* Print keying material for interfaces. */ > +int exit_code = 0; > > /* Formatter Strings */ > char *f_inet, *f_inet6, *f_ether, *f_addr; > @@ -485,7 +486,7 @@ main(int argc, char *argv[]) > errx(1, "%s: cloning name too long", > ifname); > ifconfig(argc, argv, 1, NULL); > - exit(0); > + exit(exit_code); > } > #ifdef JAIL > /* > @@ -499,7 +500,7 @@ main(int argc, char *argv[]) > errx(1, "%s: interface name too long", > ifname); > ifconfig(argc, argv, 0, NULL); > - exit(0); > + exit(exit_code); > } > #endif > errx(1, "interface %s does not exist", ifname); > @@ -597,7 +598,7 @@ main(int argc, char *argv[]) > freeifaddrs(ifap); > > freeformat(); > - exit(0); > + exit(exit_code); > } > > static struct afswtch *afs = NULL; > > Modified: head/sbin/ifconfig/ifconfig.h > ============================================================================== > --- head/sbin/ifconfig/ifconfig.h Tue Apr 17 12:52:30 2018 (r332644) > +++ head/sbin/ifconfig/ifconfig.h Tue Apr 17 12:54:58 2018 (r332645) > @@ -136,6 +136,7 @@ extern int printkeys; > extern int newaddr; > extern int verbose; > extern int printifname; > +extern int exit_code; > > void setifcap(const char *, int value, int s, const struct afswtch *); > > > Modified: head/sbin/ifconfig/ifgroup.c > ============================================================================== > --- head/sbin/ifconfig/ifgroup.c Tue Apr 17 12:52:30 2018 (r332644) > +++ head/sbin/ifconfig/ifgroup.c Tue Apr 17 12:54:58 2018 (r332645) > @@ -140,7 +140,7 @@ printgroup(const char *groupname) > if (ioctl(s, SIOCGIFGMEMB, (caddr_t)&ifgr) == -1) { > if (errno == EINVAL || errno == ENOTTY || > errno == ENOENT) > - exit(0); > + exit(exit_code); > else > err(1, "SIOCGIFGMEMB"); > } > @@ -159,7 +159,7 @@ printgroup(const char *groupname) > } > free(ifgr.ifgr_groups); > > - exit(0); > + exit(exit_code); > } > > static struct cmd group_cmds[] = { > > Modified: head/sbin/ifconfig/iflagg.c > ============================================================================== > --- head/sbin/ifconfig/iflagg.c Tue Apr 17 12:52:30 2018 (r332644) > +++ head/sbin/ifconfig/iflagg.c Tue Apr 17 12:54:58 2018 (r332645) > @@ -41,9 +41,17 @@ setlaggport(const char *val, int d, int s, const struc > strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname)); > strlcpy(rp.rp_portname, val, sizeof(rp.rp_portname)); > > - /* Don't choke if the port is already in this lagg. */ > - if (ioctl(s, SIOCSLAGGPORT, &rp) && errno != EEXIST) > - err(1, "SIOCSLAGGPORT"); > + /* > + * Do not exit with an error here. Doing so permits a > + * failed NIC to take down an entire lagg. > + * > + * Don't error at all if the port is already in the lagg. > + */ > + if (ioctl(s, SIOCSLAGGPORT, &rp) && errno != EEXIST) { > + warnx("%s %s: SIOCSLAGGPORT: %s", > + name, val, strerror(errno)); > + exit_code = 1; > + } > } > > static void > _______________________________________________ > 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" > From owner-svn-src-all@freebsd.org Tue Apr 17 14:04:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1311DFA5CF7; Tue, 17 Apr 2018 14:04:31 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 778BD75DF9; Tue, 17 Apr 2018 14:04:30 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x22b.google.com with SMTP id w3so19272752wrg.2; Tue, 17 Apr 2018 07:04:30 -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:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Qp+VFiIwwk2ozfY10bgb1LKlwWb13ufzjkky+y9FlxE=; b=dsXGfMWGnXncp9mouR1/pKfTqrs3xAtZYkf0gHXhFZiFzamnkKx6QnmUpP/iEvsoqH mpyJQhMbIblKg8hYPEKuPCD5D2cDF98NeO5A8f/noQyHHnNHMRnsO+p+NPxCnwGSP3Ug 5qLVPherg68vL9KUOGeM7/0zAJegc57HToWSJE0YI5jLfZlSpvyvZN/wB2EcW/8iHT64 sH+LRCcnYd3N4x1LsRBaBsZxbBm5xTBLvZxMm5egTJA/vAagoNpQaoAkVrd4T9Mp5lY8 QWkBEEMoWCQXbFvHZ8cL3RHX7yMENwPDVivooHGLxWdW9eyJnj7Dy7vD0ZgIIrPnRhDz bIdA== 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=Qp+VFiIwwk2ozfY10bgb1LKlwWb13ufzjkky+y9FlxE=; b=dc+ONaXeqL2s+RVcCeGmMBE38Qztl/2ML5TE6rPtTIWpT92VV+SIR7aZI2ZbhIY3Xy y4u8E99SmJRIkCaCuihsOMULo0tuwTYiHyjZA9VUdH33Ftu4O2upin0vOuQfVxu+ZZ82 KjqDxMxessdEDrr/EcE5dcdoqeqULwp1ikk1Tf7xBYdnVU3XROpaCGlObN2VDDb4hayy uMIU/ieEYXttQjidA3uwy1r0a5o6Nfipi6i6RrVT778jqlgXw0kGCIZggq3vxqndPdUg 8rD/Cz8pV5oW0U5hWIxTWrxy6+/yFTOEAX+PWNeosT0kw38Rb6WK5NHEQg00HMjgHZUi tCJQ== X-Gm-Message-State: ALQs6tAegrAUFDya3ZfZ34pAIBq2Ycz0DkAOMQmqPRvPBUUbc3XoUiQx rt0w8+tOl2ZsVeSjW6OBixb8hw== X-Google-Smtp-Source: AIpwx496WifyQ3sIan8bz14L1K8qDoMwnPRjzS8EDu1/4L6tvmYGOHa0c+2gTO3WIo8XScGiewYzEg== X-Received: by 10.223.139.4 with SMTP id n4mr1786096wra.112.1523973869100; Tue, 17 Apr 2018 07:04:29 -0700 (PDT) Received: from brick (cpc92302-cmbg19-2-0-cust461.5-4.cable.virginm.net. [82.1.209.206]) by smtp.gmail.com with ESMTPSA id w186sm4775695wmw.27.2018.04.17.07.04.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 07:04:28 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 17 Apr 2018 15:04:26 +0100 From: Edward Napierala To: rgrimes@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r332596 - stable/11/sys/fs/autofs Message-ID: <20180417140426.GA81689@brick> Mail-Followup-To: rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201804171247.w3HClIxS056065@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201804171247.w3HClIxS056065@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 14:04:31 -0000 On 0417T0547, Rodney W. Grimes wrote: > > 2018-04-16 21:36 GMT+01:00 Rodney W. Grimes > > : > > > > > > On 0416T1145, Rodney W. Grimes wrote: > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > Author: trasz > > > > > > Date: Mon Apr 16 16:15:31 2018 > > > > > > New Revision: 332596 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/332596 > > > > > > > > > > > > Log: > > > > > > MFC r328339: > > > > > > > > > > > > Add SPDX tags to autofs(5). > > > > > > > > > > > > > > > > Please until I resolve the eadler miss merge/revirt mess with > > > > > SPDX do NOT touch any SPDX stuff in 11/stable. > > > > > > > > Ok. Although, to be honest, I think I've already MFC-ed all the SPDX > > > stuff > > > > I had in my queue before seeing your mail, sorry for that. > > > > > > Could you do me a really big favor and see if any of the mfc's you > > > did is in this list: > > > Merged /head:r325966,326022-326025,326027,326192-326193,326219, > > > 326255-326261 > > > > > > > No, my SPDX MFCs were (HEAD revisions): r328342, r328336, r328335, > > r328341, r328338, r328339, r328337, and r328196. > > I have moved far enough into the process of cleanup of r330897/331722 > that I can verify so far I only have a small handfull of conflicts > that are managable. > > Some of your commits are going to temporarily need to be reverted, > the cleanup work I am doing done, > and then your commits re-applied. > > The only reason for the temporary revert/reapply is to allow > the larger revert(s) of 330897 and 331722 to be done with 0 > conflicts. > > Revert log message: > The intent is to use 1 or 2 line log messages of the form: > Revert rXXXXXX,XXXXXX,.. to clear path for Revert of r331722. > This revert shall be reverted shortly making this a NOP. > > Revert of Revert log message: > Reapply rXXXXXX,XXXXXX after revert of r331722. > > I would like to ask for your approval to revert the following > commits that are in conflict with reverting r331722: > svn merge -c-332599 . #trasz > svn merge -c-332578 . #trasz > svn merge -c-332577 . #trasz > svn merge -c-332576 . #trasz > svn merge -c-332575 . #trasz > > This block of 5 commits shall be reverted in 1 commit, and > reapplied in a second commit. > > At present these are the only blocking commits to revert > r331722, I am still working out the path to revert r330897, > at present it is at 5 commits needing reverted with 1 > conflict left to figure out. Sure, no problem, you have my approval. Sorry for the mess. From owner-svn-src-all@freebsd.org Tue Apr 17 15:29:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5009AF83CBD; Tue, 17 Apr 2018 15:29:33 +0000 (UTC) (envelope-from ram@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2CE287F54; Tue, 17 Apr 2018 15:29:32 +0000 (UTC) (envelope-from ram@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECA8C6575; Tue, 17 Apr 2018 15:29:32 +0000 (UTC) (envelope-from ram@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3HFTWja000724; Tue, 17 Apr 2018 15:29:32 GMT (envelope-from ram@FreeBSD.org) Received: (from ram@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HFTWER000722; Tue, 17 Apr 2018 15:29:32 GMT (envelope-from ram@FreeBSD.org) Message-Id: <201804171529.w3HFTWER000722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ram set sender to ram@FreeBSD.org using -f From: Ram Kishore Vegesna Date: Tue, 17 Apr 2018 15:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332646 - head/sys/dev/ocs_fc X-SVN-Group: head X-SVN-Commit-Author: ram X-SVN-Commit-Paths: head/sys/dev/ocs_fc X-SVN-Commit-Revision: 332646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 15:29:33 -0000 Author: ram Date: Tue Apr 17 15:29:32 2018 New Revision: 332646 URL: https://svnweb.freebsd.org/changeset/base/332646 Log: Moved opts-stack.h include before all other includes. PR: 227446 Approved by: ken MFC after: 3 days Modified: head/sys/dev/ocs_fc/ocs_os.c head/sys/dev/ocs_fc/ocs_os.h Modified: head/sys/dev/ocs_fc/ocs_os.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_os.c Tue Apr 17 12:54:58 2018 (r332645) +++ head/sys/dev/ocs_fc/ocs_os.c Tue Apr 17 15:29:32 2018 (r332646) @@ -37,10 +37,6 @@ */ #include "ocs.h" -#include "opt_stack.h" -#include -#include -#include /* for debug of memory allocations */ static MALLOC_DEFINE(M_OCS, "OCS", "OneCore Storage data"); Modified: head/sys/dev/ocs_fc/ocs_os.h ============================================================================== --- head/sys/dev/ocs_fc/ocs_os.h Tue Apr 17 12:54:58 2018 (r332645) +++ head/sys/dev/ocs_fc/ocs_os.h Tue Apr 17 15:29:32 2018 (r332646) @@ -39,11 +39,11 @@ #ifndef _OCS_OS_H #define _OCS_OS_H -typedef struct ocs_softc ocs_t; - /*************************************************************************** * OS specific includes */ +#include "opt_stack.h" + #include #include #include @@ -78,6 +78,8 @@ typedef struct ocs_softc ocs_t; #include #include +#include /* for debug of memory allocations */ + /* OCS_OS_MAX_ISR_TIME_MSEC - maximum time driver code should spend in an interrupt * or kernel thread context without yielding */ @@ -151,6 +153,8 @@ typedef struct ocs_softc ocs_t; /*************************************************************************** * Platform specific operations */ + +typedef struct ocs_softc ocs_t; /** * @ingroup os From owner-svn-src-all@freebsd.org Tue Apr 17 15:30:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEF4BF83F1D for ; Tue, 17 Apr 2018 15:30:55 +0000 (UTC) (envelope-from ram.vegesna@broadcom.com) Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 488356854D for ; Tue, 17 Apr 2018 15:30:55 +0000 (UTC) (envelope-from ram.vegesna@broadcom.com) Received: by mail-lf0-x232.google.com with SMTP id b23-v6so9026467lfg.4 for ; Tue, 17 Apr 2018 08: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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qqy5m6I7x4BzoeoU3YEaXxk3tPlhW+o/SOhUDn+SOko=; b=LRtaEXm4Y06Y9hbecQA8VF5R5RNry+Y9OWPJ0mrcBpA/JJUpRagnO0em+CD1iclecu 08Vw+BepnlhiECDOlr1X+I8ZHeES29qrcEeA9p4y+dgTIpFx1R58MmP0xKGY+gir/lB7 qiDhXRC4fJ7l5zfb7q/EwT7JGqUhQq9L54xYNNJuNm3lNQjM4fw3MmF3DRiqxyZAAUu3 KYufgtgbsPI+hBYT33/vLLtC9N9O5AkS36t+rUA+zPbJPZnlQ4eEgHFYllqLhxwxTqYP tFXQwfeX8KOrgZF6kIOX66Xm/vqU1SUPUEJiJAN/tZVx20o1xGHvrYsVdPqrP07D7t66 W+AQ== X-Gm-Message-State: ALQs6tAlD39L4E+tk5668Cvq6TtFCztcuD9eSpEKs+Q38vSBU/Sb+0U3 +pwUNCIQRGe6D/Z8dUgVRQ8GcsckTrMxW1MJ+gOg8qf9 X-Google-Smtp-Source: AIpwx4/0iwow87UUeBMSEEvT/8ywSBHINslb2PX+iTfBE39uNGGBPfi4/80Oi1SV4geXfzeWyJ8b3feqxbVlrT8ZMBw= X-Received: by 2002:a19:9b08:: with SMTP id d8-v6mr2053218lfe.66.1523979053708; Tue, 17 Apr 2018 08:30:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.134.205 with HTTP; Tue, 17 Apr 2018 08:30:53 -0700 (PDT) In-Reply-To: References: <201804131331.w3DDVKod044086@repo.freebsd.org> From: Ram Kishore Vegesna Date: Tue, 17 Apr 2018 21:00:53 +0530 Message-ID: Subject: Re: svn commit: r332471 - head/sys/dev/ocs_fc To: Oliver Pinter Cc: Ram Kishore Vegesna , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Bruce Evans Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 15:30:56 -0000 Thanks Oliver, For pointing the issue. Checked in the change. -Ram On Sat, Apr 14, 2018 at 3:32 AM, Oliver Pinter < oliver.pinter@hardenedbsd.org> wrote: > > > On Friday, April 13, 2018, Ram Kishore Vegesna wrote: > >> Author: ram >> Date: Fri Apr 13 13:31:20 2018 >> New Revision: 332471 >> URL: https://svnweb.freebsd.org/changeset/base/332471 >> >> Log: >> Check if STACK is defined before using the stack(9). >> >> PR: 227446 >> Reported by: emaste >> Approved by: ken >> >> Modified: >> head/sys/dev/ocs_fc/ocs_os.c >> >> Modified: head/sys/dev/ocs_fc/ocs_os.c >> ============================================================ >> ================== >> --- head/sys/dev/ocs_fc/ocs_os.c Fri Apr 13 13:23:31 2018 >> (r332470) >> +++ head/sys/dev/ocs_fc/ocs_os.c Fri Apr 13 13:31:20 2018 >> (r332471) >> @@ -37,6 +37,7 @@ >> */ >> >> #include "ocs.h" >> +#include "opt_stack.h" > > > These types of includes - where you includes opts - should go before any > other includes. > > > >> #include >> #include >> #include /* for debug of memory >> allocations */ >> @@ -855,11 +856,13 @@ void ocs_intr_enable(ocs_os_handle_t os) >> >> void ocs_print_stack(void) >> { >> +#if defined(STACK) >> struct stack st; >> >> stack_zero(&st); >> stack_save(&st); >> stack_print(&st); >> +#endif >> } >> >> void ocs_abort(void) >> _______________________________________________ >> 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" >> > From owner-svn-src-all@freebsd.org Tue Apr 17 15:34:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C780F8448F; Tue, 17 Apr 2018 15:34:09 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E066C68B45; Tue, 17 Apr 2018 15:34:08 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C12C66705; Tue, 17 Apr 2018 15:34:08 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3HFY8Zj005325; Tue, 17 Apr 2018 15:34:08 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HFY8es005324; Tue, 17 Apr 2018 15:34:08 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201804171534.w3HFY8es005324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 17 Apr 2018 15:34: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: r332647 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: ken X-SVN-Commit-Paths: stable/11/sys/cam/scsi X-SVN-Commit-Revision: 332647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 15:34:09 -0000 Author: ken Date: Tue Apr 17 15:34:08 2018 New Revision: 332647 URL: https://svnweb.freebsd.org/changeset/base/332647 Log: MFC r332458: ------------------------------------------------------------------------ r332458 | ken | 2018-04-12 15:21:18 -0600 (Thu, 12 Apr 2018) | 34 lines Handle Programmable Early Warning for control commands in sa(4). When the tape position is inside the Early Warning area, the tape drive will return a sense key of NO SENSE, and an ASC/ASCQ of 0x00,0x02, which means: End-of-partition/medium detected". If this was in response to a control command like WRITE FILEMARKS, we correctly translate this as informational status and return 0 from saerror(). Programmable Early Warning should be handled the same way, but we weren't handling it that way. As a result, if a PEW status (sense key of NO SENSE, ASC/ASCQ of 0x00,0x07, "Programmable early warning detected") came back in response to a WRITE FILEMARKS, we returned an error. The impact of this was that if an application was writing to a sa(4) device, and a PEW area was set (in the Device Configuration Extension subpage -- mode page 0x10, subpage 1), and a filemark needed to be written on close, we could wind up returning an error to the user on close because of a "failure" to write the filemarks. It actually isn't a failure, but rather just a status report from the drive, and shouldn't be treated as a failure. sys/cam/scsi/scsi_sa.c: For control commands in saerror(), treat asc/ascq 0x00,0x07 the same as 0x00,{0-5} -- not an error. Return 0, since the command actually did succeed. Reported by: Dr. Andreas Haakh Tested by: Dr. Andreas Haakh Sponsored by: Spectra Logic ------------------------------------------------------------------------ Modified: stable/11/sys/cam/scsi/scsi_sa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_sa.c Tue Apr 17 15:29:32 2018 (r332646) +++ stable/11/sys/cam/scsi/scsi_sa.c Tue Apr 17 15:34:08 2018 (r332647) @@ -3454,12 +3454,13 @@ saerror(union ccb *ccb, u_int32_t cflgs, u_int32_t sfl break; } /* - * If this was just EOM/EOP, Filemark, Setmark or ILI detected - * on a non read/write command, we assume it's not an error - * and propagate the residule and return. + * If this was just EOM/EOP, Filemark, Setmark, ILI or + * PEW detected on a non read/write command, we assume + * it's not an error and propagate the residual and return. */ - if ((aqvalid && asc == 0 && ascq > 0 && ascq <= 5) || - (aqvalid == 0 && sense_key == SSD_KEY_NO_SENSE)) { + if ((aqvalid && asc == 0 && ((ascq > 0 && ascq <= 5) + || (ascq == 0x07))) + || (aqvalid == 0 && sense_key == SSD_KEY_NO_SENSE)) { csio->resid = resid; QFRLS(ccb); return (0); From owner-svn-src-all@freebsd.org Tue Apr 17 15:44:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A383EF84E80; Tue, 17 Apr 2018 15:44:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DC416BA17; Tue, 17 Apr 2018 15:44:06 +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 4898668B1; Tue, 17 Apr 2018 15:44:06 +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 w3HFi6rp010437; Tue, 17 Apr 2018 15:44:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HFi6CN010436; Tue, 17 Apr 2018 15:44:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804171544.w3HFi6CN010436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Apr 2018 15:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332648 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 332648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 15:44:06 -0000 Author: imp Date: Tue Apr 17 15:44:05 2018 New Revision: 332648 URL: https://svnweb.freebsd.org/changeset/base/332648 Log: Restore db_radix on parse error, otherwise we'll silently change it to 10 on a botched trace command. Modified: head/sys/ddb/db_command.c Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Tue Apr 17 15:34:08 2018 (r332647) +++ head/sys/ddb/db_command.c Tue Apr 17 15:44:05 2018 (r332648) @@ -812,6 +812,7 @@ db_stack_trace(db_expr_t tid, bool hastid, db_expr_t c if (!db_expression(&count)) { db_printf("Count missing\n"); db_flush_lex(); + db_radix = radix; return; } } else { From owner-svn-src-all@freebsd.org Tue Apr 17 15:51:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E50E5F857B3; Tue, 17 Apr 2018 15:51:23 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (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 8A5176E6D5; Tue, 17 Apr 2018 15:51:23 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.3] (c-73-216-227-39.hsd1.va.comcast.net [73.216.227.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id B0876270033F; Tue, 17 Apr 2018 11:51:16 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu B0876270033F Authentication-Results: duke.cs.duke.edu; dmarc=none header.from=cs.duke.edu DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1523980276; bh=zLbM8/P/Tyr1sWGDjJE1DfTnqcSsytSm2eDOAQrc2YQ=; h=Subject:To:From:Date:From; b=VI/oiQ2c9Ej7ULpIliaDBRRPLaYboSLjLquuniS5XtV2I0k5KMqMvRJ+bdvcAfUR1 W35IdWHY59yImaXEOGJEzPq7QzgX6dn7/r34Q4VBiIfQKEe00JEKyr+yO0bTWiQIEW G+X286WddJyNwgMvgxAMHodwUnekeiHHf7m2iZnQvOhm2wO0O5c0ipl1c8f94/CuJu sQpYe2KkbTWBhkeQqNeZCz1ApK2I3z10N7/BWQjNqHqz0Yn/5eZLr2nGoQFnDjzhag 0JRBLE4nwSMNz4VRasZ83OgL+gGVLBxa0tnTkNQLnPMtQZqchxcL/Y8zleiNzOG53e uVjJuC4eNTm/Q== Subject: Re: svn commit: r332645 - head/sbin/ifconfig To: koobs@FreeBSD.org, Andrew Gallatin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201804171254.w3HCsxPx024349@repo.freebsd.org> From: Andrew Gallatin Message-ID: <22c7ff19-f835-c892-69a8-015e7797c08a@cs.duke.edu> Date: Tue, 17 Apr 2018 11:51:15 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 15:51:24 -0000 On 04/17/18 09:47, Kubilay Kocak wrote: >> Log: >> Make lagg creation more fault tolerant >> <...> > > MFC please? > <..> Hmm.. I intentionally did not mark it for MFC, for 2 reasons. I don't run -stable, and I hate to MFC something when I haven't run it. And I'm also worried because it changes (undocumented) ifconfig failure behavior, which I think is more objectionable in -stable than in head. If somebody else would like to MFC it, I certainly would not object. Drew From owner-svn-src-all@freebsd.org Tue Apr 17 16:21:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C671F87A41; Tue, 17 Apr 2018 16:21:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D50875654; Tue, 17 Apr 2018 16:21:24 +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 26BE86DCC; Tue, 17 Apr 2018 16:21:24 +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 w3HGLOQi028638; Tue, 17 Apr 2018 16:21:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HGLOuE028637; Tue, 17 Apr 2018 16:21:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804171621.w3HGLOuE028637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Apr 2018 16:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332649 - head/lib/clang/include/lld/Common X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/clang/include/lld/Common X-SVN-Commit-Revision: 332649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 16:21:24 -0000 Author: emaste Date: Tue Apr 17 16:21:23 2018 New Revision: 332649 URL: https://svnweb.freebsd.org/changeset/base/332649 Log: lld: add a __FreeBSD_version-style identifier to version This will faciliate a WITH_SYSTEM_LINKER option. Reviewed by: dim MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15110 Modified: head/lib/clang/include/lld/Common/Version.inc Modified: head/lib/clang/include/lld/Common/Version.inc ============================================================================== --- head/lib/clang/include/lld/Common/Version.inc Tue Apr 17 15:44:05 2018 (r332648) +++ head/lib/clang/include/lld/Common/Version.inc Tue Apr 17 16:21:23 2018 (r332649) @@ -4,5 +4,7 @@ #define LLD_VERSION_STRING "6.0.0" #define LLD_VERSION_MAJOR 6 #define LLD_VERSION_MINOR 0 -#define LLD_REVISION_STRING "326565" + #define LLD_REPOSITORY_STRING "FreeBSD" +// - +#define LLD_REVISION_STRING "326565-120001" From owner-svn-src-all@freebsd.org Tue Apr 17 16:36:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 832E1F88C31; Tue, 17 Apr 2018 16:36:54 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 310FE7938A; Tue, 17 Apr 2018 16:36:54 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0DCC170BB; Tue, 17 Apr 2018 16:36:54 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3HGar97035762; Tue, 17 Apr 2018 16:36:53 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HGarpw035761; Tue, 17 Apr 2018 16:36:53 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804171636.w3HGarpw035761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 17 Apr 2018 16:36:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332650 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 332650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 16:36:54 -0000 Author: brooks Date: Tue Apr 17 16:36:53 2018 New Revision: 332650 URL: https://svnweb.freebsd.org/changeset/base/332650 Log: Stop using fuswintr() and suswintr() in the profiler. Always take the AST path rather than calling MD functions which are often implemented as always failing. The is the case on amd64, arm, i386, and powerpc. This optimization (inherited from 4.4 Lite) is a pessimization on those architectures and is the sole use of these functions. They will be removed in a seperate commit. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15101 Modified: head/sys/kern/subr_prof.c Modified: head/sys/kern/subr_prof.c ============================================================================== --- head/sys/kern/subr_prof.c Tue Apr 17 16:21:23 2018 (r332649) +++ head/sys/kern/subr_prof.c Tue Apr 17 16:36:53 2018 (r332650) @@ -447,10 +447,9 @@ sys_profil(struct thread *td, struct profil_args *uap) /* * Collect user-level profiling statistics; called on a profiling tick, * when a process is running in user-mode. This routine may be called - * from an interrupt context. We try to update the user profiling buffers - * cheaply with fuswintr() and suswintr(). If that fails, we revert to - * an AST that will vector us to trap() with a context in which copyin - * and copyout will work. Trap will then call addupc_task(). + * from an interrupt context. We perform the update with an AST + * that will vector us to trap() with a context in which copyin and + * copyout will work. Trap will then call addupc_task(). * * Note that we may (rarely) not get around to the AST soon enough, and * lose profile ticks when the next tick overwrites this one, but in this @@ -461,35 +460,28 @@ void addupc_intr(struct thread *td, uintfptr_t pc, u_int ticks) { struct uprof *prof; - caddr_t addr; - u_int i; - int v; if (ticks == 0) return; prof = &td->td_proc->p_stats->p_prof; PROC_PROFLOCK(td->td_proc); - if (pc < prof->pr_off || - (i = PC_TO_INDEX(pc, prof)) >= prof->pr_size) { + if (pc < prof->pr_off || PC_TO_INDEX(pc, prof) >= prof->pr_size) { PROC_PROFUNLOCK(td->td_proc); return; /* out of range; ignore */ } - addr = prof->pr_base + i; PROC_PROFUNLOCK(td->td_proc); - if ((v = fuswintr(addr)) == -1 || suswintr(addr, v + ticks) == -1) { - td->td_profil_addr = pc; - td->td_profil_ticks = ticks; - td->td_pflags |= TDP_OWEUPC; - thread_lock(td); - td->td_flags |= TDF_ASTPENDING; - thread_unlock(td); - } + td->td_profil_addr = pc; + td->td_profil_ticks = ticks; + td->td_pflags |= TDP_OWEUPC; + thread_lock(td); + td->td_flags |= TDF_ASTPENDING; + thread_unlock(td); } /* - * Much like before, but we can afford to take faults here. If the - * update fails, we simply turn off profiling. + * Actually update the profiling statistics. If the update fails, we + * simply turn off profiling. */ void addupc_task(struct thread *td, uintfptr_t pc, u_int ticks) From owner-svn-src-all@freebsd.org Tue Apr 17 16:46:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4601DF89640; Tue, 17 Apr 2018 16:46:02 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA8C87C161; Tue, 17 Apr 2018 16:46:01 +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 E534E7257; Tue, 17 Apr 2018 16:46:01 +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 w3HGk1iZ040593; Tue, 17 Apr 2018 16:46:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HGk1CY040592; Tue, 17 Apr 2018 16:46:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804171646.w3HGk1CY040592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Apr 2018 16:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332651 - head/sys/dev/bce X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bce X-SVN-Commit-Revision: 332651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 16:46:02 -0000 Author: imp Date: Tue Apr 17 16:46:01 2018 New Revision: 332651 URL: https://svnweb.freebsd.org/changeset/base/332651 Log: Add PNP info to the bce driver. Submitted by: Lakhan Shiva Kamireddy Pull Request: https://github.com/freebsd/freebsd/pull/136 Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Tue Apr 17 16:36:53 2018 (r332650) +++ head/sys/dev/bce/if_bce.c Tue Apr 17 16:46:01 2018 (r332651) @@ -529,7 +529,8 @@ MODULE_DEPEND(bce, miibus, 1, 1, 1); DRIVER_MODULE(bce, pci, bce_driver, bce_devclass, NULL, NULL); DRIVER_MODULE(miibus, bce, miibus_driver, miibus_devclass, NULL, NULL); - +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, bce, + bce_devs, sizeof(bce_devs[0]), nitems(bce_devs) - 1); /****************************************************************************/ /* Tunable device values */ From owner-svn-src-all@freebsd.org Tue Apr 17 16:46:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B3BFF89686; Tue, 17 Apr 2018 16:46:11 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3120B7C24B; Tue, 17 Apr 2018 16:46:09 +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 947E97258; Tue, 17 Apr 2018 16:46:09 +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 w3HGk9FD040649; Tue, 17 Apr 2018 16:46:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HGk9vn040646; Tue, 17 Apr 2018 16:46:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804171646.w3HGk9vn040646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 Apr 2018 16:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332652 - in head/sys: conf dev/puc modules/puc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: conf dev/puc modules/puc X-SVN-Commit-Revision: 332652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 16:46:11 -0000 Author: imp Date: Tue Apr 17 16:46:08 2018 New Revision: 332652 URL: https://svnweb.freebsd.org/changeset/base/332652 Log: Add PNP info to the PCI attahement of the puc driver. Adjust sys/conf/files and sys/modules/puc/Makefile to omit pucdata.c now tht it's included by puc_pci.c. Submitted by: Lakhan Shiva Kamireddy (with build fixes by me) Pull Request: https://github.com/freebsd/freebsd/pull/136 Modified: head/sys/conf/files head/sys/dev/puc/puc_pci.c head/sys/modules/puc/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Apr 17 16:46:01 2018 (r332651) +++ head/sys/conf/files Tue Apr 17 16:46:08 2018 (r332652) @@ -2771,7 +2771,6 @@ dev/puc/puc.c optional puc dev/puc/puc_cfg.c optional puc dev/puc/puc_pccard.c optional puc pccard dev/puc/puc_pci.c optional puc pci -dev/puc/pucdata.c optional puc pci dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral Modified: head/sys/dev/puc/puc_pci.c ============================================================================== --- head/sys/dev/puc/puc_pci.c Tue Apr 17 16:46:01 2018 (r332651) +++ head/sys/dev/puc/puc_pci.c Tue Apr 17 16:46:08 2018 (r332652) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include static int puc_msi_disable; SYSCTL_INT(_hw_puc, OID_AUTO, msi_disable, CTLFLAG_RDTUN, @@ -198,3 +199,5 @@ static driver_t puc_pci_driver = { }; DRIVER_MODULE(puc, pci, puc_pci_driver, puc_devclass, 0, 0); +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, puc, + puc_pci_devices, sizeof(puc_pci_devices[0]), nitems(puc_pci_devices) - 1); Modified: head/sys/modules/puc/Makefile ============================================================================== --- head/sys/modules/puc/Makefile Tue Apr 17 16:46:01 2018 (r332651) +++ head/sys/modules/puc/Makefile Tue Apr 17 16:46:08 2018 (r332652) @@ -4,7 +4,7 @@ .PATH: ${SRCTOP}/sys/dev/puc KMOD= puc -SRCS= puc.c puc_cfg.c puc_pci.c puc_pccard.c pucdata.c +SRCS= puc.c puc_cfg.c puc_pci.c puc_pccard.c SRCS+= bus_if.h device_if.h serdev_if.c serdev_if.h \ card_if.h pci_if.h From owner-svn-src-all@freebsd.org Tue Apr 17 16:51:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62F1BF89C64; Tue, 17 Apr 2018 16:51:28 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1276C7C621; Tue, 17 Apr 2018 16:51:28 +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 E7BD172BF; Tue, 17 Apr 2018 16:51:27 +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 w3HGpRe8044157; Tue, 17 Apr 2018 16:51:27 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HGpRbj044156; Tue, 17 Apr 2018 16:51:27 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201804171651.w3HGpRbj044156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Tue, 17 Apr 2018 16:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332653 - head/sys/dev/ixgbe X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/dev/ixgbe X-SVN-Commit-Revision: 332653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 16:51:28 -0000 Author: gallatin Date: Tue Apr 17 16:51:27 2018 New Revision: 332653 URL: https://svnweb.freebsd.org/changeset/base/332653 Log: Restore SIOCGI2C functionality to ixgbe When ixgbe was converted to iflib, it lost the SIOCGI2C support that allows ifconfig to print SFP state, optical light levels, etc. Restore this by plugging in to the ifdi_i2c_req iflib method. Note that the sanity checking on dev_addr that used to be done in ixgbe is now done in iflib. Reviewed by: erj, Matthew Macy Sponsored by: Netflix Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Tue Apr 17 16:46:08 2018 (r332652) +++ head/sys/dev/ixgbe/if_ix.c Tue Apr 17 16:51:27 2018 (r332653) @@ -137,7 +137,7 @@ static void ixgbe_if_timer(if_ctx_t ctx, uint16_t); static void ixgbe_if_update_admin_status(if_ctx_t ctx); static void ixgbe_if_vlan_register(if_ctx_t ctx, u16 vtag); static void ixgbe_if_vlan_unregister(if_ctx_t ctx, u16 vtag); - +static int ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req); int ixgbe_intr(void *arg); /************************************************************************ @@ -270,6 +270,7 @@ static device_method_t ixgbe_if_methods[] = { DEVMETHOD(ifdi_vlan_register, ixgbe_if_vlan_register), DEVMETHOD(ifdi_vlan_unregister, ixgbe_if_vlan_unregister), DEVMETHOD(ifdi_get_counter, ixgbe_if_get_counter), + DEVMETHOD(ifdi_i2c_req, ixgbe_if_i2c_req), #ifdef PCI_IOV DEVMETHOD(ifdi_iov_init, ixgbe_if_iov_init), DEVMETHOD(ifdi_iov_uninit, ixgbe_if_iov_uninit), @@ -1232,6 +1233,25 @@ ixgbe_if_get_counter(if_ctx_t ctx, ift_counter cnt) } /* ixgbe_if_get_counter */ /************************************************************************ + * ixgbe_if_i2c_req + ************************************************************************/ +static int +ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) +{ + struct adapter *adapter = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &adapter->hw; + int i; + + + if (hw->phy.ops.read_i2c_byte == NULL) + return (ENXIO); + for (i = 0; i < req->len; i++) + hw->phy.ops.read_i2c_byte(hw, req->offset + i, + req->dev_addr, &req->data[i]); + return (0); +} /* ixgbe_if_i2c_req */ + +/************************************************************************ * ixgbe_add_media_types ************************************************************************/ static void @@ -4547,4 +4567,3 @@ ixgbe_check_fan_failure(struct adapter *adapter, u32 r if (reg & mask) device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! REPLACE IMMEDIATELY!!\n"); } /* ixgbe_check_fan_failure */ - From owner-svn-src-all@freebsd.org Tue Apr 17 17:20:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0AF5F8B929; Tue, 17 Apr 2018 17:20:06 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2F984EA6; Tue, 17 Apr 2018 17:20:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 151337767; Tue, 17 Apr 2018 17:20:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3HHK4N8056655; Tue, 17 Apr 2018 17:20:04 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HHK4rB056652; Tue, 17 Apr 2018 17:20:04 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804171720.w3HHK4rB056652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 17 Apr 2018 17:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332654 - in head: share/man/man9 sys/arm/arm sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: share/man/man9 sys/arm/arm sys/mips/mips X-SVN-Commit-Revision: 332654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 17:20:07 -0000 Author: brooks Date: Tue Apr 17 17:20:04 2018 New Revision: 332654 URL: https://svnweb.freebsd.org/changeset/base/332654 Log: Remove unused implementations of copyoutstr(). Also remove the commented out documentation. The documentation arrived with the import of the copy.9 manpage. I suspect the implementations came from NetBSD while bootstrapping the Arm and MIPS ports. Reviewed by: andrew, jmallett Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15108 Modified: head/share/man/man9/copy.9 head/sys/arm/arm/copystr.S head/sys/mips/mips/support.S Modified: head/share/man/man9/copy.9 ============================================================================== --- head/share/man/man9/copy.9 Tue Apr 17 16:51:27 2018 (r332653) +++ head/share/man/man9/copy.9 Tue Apr 17 17:20:04 2018 (r332654) @@ -61,8 +61,6 @@ .Fn copystr "const void *kfaddr" "void *kdaddr" "size_t len" "size_t *done" .Ft int .Fn copyinstr "const void *uaddr" "void *kaddr" "size_t len" "size_t *done" -.\" .Ft int -.\" .Fn copyoutstr "const void *kaddr" "void *uaddr" "size_t len" "size_t *done" .Sh DESCRIPTION The .Nm @@ -135,15 +133,6 @@ NUL, is returned in .Fa done is .No non- Ns Dv NULL ) . -.\" .It Fn copyoutstr -.\" Copies a NUL-terminated string, at most -.\" bytes long, from kernel-space address -.\" .Fa kaddr -.\" to user-space address -.\" .Fa uaddr . -.\" The number of bytes actually copied, including the terminating -.\" NUL, is returned in -.\" .Fa *done . .Sh RETURN VALUES The .Nm @@ -164,9 +153,6 @@ The .Fn copystr and .Fn copyinstr -.\" .Fn copyinstr , -.\" and -.\" .Fn copyoutstr functions return .Er ENAMETOOLONG if the string is longer than Modified: head/sys/arm/arm/copystr.S ============================================================================== --- head/sys/arm/arm/copystr.S Tue Apr 17 16:51:27 2018 (r332653) +++ head/sys/arm/arm/copystr.S Tue Apr 17 17:20:04 2018 (r332654) @@ -149,59 +149,6 @@ ENTRY(copyinstr) RET END(copyinstr) -/* - * r0 - kernel space address - * r1 - user space address - * r2 - maxlens - * r3 - lencopied - * - * Copy string from kernel space to user space - */ -ENTRY(copyoutstr) - SAVE_REGS - - teq r2, #0x00000000 - mov r6, #0x00000000 - moveq r0, #ENAMETOOLONG - beq 2f - - ldr r12, =VM_MAXUSER_ADDRESS - - GET_PCB(r4) - ldr r4, [r4] - -#ifdef DIAGNOSTIC - teq r4, #0x00000000 - beq .Lcopystrpcbfault -#endif - - adr r5, .Lcopystrfault - str r5, [r4, #PCB_ONFAULT] - -1: - cmp r0, r12 - bcs .Lcopystrfault - ldrb r5, [r0], #0x0001 - add r6, r6, #0x00000001 - teq r5, #0x00000000 - strbt r5, [r1], #0x0001 - teqne r6, r2 - bne 1b - - mov r0, #0x00000000 - str r0, [r4, #PCB_ONFAULT] - - teq r5, #0x00000000 - moveq r0, #0x00000000 - movne r0, #ENAMETOOLONG - -2: teq r3, #0x00000000 - strne r6, [r3] - - RESTORE_REGS - RET -END(copyoutstr) - /* A fault occurred during the copy */ .Lcopystrfault: mov r1, #0x00000000 Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Tue Apr 17 16:51:27 2018 (r332653) +++ head/sys/mips/mips/support.S Tue Apr 17 17:20:04 2018 (r332654) @@ -162,34 +162,6 @@ NESTED(copyinstr, CALLFRAME_SIZ, ra) END(copyinstr) /* - * Copy a null terminated string from the kernel address space into - * the user address space. - * - * copyoutstr(fromaddr, toaddr, maxlength, &lencopied) - * caddr_t fromaddr; - * caddr_t toaddr; - * u_int maxlength; - * u_int *lencopied; - */ -NESTED(copyoutstr, CALLFRAME_SIZ, ra) - PTR_SUBU sp, sp, CALLFRAME_SIZ - .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) - PTR_LA v0, copyerr - blt a1, zero, _C_LABEL(copyerr) # make sure address is in user space - REG_S ra, CALLFRAME_RA(sp) - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - jal _C_LABEL(copystr) - PTR_S v0, U_PCB_ONFAULT(v1) - REG_L ra, CALLFRAME_RA(sp) - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - PTR_S zero, U_PCB_ONFAULT(v1) - j ra - PTR_ADDU sp, sp, CALLFRAME_SIZ -END(copyoutstr) - -/* * Copy specified amount of data from user space into the kernel * copyin(from, to, len) * caddr_t *from; (user source address) From owner-svn-src-all@freebsd.org Tue Apr 17 17:23:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBA26F8BE57; Tue, 17 Apr 2018 17:23:47 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A56E853C2; Tue, 17 Apr 2018 17:23:47 +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 9557E7900; Tue, 17 Apr 2018 17:23:47 +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 w3HHNlAC061166; Tue, 17 Apr 2018 17:23:47 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HHNlaA061165; Tue, 17 Apr 2018 17:23:47 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201804171723.w3HHNlaA061165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 17 Apr 2018 17:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332655 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 332655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 17:23:48 -0000 Author: cem Date: Tue Apr 17 17:23:47 2018 New Revision: 332655 URL: https://svnweb.freebsd.org/changeset/base/332655 Log: libmd: Remove trailing whitespace from mdXhl.c No functional change. Reported by: me, in a CR from three years ago today Sponsored by: Dell EMC Isilon Modified: head/lib/libmd/mdXhl.c Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Tue Apr 17 17:20:04 2018 (r332654) +++ head/lib/libmd/mdXhl.c Tue Apr 17 17:23:47 2018 (r332655) @@ -79,11 +79,11 @@ MDXFdChunk(int fd, char *buf, off_t ofs, off_t len) readrv = read(fd, buffer, sizeof(buffer)); else readrv = read(fd, buffer, remain); - if (readrv <= 0) + if (readrv <= 0) break; MDXUpdate(&ctx, buffer, readrv); remain -= readrv; - } + } error: if (readrv < 0) return NULL; From owner-svn-src-all@freebsd.org Tue Apr 17 18:04:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E37F8E825; Tue, 17 Apr 2018 18:04:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 734706D4EC; Tue, 17 Apr 2018 18:04:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E2A27F56; Tue, 17 Apr 2018 18:04:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3HI4UeL080894; Tue, 17 Apr 2018 18:04:30 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HI4SO1080878; Tue, 17 Apr 2018 18:04:28 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804171804.w3HI4SO1080878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 17 Apr 2018 18:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332656 - in head: . share/man/man9 sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/conf sys/i386/i386 sys/mips/mips sys/powerpc/powerpc sys/riscv/riscv sys/sparc64/sparc64 sys/sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: . share/man/man9 sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/conf sys/i386/i386 sys/mips/mips sys/powerpc/powerpc sys/riscv/riscv sys/sparc64/sparc64 sys/sys X-SVN-Commit-Revision: 332656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 18:04:31 -0000 Author: brooks Date: Tue Apr 17 18:04:28 2018 New Revision: 332656 URL: https://svnweb.freebsd.org/changeset/base/332656 Log: Remove the unused fuwintr() and suiwintr() functions. Half of implementations always failed (returned (-1)) and they were previously used in only one place. Reviewed by: kib, andrew Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15102 Deleted: head/sys/powerpc/powerpc/fuswintr.c head/sys/powerpc/powerpc/suswintr.c Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile head/share/man/man9/fetch.9 head/share/man/man9/store.9 head/sys/amd64/amd64/support.S head/sys/arm/arm/fusu.S head/sys/arm64/arm64/support.S head/sys/arm64/arm64/trap.c head/sys/conf/files.powerpc head/sys/i386/i386/support.s head/sys/mips/mips/support.S head/sys/mips/mips/trap.c head/sys/riscv/riscv/support.S head/sys/riscv/riscv/trap.c head/sys/sparc64/sparc64/support.S head/sys/sys/resourcevar.h Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Apr 17 17:23:47 2018 (r332655) +++ head/ObsoleteFiles.inc Tue Apr 17 18:04:28 2018 (r332656) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20180417: remove fuswintr and suswintr +OLD_FILES+=usr/share/man/man9/fuswintr.9.gz +OLD_FILES+=usr/share/man/man9/suswintr.9.gz # 20180413: remove Arcnet support OLD_FILES+=usr/include/net/if_arc.h OLD_FILES+=usr/share/man/man4/cm.4.gz Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Apr 17 17:23:47 2018 (r332655) +++ head/share/man/man9/Makefile Tue Apr 17 18:04:28 2018 (r332656) @@ -960,7 +960,6 @@ MLINKS+=fdt_pinctrl.9 fdt_pinctrl_configure.9 \ fdt_pinctrl.9 fdt_pinctrl_configure_tree.9 \ fdt_pinctrl.9 fdt_pinctrl_register.9 MLINKS+=fetch.9 fubyte.9 \ - fetch.9 fuswintr.9 \ fetch.9 fuword.9 \ fetch.9 fuword16.9 \ fetch.9 fuword32.9 \ @@ -1934,7 +1933,6 @@ MLINKS+=stack.9 stack_copy.9 \ stack.9 stack_sbuf_print_ddb.9 \ stack.9 stack_zero.9 MLINKS+=store.9 subyte.9 \ - store.9 suswintr.9 \ store.9 suword.9 \ store.9 suword16.9 \ store.9 suword32.9 \ Modified: head/share/man/man9/fetch.9 ============================================================================== --- head/share/man/man9/fetch.9 Tue Apr 17 17:23:47 2018 (r332655) +++ head/share/man/man9/fetch.9 Tue Apr 17 18:04:28 2018 (r332656) @@ -34,13 +34,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2014 +.Dd April 17, 2018 .Dt FETCH 9 .Os .Sh NAME .Nm fetch , .Nm fubyte , -.Nm fuswintr , .Nm fuword , .Nm fuword16 , .Nm fuword32 , @@ -69,8 +68,6 @@ .Ft int64_t .Fn fueword64 "volatile const void *base" "int64_t *val" .In sys/resourcevar.h -.Ft int -.Fn fuswintr "void *base" .Sh DESCRIPTION The .Nm @@ -100,10 +97,6 @@ Fetches 32 bits of data from the user-space address .It Fn fuword64 Fetches 64 bits of data from the user-space address .Pa base . -.It Fn fuswintr -Fetches a short word of data from the user-space address -.Pa base . -This function is safe to call during an interrupt context. .It Fn fueword Fetches a word of data (long) from the user-space address .Pa base @@ -134,9 +127,8 @@ The .Fn fuword , .Fn fuword16 , .Fn fuword32 , -.Fn fuword64 , and -.Fn fuswintr +.Fn fuword64 functions return the data fetched or -1 on failure. The .Fn fueword , Modified: head/share/man/man9/store.9 ============================================================================== --- head/share/man/man9/store.9 Tue Apr 17 17:23:47 2018 (r332655) +++ head/share/man/man9/store.9 Tue Apr 17 18:04:28 2018 (r332656) @@ -34,13 +34,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2014 +.Dd April 17, 2018 .Dt STORE 9 .Os .Sh NAME .Nm store , .Nm subyte , -.Nm suswintr , .Nm suword .Nd store data to user-space .Sh SYNOPSIS @@ -58,8 +57,6 @@ .Ft int .Fn suword64 "volatile void *base" "int64_t word" .In sys/resourcevar.h -.Ft int -.Fn suswintr "void *base" "int word" .Sh DESCRIPTION The .Nm @@ -70,7 +67,7 @@ The data written must be naturally aligned. The .Nm routines provide the following functionality: -.Bl -tag -width "suswintr()" +.Bl -tag -width "suword64()" .It Fn subyte Stores a byte of data to the user-space address .Pa base . @@ -86,10 +83,6 @@ Stores 32 bits of data to the user-space address .It Fn suword64 Stores 64 bits of data to the user-space address .Pa base . -.It Fn suswintr -Stores a short word of data to the user-space address -.Pa base . -This function is safe to call during an interrupt context. .El .Sh RETURN VALUES The Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/amd64/amd64/support.S Tue Apr 17 18:04:28 2018 (r332656) @@ -456,20 +456,6 @@ ENTRY(fueword32) ret END(fueword32) -/* - * fuswintr() and suswintr() are specialized variants of fuword16() and - * suword16(), respectively. They are called from the profiling code, - * potentially at interrupt time. If they fail, that's okay; good things - * will happen later. They always fail for now, until the trap code is - * able to deal with this. - */ -ALTENTRY(suswintr) -ENTRY(fuswintr) - movq $-1,%rax - ret -END(suswintr) -END(fuswintr) - ENTRY(fuword16) PUSH_FRAME_POINTER movq PCPU(CURPCB),%rcx Modified: head/sys/arm/arm/fusu.S ============================================================================== --- head/sys/arm/arm/fusu.S Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/arm/arm/fusu.S Tue Apr 17 18:04:28 2018 (r332656) @@ -176,17 +176,6 @@ ENTRY(fusword) END(fusword) /* - * fuswintr(caddr_t uaddr); - * Fetch a short from the user's address space. Can be called during an - * interrupt. - */ - -ENTRY(fuswintr) - mov r0, #-1 - RET -END(fuswintr) - -/* * fubyte(caddr_t uaddr); * Fetch a byte from the user's address space. */ @@ -271,17 +260,6 @@ EENTRY_NP(suword32) RET EEND(suword32) END(suword) - -/* - * suswintr(caddr_t uaddr, short x); - * Store a short in the user's address space. Can be called during an - * interrupt. - */ - -ENTRY(suswintr) - mov r0, #-1 - RET -END(suswintr) /* * susword(caddr_t uaddr, short x); Modified: head/sys/arm64/arm64/support.S ============================================================================== --- head/sys/arm64/arm64/support.S Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/arm64/arm64/support.S Tue Apr 17 18:04:28 2018 (r332656) @@ -218,51 +218,6 @@ EENTRY(suword64) EEND(suword64) END(suword) -/* - * fuswintr and suswintr are just like fusword and susword except that if - * the page is not in memory or would cause a trap, then we return an error. - * The important thing is to prevent sleep() and switch(). - */ - -/* - * Special handler so the trap code knows not to sleep. - */ -ENTRY(fsu_intr_fault) - SET_FAULT_HANDLER(xzr, x1) /* Reset the handler function */ - EXIT_USER_ACCESS_CHECK(w0, x1) - mov x0, #-1 - ret -END(fsu_fault) - -/* - * int fuswintr(void *) - */ -ENTRY(fuswintr) - ldr x1, =(VM_MAXUSER_ADDRESS-3) - cmp x0, x1 - b.cs fsu_fault_nopcb - adr x6, fsu_intr_fault /* Load the fault handler */ - SET_FAULT_HANDLER(x6, x1) /* And set it */ - ldtr w0, [x0] /* Try loading the data */ - SET_FAULT_HANDLER(xzr, x1) /* Reset the fault handler */ - ret /* Return */ -END(fuswintr) - -/* - * int suswintr(void *base, int word) - */ -ENTRY(suswintr) - ldr x2, =(VM_MAXUSER_ADDRESS-3) - cmp x0, x2 - b.cs fsu_fault_nopcb - adr x6, fsu_intr_fault /* Load the fault handler */ - SET_FAULT_HANDLER(x6, x2) /* And set it */ - sttr w1, [x0] /* Try storing the data */ - SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ - mov x0, #0 /* Success */ - ret /* Return */ -END(suswintr) - ENTRY(setjmp) /* Store the stack pointer */ mov x8, sp Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/arm64/arm64/trap.c Tue Apr 17 18:04:28 2018 (r332656) @@ -172,16 +172,6 @@ data_abort(struct thread *td, struct trapframe *frame, #endif pcb = td->td_pcb; - - /* - * Special case for fuswintr and suswintr. These can't sleep so - * handle them early on in the trap handler. - */ - if (__predict_false(pcb->pcb_onfault == (vm_offset_t)&fsu_intr_fault)) { - frame->tf_elr = pcb->pcb_onfault; - return; - } - p = td->td_proc; if (lower) map = &p->p_vmspace->vm_map; Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/conf/files.powerpc Tue Apr 17 18:04:28 2018 (r332656) @@ -212,7 +212,6 @@ powerpc/powerpc/elf32_machdep.c optional powerpc | pow powerpc/powerpc/elf64_machdep.c optional powerpc64 powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c standard -powerpc/powerpc/fuswintr.c standard powerpc/powerpc/gdb_machdep.c optional gdb powerpc/powerpc/in_cksum.c optional inet | inet6 powerpc/powerpc/interrupt.c standard @@ -236,7 +235,6 @@ powerpc/powerpc/sigcode64.S optional powerpc64 powerpc/powerpc/swtch32.S optional powerpc | powerpcspe powerpc/powerpc/swtch64.S optional powerpc64 powerpc/powerpc/stack_machdep.c optional ddb | stack -powerpc/powerpc/suswintr.c standard powerpc/powerpc/syncicache.c standard powerpc/powerpc/sys_machdep.c standard powerpc/powerpc/trap.c standard Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/i386/i386/support.s Tue Apr 17 18:04:28 2018 (r332656) @@ -252,20 +252,6 @@ ENTRY(memcpy) END(memcpy) /* - * fuswintr() and suswintr() are specialized variants of fuword16() and - * suword16(), respectively. They are called from the profiling code, - * potentially at interrupt time. If they fail, that's okay; good things - * will happen later. They always fail for now, until the trap code is - * able to deal with this. - */ -ALTENTRY(suswintr) -ENTRY(fuswintr) - movl $-1,%eax - ret -END(suswintr) -END(fuswintr) - -/* * copystr(from, to, maxlen, int *lencopied) - MP SAFE */ ENTRY(copystr) Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/mips/mips/support.S Tue Apr 17 18:04:28 2018 (r332656) @@ -417,41 +417,6 @@ LEAF(fswberr) END(fswberr) /* - * fuswintr and suswintr are just like fusword and susword except that if - * the page is not in memory or would cause a trap, then we return an error. - * The important thing is to prevent sleep() and switch(). - */ -LEAF(fuswintr) - PTR_LA v0, fswintrberr - blt a0, zero, fswintrberr # make sure address is in user space - nop - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - PTR_S v0, U_PCB_ONFAULT(v1) - lhu v0, 0(a0) # fetch short - j ra - PTR_S zero, U_PCB_ONFAULT(v1) -END(fuswintr) - -LEAF(suswintr) - PTR_LA v0, fswintrberr - blt a0, zero, fswintrberr # make sure address is in user space - nop - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - PTR_S v0, U_PCB_ONFAULT(v1) - sh a1, 0(a0) # store short - PTR_S zero, U_PCB_ONFAULT(v1) - j ra - move v0, zero -END(suswintr) - -LEAF(fswintrberr) - j ra - li v0, -1 -END(fswintrberr) - -/* * memset(void *s1, int c, int len) * NetBSD: memset.S,v 1.3 2001/10/16 15:40:53 uch Exp */ Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/mips/mips/trap.c Tue Apr 17 18:04:28 2018 (r332656) @@ -684,14 +684,6 @@ trap(struct trapframe *trapframe) if (td->td_pcb->pcb_onfault == NULL) goto err; - /* check for fuswintr() or suswintr() getting a page fault */ - /* XXX There must be a nicer way to do this. */ - if (td->td_pcb->pcb_onfault == fswintrberr) { - pc = (register_t)(intptr_t)td->td_pcb->pcb_onfault; - td->td_pcb->pcb_onfault = NULL; - return (pc); - } - goto dofault; case T_TLB_LD_MISS + T_USER: Modified: head/sys/riscv/riscv/support.S ============================================================================== --- head/sys/riscv/riscv/support.S Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/riscv/riscv/support.S Tue Apr 17 18:04:28 2018 (r332656) @@ -202,48 +202,6 @@ EENTRY(suword64) EEND(suword64) END(suword) -/* - * fuswintr and suswintr are just like fusword and susword except that if - * the page is not in memory or would cause a trap, then we return an error. - * The important thing is to prevent sleep() and switch(). - */ - -/* - * Special handler so the trap code knows not to sleep. - */ -ENTRY(fsu_intr_fault) - SET_FAULT_HANDLER(x0, a1) /* Reset the handler function */ - li a0, -1 - ret -END(fsu_fault) - -/* - * int fuswintr(void *) - */ -ENTRY(fuswintr) - li a1, (VM_MAXUSER_ADDRESS-3) - bgt a0, a1, fsu_fault_nopcb - la a6, fsu_intr_fault /* Load the fault handler */ - SET_FAULT_HANDLER(a6, a1) /* And set it */ - lw a0, 0(a0) /* Try loading the data */ - SET_FAULT_HANDLER(x0, x1) /* Reset the fault handler */ - ret /* Return */ -END(fuswintr) - -/* - * int suswintr(void *base, int word) - */ -ENTRY(suswintr) - li a2, (VM_MAXUSER_ADDRESS-3) - bgt a0, a2, fsu_fault_nopcb - la a6, fsu_intr_fault /* Load the fault handler */ - SET_FAULT_HANDLER(a6, a2) /* And set it */ - sw a1, 0(a0) /* Try storing the data */ - SET_FAULT_HANDLER(x0, a2) /* Reset the fault handler */ - li a0, 0 /* Success */ - ret /* Return */ -END(suswintr) - ENTRY(setjmp) /* Store the stack pointer */ sd sp, 0(a0) Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/riscv/riscv/trap.c Tue Apr 17 18:04:28 2018 (r332656) @@ -186,16 +186,6 @@ data_abort(struct trapframe *frame, int lower) td = curthread; pcb = td->td_pcb; - - /* - * Special case for fuswintr and suswintr. These can't sleep so - * handle them early on in the trap handler. - */ - if (__predict_false(pcb->pcb_onfault == (vm_offset_t)&fsu_intr_fault)) { - frame->tf_sepc = pcb->pcb_onfault; - return; - } - sbadaddr = frame->tf_sbadaddr; p = td->td_proc; Modified: head/sys/sparc64/sparc64/support.S ============================================================================== --- head/sys/sparc64/sparc64/support.S Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/sparc64/sparc64/support.S Tue Apr 17 18:04:28 2018 (r332656) @@ -487,31 +487,6 @@ ENTRY(suword64) clr %o0 END(suword64) - .globl fs_nofault_intr_begin -fs_nofault_intr_begin: - nop - -/* - * int fuswintr(const void *base) - */ -ENTRY(fuswintr) - retl - lduha [%o0] ASI_AIUP, %o0 -END(fuswintr) - -/* - * int suswintr(const void *base, int word) - */ -ENTRY(suswintr) - stha %o1, [%o0] ASI_AIUP - retl - clr %o0 -END(suswintr) - - .globl fs_nofault_intr_end -fs_nofault_intr_end: - nop - .globl fs_nofault_end fs_nofault_end: nop Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Tue Apr 17 17:23:47 2018 (r332655) +++ head/sys/sys/resourcevar.h Tue Apr 17 18:04:28 2018 (r332656) @@ -128,7 +128,6 @@ int chgsbsize(struct uidinfo *uip, u_int *hiwat, u_in rlim_t maxval); int chgptscnt(struct uidinfo *uip, int diff, rlim_t maxval); int chgumtxcnt(struct uidinfo *uip, int diff, rlim_t maxval); -int fuswintr(void *base); int kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, struct rlimit *limp); struct plimit @@ -152,7 +151,6 @@ void rufetchcalc(struct proc *p, struct rusage *ru, s struct timeval *sp); void rufetchtd(struct thread *td, struct rusage *ru); void ruxagg(struct proc *p, struct thread *td); -int suswintr(void *base, int word); struct uidinfo *uifind(uid_t uid); void uifree(struct uidinfo *uip); From owner-svn-src-all@freebsd.org Tue Apr 17 18:07:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A381F8EB91; Tue, 17 Apr 2018 18:07:41 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DD286EB7B; Tue, 17 Apr 2018 18:07:41 +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 1491E7F6F; Tue, 17 Apr 2018 18:07:41 +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 w3HI7eCU081057; Tue, 17 Apr 2018 18:07:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HI7e4D081051; Tue, 17 Apr 2018 18:07:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201804171807.w3HI7e4D081051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 17 Apr 2018 18:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332657 - in head: etc/mtree sys/kern sys/sys tests/sys tests/sys/capsicum X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: etc/mtree sys/kern sys/sys tests/sys tests/sys/capsicum X-SVN-Commit-Revision: 332657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 18:07:41 -0000 Author: jhb Date: Tue Apr 17 18:07:40 2018 New Revision: 332657 URL: https://svnweb.freebsd.org/changeset/base/332657 Log: Properly do a deep copy of the ioctls capability array for fget_cap(). fget_cap() tries to do a cheaper snapshot of a file descriptor without holding the file descriptor lock. This snapshot does not do a deep copy of the ioctls capability array, but instead uses a different return value to inform the caller to retry the copy with the lock held. However, filecaps_copy() was returning 1 to indicate that a retry was required, and fget_cap() was checking for 0 (actually '!filecaps_copy()'). As a result, fget_cap() did not do a deep copy of the ioctls array and just reused the original pointer. This cause multiple file descriptor entries to think they owned the same pointer and eventually resulted in duplicate frees. The only code path that I'm aware of that triggers this is to create a listen socket that has a restricted list of ioctls and then call accept() which calls fget_cap() with a valid filecaps structure from getsock_cap(). To fix, change the return value of filecaps_copy() to return true if it succeeds in copying the caps and false if it fails because the lock is required. I find this more intuitive than fixing the caller in this case. While here, change the return type from 'int' to 'bool'. Finally, make filecaps_copy() more robust in the failure case by not copying any of the source filecaps structure over. This avoids the possibility of leaking a pointer into a structure if a similar future caller doesn't properly handle the return value from filecaps_copy() at the expense of one more branch. I also added a test case that panics before this change and now passes. Reviewed by: kib Discussed with: mjg (not a fan of the extra branch) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15047 Added: head/tests/sys/capsicum/ head/tests/sys/capsicum/Makefile (contents, props changed) head/tests/sys/capsicum/ioctls_test.c (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/sys/kern/kern_descrip.c head/sys/sys/filedesc.h head/tests/sys/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Apr 17 18:04:28 2018 (r332656) +++ head/etc/mtree/BSD.tests.dist Tue Apr 17 18:07:40 2018 (r332657) @@ -430,6 +430,8 @@ .. aio .. + capsicum + .. cddl zfs bin Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Apr 17 18:04:28 2018 (r332656) +++ head/sys/kern/kern_descrip.c Tue Apr 17 18:07:40 2018 (r332657) @@ -1492,16 +1492,16 @@ filecaps_init(struct filecaps *fcaps) * Note that if the table was not locked, the caller has to check the relevant * sequence counter to determine whether the operation was successful. */ -int +bool filecaps_copy(const struct filecaps *src, struct filecaps *dst, bool locked) { size_t size; + if (src->fc_ioctls != NULL && !locked) + return (false); *dst = *src; if (src->fc_ioctls == NULL) - return (0); - if (!locked) - return (1); + return (true); KASSERT(src->fc_nioctls > 0, ("fc_ioctls != NULL, but fc_nioctls=%hd", src->fc_nioctls)); @@ -1509,7 +1509,7 @@ filecaps_copy(const struct filecaps *src, struct filec size = sizeof(src->fc_ioctls[0]) * src->fc_nioctls; dst->fc_ioctls = malloc(size, M_FILECAPS, M_WAITOK); bcopy(src->fc_ioctls, dst->fc_ioctls, size); - return (0); + return (true); } static u_long * Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Tue Apr 17 18:04:28 2018 (r332656) +++ head/sys/sys/filedesc.h Tue Apr 17 18:07:40 2018 (r332657) @@ -155,7 +155,7 @@ enum { struct thread; void filecaps_init(struct filecaps *fcaps); -int filecaps_copy(const struct filecaps *src, struct filecaps *dst, +bool filecaps_copy(const struct filecaps *src, struct filecaps *dst, bool locked); void filecaps_move(struct filecaps *src, struct filecaps *dst); void filecaps_free(struct filecaps *fcaps); Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Tue Apr 17 18:04:28 2018 (r332656) +++ head/tests/sys/Makefile Tue Apr 17 18:07:40 2018 (r332657) @@ -6,6 +6,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio +TESTS_SUBDIRS+= capsicum TESTS_SUBDIRS+= ${_cddl} TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file Added: head/tests/sys/capsicum/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/capsicum/Makefile Tue Apr 17 18:07:40 2018 (r332657) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/capsicum + +ATF_TESTS_C+= ioctls_test + +WARNS?= 6 + +.include Added: head/tests/sys/capsicum/ioctls_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/capsicum/ioctls_test.c Tue Apr 17 18:07:40 2018 (r332657) @@ -0,0 +1,127 @@ +/*- + * Copyright (c) 2018 John Baldwin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* + * A variant of ATF_REQUIRE that is suitable for use in child + * processes. This only works if the parent process is tripped up by + * the early exit and fails some requirement itself. + */ +#define CHILD_REQUIRE(exp) do { \ + if (!(exp)) \ + child_fail_require(__FILE__, __LINE__, \ + #exp " not met"); \ + } while (0) + +static __dead2 void +child_fail_require(const char *file, int line, const char *str) +{ + char buf[128]; + + snprintf(buf, sizeof(buf), "%s:%d: %s\n", file, line, str); + write(2, buf, strlen(buf)); + _exit(32); +} + +/* + * Exercise the edge case of a custom ioctl list being copied from a + * listen socket to an accepted socket. + */ +ATF_TC_WITHOUT_HEAD(cap_ioctls__listen_copy); +ATF_TC_BODY(cap_ioctls__listen_copy, tc) +{ + struct sockaddr_in sin; + cap_rights_t rights; + u_long cmds[] = { FIONREAD }; + socklen_t len; + pid_t pid; + char dummy; + int s[2], status; + + s[0] = socket(AF_INET, SOCK_STREAM, 0); + ATF_REQUIRE(s[0] > 0); + + /* Bind to an arbitrary unused port. */ + memset(&sin, 0, sizeof(sin)); + sin.sin_len = sizeof(sin); + sin.sin_family = AF_INET; + sin.sin_port = 0; + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + ATF_REQUIRE(bind(s[0], (struct sockaddr *)&sin, sizeof(sin)) == 0); + + CHILD_REQUIRE(listen(s[0], 1) == 0); + + len = sizeof(sin); + ATF_REQUIRE(getsockname(s[0], (struct sockaddr *)&sin, &len) == 0); + ATF_REQUIRE(len == sizeof(sin)); + + cap_rights_init(&rights, CAP_ACCEPT, CAP_IOCTL); + ATF_REQUIRE(cap_rights_limit(s[0], &rights) == 0); + ATF_REQUIRE(cap_ioctls_limit(s[0], cmds, nitems(cmds)) == 0); + + pid = fork(); + if (pid == 0) { + s[1] = accept(s[0], NULL, NULL); + CHILD_REQUIRE(s[1] > 0); + + /* Close both sockets during exit(). */ + exit(0); + } + + ATF_REQUIRE(pid > 0); + + ATF_REQUIRE(close(s[0]) == 0); + s[1] = socket(AF_INET, SOCK_STREAM, 0); + ATF_REQUIRE(s[1] > 0); + ATF_REQUIRE(connect(s[1], (struct sockaddr *)&sin, sizeof(sin)) == 0); + ATF_REQUIRE(read(s[1], &dummy, sizeof(dummy)) == 0); + ATF_REQUIRE(close(s[1]) == 0); + + ATF_REQUIRE(wait(&status) == pid); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, cap_ioctls__listen_copy); + + return (atf_no_error()); +} From owner-svn-src-all@freebsd.org Tue Apr 17 18:24:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C47DF90080; Tue, 17 Apr 2018 18:24:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D90BD731AE; Tue, 17 Apr 2018 18:24:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 0409510AFD3; Tue, 17 Apr 2018 14:24:47 -0400 (EDT) From: John Baldwin To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332652 - in head/sys: conf dev/puc modules/puc Date: Tue, 17 Apr 2018 10:20:56 -0700 Message-ID: <3010482.A3g1Uy1uGA@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201804171646.w3HGk9vn040646@repo.freebsd.org> References: <201804171646.w3HGk9vn040646@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 17 Apr 2018 14:24:47 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 18:24:48 -0000 On Tuesday, April 17, 2018 04:46:09 PM Warner Losh wrote: > Author: imp > Date: Tue Apr 17 16:46:08 2018 > New Revision: 332652 > URL: https://svnweb.freebsd.org/changeset/base/332652 > > Log: > Add PNP info to the PCI attahement of the puc driver. > > Adjust sys/conf/files and sys/modules/puc/Makefile to omit > pucdata.c now tht it's included by puc_pci.c. > > Submitted by: Lakhan Shiva Kamireddy (with build fixes by me) > Pull Request: https://github.com/freebsd/freebsd/pull/136 If you are going to #include it you can remove the terminator entry and use nitems() in puc_pci_match instead. That will also remove the need for the - 1 hack in the MODULE_PNP_INFO line. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Apr 17 18:25:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E508F9016D for ; Tue, 17 Apr 2018 18:25:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2BA5735E8 for ; Tue, 17 Apr 2018 18:25:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22d.google.com with SMTP id a7so7625085ioc.12 for ; Tue, 17 Apr 2018 11:25:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=RXueKUvQiUsZctaJGoQhq0rXXNPr0SVf6vJEa9/Xb2o=; b=SbrcXfiF38YLnxuaY9ADzE52pMrR9M3pk1ahdX5x+oDYuk4yc2afwWo5NwzPz6IFSt 3anHTP/BoJ4xtzDd7islXeh3io5X7qviLF1KpxzRavs2XPSO65z2i8q8pZN2vt6QxaKt KO/dIziKOi9rYiNTzA9lC/FPN2rJRzMre+vlmFttZdEQ5x1u5PDTjo7E48noEnng7Hb1 whbfyzjAtXVivxz0NeFmAAsmf+xP0fkYpqgrpWeeGNHU2poF+cGLLia9oxwp4l3UCOtV Yeiaji1HlUVWz/8LHkv372lCgdi1F5FZtqTS3a/7m5WKmCithH5hhtbarniKo4nW+qUQ /PKg== 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:in-reply-to:references:from :date:message-id:subject:to:cc; bh=RXueKUvQiUsZctaJGoQhq0rXXNPr0SVf6vJEa9/Xb2o=; b=sswWwqgPHuaqfkCxbbrBjtubHd0RbA6LU5L2NF3NSaq1kPysvfSuaUPgHoW9KJwtJS UxSQL4/dWvqE/StD5VO3j1cTChEWdjgUmHhpDVX3b2pxSBnRTi7Ly3ZmLpFWTfNurLqe 1xgQb6kiKj1gg2JHTm31xRHhNfJ+n2WVabufVchdRIwtiKbWJjwHJRRQa4zFzpxtM2m/ nm6u/+rS8e3IR7/4cOI+V+QTGW792ILSADtzj1Rc1PQW+Tgil3U8WtaWJ9LEpk379K7+ rOVz6nmUg22jmONZAW0LEE6HtXzcsSRk+l/ZNV9L5fEYzIFrHZG2GJYUSHUb+bauFSqj 4Z8Q== X-Gm-Message-State: ALQs6tCfEGBQFNjt+xaKIQYrOFCg2laYlTL2DwLY7DqRqOFtq0aAfNd6 fEaMb2Uh+RsIqi39LAe+5z75Yb/Q01stey40YtdmVw== X-Google-Smtp-Source: AIpwx4+JO0jM0Fja5x+fE2shxY/g7Be6OfRxe9KxTct3Ggg7cro+Q1I4CLoaEr0l93rDbthOmtU4xsCJVi/RQQMvbyY= X-Received: by 10.107.56.70 with SMTP id f67mr3135728ioa.117.1523989541763; Tue, 17 Apr 2018 11:25:41 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:a604:0:0:0:0:0 with HTTP; Tue, 17 Apr 2018 11:25:41 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <3010482.A3g1Uy1uGA@ralph.baldwin.cx> References: <201804171646.w3HGk9vn040646@repo.freebsd.org> <3010482.A3g1Uy1uGA@ralph.baldwin.cx> From: Warner Losh Date: Tue, 17 Apr 2018 12:25:41 -0600 X-Google-Sender-Auth: bYkxuy9VpSG-1_h-t3sRdfAr9qU Message-ID: Subject: Re: svn commit: r332652 - in head/sys: conf dev/puc modules/puc To: John Baldwin Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 18:25:43 -0000 On Tue, Apr 17, 2018 at 11:20 AM, John Baldwin wrote: > On Tuesday, April 17, 2018 04:46:09 PM Warner Losh wrote: > > Author: imp > > Date: Tue Apr 17 16:46:08 2018 > > New Revision: 332652 > > URL: https://svnweb.freebsd.org/changeset/base/332652 > > > > Log: > > Add PNP info to the PCI attahement of the puc driver. > > > > Adjust sys/conf/files and sys/modules/puc/Makefile to omit > > pucdata.c now tht it's included by puc_pci.c. > > > > Submitted by: Lakhan Shiva Kamireddy (with build fixes by me) > > Pull Request: https://github.com/freebsd/freebsd/pull/136 > > If you are going to #include it you can remove the terminator entry > and use nitems() in puc_pci_match instead. That will also remove the > need for the - 1 hack in the MODULE_PNP_INFO line. > Good suggestion... Warner From owner-svn-src-all@freebsd.org Tue Apr 17 18:49:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04363F918C1; Tue, 17 Apr 2018 18:49:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A018978FF5; Tue, 17 Apr 2018 18:49: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 9B190105D5; Tue, 17 Apr 2018 18:49:17 +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 w3HInHfJ001218; Tue, 17 Apr 2018 18:49:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HInHT3001217; Tue, 17 Apr 2018 18:49:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201804171849.w3HInHT3001217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 17 Apr 2018 18:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332658 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 332658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 18:49:18 -0000 Author: markj Date: Tue Apr 17 18:49:17 2018 New Revision: 332658 URL: https://svnweb.freebsd.org/changeset/base/332658 Log: Ensure that m and skip_m belong to the same object. Pages allocated from a given reservation may belong to different objects. It is therefore possible for vm_page_ps_test() to be called with the base page's object unlocked. Check for this case before asserting that the object lock is held. Reported by: jhb Reviewed by: kib MFC after: 1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Apr 17 18:07:40 2018 (r332657) +++ head/sys/vm/vm_page.c Tue Apr 17 18:49:17 2018 (r332658) @@ -4140,6 +4140,8 @@ vm_page_ps_test(vm_page_t m, int flags, vm_page_t skip int i, npages; object = m->object; + if (skip_m != NULL && skip_m->object != object) + return (false); VM_OBJECT_ASSERT_LOCKED(object); npages = atop(pagesizes[m->psind]); From owner-svn-src-all@freebsd.org Tue Apr 17 19:39:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B302F95430; Tue, 17 Apr 2018 19:39:48 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C11DD87C1F; Tue, 17 Apr 2018 19:39:47 +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 AED4010DE2; Tue, 17 Apr 2018 19:39:47 +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 w3HJdl9u029980; Tue, 17 Apr 2018 19:39:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HJdliY029978; Tue, 17 Apr 2018 19:39:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804171939.w3HJdliY029978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 17 Apr 2018 19:39:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332659 - head/usr.sbin/usbconfig X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/usbconfig X-SVN-Commit-Revision: 332659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 19:39:48 -0000 Author: trasz Date: Tue Apr 17 19:39:47 2018 New Revision: 332659 URL: https://svnweb.freebsd.org/changeset/base/332659 Log: Make it possible to pass the ugenX.Y to usbconfig(8) without using "-d", eg "usbconfig ugen1.2 dump_all_desc". Reviewed by: hselasky@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/usbconfig/usbconfig.8 head/usr.sbin/usbconfig/usbconfig.c Modified: head/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.8 Tue Apr 17 18:49:17 2018 (r332658) +++ head/usr.sbin/usbconfig/usbconfig.8 Tue Apr 17 19:39:47 2018 (r332659) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 30, 2017 +.Dd April 17, 2018 .Dt USBCONFIG 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Op Fl a Ar addr .Op cmds... .Nm -.Op Fl d Ar [ugen]. +.Op Oo Fl d Oc Ar [ugen]. .Op cmds... .Sh DESCRIPTION The Modified: head/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.c Tue Apr 17 18:49:17 2018 (r332658) +++ head/usr.sbin/usbconfig/usbconfig.c Tue Apr 17 19:39:47 2018 (r332659) @@ -820,6 +820,29 @@ main(int argc, char **argv) opt->got_any++; break; default: + if (n == 1) { + ptr = argv[n]; + + if ((ptr[0] == 'u') && + (ptr[1] == 'g') && + (ptr[2] == 'e') && + (ptr[3] == 'n')) + ptr += 4; + + if ((sscanf(ptr, "%d.%d", + &unit, &addr) != 2) || + (unit < 0) || (unit > 65535) || + (addr < 0) || (addr > 65535)) { + usage(); + break; + } + + opt->bus = unit; + opt->addr = addr; + opt->got_bus = 1; + opt->got_addr = 1; + break; + } usage(); break; } From owner-svn-src-all@freebsd.org Tue Apr 17 22:30:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCBEAFA1432; Tue, 17 Apr 2018 22:30:00 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 807A4712A1; Tue, 17 Apr 2018 22:30:00 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76CA112911; Tue, 17 Apr 2018 22:30:00 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3HMU02G014809; Tue, 17 Apr 2018 22:30:00 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HMU0Wi014808; Tue, 17 Apr 2018 22:30:00 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804172230.w3HMU0Wi014808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 17 Apr 2018 22:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332660 - head/sys/sparc64/sparc64 X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/sparc64/sparc64 X-SVN-Commit-Revision: 332660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 22:30:01 -0000 Author: brooks Date: Tue Apr 17 22:30:00 2018 New Revision: 332660 URL: https://svnweb.freebsd.org/changeset/base/332660 Log: Remove references to fs_nofault_intr_begin/end. These should have removed in r332656. Reported by: mjg, lidl Modified: head/sys/sparc64/sparc64/trap.c Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Tue Apr 17 19:39:47 2018 (r332659) +++ head/sys/sparc64/sparc64/trap.c Tue Apr 17 22:30:00 2018 (r332660) @@ -100,8 +100,6 @@ extern char copy_nofault_end[]; extern char fs_fault[]; extern char fs_nofault_begin[]; extern char fs_nofault_end[]; -extern char fs_nofault_intr_begin[]; -extern char fs_nofault_intr_end[]; extern char fas_fault[]; extern char fas_nofault_begin[]; @@ -478,14 +476,6 @@ trap_pfault(struct thread *td, struct trapframe *tf) } if (ctx != TLB_CTX_KERNEL) { - if ((tf->tf_tstate & TSTATE_PRIV) != 0 && - (tf->tf_tpc >= (u_long)fs_nofault_intr_begin && - tf->tf_tpc <= (u_long)fs_nofault_intr_end)) { - tf->tf_tpc = (u_long)fs_fault; - tf->tf_tnpc = tf->tf_tpc + 4; - return (0); - } - /* This is a fault on non-kernel virtual memory. */ map = &p->p_vmspace->vm_map; } else { From owner-svn-src-all@freebsd.org Tue Apr 17 22:33:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CE73FA195A; Tue, 17 Apr 2018 22:33:42 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B493971774; Tue, 17 Apr 2018 22:33:41 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF91D12A95; Tue, 17 Apr 2018 22:33:41 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3HMXfZ0019761; Tue, 17 Apr 2018 22:33:41 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3HMXfqj019760; Tue, 17 Apr 2018 22:33:41 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201804172233.w3HMXfqj019760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Tue, 17 Apr 2018 22:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332661 - head/release/amd64 X-SVN-Group: head X-SVN-Commit-Author: benno X-SVN-Commit-Paths: head/release/amd64 X-SVN-Commit-Revision: 332661 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2018 22:33:42 -0000 Author: benno Date: Tue Apr 17 22:33:41 2018 New Revision: 332661 URL: https://svnweb.freebsd.org/changeset/base/332661 Log: Generate hybrid ISO images for amd64. This keeps the existing El Torito entries for BIOS and UEFI boot code and adds a GPT in the ISO image's System Area containing boot code for BIOS that will load /boot/loader from the ISO filesystem and execute it. We then use etdump to find the EFI System Partition image in the El Torito catalog and add an entry to the GPT that allows EFI to find it. Reviewed by: gjb, imp Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D15051 Modified: head/release/amd64/mkisoimages.sh Modified: head/release/amd64/mkisoimages.sh ============================================================================== --- head/release/amd64/mkisoimages.sh Tue Apr 17 22:30:00 2018 (r332660) +++ head/release/amd64/mkisoimages.sh Tue Apr 17 22:33:41 2018 (r332661) @@ -38,7 +38,7 @@ if [ "$1" = "-b" ]; then umount efi rmdir efi mdconfig -d -u $device - bootable="-o bootimage=i386;efiboot.img -o no-emul-boot -o platformid=efi $bootable" + bootable="$bootable -o bootimage=i386;efiboot.img -o no-emul-boot -o platformid=efi" shift else @@ -58,3 +58,29 @@ echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/f makefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@" rm -f "$1/etc/fstab" rm -f efiboot.img + +if [ "$bootable" != "" ]; then + # Look for the EFI System Partition image we dropped in the ISO image. + for entry in `etdump --format shell $NAME`; do + eval $entry + if [ "$et_platform" = "efi" ]; then + espstart=`expr $et_lba \* 2048` + espsize=`expr $et_sectors \* 512` + espparam="-p efi::$espsize:$espstart" + break + fi + done + + # Create a GPT image containing the partitions we need for hybrid boot. + imgsize=`stat -f %z $NAME` + mkimg -s gpt \ + --capacity $imgsize \ + -b $4/boot/pmbr \ + $espparam \ + -p freebsd-boot:=$4/boot/isoboot \ + -o hybrid.img + + # Drop the PMBR, GPT, and boot code into the System Area of the ISO. + dd if=hybrid.img of=$NAME bs=32k count=1 conv=notrunc + rm -f hybrid.img +fi From owner-svn-src-all@freebsd.org Wed Apr 18 02:25:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2070F8651B; Wed, 18 Apr 2018 02:25:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FD4284127; Wed, 18 Apr 2018 02:25:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46A3B14F03; Wed, 18 Apr 2018 02:25:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3I2P4F6033279; Wed, 18 Apr 2018 02:25:04 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3I2P4jT033278; Wed, 18 Apr 2018 02:25:04 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201804180225.w3I2P4jT033278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 18 Apr 2018 02:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332662 - head/usr.sbin/iostat X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/iostat X-SVN-Commit-Revision: 332662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 02:25:04 -0000 Author: allanjude Date: Wed Apr 18 02:25:03 2018 New Revision: 332662 URL: https://svnweb.freebsd.org/changeset/base/332662 Log: Make `iostat -xC` print CPU information on its own line Requested by: mahrens Reviewed by: kenm (maintainer), mahrens MFC after: 1 week Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D15076 Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c ============================================================================== --- head/usr.sbin/iostat/iostat.c Tue Apr 17 22:33:41 2018 (r332661) +++ head/usr.sbin/iostat/iostat.c Wed Apr 18 02:25:03 2018 (r332662) @@ -802,11 +802,15 @@ devstats(int perf_select, long double etime, int havel char *devicename; if (xflag > 0) { + if (Cflag > 0) { + printf(" cpu\n"); + printf(" us ni sy in id\n"); + cpustats(); + printf("\n"); + } printf(" extended device statistics "); if (Tflag > 0) printf(" tty "); - if (Cflag > 0) - printf(" cpu "); printf("\n"); if (Iflag == 0) { printf("device r/s w/s kr/s kw/s " @@ -817,8 +821,6 @@ devstats(int perf_select, long double etime, int havel } if (Tflag > 0) printf("tin tout "); - if (Cflag > 0) - printf("us ni sy in id "); printf("\n"); } @@ -922,8 +924,6 @@ devstats(int perf_select, long double etime, int havel printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); - if (Cflag > 0) - cpustats(); } printf("\n"); } From owner-svn-src-all@freebsd.org Wed Apr 18 04:53:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8414F900A8; Wed, 18 Apr 2018 04:53:29 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D9177D781; Wed, 18 Apr 2018 04:53:29 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (220-253-154-11.dyn.iinet.net.au [220.253.154.11]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id w3I4rNRd029154 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 17 Apr 2018 21:53:26 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r332559 - head/usr.sbin/mountd To: Konstantin Belousov , Rick Macklem Cc: Andriy Gapon , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <20180417123212.GM1774@kib.kiev.ua> From: Julian Elischer Message-ID: Date: Wed, 18 Apr 2018 12:53:18 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180417123212.GM1774@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 04:53:30 -0000 On 17/4/18 8:32 pm, Konstantin Belousov wrote: > On Tue, Apr 17, 2018 at 12:02:04AM +0000, Rick Macklem wrote: >> I wrote: >>> Julian Elischer wrote: >>>> On 16/4/18 6:56 pm, Konstantin Belousov wrote: >>> [stuff snipped] >>>>>> + ngroups =3D XU_NGROUPS + 1; >>>>> Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? >>>> valid question.. because that is how many are allocated? >>>> it was a "minimally invasive patch".. whoever used XU_NGROUPS before >>>> should have fixed it. >>>> Having said that, thanks for drawing out attention to it.. will >>>> probably fix. >>> 16 is the limit specified in the RFCs for Sun RPC, so that is the "on the wire" limit. >>> I haven't looked at the code. It might make sense to handle more here and then >>> set the limit at 16 after getting rid of duplicates, but I have no idea if = >>> it matters? >>> >>> rick >> Correcting my own post. Now that I've looked at the code, this doesn't go on >> the wire. It does go in the exports structure, which means that this structure >> would have to be revised (along with the syscall and VOP calls and the kernel >> code that uses it). These credentials are for the "maproot/mapall" export >> option and revising the export structure seems like quite a bit of work for this >> case. (Until revised XU_NGROUPS is the correct value to set it to, since there >> is a "struct xucred" in the exports structure.) >> >> Since Julian Elischer has been emailing me about adding a "fsid" export option >> which allows /etc/exports to set the FSID of the exported fs (which would also >> need to go in the exports structure), it might be about time to rev. the exports >> structure? > Probably yes, we would need a new variant of the nmount(2) syscall. > Existing syscall should use the old layout for compatibility (we care > about nmount and COMPAT32 as well). > our issue is that we make a server that combines CIFS/SMB access (via samba), credential setting from a company wide AD server (windows) via winbindd (samba) via nsswitch.. and NFS. The problem is that when one looks up a user name from the AD server One can get back a credential with a large number of groups, because some companies use windows groups extensively.  SO a sinel user may be in a group for every project they are involved with and a method of giving them access to files related to a project. In this scenario a group manager may be given access to a lot of groups. A user looking at a file via NFS needs to be able to see what he needs and still be blocked as per company policy. I am investigating the new user-manager  daemon may help but I don't fully understand it yet. I gather it maps an incoming request to a set of groups as defined on the server rather than on the client, but I'm not sure yet how that relates to mountd. From owner-svn-src-all@freebsd.org Wed Apr 18 05:58:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D664CF93E6D; Wed, 18 Apr 2018 05:58:27 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 831CE6A063; Wed, 18 Apr 2018 05:58:27 +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 7B564170BB; Wed, 18 Apr 2018 05:58:27 +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 w3I5wRXH038598; Wed, 18 Apr 2018 05:58:27 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3I5wRgg038597; Wed, 18 Apr 2018 05:58:27 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201804180558.w3I5wRgg038597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 18 Apr 2018 05:58:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332663 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 332663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 05:58:28 -0000 Author: cperciva Date: Wed Apr 18 05:58:27 2018 New Revision: 332663 URL: https://svnweb.freebsd.org/changeset/base/332663 Log: Move debug.{trace,debugger}_on_panic and kern.panic_reboot_wait_time in EC2 instances from sysctl.conf to loader.conf; these can all be set as loader tunables, and setting them in loader.conf gives us the right behaviour in the event of a kernel panic taking place prior to when sysctl.conf is processed. MFC after: 1 week Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Wed Apr 18 02:25:03 2018 (r332662) +++ head/release/tools/ec2.conf Wed Apr 18 05:58:27 2018 (r332663) @@ -60,9 +60,9 @@ vm_extra_pre_umount() { # The EC2 console is output-only, so while printing a backtrace can # be useful, there's no point dropping into a debugger or waiting # for a keypress. - echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf - echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/etc/sysctl.conf - echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/etc/sysctl.conf + echo 'debug.trace_on_panic=1' >> ${DESTDIR}/boot/loader.conf + echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/boot/loader.conf + echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/boot/loader.conf # The console is not interactive, so we might as well boot quickly. echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf From owner-svn-src-all@freebsd.org Wed Apr 18 11:02:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63ED9FA87A8; Wed, 18 Apr 2018 11:02:20 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16AFB6FD28; Wed, 18 Apr 2018 11:02:20 +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 1180C1A22F; Wed, 18 Apr 2018 11:02:20 +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 w3IB2J05094430; Wed, 18 Apr 2018 11:02:19 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IB2JMH094429; Wed, 18 Apr 2018 11:02:19 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201804181102.w3IB2JMH094429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 18 Apr 2018 11:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332664 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 332664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 11:02:20 -0000 Author: oshogbo Date: Wed Apr 18 11:02:19 2018 New Revision: 332664 URL: https://svnweb.freebsd.org/changeset/base/332664 Log: Add missing argument in the cnv man page. Reported by: MiÅ‚osz Kaniewski MFC after: 1 week Sponsored by: Wheel Systems Modified: head/share/man/man9/cnv.9 Modified: head/share/man/man9/cnv.9 ============================================================================== --- head/share/man/man9/cnv.9 Wed Apr 18 05:58:27 2018 (r332663) +++ head/share/man/man9/cnv.9 Wed Apr 18 11:02:19 2018 (r332664) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2017 +.Dd April 18, 2018 .Dt CNV 9 .Os .Sh NAME @@ -66,27 +66,27 @@ .Fn cnvlist_get_descriptor_array "void *cookiep" "size_t *nitemsp" .\" .Ft bool -.Fn cnvlist_take_bool "void *cookiep" +.Fn cnvlist_take_bool "nvlist_t *nvl" "void *cookiep" .Ft uint64_t -.Fn cnvlist_take_number "void *cookiep" +.Fn cnvlist_take_number "nvlist_t *nvl" "void *cookiep" .Ft "const char *" -.Fn cnvlist_take_string "void *cookiep" +.Fn cnvlist_take_string "nvlist_t *nvl" "void *cookiep" .Ft "const nvlist_t *" -.Fn cnvlist_take_nvlist "void *cookiep" +.Fn cnvlist_take_nvlist "nvlist_t *nvl" "void *cookiep" .Ft "const void *" -.Fn cnvlist_take_binary "void *cookiep" "size_t *sizep" +.Fn cnvlist_take_binary "nvlist_t *nvl" "void *cookiep" "size_t *sizep" .Ft "const bool *" -.Fn cnvlist_take_bool_array "void *cookiep" "size_t *nitemsp" +.Fn cnvlist_take_bool_array "nvlist_t *nvl" "void *cookiep" "size_t *nitemsp" .Ft "const uint64_t *" -.Fn cnvlist_take_number_array "void *cookiep" "size_t *nitemsp" +.Fn cnvlist_take_number_array "nvlist_t *nvl" "void *cookiep" "size_t *nitemsp" .Ft "const char * const *" -.Fn cnvlist_take_string_array "void *cookiep" "size_t *nitemsp" +.Fn cnvlist_take_string_array "nvlist_t *nvl" "void *cookiep" "size_t *nitemsp" .Ft "const nvlist_t * const *" -.Fn cnvlist_take_nvlist_array "void *cookiep" "size_t *nitemsp" +.Fn cnvlist_take_nvlist_array "nvlist_t *nvl" "void *cookiep" "size_t *nitemsp" .Ft int -.Fn cnvlist_take_descriptor "void *cookiep" +.Fn cnvlist_take_descriptor "nvlist_t *nvl" "void *cookiep" .Ft "const int *" -.Fn cnvlist_take_descriptor_array "void *cookiep" "size_t *nitemsp" +.Fn cnvlist_take_descriptor_array "nvlist_t *nvl" "void *cookiep" "size_t *nitemsp" .\" .Ft void .Fn cnvlist_free_null "nvlist_t *nvl" "void *cookiep" From owner-svn-src-all@freebsd.org Wed Apr 18 13:17:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D67F1F8A582; Wed, 18 Apr 2018 13:17:15 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84BEA6B9C0; Wed, 18 Apr 2018 13:17:15 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DFCC1B6C7; Wed, 18 Apr 2018 13:17:15 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3IDHFOQ059592; Wed, 18 Apr 2018 13:17:15 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IDHE2L059588; Wed, 18 Apr 2018 13:17:14 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201804181317.w3IDHE2L059588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Wed, 18 Apr 2018 13:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332671 - head/contrib/top X-SVN-Group: head X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: head/contrib/top X-SVN-Commit-Revision: 332671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 13:17:16 -0000 Author: lidl Date: Wed Apr 18 13:17:14 2018 New Revision: 332671 URL: https://svnweb.freebsd.org/changeset/base/332671 Log: top: fix warnings from clang/gcc Add includes for and where necessary, and rename a few internal functions to have a "top_" prefix to avoid clashes with standard names from curses.h/termcap.h headers. Top now compiles without warnings on both gcc and clang. Reviewed by: emaste, imp, jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D15115 Modified: head/contrib/top/display.c head/contrib/top/screen.c head/contrib/top/screen.h head/contrib/top/top.c Modified: head/contrib/top/display.c ============================================================================== --- head/contrib/top/display.c Wed Apr 18 12:56:17 2018 (r332670) +++ head/contrib/top/display.c Wed Apr 18 13:17:14 2018 (r332671) @@ -32,7 +32,9 @@ #include +#include #include +#include #include #include @@ -255,7 +257,7 @@ double *avenrun; register int i; /* i_loadave also clears the screen, since it is first */ - clear(); + top_clear(); /* mpid == -1 implies this system doesn't have an _mpid */ if (mpid != -1) @@ -796,7 +798,7 @@ i_message() } if (next_msg[0] != '\0') { - standout(next_msg); + top_standout(next_msg); msglen = strlen(next_msg); next_msg[0] = '\0'; } @@ -1076,7 +1078,7 @@ caddr_t a1, a2, a3; i = strlen(next_msg); if ((type & MT_delayed) == 0) { - type & MT_standout ? standout(next_msg) : + type & MT_standout ? top_standout(next_msg) : fputs(next_msg, stdout); (void) clear_eol(msglen - i); msglen = i; @@ -1088,7 +1090,7 @@ caddr_t a1, a2, a3; { if ((type & MT_delayed) == 0) { - type & MT_standout ? standout(next_msg) : fputs(next_msg, stdout); + type & MT_standout ? top_standout(next_msg) : fputs(next_msg, stdout); msglen = strlen(next_msg); next_msg[0] = '\0'; } Modified: head/contrib/top/screen.c ============================================================================== --- head/contrib/top/screen.c Wed Apr 18 12:56:17 2018 (r332670) +++ head/contrib/top/screen.c Wed Apr 18 13:17:14 2018 (r332671) @@ -45,6 +45,8 @@ # endif # endif #endif +#include +#include #include "screen.h" #include "boolean.h" @@ -432,10 +434,7 @@ get_screensize() } void -standout(msg) - -char *msg; - +top_standout(char *msg) { if (smart_terminal) { @@ -450,8 +449,7 @@ char *msg; } void -clear() - +top_clear() { if (smart_terminal) { @@ -460,10 +458,7 @@ clear() } int -clear_eol(len) - -int len; - +clear_eol(int len) { if (smart_terminal && !overstrike && len > 0) { @@ -496,12 +491,8 @@ go_home() /* This has to be defined as a subroutine for tputs (instead of a macro) */ -void -putstdout(ch) - -char ch; - +int +putstdout(int ch) { - putchar(ch); + return putchar(ch); } - Modified: head/contrib/top/screen.h ============================================================================== --- head/contrib/top/screen.h Wed Apr 18 12:56:17 2018 (r332670) +++ head/contrib/top/screen.h Wed Apr 18 13:17:14 2018 (r332671) @@ -28,10 +28,10 @@ extern int screen_length; extern int screen_width; /* a function that puts a single character on stdout */ -void putstdout(char ch); +int putstdout(int ch); int clear_eol(int len); -void standout(char *msg); -void clear(void); +void top_standout(char *msg); +void top_clear(void); void go_home(void); void reinit_screen(void); void get_screensize(void); Modified: head/contrib/top/top.c ============================================================================== --- head/contrib/top/top.c Wed Apr 18 12:56:17 2018 (r332670) +++ head/contrib/top/top.c Wed Apr 18 13:17:14 2018 (r332671) @@ -39,6 +39,7 @@ char *copyright = #include #include +#include #include #include #include @@ -79,7 +80,7 @@ int pcpu_stats = No; sigret_t leave(); sigret_t tstop(); #ifdef SIGWINCH -sigret_t winch(); +sigret_t top_winch(int); #endif volatile sig_atomic_t leaveflag; @@ -682,7 +683,7 @@ char *argv[]; (void) signal(SIGQUIT, leave); (void) signal(SIGTSTP, tstop); #ifdef SIGWINCH - (void) signal(SIGWINCH, winch); + (void) signal(SIGWINCH, top_winch); #endif #ifdef SIGRELSE sigrelse(SIGINT); @@ -897,7 +898,7 @@ restart: max_topn = display_resize(); /* reset the signal handler */ - (void) signal(SIGWINCH, winch); + (void) signal(SIGWINCH, top_winch); reset_display(); winchflag = 0; @@ -971,9 +972,9 @@ restart: case CMD_help1: /* help */ case CMD_help2: reset_display(); - clear(); + top_clear(); show_help(); - standout("Hit any key to continue: "); + top_standout("Hit any key to continue: "); fflush(stdout); (void) read(0, &ch, 1); break; @@ -989,9 +990,9 @@ restart: else { reset_display(); - clear(); + top_clear(); show_errors(); - standout("Hit any key to continue: "); + top_standout("Hit any key to continue: "); fflush(stdout); (void) read(0, &ch, 1); } @@ -1300,10 +1301,7 @@ int i; } #ifdef SIGWINCH -sigret_t winch(i) /* SIGWINCH handler */ - -int i; - +sigret_t top_winch(int i) /* SIGWINCH handler */ { winchflag = 1; } From owner-svn-src-all@freebsd.org Wed Apr 18 13:58:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84659F8CF82; Wed, 18 Apr 2018 13:58:43 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37BCD7395C; Wed, 18 Apr 2018 13:58:43 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 327761BD21; Wed, 18 Apr 2018 13:58:43 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3IDwg6S088702; Wed, 18 Apr 2018 13:58:42 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IDwgpq088701; Wed, 18 Apr 2018 13:58:42 GMT (envelope-from br@FreeBSD.org) Message-Id: <201804181358.w3IDwgpq088701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 18 Apr 2018 13:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332672 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 332672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 13:58:43 -0000 Author: br Date: Wed Apr 18 13:58:42 2018 New Revision: 332672 URL: https://svnweb.freebsd.org/changeset/base/332672 Log: Set correct float abi (float abi double) for hard-float build, so __riscv_float_abi_double macro will be defined by compiler. The options are: o lp64 __riscv_float_abi_soft o lp64f __riscv_float_abi_single o lp64d __riscv_float_abi_double Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Wed Apr 18 13:17:14 2018 (r332671) +++ head/share/mk/bsd.cpu.mk Wed Apr 18 13:58:42 2018 (r332672) @@ -370,8 +370,8 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -m CFLAGS += -march=rv64imac -mabi=lp64 ACFLAGS += -march=rv64imac -mabi=lp64 .else -CFLAGS += -march=rv64imafdc -mabi=lp64 -ACFLAGS += -march=rv64imafdc -mabi=lp64 +CFLAGS += -march=rv64imafdc -mabi=lp64d +ACFLAGS += -march=rv64imafdc -mabi=lp64d .endif .endif From owner-svn-src-all@freebsd.org Wed Apr 18 14:02:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B85C3F8D4E4; Wed, 18 Apr 2018 14:02:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 644D474F17; Wed, 18 Apr 2018 14:02:37 +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 5C21D1BEAA; Wed, 18 Apr 2018 14:02:37 +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 w3IE2bYg093660; Wed, 18 Apr 2018 14:02:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IE2bpl093659; Wed, 18 Apr 2018 14:02:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804181402.w3IE2bpl093659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 18 Apr 2018 14:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332673 - head/tools/tools X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/tools X-SVN-Commit-Revision: 332673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:02:37 -0000 Author: emaste Date: Wed Apr 18 14:02:37 2018 New Revision: 332673 URL: https://svnweb.freebsd.org/changeset/base/332673 Log: Remove mention of tools/recoverdisk, now in sbin PR: 227570 MFC after: 3 days Modified: head/tools/tools/README Modified: head/tools/tools/README ============================================================================== --- head/tools/tools/README Wed Apr 18 13:58:42 2018 (r332672) +++ head/tools/tools/README Wed Apr 18 14:02:37 2018 (r332673) @@ -55,7 +55,6 @@ pciid Generate src/share/misc/pci_vendors. pciroms A tool for dumping PCI ROM images. WARNING: alpha quality. pirtool A tool for dumping the $PIR table on i386 machines at runtime. portsinfo Generate list of new ports for last two weeks. -recoverdisk Copy as much data as possible from a defective disk. scsi-defects Get at the primary or grown defect list of a SCSI disk. sysdoc Build a manual page with available sysctls for a specific kernel configuration. From owner-svn-src-all@freebsd.org Wed Apr 18 14:34:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05497F8FA50; Wed, 18 Apr 2018 14:34:35 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CE7F7C552; Wed, 18 Apr 2018 14:34:34 +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 8F0941C360; Wed, 18 Apr 2018 14:34:34 +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 w3IEYYH6008774; Wed, 18 Apr 2018 14:34:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEYY9C008770; Wed, 18 Apr 2018 14:34:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181434.w3IEYY9C008770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332674 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 332674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:34:35 -0000 Author: gjb Date: Wed Apr 18 14:34:33 2018 New Revision: 332674 URL: https://svnweb.freebsd.org/changeset/base/332674 Log: Increase the msdosfs partition size on arm SoC images where the current size may not be sufficiently large for development and/or testing. PR: 227548 Submitted by: trasz MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BEAGLEBONE.conf head/release/arm/GUMSTIX.conf head/release/arm/PANDABOARD.conf head/release/arm/RPI-B.conf Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Wed Apr 18 14:02:37 2018 (r332673) +++ head/release/arm/BEAGLEBONE.conf Wed Apr 18 14:34:33 2018 (r332674) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-beaglebone" -FAT_SIZE="2m" +FAT_SIZE="41m" FAT_TYPE="12" IMAGE_SIZE="3072M" KERNEL="GENERIC" Modified: head/release/arm/GUMSTIX.conf ============================================================================== --- head/release/arm/GUMSTIX.conf Wed Apr 18 14:02:37 2018 (r332673) +++ head/release/arm/GUMSTIX.conf Wed Apr 18 14:34:33 2018 (r332674) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="arm" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-duovero" -FAT_SIZE="2m" +FAT_SIZE="41m" FAT_TYPE="12" IMAGE_SIZE="3072M" KERNEL="GUMSTIX" Modified: head/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Wed Apr 18 14:02:37 2018 (r332673) +++ head/release/arm/PANDABOARD.conf Wed Apr 18 14:34:33 2018 (r332674) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-pandaboard" -FAT_SIZE="2m" +FAT_SIZE="41m" FAT_TYPE="12" IMAGE_SIZE="3072M" KERNEL="GENERIC" Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Wed Apr 18 14:02:37 2018 (r332673) +++ head/release/arm/RPI-B.conf Wed Apr 18 14:34:33 2018 (r332674) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-rpi sysutils/rpi-firmware" -FAT_SIZE="17m" +FAT_SIZE="41m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="RPI-B" From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAC8EF9032B; Wed, 18 Apr 2018 14:42:41 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A14C7D09D; Wed, 18 Apr 2018 14:42: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 54D461C500; Wed, 18 Apr 2018 14:42: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 w3IEgfX5013765; Wed, 18 Apr 2018 14:42:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgfQA013764; Wed, 18 Apr 2018 14:42:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgfQA013764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332675 - 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: 332675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:42 -0000 Author: gjb Date: Wed Apr 18 14:42:41 2018 New Revision: 332675 URL: https://svnweb.freebsd.org/changeset/base/332675 Log: Initial pruning of the relnotes page post-11.1-RELEASE. 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 Wed Apr 18 14:34:33 2018 (r332674) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:41 2018 (r332675) @@ -159,317 +159,57 @@ Userland Configuration Changes - The &man.inetd.8; utility is now built - without libwrap support when - WITHOUT_TCP_WRAPPERS is set in - &man.src.conf.5;. - - The &man.libthr.3; library and related - files are now evaluated and removed by the - delete-old-libs target when upgrading the - system if WITHOUT_LIBTHR is - set in &man.src.conf.5;. - - The - WITH_LLD_AS_LD build knob has been added, - which installs LLD as - /usr/bin/ld if set. - - - LLD has been enabled by default and - installed as /usr/bin/ld on - &os;/&arch.arm64;. - - The - WITH_RPCBIND_WARMSTART_SUPPORT - &man.src.conf.5; knob has been added, which when enabled - allows building &man.rpcbind.8; with - warmstart support. +   Userland Application Changes - Support for &man.blacklistd.8; has been added - to OpenSSH. - - The &man.bspatch.1; utility has been - updated with &man.capsicum.4; support. - - The - &man.cron.8; utility has been updated to add support for - including files within /etc/cron.d and /usr/local/etc/cron.d by - default. - - The - &man.syslogd.8; utility has been updated to add the - include keyword which allows specifying - a directory containing configuration files to be included in - addition to &man.syslog.conf.5;. The default - &man.syslog.conf.5; has been updated to include /etc/syslog.d and /usr/local/etc/syslog.d by - default. - - The &man.zfsbootcfg.8; utility has been - added, providing one-time &man.boot.config.5;-style options - for &man.zfsboot.8;. - - The - &man.setkey.8; utility has been modified to show the runtime - NAT-T configuration. The - -g and -t flags have - been added, which list only global and virtual policies, - respectively, when used with the -D and - -P flags. - - The &man.getaddrinfo.1; utility has been - added, ported from NetBSD. - - The &man.jail.8; utility has been - updated to allow explicitly-assigned IPv4 - and IPv6 addresses to be used within - a jail. - - The &man.daemon.8; utility has been - updated to allow redirecting &man.stdout.4; and &man.stderr.4; - output to &man.syslog.3; or to a file. - - The - &man.efivar.8; utility has been added, providing an interface - to manage UEFI variables. - - The &man.cxgbetool.8; utility has been - added, providing command-line access to features and debugging - facilities of &man.cxgbe.4; devices. - - The &man.primes.6; utility now - enumerates primes beyond - 3825123056546413050, up to a new limit of - 2^64 - 1. +   Contributed Software - &man.readelf.1; has been updated to - report &arch.arm; program and section header types. - - The - ELF Tool Chain has been updated to upstream - revision r3490. - - &man.groff.1; has been updated to use - the changelog date rather than file modification date in - manual pages for build reproducibility. - - - &man.groff.1; is planned to be deprecated effective &os; - 12.0-RELEASE. - - - &man.unbound.8; has been updated to - version 1.5.10. - - &man.strings.1; has been updated to fix - the exit status when multiple files are provided as arguments, - and an error is encountered before the last file. - - &man.makewhatis.1; has been updated to produce - build-reproducible output. - - Subversion - has been updated to version 1.9.5. - - &man.file.1; has been updated to version - 5.29. - - The &man.amd.8; utility has been updated - to version 6.2. - - The CLDR locales have - been updated to version 30.0.3. The unicode locales have been - updated to version 9.0.0. - - &man.xz.1; has been updated to version - 5.2.3. - - &man.tcpdump.1; has been updated to - version 4.9.0. - - &man.zlib.3; has been updated to version - 1.2.11. - - openresolv - has been updated to version 3.9.0. - - The NetBSD test suite has been updated - to the 01.11.2017_23.20 snapshot. - - libucl has been - updated to version 20170219. - - &man.libarchive.3; has been updated to - version 3.3.1. - - &man.dma.8; has been updated to the - 2017-02-10 snapshot. - - &man.ntpd.8; has been updated to version - 4.2.8p10. - - ACPICA has - been updated to version 20170303. - - Timezone data files have been updated to - version 2017b. - - &man.mandoc.1; has been updated to - version 1.14. - - Clang has - been updated to version 4.0.0. - - LLVM has - been updated to version 4.0.0. - - LLD has - been updated to version 4.0.0. - - LLDB has - been updated to version 4.0.0. - - compiler-rt - has been updated to version 4.0.0. - - libc++ has - been updated to version 4.0.0. - - &man.tcsh.1; has been updated to version - 6.20.00. - - &man.blacklistd.8; has been updated to the - 20170503 snapshot. - - &man.blacklistd.8; support for - OpenSSH has been refined to adjust - notification points to catch all authentication failures - rather than only those caused by invalid login - usernames. - - &man.byacc.1; has been updated to - version 20170201. - - bmake has - been updated to version 20170510. +   Installation and Configuration Tools - The installer, &man.bsdinstall.8;, has - been updated to include support for hidden wireless networks - when configuring the &man.wlan.4; interface. - - The - default EFI partition created by - &man.bsdinstall.8; has been increased from 800KB to - 200MB. +   <filename class="directory">/etc/rc.d</filename> Scripts - The jail_confwarn - &man.rc.conf.5; entry has been added, which suppresses - warnings about obsolete per-&man.jail.8; - configurations. +   <filename class="directory">/etc/periodic</filename> Scripts - The default &man.periodic.conf.5; has - been updated to include the - anticongestion_sleeptime option, - consolidating random sleeps in &man.periodic.8; scripts and - replacing the daily_ntpd_avoid_congestion - option. The default value is 3600 seconds. - - The 410.status-mfi - &man.periodic.8; script has been added to monitor the status - of &man.mfi.4; volumes. +   Runtime Libraries and API - The libmd library has - been updated to introduce functions that operate on &man.fd.4; - instead of filename. - - The &man.kvm.close.3; function has been - updated to return the accumulated error from previous - &man.close.2; calls. - - The C standard library has been updated - to make use of &man.reallocarray.3; for bounds - checking. - - The clock_nanosleep() - system call has been added. The - nanosleep() system call is now a wrapper - around clock_nanosleep(). - - The system libraries have been updated - to make use of &man.reallocarray.3; for bounds - checking. +   ABI Compatibility - The type max_align_t - is now defined for C11 compliance. - - The - sem_clockwait_np() library function has - been added, which allows the caller to specify the reference - clock and choose between absolute and relative mode. - - The clang - nullability qualifiers have been added to - the C library headers. - - Uses of the GNU - __nonnull__ attribute have been replaced - with the more benign Clang - nullability attributes. +   Userland Debugging - &man.ptrace.2; now supports events for - &man.vfork.2;, permitting reliable debugging across - &man.vfork.2; invocations. - - Process core dumps now include the - process ID (PID) and command line - arguments. +   @@ -483,115 +223,31 @@ General Kernel Changes - The &man.getdtablesize.2; system call is - now permitted in capability mode. - - The kern.proc.nfds - &man.sysctl.8; is now permitted in capability mode. - - The - sys/conf/newvers.sh script has been - updated with an option to exclude build-specific metadata from - the kernel for build reproducibility. +   Kernel Bug Fixes - The &man.ipf.4; packet filter has been - updated to prevent keep state from - incorrectly implying keep frags, matching - the behavior documented in &man.ipf.5;. +   Kernel Configuration - The - WITH_REPRODUCIBLE_BUILD &man.src.conf.5; - knob has been added, which when set, excludes build-specific - metadata from the kernel, for build reproducibility. - - Support for NAT-T is now - enabled by default. The IPSEC_NAT_T kernel - configuration option has been removed. - - The - IPSEC_FILTERTUNNEL kernel option has been - removed, which was deprecated by the - net.inet.ipsec.filtertunnel sysctl. - - The EARLY_AP_STARTUP - option has been enabled by default on &arch.amd64; and - &arch.i386; architectures, which when enabled releases - Application Processors (APs) earlier in the - kernel startup process. +   Kernel Modules - &man.cloudabi.4; has been updated to - allow running 32-bit binaries within 64-bit userland - environments when the kernel configuration file has the - COMPAT_CLOUDABI32 option present. - - The - ipsec and tcpmd5 kernel - modules have been added. - - - Following the addition of the tcpmd5 - module, it is now necessary to have a security association - (SA) entry for both inbound and outbound - directions. - - - The - &man.ipfw.4; packet filter has been updated to add support for - named dynamic states. - - The - ipfw_nptv6 kernel module has been added, - implementing Network Prefix Translation for - IPv6 as defined in RFC - 6296. - - The - ipfw_nat64 kernel module has been added, - implementing stateless and stateful - NAT64. - - The - &man.cfumass.4; device has been added, providing a storage - frontend to USB - OTG-capable hardware. - - The - ipfw_pmod kernel module has been added, - designed for modifying packets of any protocol. - - - At present, only TCP - MSS modification is implemented. - +   System Tuning and Controls - The - vfs.root_mount_always_wait tunable has been - added, which forces the kernel to wait for root mount holds - even if the root device is already present. - - When the system real time clock - (RTC) is adjusted, such as by - clock_settime(), sleeping threads are now - awakened and absolute sleep times are reevaluated based on the - new value of the RTC. +   @@ -604,124 +260,19 @@ Device Drivers - The &man.jedec.ts.4; driver has been - added, providing support for thermal sensors on memory - modules. The driver currently supports chips that are fully - compliant with the JEDEC - JC 42.4 specification. - - The &man.chromebook.platform.4; driver - has been added, providing support for various Chromebook - models. - - The &man.bytgpio.4; driver has been - added, providing support for Intel® Bay Trail™ - SoC GPIO controllers. - - /dev/kmem no longer - supports access via mmap(). Consumers - wishing to use /dev/kmem must use - read() and - write(). - - &man.devctl.8; now supports a "clear - driver" command as a complement to "set - driver". +   Storage Drivers - The &man.mpr.4; driver has been updated - to support tri-mode - (SAS/SATA/PCIe) - Broadcom® storage adapters. +   Network Drivers - The &man.cxgbe.4; driver has been updated - to provide support for Virtual Function devices - (VFs) on Chelsio T4 and T5 adapters. - - TCP connections using the TCP Offload - Engine (TOE) on Chelsio T4+ adapters can - now perform zero-copy sends via - aio_write(). - - The &man.cxgbev.4; driver has been added, - providing support for Virtual Function devices - (VFs) on Chelsio T4 and T5 adapters. - - The &man.bnxt.4; driver has been added, - providing support for Broadcom® NetXtreme-C™ and - NetXtreme-E™ devices. - - The &man.cxgbe.4; driver now supports - devices using T6-based adapters which support 10, 25, 40, and - 100 Gbps. - - The &man.cxgbe.4; driver has been updated - to provide support for Virtual Function devices - (VFs) on Chelsio T6 adapters. - - The &man.cxgbev.4; driver has been updated - to provide support for Virtual Function devices - (VFs) on Chelsio T6 adapters. - - The &man.miibus.4; driver has been updated - to support Microchip/Micrel KSZ9031 Gigabit ethernet - cards. - - The &man.alc.4; driver has been updated - to provide support for Atheros® Killer E2400™ - Gigabit ethernet cards. - - The - &man.alc.4; driver has been updated to provide support for - Atheros® Killer E2500™ Gigabit ethernet - cards. - - The &man.etherswitch.4; driver has been - updated to support RTL8366RB and RTL8366SR cards. - - The - &man.if.ipsec.4; virtual tunneling interface has been added, - implementing route-based VPNs protected - with Encapsulating Security Payload - (ESP). - - The &man.qlnxe.4; driver has been added, - providing support for Cavium® Qlogic™ 45000 Series - adapters. - - The &man.qlxgbe.4; firmware has been - updated to version 5.4.64. - - The &man.ixl.4; driver has been updated - to version 1.7.12-k. - - The &man.cxgbe.4; driver has been updated - to firmware version 1.16.45.0 for T4, T5, and T6 cards. - - The &man.qlnxe.4; driver has been - updated to support QLE41XXX hardware. - - The &man.qlnxe.4; driver firmware has - been updated to version 8.30.0.0. +   @@ -736,56 +287,19 @@ Hardware Support - The &man.atkbdc.4; driver has been - updated to provide support for Elantech® trackpads. To - enable hardware support, add - hw.psm.elantech_support=1 to - &man.loader.conf.5;. +   Virtualization Support - PCI passthrough with - &man.bhyve.4; supports more dynamic configurations permitting - devices to be marked for passthrough or host use at - runtime. - - PCI passthrough with - &man.bhyve.4; resets functions via FLR when - a virtual machine is started and stopped. - - PCI passthrough support has - been enabled on &os; virtual machines running on - Microsoft® Hyper-V™. - - The - &man.hv.netvsc.4; driver SR-IOV - implementation has been updated to support Virtual Function - (VF) devices, such as the Mellanox® - Connect-X3™ network card. - - Support - for Microsoft® Hyper-V™ Generation 2 virtual - machines has been added. - - Support - for synthetic keyboards has been added for virtual machines - running on Microsoft® Hyper-V™. - - The &os; virtual machines provided on - Amazon® EC2™ now enable IPv6 by - default. +   ARM Support - Support for the Allwinner A13 board has - been added. +   @@ -804,29 +318,13 @@ Networked Storage - The NFS client now - properly handles NFS4ERR_BAD_SESSION errors - received from an NFS server. Additionally, - the kernel RPC client has been updated to - prevent creating new TCP connections when - ERESTART is received from - &man.sosend.9;. - - The NFS client now - supports the Amazon® Elastic File System™ - (EFS). +   ZFS - The - vfs.zfs.debug_flags &man.sysctl.8; has been - deprecated in favor of - vfs.zfs.debugflags. Additionally, - vfs.zfs.debugflags can now be configured in - &man.loader.conf.5;, whereas - vfs.zfs.debug_flags could not. +   @@ -845,14 +343,7 @@ Boot Loader Changes - The - UEFI boot loader has been updated for build - reproducibility. - - The - EFI loader has been updated to support - TFTPFS, providing netboot support without - requiring an NFS server. +   @@ -871,38 +362,13 @@ General Network Changes - The - network stack has been updated to include - ip6_tryforward(), providing performance - benefits as result of a reduced number of checks. - - The network stack has been modified to fix - incorrect or invalid IP addresses if - multiple threads emit a UDP - log_in_vain message concurrently. - - The TCP stack has - been changed to use the estimated RTT - instead of timestamps for receive buffer auto resizing. +   Network Protocols - Support for GARP - (gratuitous ARP) retransmit has been added. - A new &man.sysctl.8;, - net.link.ether.inet.garp_rexmit_count, has - been added, which sets the maximum number of retransmissions - when set to a non-zero value. - - Support for the - UDP_ENCAP_ESPINUDP_NON_IKE encapsulation - type has been removed. +   From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8EB3F9037F; Wed, 18 Apr 2018 14:42:47 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C6627D183; Wed, 18 Apr 2018 14:42:46 +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 6CB831C505; Wed, 18 Apr 2018 14:42:46 +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 w3IEgkKW013981; Wed, 18 Apr 2018 14:42:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgkiT013980; Wed, 18 Apr 2018 14:42:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgkiT013980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332680 - 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: 332680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:48 -0000 Author: gjb Date: Wed Apr 18 14:42:46 2018 New Revision: 332680 URL: https://svnweb.freebsd.org/changeset/base/332680 Log: Document r328140, df(1) '--si' alias to '-H'. 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 Wed Apr 18 14:42:45 2018 (r332679) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:46 2018 (r332680) @@ -165,6 +165,10 @@ Userland Application Changes + The &man.df.1; utility has been updated + to include the --si long option, which is + an alias to -H. + The &man.ps.1; utility has been updated to include a jail, which when used will list the name of a &man.jail.8; instead of the numeric From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21141F90361; Wed, 18 Apr 2018 14:42:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 015BA7D0D1; Wed, 18 Apr 2018 14:42:43 +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 96E3B1C502; Wed, 18 Apr 2018 14:42:43 +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 w3IEghxf013851; Wed, 18 Apr 2018 14:42:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEghCV013850; Wed, 18 Apr 2018 14:42:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEghCV013850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332677 - 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: 332677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:46 -0000 Author: gjb Date: Wed Apr 18 14:42:43 2018 New Revision: 332677 URL: https://svnweb.freebsd.org/changeset/base/332677 Log: Document r331246, bmake version 20180222. 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 Wed Apr 18 14:42:42 2018 (r332676) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:43 2018 (r332677) @@ -171,6 +171,9 @@ Contributed Software + The bmake + utility has been updated to upstream version 20180222. + The clang, llvm, lld, From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9D9AF90331; Wed, 18 Apr 2018 14:42: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F1777D09E; Wed, 18 Apr 2018 14:42: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 59FDD1C501; Wed, 18 Apr 2018 14:42: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 w3IEggQC013808; Wed, 18 Apr 2018 14:42:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEggHV013807; Wed, 18 Apr 2018 14:42:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEggHV013807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332676 - 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: 332676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:42 -0000 Author: gjb Date: Wed Apr 18 14:42:42 2018 New Revision: 332676 URL: https://svnweb.freebsd.org/changeset/base/332676 Log: Document r331838, clang, lld, lldb, llvm, etc. update to 6.0.0. 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 Wed Apr 18 14:42:41 2018 (r332675) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:42 2018 (r332676) @@ -171,7 +171,13 @@ Contributed Software -   + The clang, + llvm, + lld, + lldb, and + complier-rt utilities as well as + libc++ have been updated to upstream + version 6.0.0. From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ED7DF90389; Wed, 18 Apr 2018 14:42:48 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EDD67D185; Wed, 18 Apr 2018 14:42:47 +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 7A0FE1C506; Wed, 18 Apr 2018 14:42:47 +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 w3IEgl4T014025; Wed, 18 Apr 2018 14:42:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEglLZ014024; Wed, 18 Apr 2018 14:42:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEglLZ014024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42:47 +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: r332681 - 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: 332681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:48 -0000 Author: gjb Date: Wed Apr 18 14:42:47 2018 New Revision: 332681 URL: https://svnweb.freebsd.org/changeset/base/332681 Log: Document r324271, ps(1) capsicum capability mode state information. 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 Wed Apr 18 14:42:46 2018 (r332680) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:47 2018 (r332681) @@ -165,6 +165,10 @@ Userland Application Changes + The &man.ps.1; utility has been updated + to display if a process is running with &man.capsicum.4; + capability mode, indicated by C. + The &man.df.1; utility has been updated to include the --si long option, which is an alias to -H. From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01D5AF903CB; Wed, 18 Apr 2018 14:42:51 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36D667D201; Wed, 18 Apr 2018 14:42:49 +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 77ED41C507; Wed, 18 Apr 2018 14:42:48 +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 w3IEgmZO014069; Wed, 18 Apr 2018 14:42:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgm2p014068; Wed, 18 Apr 2018 14:42:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgm2p014068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332682 - 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: 332682 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:51 -0000 Author: gjb Date: Wed Apr 18 14:42:48 2018 New Revision: 332682 URL: https://svnweb.freebsd.org/changeset/base/332682 Log: Document r324270, ps(1) realtime and idle priorities in state flags. 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 Wed Apr 18 14:42:47 2018 (r332681) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:48 2018 (r332682) @@ -165,6 +165,9 @@ Userland Application Changes + The &man.ps.1; utility has been updated + to reflect realtime and idle priorities in state flags. + The &man.ps.1; utility has been updated to display if a process is running with &man.capsicum.4; capability mode, indicated by C. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52ADFF904BA; Wed, 18 Apr 2018 14:43:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 702847D2F8; Wed, 18 Apr 2018 14:42:54 +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 79E371C50D; Wed, 18 Apr 2018 14:42:54 +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 w3IEgsxq014328; Wed, 18 Apr 2018 14:42:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgsGn014327; Wed, 18 Apr 2018 14:42:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgsGn014327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332688 - 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: 332688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:05 -0000 Author: gjb Date: Wed Apr 18 14:42:54 2018 New Revision: 332688 URL: https://svnweb.freebsd.org/changeset/base/332688 Log: Document r331500, TIAO USB multi-protocol adapter support. 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 Wed Apr 18 14:42:53 2018 (r332687) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:54 2018 (r332688) @@ -324,7 +324,9 @@ Hardware Support -   + Support for the TAIO + USB multi-protocol adapter + (TUMPA) has been added. From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE437F9036E; Wed, 18 Apr 2018 14:42:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C46897D138; Wed, 18 Apr 2018 14:42:45 +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 94F811C503; Wed, 18 Apr 2018 14:42:44 +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 w3IEgihb013894; Wed, 18 Apr 2018 14:42:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgi0Q013893; Wed, 18 Apr 2018 14:42:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgi0Q013893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332678 - 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: 332678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:46 -0000 Author: gjb Date: Wed Apr 18 14:42:44 2018 New Revision: 332678 URL: https://svnweb.freebsd.org/changeset/base/332678 Log: Document r330570, less(1) v530. 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 Wed Apr 18 14:42:43 2018 (r332677) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:44 2018 (r332678) @@ -171,6 +171,9 @@ Contributed Software + The &man.less.1; utility has been + updated to upstream version v530. + The bmake utility has been updated to upstream version 20180222. From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E223AF90380; Wed, 18 Apr 2018 14:42:47 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD5ED7D17B; Wed, 18 Apr 2018 14:42:46 +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 7EC451C504; Wed, 18 Apr 2018 14:42:45 +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 w3IEgjlN013937; Wed, 18 Apr 2018 14:42:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgjjC013936; Wed, 18 Apr 2018 14:42:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgjjC013936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332679 - 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: 332679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:48 -0000 Author: gjb Date: Wed Apr 18 14:42:45 2018 New Revision: 332679 URL: https://svnweb.freebsd.org/changeset/base/332679 Log: Document r331471, ps(1) 'jail' keyword. 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 Wed Apr 18 14:42:44 2018 (r332678) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:45 2018 (r332679) @@ -165,7 +165,10 @@ Userland Application Changes -   + The &man.ps.1; utility has been updated + to include a jail, which when used will + list the name of a &man.jail.8; instead of the numeric + ID. From owner-svn-src-all@freebsd.org Wed Apr 18 14:42:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2533AF903E3; Wed, 18 Apr 2018 14:42: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 763517D23C; Wed, 18 Apr 2018 14:42:50 +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 8A9581C508; Wed, 18 Apr 2018 14:42:49 +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 w3IEgnOO014112; Wed, 18 Apr 2018 14:42:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgn1A014111; Wed, 18 Apr 2018 14:42:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgn1A014111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332683 - 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: 332683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:42:55 -0000 Author: gjb Date: Wed Apr 18 14:42:49 2018 New Revision: 332683 URL: https://svnweb.freebsd.org/changeset/base/332683 Log: Document r321092, ln(1) '-F' behavior fixed. 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 Wed Apr 18 14:42:48 2018 (r332682) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:49 2018 (r332683) @@ -165,6 +165,11 @@ Userland Application Changes + The &man.ln.1; utility has been updated + to correct the behavior of the -F flag by + unlinking an existing directory before creating a symbolic + link. + The &man.ps.1; utility has been updated to reflect realtime and idle priorities in state flags. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6252DF90462; Wed, 18 Apr 2018 14:43:01 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3D647D272; Wed, 18 Apr 2018 14:42:51 +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 78E1D1C50A; Wed, 18 Apr 2018 14:42:51 +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 w3IEgpbd014198; Wed, 18 Apr 2018 14:42:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgpBr014197; Wed, 18 Apr 2018 14:42:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgpBr014197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332685 - 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: 332685 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:01 -0000 Author: gjb Date: Wed Apr 18 14:42:51 2018 New Revision: 332685 URL: https://svnweb.freebsd.org/changeset/base/332685 Log: Document r323134, OpenSSH version 7.4p1. 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 Wed Apr 18 14:42:50 2018 (r332684) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:51 2018 (r332685) @@ -190,6 +190,9 @@ Contributed Software + OpenSSH has + been updated to version 7.4p1. + The &man.less.1; utility has been updated to upstream version v530. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C96BF904E8; Wed, 18 Apr 2018 14:43:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 642DC7D486; Wed, 18 Apr 2018 14:43:01 +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 9ACB11C514; Wed, 18 Apr 2018 14:43:01 +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 w3IEh1ln014635; Wed, 18 Apr 2018 14:43:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh1vX014634; Wed, 18 Apr 2018 14:43:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh1vX014634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332695 - 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: 332695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:06 -0000 Author: gjb Date: Wed Apr 18 14:43:01 2018 New Revision: 332695 URL: https://svnweb.freebsd.org/changeset/base/332695 Log: Document r330106, NTP 4.2.8p11. 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 Wed Apr 18 14:43:00 2018 (r332694) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:01 2018 (r332695) @@ -208,6 +208,9 @@ The &man.tcpdump.1; utility has been updated to version 4.9.2. + The NTP utilities + have been updated to version 4.2.8p11. + The &man.less.1; utility has been updated to upstream version v530. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1201BF904E7; Wed, 18 Apr 2018 14:43:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D698F7D472; Wed, 18 Apr 2018 14:43:02 +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 95A9A1C515; Wed, 18 Apr 2018 14:43:02 +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 w3IEh2XK014679; Wed, 18 Apr 2018 14:43:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh24u014678; Wed, 18 Apr 2018 14:43:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh24u014678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332696 - 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: 332696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:06 -0000 Author: gjb Date: Wed Apr 18 14:43:02 2018 New Revision: 332696 URL: https://svnweb.freebsd.org/changeset/base/332696 Log: Document r322172, libxo(3) 0.8.4. 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 Wed Apr 18 14:43:01 2018 (r332695) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:02 2018 (r332696) @@ -193,6 +193,9 @@ The &man.libarchive.3; library has been updated to version 3.3.2. + The &man.libxo.3; library has been + updated to version 0.8.4. + Subversion has been updated to version 1.9.7. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A09DF904BD; Wed, 18 Apr 2018 14:43:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BE777D230; Wed, 18 Apr 2018 14:42:50 +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 764E61C509; Wed, 18 Apr 2018 14:42:50 +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 w3IEgoSu014155; Wed, 18 Apr 2018 14:42:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgouE014154; Wed, 18 Apr 2018 14:42:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgouE014154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332684 - 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: 332684 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:05 -0000 Author: gjb Date: Wed Apr 18 14:42:50 2018 New Revision: 332684 URL: https://svnweb.freebsd.org/changeset/base/332684 Log: Document r331638, OpenSSL 1.0.2o. 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 Wed Apr 18 14:42:49 2018 (r332683) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:50 2018 (r332684) @@ -196,6 +196,9 @@ The bmake utility has been updated to upstream version 20180222. + OpenSSL has + been updated to version 1.0.2o. + The clang, llvm, lld, From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4ECAF90526; Wed, 18 Apr 2018 14:43:07 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A2F67D4FB; Wed, 18 Apr 2018 14:43:06 +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 A19B51C517; Wed, 18 Apr 2018 14:43:04 +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 w3IEh4Bi014767; Wed, 18 Apr 2018 14:43:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh415014766; Wed, 18 Apr 2018 14:43:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh415014766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332698 - 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: 332698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:08 -0000 Author: gjb Date: Wed Apr 18 14:43:04 2018 New Revision: 332698 URL: https://svnweb.freebsd.org/changeset/base/332698 Log: Document r325003, diskinfo(8) rotation rate and TRIM/UNMAP support displayed. 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 Wed Apr 18 14:43:03 2018 (r332697) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:04 2018 (r332698) @@ -177,6 +177,12 @@ to display if a process is running with &man.capsicum.4; capability mode, indicated by C. + The &man.diskinfo.8; utility has been + updated to display disk rotation rate and if + TRIM/UNMAP is supported + by the disk. + The &man.df.1; utility has been updated to include the --si long option, which is an alias to -H. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63AA0F90475; Wed, 18 Apr 2018 14:43:02 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E56557D2A0; Wed, 18 Apr 2018 14:42:53 +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 802201C50C; Wed, 18 Apr 2018 14:42:53 +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 w3IEgr1P014284; Wed, 18 Apr 2018 14:42:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgrua014283; Wed, 18 Apr 2018 14:42:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgrua014283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332687 - 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: 332687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:02 -0000 Author: gjb Date: Wed Apr 18 14:42:53 2018 New Revision: 332687 URL: https://svnweb.freebsd.org/changeset/base/332687 Log: Document r326892, Amazon EC2 instances now use Amazon Time Sync Service, NTP service internal to the EC2 infrastructure. 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 Wed Apr 18 14:42:52 2018 (r332686) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:53 2018 (r332687) @@ -457,7 +457,10 @@ Integration Changes -   + Amazon® EC2™ instances now + keep their clocks synchronized using the Amazon Time Sync + Service, the NTP service internal to the + EC2™ infrastructure. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52C13F904BB; Wed, 18 Apr 2018 14:43:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C6907D349; Wed, 18 Apr 2018 14:42:56 +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 8F34C1C50F; Wed, 18 Apr 2018 14:42:56 +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 w3IEguwV014416; Wed, 18 Apr 2018 14:42:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEguhc014415; Wed, 18 Apr 2018 14:42:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEguhc014415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332690 - 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: 332690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:05 -0000 Author: gjb Date: Wed Apr 18 14:42:56 2018 New Revision: 332690 URL: https://svnweb.freebsd.org/changeset/base/332690 Log: Document r327234, tcpdump(1) 4.9.2. 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 Wed Apr 18 14:42:55 2018 (r332689) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:56 2018 (r332690) @@ -193,6 +193,9 @@ OpenSSH has been updated to version 7.5p1. + The &man.tcpdump.1; utility has been + updated to version 4.9.2. + The &man.less.1; utility has been updated to upstream version v530. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C545F90696; Wed, 18 Apr 2018 14:43:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 032B37D5EE; Wed, 18 Apr 2018 14:43:11 +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 0A6401C51D; Wed, 18 Apr 2018 14:43:11 +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 w3IEhA0v015027; Wed, 18 Apr 2018 14:43:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhAEm015026; Wed, 18 Apr 2018 14:43:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhAEm015026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332704 - 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: 332704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:22 -0000 Author: gjb Date: Wed Apr 18 14:43:10 2018 New Revision: 332704 URL: https://svnweb.freebsd.org/changeset/base/332704 Log: Document r321262, newsyslog(8) RFC5424-compliant log rotation messages. 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 Wed Apr 18 14:43:09 2018 (r332703) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:10 2018 (r332704) @@ -170,6 +170,10 @@ unlinking an existing directory before creating a symbolic link. + The &man.newsyslog.8; utility has been + updated to support RFC5424-compliant + messages when rotating system logs. + The &man.diskinfo.8; utility has been updated to include two new flags, -s which displays the disk identity (usually the serial number), and From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A5A8F904BE; Wed, 18 Apr 2018 14:43:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA5547D37B; Wed, 18 Apr 2018 14:42:57 +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 8D9A61C510; Wed, 18 Apr 2018 14:42:57 +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 w3IEgvsM014459; Wed, 18 Apr 2018 14:42:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgvF1014458; Wed, 18 Apr 2018 14:42:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgvF1014458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332691 - 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: 332691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:05 -0000 Author: gjb Date: Wed Apr 18 14:42:57 2018 New Revision: 332691 URL: https://svnweb.freebsd.org/changeset/base/332691 Log: Document r322442, subversion 1.9.7. 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 Wed Apr 18 14:42:56 2018 (r332690) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:57 2018 (r332691) @@ -190,6 +190,9 @@ Contributed Software + Subversion + has been updated to version 1.9.7. + OpenSSH has been updated to version 7.5p1. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34CE0F9065B; Wed, 18 Apr 2018 14:43:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 863DA7D526; Wed, 18 Apr 2018 14:43:07 +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 9DDD11C518; Wed, 18 Apr 2018 14:43:05 +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 w3IEh5sV014810; Wed, 18 Apr 2018 14:43:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh5lH014809; Wed, 18 Apr 2018 14:43:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh5lH014809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:05 +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: r332699 - 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: 332699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:20 -0000 Author: gjb Date: Wed Apr 18 14:43:05 2018 New Revision: 332699 URL: https://svnweb.freebsd.org/changeset/base/332699 Log: Document r321927, diskinfo(8) '-s' and '-p' flag additions. 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 Wed Apr 18 14:43:04 2018 (r332698) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:05 2018 (r332699) @@ -170,6 +170,14 @@ unlinking an existing directory before creating a symbolic link. + The &man.diskinfo.8; utility has been + updated to include two new flags, -s which + displays the disk identity (usually the serial number), and + -p which displays the physical path to the + disk in a storage controller. The -s and + -p flags are mutually exclusive, and cannot + be used with any other flags. + The &man.ps.1; utility has been updated to reflect realtime and idle priorities in state flags. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFD23F906C4; Wed, 18 Apr 2018 14:43:23 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1241C7D5FD; Wed, 18 Apr 2018 14:43: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 E1D281C51E; Wed, 18 Apr 2018 14:43:11 +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 w3IEhBh8015070; Wed, 18 Apr 2018 14:43:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhBdM015069; Wed, 18 Apr 2018 14:43:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhBdM015069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:11 +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: r332705 - 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: 332705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:24 -0000 Author: gjb Date: Wed Apr 18 14:43:11 2018 New Revision: 332705 URL: https://svnweb.freebsd.org/changeset/base/332705 Log: Document r322919, pw(8) 'usermod' update to handle empty secondary group lists (-G ''). 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 Wed Apr 18 14:43:10 2018 (r332704) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:11 2018 (r332705) @@ -186,6 +186,11 @@ been updated to include device model when the -s flag is used. + The &man.pw.8; utility has been updated + to properly handle empty secondary group lists as an argument + to the -G flag when using the + usermod subcommand. + The &man.ps.1; utility has been updated to reflect realtime and idle priorities in state flags. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2C59F904CF; Wed, 18 Apr 2018 14:43:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 293227D426; Wed, 18 Apr 2018 14:43:00 +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 9AEC71C513; Wed, 18 Apr 2018 14:43:00 +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 w3IEh0Bv014592; Wed, 18 Apr 2018 14:43:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh0ml014591; Wed, 18 Apr 2018 14:43:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh0ml014591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332694 - 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: 332694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:06 -0000 Author: gjb Date: Wed Apr 18 14:43:00 2018 New Revision: 332694 URL: https://svnweb.freebsd.org/changeset/base/332694 Log: Document r324581, mandoc(1) 1.14.3. 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 Wed Apr 18 14:42:59 2018 (r332693) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:00 2018 (r332694) @@ -202,6 +202,9 @@ OpenSSH has been updated to version 7.5p1. + The &man.mandoc.1; utility has been + updated to version 1.14.3. + The &man.tcpdump.1; utility has been updated to version 4.9.2. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 593F9F90474; Wed, 18 Apr 2018 14:43:02 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D266F7D299; Wed, 18 Apr 2018 14:42:52 +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 9CA9A1C50B; Wed, 18 Apr 2018 14:42:52 +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 w3IEgqC0014241; Wed, 18 Apr 2018 14:42:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgqrl014240; Wed, 18 Apr 2018 14:42:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgqrl014240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332686 - 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: 332686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:02 -0000 Author: gjb Date: Wed Apr 18 14:42:52 2018 New Revision: 332686 URL: https://svnweb.freebsd.org/changeset/base/332686 Log: Document r323136 which I overlooked, OpenSSH 7.5p1. 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 Wed Apr 18 14:42:51 2018 (r332685) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:52 2018 (r332686) @@ -190,8 +190,8 @@ Contributed Software - OpenSSH has - been updated to version 7.4p1. + OpenSSH has + been updated to version 7.5p1. The &man.less.1; utility has been updated to upstream version v530. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF086F904CE; Wed, 18 Apr 2018 14:43:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E1647D3C3; Wed, 18 Apr 2018 14:42:59 +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 AD5901C512; Wed, 18 Apr 2018 14:42:59 +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 w3IEgx4x014545; Wed, 18 Apr 2018 14:42:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgxH2014544; Wed, 18 Apr 2018 14:42:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgxH2014544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332693 - 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: 332693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:06 -0000 Author: gjb Date: Wed Apr 18 14:42:59 2018 New Revision: 332693 URL: https://svnweb.freebsd.org/changeset/base/332693 Log: Document r321303, libarchive(3) 3.3.2. 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 Wed Apr 18 14:42:58 2018 (r332692) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:59 2018 (r332693) @@ -190,6 +190,9 @@ Contributed Software + The &man.libarchive.3; library has been + updated to version 3.3.2. + Subversion has been updated to version 1.9.7. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32AECF9065A; Wed, 18 Apr 2018 14:43:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E0A07D523; Wed, 18 Apr 2018 14:43:07 +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 A3C781C516; Wed, 18 Apr 2018 14:43:03 +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 w3IEh3nf014723; Wed, 18 Apr 2018 14:43:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh3FT014722; Wed, 18 Apr 2018 14:43:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh3FT014722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:03 +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: r332697 - 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: 332697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:20 -0000 Author: gjb Date: Wed Apr 18 14:43:03 2018 New Revision: 332697 URL: https://svnweb.freebsd.org/changeset/base/332697 Log: Document r329114, GELI passphrase length no longer visible during boot by default. 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 Wed Apr 18 14:43:02 2018 (r332696) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:03 2018 (r332697) @@ -406,7 +406,10 @@ Boot Loader Changes -   + The length of GELI + passphrases entered when booting a system with encrypted disks + is now hidden by default. See the configuration options in + &man.geli.8; to restore the previous behavior. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B7ECF9066C; Wed, 18 Apr 2018 14:43:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B797A7D55C; Wed, 18 Apr 2018 14:43:08 +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 C2FEA1C519; Wed, 18 Apr 2018 14:43:06 +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 w3IEh6T6014853; Wed, 18 Apr 2018 14:43:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh6wt014852; Wed, 18 Apr 2018 14:43:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh6wt014852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332700 - 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: 332700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:20 -0000 Author: gjb Date: Wed Apr 18 14:43:06 2018 New Revision: 332700 URL: https://svnweb.freebsd.org/changeset/base/332700 Log: Document r321929, diskinfo(8) '-s' also includes the device model. 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 Wed Apr 18 14:43:05 2018 (r332699) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:06 2018 (r332700) @@ -178,6 +178,10 @@ -p flags are mutually exclusive, and cannot be used with any other flags. + The &man.diskinfo.8; utility has also + been updated to include device model when the + -s flag is used. + The &man.ps.1; utility has been updated to reflect realtime and idle priorities in state flags. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32CACF9068A; Wed, 18 Apr 2018 14:43:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC2B57D61F; Wed, 18 Apr 2018 14:43:13 +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 DE5941C51F; Wed, 18 Apr 2018 14:43: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 w3IEhCdO015115; Wed, 18 Apr 2018 14:43:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhCjC015114; Wed, 18 Apr 2018 14:43:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhCjC015114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332706 - 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: 332706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:22 -0000 Author: gjb Date: Wed Apr 18 14:43:12 2018 New Revision: 332706 URL: https://svnweb.freebsd.org/changeset/base/332706 Log: Document r326848, pw(8) expiration handling fix. 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 Wed Apr 18 14:43:11 2018 (r332705) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:12 2018 (r332706) @@ -204,6 +204,9 @@ TRIM/UNMAP is supported by the disk. + The &man.pw.8; utility has been updated + to correct handling of account expiration periods. + The &man.df.1; utility has been updated to include the --si long option, which is an alias to -H. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33A80F906EC; Wed, 18 Apr 2018 14:43:25 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B4A77D65A; Wed, 18 Apr 2018 14:43:14 +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 0F78F1C520; Wed, 18 Apr 2018 14:43:14 +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 w3IEhDD1015158; Wed, 18 Apr 2018 14:43:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhDTw015157; Wed, 18 Apr 2018 14:43:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhDTw015157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332707 - 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: 332707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:25 -0000 Author: gjb Date: Wed Apr 18 14:43:13 2018 New Revision: 332707 URL: https://svnweb.freebsd.org/changeset/base/332707 Log: Document r330694, "@" and "!" now allowed in GECOS fields. 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 Wed Apr 18 14:43:12 2018 (r332706) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:13 2018 (r332707) @@ -211,6 +211,11 @@ to include the --si long option, which is an alias to -H. + The &man.pw.8; utility has been updated to + allow the @ and ! + characters in the GECOS field. + The &man.ps.1; utility has been updated to include a jail, which when used will list the name of a &man.jail.8; instead of the numeric From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED2A2F90676; Wed, 18 Apr 2018 14:43:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE8F97D58C; Wed, 18 Apr 2018 14:43:09 +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 A6A3B1C51B; Wed, 18 Apr 2018 14:43:08 +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 w3IEh85o014939; Wed, 18 Apr 2018 14:43:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh8L9014938; Wed, 18 Apr 2018 14:43:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh8L9014938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332702 - 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: 332702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:21 -0000 Author: gjb Date: Wed Apr 18 14:43:08 2018 New Revision: 332702 URL: https://svnweb.freebsd.org/changeset/base/332702 Log: Fix the revision efibootmgr(8) was merged to stable/11. 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 Wed Apr 18 14:43:07 2018 (r332701) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:08 2018 (r332702) @@ -195,11 +195,6 @@ TRIM/UNMAP is supported by the disk. - The &man.efibootmgr.8; utility has been - added, which is used to manipulate the EFI - boot manager. - The &man.df.1; utility has been updated to include the --si long option, which is an alias to -H. @@ -208,6 +203,11 @@ to include a jail, which when used will list the name of a &man.jail.8; instead of the numeric ID. + + The &man.efibootmgr.8; utility has been + added, which is used to manipulate the EFI + boot manager. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 571E7F904BC; Wed, 18 Apr 2018 14:43:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 239D37D31A; Wed, 18 Apr 2018 14:42: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 7A1001C50E; Wed, 18 Apr 2018 14:42: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 w3IEgtib014372; Wed, 18 Apr 2018 14:42:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgts1014371; Wed, 18 Apr 2018 14:42:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgts1014371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332689 - 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: 332689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:05 -0000 Author: gjb Date: Wed Apr 18 14:42:55 2018 New Revision: 332689 URL: https://svnweb.freebsd.org/changeset/base/332689 Log: Document r331662, tzdata version 2018d. 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 Wed Apr 18 14:42:54 2018 (r332688) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:55 2018 (r332689) @@ -202,6 +202,9 @@ OpenSSL has been updated to version 1.0.2o. + Timezone data files have been updated to + version 2018d. + The clang, llvm, lld, From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8443EF9075F; Wed, 18 Apr 2018 14:43:28 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B843B7D69C; Wed, 18 Apr 2018 14:43: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 F02F21C521; Wed, 18 Apr 2018 14:43:14 +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 w3IEhEgn015201; Wed, 18 Apr 2018 14:43:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhEkr015200; Wed, 18 Apr 2018 14:43:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhEkr015200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332708 - 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: 332708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:28 -0000 Author: gjb Date: Wed Apr 18 14:43:14 2018 New Revision: 332708 URL: https://svnweb.freebsd.org/changeset/base/332708 Log: Document r321287, sesutil(8) libxo(3) support. 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 Wed Apr 18 14:43:13 2018 (r332707) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:14 2018 (r332708) @@ -174,6 +174,10 @@ updated to support RFC5424-compliant messages when rotating system logs. + The + &man.sesutil.8; utility has been updated to include + &man.libxo.3; support in output. + The &man.diskinfo.8; utility has been updated to include two new flags, -s which displays the disk identity (usually the serial number), and From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9BA1F907B6; Wed, 18 Apr 2018 14:43:31 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 226C47D72A; Wed, 18 Apr 2018 14:43:19 +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 E7F071C525; Wed, 18 Apr 2018 14:43:18 +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 w3IEhIRV015374; Wed, 18 Apr 2018 14:43:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhIoF015373; Wed, 18 Apr 2018 14:43:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhIoF015373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332712 - 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: 332712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:31 -0000 Author: gjb Date: Wed Apr 18 14:43:18 2018 New Revision: 332712 URL: https://svnweb.freebsd.org/changeset/base/332712 Log: Document r324380, cpucontrol(8) '-n' flag addition. 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 Wed Apr 18 14:43:17 2018 (r332711) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:18 2018 (r332712) @@ -207,6 +207,11 @@ to display if a process is running with &man.capsicum.4; capability mode, indicated by C. + The &man.cpucontrol.8; utility has been + updated to include a new flag, -n, that + disables the default microcode update search path when + used. + The &man.diskinfo.8; utility has been updated to display disk rotation rate and if From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44737F907EE; Wed, 18 Apr 2018 14:43:33 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DEC97D766; Wed, 18 Apr 2018 14:43:22 +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 1AA921C528; Wed, 18 Apr 2018 14:43:22 +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 w3IEhLgJ015505; Wed, 18 Apr 2018 14:43:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhLCC015504; Wed, 18 Apr 2018 14:43:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhLCC015504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332715 - 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: 332715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:33 -0000 Author: gjb Date: Wed Apr 18 14:43:21 2018 New Revision: 332715 URL: https://svnweb.freebsd.org/changeset/base/332715 Log: Document r328599, service(8) '-j' flag addition. 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 Wed Apr 18 14:43:20 2018 (r332714) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:21 2018 (r332715) @@ -238,6 +238,12 @@ to include the --si long option, which is an alias to -H. + The &man.service.8; utility has been + updated to include a new flag, -j, which is + used to interact with services running within a &man.jail.8;. + The argument to -j can be either the name + or numeric jail ID. + The &man.pw.8; utility has been updated to allow the @ and ! From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FD80F90850; Wed, 18 Apr 2018 14:43:36 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91E1B7D79B; Wed, 18 Apr 2018 14:43:23 +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 097C31C529; Wed, 18 Apr 2018 14:43:23 +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 w3IEhMxJ015548; Wed, 18 Apr 2018 14:43:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhMgG015547; Wed, 18 Apr 2018 14:43:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhMgG015547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332716 - 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: 332716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:36 -0000 Author: gjb Date: Wed Apr 18 14:43:22 2018 New Revision: 332716 URL: https://svnweb.freebsd.org/changeset/base/332716 Log: Document r326778, camcontrol(8) ZAC device type output. 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 Wed Apr 18 14:43:21 2018 (r332715) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:22 2018 (r332716) @@ -218,6 +218,12 @@ TRIM/UNMAP is supported by the disk. + The &man.camcontrol.8; utility has + been updated to include ZAC (Zoned-device + ATA command set) information when the + identify subcommand is used. + The &man.pw.8; utility has been updated to correct handling of account expiration periods. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F616F90970; Wed, 18 Apr 2018 14:43:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B91FF7D91F; Wed, 18 Apr 2018 14:43: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 196B51C530; Wed, 18 Apr 2018 14:43:30 +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 w3IEhTt6015852; Wed, 18 Apr 2018 14:43:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhTJk015851; Wed, 18 Apr 2018 14:43:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhTJk015851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332723 - 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: 332723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:46 -0000 Author: gjb Date: Wed Apr 18 14:43:29 2018 New Revision: 332723 URL: https://svnweb.freebsd.org/changeset/base/332723 Log: Document r322910, umount(8) '-N' flag addition. 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 Wed Apr 18 14:43:28 2018 (r332722) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:29 2018 (r332723) @@ -195,6 +195,11 @@ been updated to include device model when the -s flag is used. + The &man.umount.8; utility has been + updated to include a new flag, -N, which + is used to forcefully unmount an NFS + mounted filesystem. + The &man.pw.8; utility has been updated to properly handle empty secondary group lists as an argument to the -G flag when using the From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16C74F909E8; Wed, 18 Apr 2018 14:43:51 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5785B7D991; Wed, 18 Apr 2018 14:43:33 +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 2458E1C533; Wed, 18 Apr 2018 14:43:33 +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 w3IEhWgu015981; Wed, 18 Apr 2018 14:43:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhWpN015980; Wed, 18 Apr 2018 14:43:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhWpN015980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332726 - 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: 332726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:51 -0000 Author: gjb Date: Wed Apr 18 14:43:32 2018 New Revision: 332726 URL: https://svnweb.freebsd.org/changeset/base/332726 Log: Document r328716, new nvmecontrol(8) WDC-specific control options. 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 Wed Apr 18 14:43:31 2018 (r332725) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:32 2018 (r332726) @@ -278,6 +278,13 @@ SMART data, instead of the hexidecimal value. + The &man.nvmecontrol.8; utility has been + updated to include control options for Western Digital® + HGST drives. The new options are cap-diag, + get-crash-dump, + drive-log, purge, and + purge-monitor. + The &man.dhclient.8; utility has been updated to be more compliant with RFC2131 From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 697B4F90794; Wed, 18 Apr 2018 14:43: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89FAC7D6BB; Wed, 18 Apr 2018 14:43:16 +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 21A271C522; Wed, 18 Apr 2018 14:43:16 +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 w3IEhFN1015244; Wed, 18 Apr 2018 14:43:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhFGv015243; Wed, 18 Apr 2018 14:43:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhFGv015243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14: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: r332709 - 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: 332709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:30 -0000 Author: gjb Date: Wed Apr 18 14:43:15 2018 New Revision: 332709 URL: https://svnweb.freebsd.org/changeset/base/332709 Log: Document r321241, crontab(1) '-f' flag added. 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 Wed Apr 18 14:43:14 2018 (r332708) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:15 2018 (r332709) @@ -170,6 +170,11 @@ unlinking an existing directory before creating a symbolic link. + The &man.crontab.1; utility has been + updated to include a new flag, -f, which + forces &man.crontab.5; removal when -r is + used non-interactively. + The &man.newsyslog.8; utility has been updated to support RFC5424-compliant messages when rotating system logs. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7FD9F90895; Wed, 18 Apr 2018 14:43:40 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 706607D7F9; Wed, 18 Apr 2018 14:43:24 +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 036EE1C52A; Wed, 18 Apr 2018 14:43:24 +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 w3IEhNBU015591; Wed, 18 Apr 2018 14:43:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhNb3015590; Wed, 18 Apr 2018 14:43:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhNb3015590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332717 - 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: 332717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:41 -0000 Author: gjb Date: Wed Apr 18 14:43:23 2018 New Revision: 332717 URL: https://svnweb.freebsd.org/changeset/base/332717 Log: Document r330692, dhclient(8) RFC2131 compliance fix. 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 Wed Apr 18 14:43:22 2018 (r332716) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:23 2018 (r332717) @@ -250,6 +250,15 @@ The argument to -j can be either the name or numeric jail ID. + The &man.dhclient.8; utility has been + updated to be more compliant with RFC2131 + by setting the source address field in the + IP header to 0 when + sending a DHCPREQUEST message to attempt to + obtain a previously-assigned IP + address. + The &man.pw.8; utility has been updated to allow the @ and ! From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90111F90930; Wed, 18 Apr 2018 14:43:44 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DFEA7D8BA; Wed, 18 Apr 2018 14:43:28 +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 143BE1C52E; Wed, 18 Apr 2018 14:43: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 w3IEhRS7015764; Wed, 18 Apr 2018 14:43:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhRiM015763; Wed, 18 Apr 2018 14:43:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhRiM015763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332721 - 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: 332721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:44 -0000 Author: gjb Date: Wed Apr 18 14:43:27 2018 New Revision: 332721 URL: https://svnweb.freebsd.org/changeset/base/332721 Log: Document r327592, mdmfs(8) tmpfs(5) support. 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 Wed Apr 18 14:43:26 2018 (r332720) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:27 2018 (r332721) @@ -232,6 +232,9 @@ The &man.pw.8; utility has been updated to correct handling of account expiration periods. + The &man.mdmfs.8; utility has been + updated to support &man.tmpfs.5;. + The &man.cpucontrol.8; utility has been updated to include a new flag, -e, which is used to re-evaluate reported CPU features From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99B25F9066B; Wed, 18 Apr 2018 14:43:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F19D7D570; Wed, 18 Apr 2018 14:43:08 +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 B1CD81C51A; Wed, 18 Apr 2018 14:43:07 +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 w3IEh7Eg014896; Wed, 18 Apr 2018 14:43:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh7SF014895; Wed, 18 Apr 2018 14:43:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh7SF014895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332701 - 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: 332701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:20 -0000 Author: gjb Date: Wed Apr 18 14:43:07 2018 New Revision: 332701 URL: https://svnweb.freebsd.org/changeset/base/332701 Log: Document r326725, efibootmgr(8) addition. 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 Wed Apr 18 14:43:06 2018 (r332700) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:07 2018 (r332701) @@ -195,6 +195,11 @@ TRIM/UNMAP is supported by the disk. + The &man.efibootmgr.8; utility has been + added, which is used to manipulate the EFI + boot manager. + The &man.df.1; utility has been updated to include the --si long option, which is an alias to -H. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C058FF907B7; Wed, 18 Apr 2018 14:43:31 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B3517D6ED; Wed, 18 Apr 2018 14:43:17 +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 EBFD11C523; Wed, 18 Apr 2018 14:43:16 +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 w3IEhGkG015287; Wed, 18 Apr 2018 14:43:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhGUc015286; Wed, 18 Apr 2018 14:43:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhGUc015286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332710 - 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: 332710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:32 -0000 Author: gjb Date: Wed Apr 18 14:43:16 2018 New Revision: 332710 URL: https://svnweb.freebsd.org/changeset/base/332710 Log: Document r321413, bhyve virtio_console(4) support. 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 Wed Apr 18 14:43:15 2018 (r332709) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:16 2018 (r332710) @@ -413,7 +413,8 @@ Virtualization Support -   + Support for &man.virtio.console.4; has + been added to &man.bhyve.4;. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 456C9F90943; Wed, 18 Apr 2018 14:43:45 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA92A7D8F3; Wed, 18 Apr 2018 14:43:29 +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 673C41C52F; Wed, 18 Apr 2018 14:43:29 +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 w3IEhSdQ015808; Wed, 18 Apr 2018 14:43:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhSL7015807; Wed, 18 Apr 2018 14:43:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhSL7015807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332722 - 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: 332722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:45 -0000 Author: gjb Date: Wed Apr 18 14:43:28 2018 New Revision: 332722 URL: https://svnweb.freebsd.org/changeset/base/332722 Log: Document r326413, pfctl(8) route-to properly handles interfaces with multiple IP addresses. 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 Wed Apr 18 14:43:27 2018 (r332721) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:28 2018 (r332722) @@ -223,6 +223,11 @@ TRIM/UNMAP is supported by the disk. + The &man.pfctl.8; utility has been + updated to allow route-to to properly + handle network interfaces with multiple IP + addresses. + The &man.camcontrol.8; utility has been updated to include ZAC (Zoned-device From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7A1AF904D6; Wed, 18 Apr 2018 14:43:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A66B47D3D8; Wed, 18 Apr 2018 14:42:58 +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 8E1B31C511; Wed, 18 Apr 2018 14:42:58 +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 w3IEgwD7014502; Wed, 18 Apr 2018 14:42:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEgws5014501; Wed, 18 Apr 2018 14:42:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181442.w3IEgws5014501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:42: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: r332692 - 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: 332692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:06 -0000 Author: gjb Date: Wed Apr 18 14:42:58 2018 New Revision: 332692 URL: https://svnweb.freebsd.org/changeset/base/332692 Log: Document r328874, file(1) 5.32. 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 Wed Apr 18 14:42:57 2018 (r332691) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:42:58 2018 (r332692) @@ -193,6 +193,9 @@ Subversion has been updated to version 1.9.7. + The &man.file.1; utility has been + updated to version 5.32. + OpenSSH has been updated to version 7.5p1. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC8BCF9067A; Wed, 18 Apr 2018 14:43:21 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F5B77D5BB; Wed, 18 Apr 2018 14:43:10 +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 DC1A01C51C; Wed, 18 Apr 2018 14:43:09 +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 w3IEh9KR014983; Wed, 18 Apr 2018 14:43:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEh9YN014981; Wed, 18 Apr 2018 14:43:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEh9YN014981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332703 - 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: 332703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:21 -0000 Author: gjb Date: Wed Apr 18 14:43:09 2018 New Revision: 332703 URL: https://svnweb.freebsd.org/changeset/base/332703 Log: Document r331586, mlx5io(4) and mlx5tool(8) additions. 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 Wed Apr 18 14:43:08 2018 (r332702) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:09 2018 (r332703) @@ -204,6 +204,11 @@ list the name of a &man.jail.8; instead of the numeric ID. + The &man.mlx5tool.8; utility has been + added, which is used to manage Connect-X 4 and + Connect-X 5 devices supported by &man.mlx5io.4;. + The &man.efibootmgr.8; utility has been added, which is used to manipulate the EFI @@ -344,7 +349,10 @@ Device Drivers -   + The &man.mlx5io.4; driver has been added, + providing an interface to manage supported Connect-X 4 + and Connect-X 5 network adapters. Modified: stable/11/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/11/release/doc/share/xml/sponsor.ent Wed Apr 18 14:43:08 2018 (r332702) +++ stable/11/release/doc/share/xml/sponsor.ent Wed Apr 18 14:43:09 2018 (r332703) @@ -40,6 +40,7 @@ + From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5770F907BD; Wed, 18 Apr 2018 14:43:31 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7DB77D71F; Wed, 18 Apr 2018 14:43:18 +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 EA2011C524; Wed, 18 Apr 2018 14:43:17 +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 w3IEhHnD015330; Wed, 18 Apr 2018 14:43:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhHT5015329; Wed, 18 Apr 2018 14:43:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhHT5015329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332711 - 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: 332711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:32 -0000 Author: gjb Date: Wed Apr 18 14:43:17 2018 New Revision: 332711 URL: https://svnweb.freebsd.org/changeset/base/332711 Log: Document r322254, bsdinstall(8) UEFI-only boot on arm64. 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 Wed Apr 18 14:43:16 2018 (r332710) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:17 2018 (r332711) @@ -292,7 +292,10 @@ Installation and Configuration Tools -   + The &man.bsdinstall.8; installer has been + updated to default to UEFI-only + boot. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D4F7F907C9; Wed, 18 Apr 2018 14:43:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB9997D72D; Wed, 18 Apr 2018 14:43:19 +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 E30051C526; Wed, 18 Apr 2018 14:43:19 +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 w3IEhJLe015417; Wed, 18 Apr 2018 14:43:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhJZT015416; Wed, 18 Apr 2018 14:43:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhJZT015416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332713 - 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: 332713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:32 -0000 Author: gjb Date: Wed Apr 18 14:43:19 2018 New Revision: 332713 URL: https://svnweb.freebsd.org/changeset/base/332713 Log: Document r327871, cpucontrol(8) CPU feature re-evaluation ('-e'). 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 Wed Apr 18 14:43:18 2018 (r332712) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:19 2018 (r332713) @@ -221,6 +221,19 @@ The &man.pw.8; utility has been updated to correct handling of account expiration periods. + The &man.cpucontrol.8; utility has been + updated to include a new flag, -e, which is + used to re-evaluate reported CPU features + after applying firmware updates. + + + The &man.cpucontrol.8; -e flag should + only be used after microcode update have been applied to all + CPUs in the system, otherwise system + instability may be experienced if processor features are not + identical across the system. + + The &man.df.1; utility has been updated to include the --si long option, which is an alias to -H. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC2DFF907E4; Wed, 18 Apr 2018 14:43:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB8D37D74D; Wed, 18 Apr 2018 14:43:20 +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 E68101C527; Wed, 18 Apr 2018 14:43:20 +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 w3IEhKDc015462; Wed, 18 Apr 2018 14:43:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhKDo015461; Wed, 18 Apr 2018 14:43:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhKDo015461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332714 - 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: 332714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:32 -0000 Author: gjb Date: Wed Apr 18 14:43:20 2018 New Revision: 332714 URL: https://svnweb.freebsd.org/changeset/base/332714 Log: Document r330307, cxgbe(4) firmware version 1.16.63.0. 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 Wed Apr 18 14:43:19 2018 (r332713) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:20 2018 (r332714) @@ -400,6 +400,11 @@ sponsor="&mellanox;">The &man.mlx5io.4; driver has been added, providing an interface to manage supported Connect-X 4 and Connect-X 5 network adapters. + + The &man.cxgbe.4; driver has been updated + to firmware version 1.16.63.0 for T4, T5, and T6 network + adapters. From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9006F90982; Wed, 18 Apr 2018 14:43:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9F4B7D932; Wed, 18 Apr 2018 14:43:31 +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 1D0B01C531; Wed, 18 Apr 2018 14:43:31 +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 w3IEhUIw015895; Wed, 18 Apr 2018 14:43:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhUJL015894; Wed, 18 Apr 2018 14:43:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhUJL015894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332724 - 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: 332724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:47 -0000 Author: gjb Date: Wed Apr 18 14:43:30 2018 New Revision: 332724 URL: https://svnweb.freebsd.org/changeset/base/332724 Log: Document r331603, sysctl(8) support for setting multiple values to a multi-value node. 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 Wed Apr 18 14:43:29 2018 (r332723) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:30 2018 (r332724) @@ -297,6 +297,12 @@ added, which is used to manage Connect-X 4 and Connect-X 5 devices supported by &man.mlx5io.4;. + The &man.sysctl.8; utility has been + updated to support setting an array of values to nodes. Prior + to this change, &man.sysctl.8; could only set one value to + a node that may return multiple values when queried. + The &man.ifconfig.8; utility has been updated to include a random option, which when used with the ether option, generates From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48C1DF9088D; Wed, 18 Apr 2018 14:43:40 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB8F77D82C; Wed, 18 Apr 2018 14:43:25 +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 08AF01C52B; Wed, 18 Apr 2018 14:43:25 +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 w3IEhOTa015634; Wed, 18 Apr 2018 14:43:24 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhOZa015633; Wed, 18 Apr 2018 14:43:24 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhOZa015633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332718 - 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: 332718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:40 -0000 Author: gjb Date: Wed Apr 18 14:43:24 2018 New Revision: 332718 URL: https://svnweb.freebsd.org/changeset/base/332718 Log: Document r324674, fsck_ffs(8) no longer reports a filesystem as 'modified' if only the timestamp in the superblock changed. 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 Wed Apr 18 14:43:23 2018 (r332717) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:24 2018 (r332718) @@ -212,6 +212,11 @@ disables the default microcode update search path when used. + The &man.fsck.ffs.8; utility has been + updated to prevent a filesystem from being reported as + modified when only the timestamp in the superblock is + updated. + The &man.diskinfo.8; utility has been updated to display disk rotation rate and if From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAB16F908E0; Wed, 18 Apr 2018 14:43: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F2DA7D88E; Wed, 18 Apr 2018 14:43:26 +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 0ADD11C52C; Wed, 18 Apr 2018 14:43:26 +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 w3IEhPj4015677; Wed, 18 Apr 2018 14:43:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhPUR015676; Wed, 18 Apr 2018 14:43:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhPUR015676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332719 - 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: 332719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:42 -0000 Author: gjb Date: Wed Apr 18 14:43:25 2018 New Revision: 332719 URL: https://svnweb.freebsd.org/changeset/base/332719 Log: Document r328604, fsck_ffs(8) exit with non-zero status if filesystem is not repaired. 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 Wed Apr 18 14:43:24 2018 (r332718) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:25 2018 (r332719) @@ -255,6 +255,11 @@ The argument to -j can be either the name or numeric jail ID. + The &man.fsck.ffs.8; utility has been + updated to exit with a non-zero status when the filesystem is + not repaired. + The &man.dhclient.8; utility has been updated to be more compliant with RFC2131 From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66E41F908CA; Wed, 18 Apr 2018 14:43: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D5917D8A1; Wed, 18 Apr 2018 14:43:27 +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 1F66B1C52D; Wed, 18 Apr 2018 14:43:27 +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 w3IEhQfx015720; Wed, 18 Apr 2018 14:43:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhQjc015719; Wed, 18 Apr 2018 14:43:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhQjc015719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43: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: r332720 - 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: 332720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:42 -0000 Author: gjb Date: Wed Apr 18 14:43:26 2018 New Revision: 332720 URL: https://svnweb.freebsd.org/changeset/base/332720 Log: Document r331729, ifconfig(8) random MAC address generation. 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 Wed Apr 18 14:43:25 2018 (r332719) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:26 2018 (r332720) @@ -284,6 +284,12 @@ added, which is used to manage Connect-X 4 and Connect-X 5 devices supported by &man.mlx5io.4;. + The &man.ifconfig.8; utility has been + updated to include a random option, which + when used with the ether option, generates + a random MAC address for an + interface. + The &man.efibootmgr.8; utility has been added, which is used to manipulate the EFI From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB710F909D2; Wed, 18 Apr 2018 14:43:50 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 276A67D977; Wed, 18 Apr 2018 14:43:32 +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 419831C532; Wed, 18 Apr 2018 14:43:32 +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 w3IEhVpN015938; Wed, 18 Apr 2018 14:43:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhVGI015937; Wed, 18 Apr 2018 14:43:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhVGI015937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332725 - 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: 332725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:51 -0000 Author: gjb Date: Wed Apr 18 14:43:31 2018 New Revision: 332725 URL: https://svnweb.freebsd.org/changeset/base/332725 Log: Document r328668, nvmecontrol(8) SMART data returned in a numeric value instead of a hex value. 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 Wed Apr 18 14:43:30 2018 (r332724) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:31 2018 (r332725) @@ -273,6 +273,11 @@ updated to exit with a non-zero status when the filesystem is not repaired. + The &man.nvmecontrol.8; utility has been + updated to print the full 128 bit value for + SMART data, instead of the hexidecimal + value. + The &man.dhclient.8; utility has been updated to be more compliant with RFC2131 From owner-svn-src-all@freebsd.org Wed Apr 18 14:43:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ECCFF90A3C; Wed, 18 Apr 2018 14:43:54 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DFE47D9FA; Wed, 18 Apr 2018 14:43:34 +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 291961C534; Wed, 18 Apr 2018 14:43:34 +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 w3IEhXqJ016024; Wed, 18 Apr 2018 14:43:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEhXN8016023; Wed, 18 Apr 2018 14:43:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181443.w3IEhXN8016023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332727 - 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: 332727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:43:54 -0000 Author: gjb Date: Wed Apr 18 14:43:33 2018 New Revision: 332727 URL: https://svnweb.freebsd.org/changeset/base/332727 Log: Document r325473, rsh(1) '-N' flag addition. 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 Wed Apr 18 14:43:32 2018 (r332726) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:43:33 2018 (r332727) @@ -228,6 +228,10 @@ TRIM/UNMAP is supported by the disk. + The &man.rsh.1; utility has been updated + to include a new flag, -N, which disables + shutdown of a socket sending path when used. + The &man.pfctl.8; utility has been updated to allow route-to to properly handle network interfaces with multiple IP From owner-svn-src-all@freebsd.org Wed Apr 18 14:55:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BE8FF9213B; Wed, 18 Apr 2018 14:55:02 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B3F783308; Wed, 18 Apr 2018 14:55:01 +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 90FC91C6BC; Wed, 18 Apr 2018 14:55:01 +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 w3IEt1eW020946; Wed, 18 Apr 2018 14:55:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IEt19t020945; Wed, 18 Apr 2018 14:55:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181455.w3IEt19t020945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 14:55: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: r332728 - 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: 332728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 14:55:02 -0000 Author: gjb Date: Wed Apr 18 14:55:01 2018 New Revision: 332728 URL: https://svnweb.freebsd.org/changeset/base/332728 Log: Fix an incomplete sentence. Submitted by: markj 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 Wed Apr 18 14:43:33 2018 (r332727) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 14:55:01 2018 (r332728) @@ -304,8 +304,8 @@ characters in the GECOS field. The &man.ps.1; utility has been updated - to include a jail, which when used will - list the name of a &man.jail.8; instead of the numeric + to include a jail keyword, which when used + will list the name of a &man.jail.8; instead of the numeric ID. Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B24FCF952BD; Wed, 18 Apr 2018 15:34:19 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BB286DB46; Wed, 18 Apr 2018 15:34:19 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 553451CD46; Wed, 18 Apr 2018 15:34:19 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3IFYJGU040434; Wed, 18 Apr 2018 15:34:19 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IFYJCq040433; Wed, 18 Apr 2018 15:34:19 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201804181534.w3IFYJCq040433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 18 Apr 2018 15:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332729 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 332729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 15:34:20 -0000 Author: shurd Date: Wed Apr 18 15:34:18 2018 New Revision: 332729 URL: https://svnweb.freebsd.org/changeset/base/332729 Log: iflib: Fix queue distribution when there are no threads Previously, if there are no threads, all queues which targeted cores that share an L2 cache were bound to a single core. The intent is to distribute them across these cores. Reported by: olivier Reviewed by: sbruno Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15120 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Apr 18 14:55:01 2018 (r332728) +++ head/sys/net/iflib.c Wed Apr 18 15:34:18 2018 (r332729) @@ -5117,13 +5117,18 @@ find_child_with_core(int cpu, struct cpu_group *grp) } /* - * Find the nth thread on the specified core + * Find the nth "close" core to the specified core + * "close" is defined as the deepest level that shares + * at least an L2 cache. With threads, this will be + * threads on the same core. If the sahred cache is L3 + * or higher, simply returns the same core. */ static int -find_thread(int cpu, int thread_num) +find_close_core(int cpu, int core_offset) { struct cpu_group *grp; int i; + int fcpu; cpuset_t cs; grp = cpu_top; @@ -5143,7 +5148,19 @@ find_thread(int cpu, int thread_num) /* Now pick one */ CPU_COPY(&grp->cg_mask, &cs); - for (i = thread_num % grp->cg_count; i > 0; i--) { + + /* Add the selected CPU offset to core offset. */ + for (i = 0; (fcpu = CPU_FFS(&cs)) != 0; i++) { + if (fcpu - 1 == cpu) + break; + CPU_CLR(fcpu - 1, &cs); + } + MPASS(fcpu); + + core_offset += i; + + CPU_COPY(&grp->cg_mask, &cs); + for (i = core_offset % grp->cg_count; i > 0; i--) { MPASS(CPU_FFS(&cs)); CPU_CLR(CPU_FFS(&cs) - 1, &cs); } @@ -5152,31 +5169,31 @@ find_thread(int cpu, int thread_num) } #else static int -find_thread(int cpu, int thread_num __unused) +find_close_core(int cpu, int core_offset __unused) { return cpu; } #endif static int -get_thread_num(if_ctx_t ctx, iflib_intr_type_t type, int qid) +get_core_offset(if_ctx_t ctx, iflib_intr_type_t type, int qid) { switch (type) { case IFLIB_INTR_TX: - /* TX queues get threads on the same core as the corresponding RX queue */ - /* XXX handle multiple RX threads per core and more than two threads per core */ + /* TX queues get cores which share at least an L2 cache with the corresponding RX queue */ + /* XXX handle multiple RX threads per core and more than two core per L2 group */ return qid / CPU_COUNT(&ctx->ifc_cpus) + 1; case IFLIB_INTR_RX: case IFLIB_INTR_RXTX: - /* RX queues get the first thread on their core */ + /* RX queues get the specified core */ return qid / CPU_COUNT(&ctx->ifc_cpus); default: return -1; } } #else -#define get_thread_num(ctx, type, qid) CPU_FIRST() -#define find_thread(cpuid, tid) CPU_FIRST() +#define get_core_offset(ctx, type, qid) CPU_FIRST() +#define find_close_core(cpuid, tid) CPU_FIRST() #define find_nth(ctx, gid) CPU_FIRST() #endif @@ -5189,9 +5206,9 @@ iflib_irq_set_affinity(if_ctx_t ctx, int irq, iflib_in int err, tid; cpuid = find_nth(ctx, qid); - tid = get_thread_num(ctx, type, qid); + tid = get_core_offset(ctx, type, qid); MPASS(tid >= 0); - cpuid = find_thread(cpuid, tid); + cpuid = find_close_core(cpuid, tid); err = taskqgroup_attach_cpu(tqg, gtask, uniq, cpuid, irq, name); if (err) { device_printf(ctx->ifc_dev, "taskqgroup_attach_cpu failed %d\n", err); From owner-svn-src-all@freebsd.org Wed Apr 18 15:44:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2C25F95D65; Wed, 18 Apr 2018 15:44:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E5DD70EA7; Wed, 18 Apr 2018 15:44:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 453DC1CEF1; Wed, 18 Apr 2018 15:44:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3IFit7W045392; Wed, 18 Apr 2018 15:44:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IFisf7045389; Wed, 18 Apr 2018 15:44:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804181544.w3IFisf7045389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 18 Apr 2018 15:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332730 - in head/sys: amd64/amd64 i386/i386 powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 powerpc/powerpc X-SVN-Commit-Revision: 332730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 15:44:55 -0000 Author: avg Date: Wed Apr 18 15:44:54 2018 New Revision: 332730 URL: https://svnweb.freebsd.org/changeset/base/332730 Log: don't check for kdb reentry in trap_fatal(), it's impossible trap() checks for it earlier and calls kdb_reentry(). Discussed with: jhb MFC after: 12 days Sponsored by: Panzura Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c head/sys/powerpc/powerpc/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Wed Apr 18 15:34:18 2018 (r332729) +++ head/sys/amd64/amd64/trap.c Wed Apr 18 15:44:54 2018 (r332730) @@ -811,7 +811,7 @@ trap_fatal(frame, eva) curproc->p_pid, curthread->td_name); #ifdef KDB - if (debugger_on_panic || kdb_active) + if (debugger_on_panic) if (kdb_trap(type, 0, frame)) return; #endif Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Wed Apr 18 15:34:18 2018 (r332729) +++ head/sys/i386/i386/trap.c Wed Apr 18 15:44:54 2018 (r332730) @@ -937,7 +937,7 @@ trap_fatal(frame, eva) curproc->p_pid, curthread->td_name); #ifdef KDB - if (debugger_on_panic || kdb_active) { + if (debugger_on_panic) { frame->tf_err = eva; /* smuggle fault address to ddb */ if (kdb_trap(type, 0, frame)) { frame->tf_err = code; /* restore error code */ Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Wed Apr 18 15:34:18 2018 (r332729) +++ head/sys/powerpc/powerpc/trap.c Wed Apr 18 15:44:54 2018 (r332730) @@ -452,8 +452,7 @@ trap_fatal(struct trapframe *frame) printtrap(frame->exc, frame, 1, (frame->srr1 & PSL_PR)); #ifdef KDB - if ((debugger_on_panic || kdb_active) && - kdb_trap(frame->exc, 0, frame)) + if (debugger_on_panic && kdb_trap(frame->exc, 0, frame)) return; #endif panic("%s trap", trapname(frame->exc)); From owner-svn-src-all@freebsd.org Wed Apr 18 16:22:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AA13F9829B; Wed, 18 Apr 2018 16:22:24 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B00EF772A7; Wed, 18 Apr 2018 16:22:23 +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 AB0021D561; Wed, 18 Apr 2018 16:22:23 +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 w3IGMNRC065114; Wed, 18 Apr 2018 16:22:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IGMNeH065113; Wed, 18 Apr 2018 16:22:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181622.w3IGMNeH065113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 16:22:23 +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: r332731 - in stable: 10/etc/rc.d 11/etc/rc.d X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/etc/rc.d 11/etc/rc.d X-SVN-Commit-Revision: 332731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 16:22:24 -0000 Author: gjb Date: Wed Apr 18 16:22:23 2018 New Revision: 332731 URL: https://svnweb.freebsd.org/changeset/base/332731 Log: MFC r326278 (manu): growfs: Commit the changes after expanding the partition This fix the problem in arm snapshot present since at least 6 months where growfs was failing at firstboot and dropped you in a single user shell. Note: In addition to this merge, kern.geom.part.mbr.enforce_chs has been enabled on the build machine to mitigate against the issue in the PR referenced. PR: 226536 Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/rc.d/growfs Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/etc/rc.d/growfs Directory Properties: stable/11/ (props changed) Modified: stable/10/etc/rc.d/growfs ============================================================================== --- stable/10/etc/rc.d/growfs Wed Apr 18 15:44:54 2018 (r332730) +++ stable/10/etc/rc.d/growfs Wed Apr 18 16:22:23 2018 (r332731) @@ -89,6 +89,7 @@ growfs_start () exit 0 } }' dev="$rawdev" + gpart commit "$rootdev" growfs -y /dev/"$rootdev" } From owner-svn-src-all@freebsd.org Wed Apr 18 16:22:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44827F982A0; Wed, 18 Apr 2018 16:22:24 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5FF4772A8; Wed, 18 Apr 2018 16:22:23 +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 E0F441D562; Wed, 18 Apr 2018 16:22:23 +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 w3IGMNPR065120; Wed, 18 Apr 2018 16:22:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IGMNAI065119; Wed, 18 Apr 2018 16:22:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181622.w3IGMNAI065119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 16:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332731 - in stable: 10/etc/rc.d 11/etc/rc.d X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/etc/rc.d 11/etc/rc.d X-SVN-Commit-Revision: 332731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 16:22:24 -0000 Author: gjb Date: Wed Apr 18 16:22:23 2018 New Revision: 332731 URL: https://svnweb.freebsd.org/changeset/base/332731 Log: MFC r326278 (manu): growfs: Commit the changes after expanding the partition This fix the problem in arm snapshot present since at least 6 months where growfs was failing at firstboot and dropped you in a single user shell. Note: In addition to this merge, kern.geom.part.mbr.enforce_chs has been enabled on the build machine to mitigate against the issue in the PR referenced. PR: 226536 Sponsored by: The FreeBSD Foundation Modified: stable/11/etc/rc.d/growfs Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/etc/rc.d/growfs Directory Properties: stable/10/ (props changed) Modified: stable/11/etc/rc.d/growfs ============================================================================== --- stable/11/etc/rc.d/growfs Wed Apr 18 15:44:54 2018 (r332730) +++ stable/11/etc/rc.d/growfs Wed Apr 18 16:22:23 2018 (r332731) @@ -90,6 +90,7 @@ growfs_start () exit 0 } }' dev="$rawdev" + gpart commit "$rootdev" growfs -y /dev/"$rootdev" } From owner-svn-src-all@freebsd.org Wed Apr 18 16:27:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F4E9F98873; Wed, 18 Apr 2018 16:27:07 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20DB2785D0; Wed, 18 Apr 2018 16:27:07 +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 1654B1D574; Wed, 18 Apr 2018 16:27:07 +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 w3IGR6mq065329; Wed, 18 Apr 2018 16:27:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IGR6jW065328; Wed, 18 Apr 2018 16:27:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804181627.w3IGR6jW065328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 18 Apr 2018 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: r332732 - 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: 332732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 16:27:07 -0000 Author: gjb Date: Wed Apr 18 16:27:06 2018 New Revision: 332732 URL: https://svnweb.freebsd.org/changeset/base/332732 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 Wed Apr 18 16:22:23 2018 (r332731) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 18 16:27:06 2018 (r332732) @@ -279,7 +279,7 @@ The &man.nvmecontrol.8; utility has been updated to print the full 128 bit value for - SMART data, instead of the hexidecimal + SMART data, instead of the hexadecimal value. The &man.nvmecontrol.8; utility has been From owner-svn-src-all@freebsd.org Wed Apr 18 18:36:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BA4FFA11C5; Wed, 18 Apr 2018 18:36: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1EAD77DE7; Wed, 18 Apr 2018 18:36: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 B81CD1EA15; Wed, 18 Apr 2018 18:36: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 w3IIaQ0c032049; Wed, 18 Apr 2018 18:36:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IIaQ6N032048; Wed, 18 Apr 2018 18:36:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201804181836.w3IIaQ6N032048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 18 Apr 2018 18:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332733 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 332733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 18:36:27 -0000 Author: jhb Date: Wed Apr 18 18:36:26 2018 New Revision: 332733 URL: https://svnweb.freebsd.org/changeset/base/332733 Log: Workaround fixed I/O port resources encoded as I/O port ranges in _CRS. ACPI I/O port descriptors use _MIN and _MAX fields to specify the set of allowable base (start) addresses for an I/O port resource along with a _LEN field specifying the length. A fixed resource is supposed to be encoded with _MIN == _MAX, but some buggy firmwares instead set _MAX to the end of the fixed range. Relocating I/O ranges only make sense in _PRS (possible resource settings), not in _CRS (current resource settings), so if an I/O port range with _MAX set set to the end of the range is present in _CRS, treat it as a fixed I/O port resource starting at _MIN. PR: 224096 Submitted by: Harald Böhm Pointy hat to: jhb (taking so long to actually commit this) MFC after: 1 week Modified: head/sys/dev/acpica/acpi_resource.c Modified: head/sys/dev/acpica/acpi_resource.c ============================================================================== --- head/sys/dev/acpica/acpi_resource.c Wed Apr 18 16:27:06 2018 (r332732) +++ head/sys/dev/acpica/acpi_resource.c Wed Apr 18 18:36:26 2018 (r332733) @@ -530,6 +530,24 @@ acpi_res_set_iorange(device_t dev, void *context, uint if (cp == NULL) return; + + /* + * XXX: Some BIOSes contain buggy _CRS entries where fixed I/O + * ranges have the maximum base address (_MAX) to the end of the + * I/O range instead of the start. These are then treated as a + * relocatable I/O range rather than a fixed I/O resource. As a + * workaround, treat I/O resources encoded this way as fixed I/O + * ports. + */ + if (high == (low + length)) { + if (bootverbose) + device_printf(dev, + "_CRS has fixed I/O port range defined as relocatable\n"); + + bus_set_resource(dev, SYS_RES_IOPORT, cp->ar_nio++, low, length); + return; + } + device_printf(dev, "I/O range not supported\n"); } From owner-svn-src-all@freebsd.org Wed Apr 18 18:45:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 034B7FA1B85; Wed, 18 Apr 2018 18:45:05 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A45FE7AC7B; Wed, 18 Apr 2018 18:45:04 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 855A51EBB5; Wed, 18 Apr 2018 18:45:04 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3IIj4Yg037188; Wed, 18 Apr 2018 18:45:04 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IIj4fL037185; Wed, 18 Apr 2018 18:45:04 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201804181845.w3IIj4fL037185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 18 Apr 2018 18:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332734 - in stable/11/sys: kern net X-SVN-Group: stable-11 X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in stable/11/sys: kern net X-SVN-Commit-Revision: 332734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 18:45:05 -0000 Author: shurd Date: Wed Apr 18 18:45:04 2018 New Revision: 332734 URL: https://svnweb.freebsd.org/changeset/base/332734 Log: MFC r332388: Make BPF global lock an SX This allows NIC drivers to sleep on polling config operations. PR: 323477 Submitted by: Matthew Macy Reviewed by: shurd Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D14982 Modified: stable/11/sys/kern/subr_witness.c stable/11/sys/net/bpf.c stable/11/sys/net/bpfdesc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_witness.c ============================================================================== --- stable/11/sys/kern/subr_witness.c Wed Apr 18 18:36:26 2018 (r332733) +++ stable/11/sys/kern/subr_witness.c Wed Apr 18 18:45:04 2018 (r332734) @@ -567,7 +567,7 @@ static struct witness_order_list_entry order_lists[] = /* * BPF */ - { "bpf global lock", &lock_class_mtx_sleep }, + { "bpf global lock", &lock_class_sx }, { "bpf interface lock", &lock_class_rw }, { "bpf cdev lock", &lock_class_mtx_sleep }, { NULL, NULL }, Modified: stable/11/sys/net/bpf.c ============================================================================== --- stable/11/sys/net/bpf.c Wed Apr 18 18:36:26 2018 (r332733) +++ stable/11/sys/net/bpf.c Wed Apr 18 18:45:04 2018 (r332734) @@ -157,6 +157,9 @@ struct bpf_dltlist32 { #define BIOCSETFNR32 _IOW('B', 130, struct bpf_program32) #endif +#define BPF_LOCK() sx_xlock(&bpf_sx) +#define BPF_UNLOCK() sx_xunlock(&bpf_sx) +#define BPF_LOCK_ASSERT() sx_assert(&bpf_sx, SA_XLOCKED) /* * bpf_iflist is a list of BPF interface structures, each corresponding to a * specific DLT. The same network interface might have several BPF interface @@ -164,7 +167,7 @@ struct bpf_dltlist32 { * frames, ethernet frames, etc). */ static LIST_HEAD(, bpf_if) bpf_iflist, bpf_freelist; -static struct mtx bpf_mtx; /* bpf global lock */ +static struct sx bpf_sx; /* bpf global lock */ static int bpf_bpfd_cnt; static void bpf_attachd(struct bpf_d *, struct bpf_if *); @@ -2800,7 +2803,7 @@ bpf_drvinit(void *unused) { struct cdev *dev; - mtx_init(&bpf_mtx, "bpf global lock", NULL, MTX_DEF); + sx_init(&bpf_sx, "bpf global lock"); LIST_INIT(&bpf_iflist); LIST_INIT(&bpf_freelist); Modified: stable/11/sys/net/bpfdesc.h ============================================================================== --- stable/11/sys/net/bpfdesc.h Wed Apr 18 18:36:26 2018 (r332733) +++ stable/11/sys/net/bpfdesc.h Wed Apr 18 18:45:04 2018 (r332734) @@ -115,9 +115,6 @@ struct bpf_d { #define BPF_PID_REFRESH(bd, td) (bd)->bd_pid = (td)->td_proc->p_pid #define BPF_PID_REFRESH_CUR(bd) (bd)->bd_pid = curthread->td_proc->p_pid -#define BPF_LOCK() mtx_lock(&bpf_mtx) -#define BPF_UNLOCK() mtx_unlock(&bpf_mtx) -#define BPF_LOCK_ASSERT() mtx_assert(&bpf_mtx, MA_OWNED) /* * External representation of the bpf descriptor */ From owner-svn-src-all@freebsd.org Wed Apr 18 18:45:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39DCDFA1C4C; Wed, 18 Apr 2018 18:45:35 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E202E7ADDC; Wed, 18 Apr 2018 18:45:34 +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 DC5381EBB7; Wed, 18 Apr 2018 18:45:34 +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 w3IIjYMM037259; Wed, 18 Apr 2018 18:45:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IIjYdt037258; Wed, 18 Apr 2018 18:45:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201804181845.w3IIjYdt037258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 18 Apr 2018 18:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332735 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 332735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 18:45:35 -0000 Author: jhb Date: Wed Apr 18 18:45:34 2018 New Revision: 332735 URL: https://svnweb.freebsd.org/changeset/base/332735 Log: Fix two off-by-one errors when allocating MSI and MSI-X interrupts. x86 enforces an (arbitray) limit on the number of available MSI and MSI-X interrupts to simplify code (in particular, interrupt_source[] is statically sized). This means that an attempt to allocate an MSI vector needs to fail if it would go beyond the limit, but the checks for exceeding the limit had an off-by-one error. In the case of MSI-X which allocates interrupts one at a time this meant that IRQ 768 kept getting handed out multiple times for msix_alloc() instead of failing because all MSI IRQs were in use. Tested by: lidl MFC after: 1 week Modified: head/sys/x86/x86/msi.c Modified: head/sys/x86/x86/msi.c ============================================================================== --- head/sys/x86/x86/msi.c Wed Apr 18 18:45:04 2018 (r332734) +++ head/sys/x86/x86/msi.c Wed Apr 18 18:45:34 2018 (r332735) @@ -404,7 +404,7 @@ again: /* Do we need to create some new sources? */ if (cnt < count) { /* If we would exceed the max, give up. */ - if (i + (count - cnt) > FIRST_MSI_INT + NUM_MSI_INTS) { + if (i + (count - cnt) >= FIRST_MSI_INT + NUM_MSI_INTS) { mtx_unlock(&msi_lock); free(mirqs, M_MSI); return (ENXIO); @@ -645,7 +645,7 @@ again: /* Do we need to create a new source? */ if (msi == NULL) { /* If we would exceed the max, give up. */ - if (i + 1 > FIRST_MSI_INT + NUM_MSI_INTS) { + if (i + 1 >= FIRST_MSI_INT + NUM_MSI_INTS) { mtx_unlock(&msi_lock); return (ENXIO); } From owner-svn-src-all@freebsd.org Wed Apr 18 19:18:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24A19FA3E89; Wed, 18 Apr 2018 19:18:16 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA0F9827D3; Wed, 18 Apr 2018 19:18:15 +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 C0AA31F0F5; Wed, 18 Apr 2018 19:18:15 +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 w3IJIFcG051795; Wed, 18 Apr 2018 19:18:15 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IJIFaP051788; Wed, 18 Apr 2018 19:18:15 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201804181918.w3IJIFaP051788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 18 Apr 2018 19:18: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: r332736 - in stable/11: include lib/libc/stdio lib/libc/tests/stdio X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable/11: include lib/libc/stdio lib/libc/tests/stdio X-SVN-Commit-Revision: 332736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 19:18:16 -0000 Author: cy Date: Wed Apr 18 19:18:14 2018 New Revision: 332736 URL: https://svnweb.freebsd.org/changeset/base/332736 Log: MFC r331936, r331942, r331943, r331945, r331947, r331948 Add new gets_s(3) stdio function. This implements the gets_s(3) function as documented at http://en.cppreference.com/w/c/io/gets. It facilitates the optional removal of gets(3). Reviewed by: ed Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12785 Added: stable/11/lib/libc/stdio/gets_s.c - copied unchanged from r331936, head/lib/libc/stdio/gets_s.c stable/11/lib/libc/tests/stdio/gets_s_test.c - copied unchanged from r331936, head/lib/libc/tests/stdio/gets_s_test.c Modified: stable/11/include/stdio.h stable/11/lib/libc/stdio/Makefile.inc stable/11/lib/libc/stdio/Symbol.map stable/11/lib/libc/stdio/fgets.3 stable/11/lib/libc/tests/stdio/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/include/stdio.h ============================================================================== --- stable/11/include/stdio.h Wed Apr 18 18:45:34 2018 (r332735) +++ stable/11/include/stdio.h Wed Apr 18 19:18:14 2018 (r332736) @@ -49,6 +49,11 @@ typedef __size_t size_t; #define _SIZE_T_DECLARED #endif +#ifndef _RSIZE_T_DEFINED +#define _RSIZE_T_DEFINED +typedef size_t rsize_t; +#endif + #if __POSIX_VISIBLE >= 200809 #ifndef _OFF_T_DECLARED #define _OFF_T_DECLARED @@ -263,6 +268,9 @@ size_t fwrite(const void * __restrict, size_t, size_t int getc(FILE *); int getchar(void); char *gets(char *); +#if __EXT1_VISIBLE +char *gets_s(char *, rsize_t); +#endif void perror(const char *); int printf(const char * __restrict, ...); int putc(int, FILE *); Modified: stable/11/lib/libc/stdio/Makefile.inc ============================================================================== --- stable/11/lib/libc/stdio/Makefile.inc Wed Apr 18 18:45:34 2018 (r332735) +++ stable/11/lib/libc/stdio/Makefile.inc Wed Apr 18 19:18:14 2018 (r332736) @@ -14,7 +14,7 @@ SRCS+= _flock_stub.c asprintf.c clrerr.c dprintf.c \ fputwc.c fputws.c fread.c freopen.c fscanf.c fseek.c fsetpos.c \ ftell.c funopen.c fvwrite.c fwalk.c fwide.c fwprintf.c fwscanf.c \ fwrite.c getc.c getchar.c getdelim.c getline.c \ - gets.c getw.c getwc.c getwchar.c makebuf.c mktemp.c \ + gets.c gets_s.c getw.c getwc.c getwchar.c makebuf.c mktemp.c \ open_memstream.c open_wmemstream.c \ perror.c printf.c printf-pos.c putc.c putchar.c \ puts.c putw.c putwc.c putwchar.c \ @@ -50,6 +50,7 @@ MLINKS+=ferror.3 ferror_unlocked.3 \ ferror.3 fileno.3 ferror.3 fileno_unlocked.3 MLINKS+=fflush.3 fpurge.3 MLINKS+=fgets.3 gets.3 +MLINKS+=fgets.3 gets_s.3 MLINKS+=flockfile.3 ftrylockfile.3 flockfile.3 funlockfile.3 MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3 fopen.3 fmemopen.3 MLINKS+=fputs.3 puts.3 Modified: stable/11/lib/libc/stdio/Symbol.map ============================================================================== --- stable/11/lib/libc/stdio/Symbol.map Wed Apr 18 18:45:34 2018 (r332735) +++ stable/11/lib/libc/stdio/Symbol.map Wed Apr 18 19:18:14 2018 (r332736) @@ -167,6 +167,10 @@ FBSD_1.4 { fopencookie; }; +FBSD_1.5 { + gets_s; +}; + FBSDprivate_1.0 { _flockfile; _flockfile_debug_stub; Modified: stable/11/lib/libc/stdio/fgets.3 ============================================================================== --- stable/11/lib/libc/stdio/fgets.3 Wed Apr 18 18:45:34 2018 (r332735) +++ stable/11/lib/libc/stdio/fgets.3 Wed Apr 18 19:18:14 2018 (r332736) @@ -32,12 +32,13 @@ .\" @(#)fgets.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 5, 2012 +.Dd April 3, 2018 .Dt FGETS 3 .Os .Sh NAME .Nm fgets , -.Nm gets +.Nm gets , +.Nm gets_s .Nd get a line from a stream .Sh LIBRARY .Lb libc @@ -46,6 +47,8 @@ .Ft char * .Fn fgets "char * restrict str" "int size" "FILE * restrict stream" .Ft char * +.Fn gets_s "char *str" "rsize_t size" +.Ft char * .Fn gets "char *str" .Sh DESCRIPTION The @@ -65,6 +68,17 @@ If any characters are read and there is no error, a character is appended to end the string. .Pp The +.Fn gets_s +function +is equivalent to +.Fn fgets +with a +.Fa stream +of +.Dv stdin , +except that the newline character (if any) is not stored in the string. +.Pp +The .Fn gets function is equivalent to @@ -80,7 +94,8 @@ It is the caller's responsibility to ensure that the i if any, is sufficiently short to fit in the string. .Sh RETURN VALUES Upon successful completion, -.Fn fgets +.Fn fgets , +.Fn gets_s , and .Fn gets return @@ -94,7 +109,8 @@ they return .Dv NULL and the buffer contents are indeterminate. The -.Fn fgets +.Fn fgets , +.Fn gets_s , and .Fn gets functions @@ -141,6 +157,13 @@ and .Fn gets conform to .St -isoC-99 . +.Fn gets_s +conforms to +.St -isoC-2011 +K.3.7.4.1. +.Fn gets +has been removed from +.St -isoC-2011 . .Sh SECURITY CONSIDERATIONS The .Fn gets Copied: stable/11/lib/libc/stdio/gets_s.c (from r331936, head/lib/libc/stdio/gets_s.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/stdio/gets_s.c Wed Apr 18 19:18:14 2018 (r332736, copy of r331936, head/lib/libc/stdio/gets_s.c) @@ -0,0 +1,102 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 2017, 2018 + * Cyril S. E. Schubert. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Chris Torek. + * + * 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "namespace.h" +#include +#include +#include +#include +#include "un-namespace.h" +#include "libc_private.h" +#include "local.h" + +static inline char * +_gets_s(char *buf, rsize_t n) +{ + int c; + char *s; + + ORIENT(stdin, -1); + for (s = buf, n--; (c = __sgetc(stdin)) != '\n' && n > 0 ; n--) { + if (c == EOF) { + if (s == buf) { + return (NULL); + } else + break; + } else + *s++ = c; + } + + /* + * If end of buffer reached, discard until \n or eof. + * Then throw an error. + */ + if (n == 0) { + /* discard */ + while ((c = __sgetc(stdin)) != '\n' && c != EOF); + /* throw the error after lock released prior to exit */ + __throw_constraint_handler_s("gets_s : end of buffer", E2BIG); + return (NULL); + } + *s = 0; + return (buf); +} + +/* ISO/IEC 9899:2011 K.3.7.4.1 */ +char * +gets_s(char *buf, rsize_t n) +{ + char *ret; + if (buf == NULL) { + __throw_constraint_handler_s("gets_s : str is NULL", EINVAL); + return(NULL); + } else if (n > RSIZE_MAX) { + __throw_constraint_handler_s("gets_s : n > RSIZE_MAX", + EINVAL); + return(NULL); + } else if (n == 0) { + __throw_constraint_handler_s("gets_s : n == 0", EINVAL); + return(NULL); + } + + FLOCKFILE_CANCELSAFE(stdin); + ret = _gets_s(buf, n); + FUNLOCKFILE_CANCELSAFE(); + return (ret); +} Modified: stable/11/lib/libc/tests/stdio/Makefile ============================================================================== --- stable/11/lib/libc/tests/stdio/Makefile Wed Apr 18 18:45:34 2018 (r332735) +++ stable/11/lib/libc/tests/stdio/Makefile Wed Apr 18 19:18:14 2018 (r332736) @@ -7,6 +7,7 @@ ATF_TESTS_C+= fmemopen2_test ATF_TESTS_C+= fopen2_test ATF_TESTS_C+= freopen_test ATF_TESTS_C+= getdelim_test +ATF_TESTS_C+= gets_s_test ATF_TESTS_C+= mkostemp_test ATF_TESTS_C+= open_memstream2_test ATF_TESTS_C+= open_wmemstream_test Copied: stable/11/lib/libc/tests/stdio/gets_s_test.c (from r331936, head/lib/libc/tests/stdio/gets_s_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/tests/stdio/gets_s_test.c Wed Apr 18 19:18:14 2018 (r332736, copy of r331936, head/lib/libc/tests/stdio/gets_s_test.c) @@ -0,0 +1,145 @@ +/*- + * Copyright (c) 2017 Cyril S. E. Schubert. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +static errno_t error_code; +static const char * message; + +void +h(const char * msg, void * ptr __unused, errno_t error) +{ + error_code = error; + message = msg; +} + +/* null ptr */ +ATF_TC_WITHOUT_HEAD(null_ptr); +ATF_TC_BODY(null_ptr, tc) +{ + ATF_CHECK_MSG(gets_s(NULL, 1) == NULL, + "gets_s() failed to handle NULL pointer"); +} + +/* normal */ +ATF_TC_WITHOUT_HEAD(normal); +ATF_TC_BODY(normal, tc) +{ + pid_t kidpid; + int fd[2]; + int nfd; + + // close(STDIN_FILENO); + // close(STDOUT_FILENO); + pipe(fd); + + if ((kidpid = fork()) == 0) { + char b[10]; + + close(fd[1]); + nfd = dup2(fd[0], 0); + close(fd[0]); + stdin = fdopen(nfd, "r"); + ATF_CHECK_MSG(gets_s(b, sizeof(b)) == 0, "gets_s() normal failed"); + fclose(stdin); + } else { + int stat; + + close(fd[0]); + stdout = fdopen(fd[1], "w"); + puts("a sting"); + fclose(stdout); + (void) waitpid(kidpid, &stat, WEXITED); + } +} + +/* n > rmax */ +ATF_TC_WITHOUT_HEAD(n_gt_rmax); +ATF_TC_BODY(n_gt_rmax, tc) +{ + char b; + + ATF_CHECK_MSG(gets_s(&b, RSIZE_MAX + 1) == NULL, + "gets_s() n > RSIZE_MAX"); +} + +/* n == 0 */ +ATF_TC_WITHOUT_HEAD(n_eq_zero); +ATF_TC_BODY(n_eq_zero, tc) +{ + char b; + + ATF_CHECK_MSG(gets_s(&b, 0) == NULL, "gets_s() n is zero"); +} + +/* n > rmax, handler */ +ATF_TC_WITHOUT_HEAD(n_gt_rmax_handler); +ATF_TC_BODY(n_gt_rmax_handler, tc) +{ + char b; + + error_code = 0; + message = NULL; + set_constraint_handler_s(h); + ATF_CHECK_MSG(gets_s(&b, RSIZE_MAX + 1) == NULL, "gets_s() n > RSIZE_MAX"); + ATF_CHECK_MSG(error_code > 0, "gets_s() error code is %d", error_code); + ATF_CHECK_MSG(strcmp(message, "gets_s : n > RSIZE_MAX") == 0, "gets_s(): incorrect error message"); +} + +/* n == 0, handler */ +ATF_TC_WITHOUT_HEAD(n_eq_zero_handler); +ATF_TC_BODY(n_eq_zero_handler, tc) +{ + char b; + + error_code = 0; + message = NULL; + set_constraint_handler_s(h); + ATF_CHECK(gets_s(&b, 0) == NULL); + ATF_CHECK_MSG(error_code > 0, "gets_s() error code is %d", error_code); + ATF_CHECK_MSG(strcmp(message, "gets_s : n == 0") == 0, "gets_s(): incorrect error message"); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, null_ptr); + ATF_TP_ADD_TC(tp, normal); + ATF_TP_ADD_TC(tp, n_gt_rmax); + ATF_TP_ADD_TC(tp, n_eq_zero); + ATF_TP_ADD_TC(tp, n_gt_rmax_handler); + ATF_TP_ADD_TC(tp, n_eq_zero_handler); + return (atf_no_error()); +} From owner-svn-src-all@freebsd.org Wed Apr 18 20:07:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43055FA69CB; Wed, 18 Apr 2018 20:07:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E64226F6A2; Wed, 18 Apr 2018 20:07:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB2A91F8FD; Wed, 18 Apr 2018 20:07:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3IK7lEo077468; Wed, 18 Apr 2018 20:07:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IK7lwN077467; Wed, 18 Apr 2018 20:07:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201804182007.w3IK7lwN077467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 18 Apr 2018 20:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332737 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 332737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 20:07:48 -0000 Author: kib Date: Wed Apr 18 20:07:47 2018 New Revision: 332737 URL: https://svnweb.freebsd.org/changeset/base/332737 Log: For fatal traps other than pagefaults, print raw fault error codes. For pagefaults, the error is already decoded and printed. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Wed Apr 18 19:18:14 2018 (r332736) +++ head/sys/i386/i386/trap.c Wed Apr 18 20:07:47 2018 (r332737) @@ -904,6 +904,8 @@ trap_fatal(frame, eva) "", code & PGEX_RSV ? "reserved bits in PTE" : code & PGEX_P ? "protection violation" : "page not present"); + } else { + printf("error code = %#x\n", code); } printf("instruction pointer = 0x%x:0x%x\n", frame->tf_cs & 0xffff, frame->tf_eip); From owner-svn-src-all@freebsd.org Wed Apr 18 20:09:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D930DFA6ABF; Wed, 18 Apr 2018 20:09:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B6F97062C; Wed, 18 Apr 2018 20:09: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 831441F8FE; Wed, 18 Apr 2018 20:09: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 w3IK9Q6C077567; Wed, 18 Apr 2018 20:09:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IK9QIN077566; Wed, 18 Apr 2018 20:09:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201804182009.w3IK9QIN077566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 18 Apr 2018 20:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332738 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 332738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 20:09:27 -0000 Author: kib Date: Wed Apr 18 20:09:26 2018 New Revision: 332738 URL: https://svnweb.freebsd.org/changeset/base/332738 Log: Fix pmap_trm_alloc(M_ZERO). Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Apr 18 20:07:47 2018 (r332737) +++ head/sys/i386/i386/pmap.c Wed Apr 18 20:09:26 2018 (r332738) @@ -5630,6 +5630,8 @@ pmap_trm_alloc(size_t size, int flags) 0, 0, VMEM_ADDR_MIN, VMEM_ADDR_MAX, flags | M_FIRSTFIT, &res); if (error != 0) return (NULL); + if ((flags & M_ZERO) != 0) + bzero((void *)res, size); return ((void *)res); } From owner-svn-src-all@freebsd.org Wed Apr 18 20:31:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9A48FA7CC9; Wed, 18 Apr 2018 20:31: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B9FC75416; Wed, 18 Apr 2018 20:31:42 +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 9687B1FD6D; Wed, 18 Apr 2018 20:31:42 +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 w3IKVgsT090557; Wed, 18 Apr 2018 20:31:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IKVgBC090554; Wed, 18 Apr 2018 20:31:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804182031.w3IKVgBC090554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 18 Apr 2018 20:31: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: r332739 - in stable/11/cddl/contrib/opensolaris/cmd: zfs zpool X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/cddl/contrib/opensolaris/cmd: zfs zpool X-SVN-Commit-Revision: 332739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 20:31:43 -0000 Author: mav Date: Wed Apr 18 20:31:42 2018 New Revision: 332739 URL: https://svnweb.freebsd.org/changeset/base/332739 Log: MFC r332641: MFV man pages update from r329502: 7614 zfs device evacuation/removal. Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Apr 18 20:09:26 2018 (r332738) +++ stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Apr 18 20:31:42 2018 (r332739) @@ -116,6 +116,9 @@ .Oo Fl S Ar property Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | Ns Ar bookmark Ns ... .Nm +.Cm remap +.Ar filesystem Ns | Ns Ar volume +.Nm .Cm set .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... @@ -2266,6 +2269,17 @@ if the .Fl S option was not specified. .El +.It Xo +.Nm +.Cm remap +.Ar filesystem Ns | Ns Ar volume +.Xc +.Pp +Remap the indirect blocks in the given fileystem or volume so that they no +longer reference blocks on previously removed vdevs and we can eventually +shrink the size of the indirect mapping objects for the previously removed +vdevs. Note that remapping all blocks might not be possible and that +references from snapshots will still exist and cannot be remapped. .It Xo .Nm .Cm upgrade Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Apr 18 20:09:26 2018 (r332738) +++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Apr 18 20:31:42 2018 (r332739) @@ -448,6 +448,40 @@ when the "zpool checkpoint" command is used to checkpo The feature will only return back to being .Sy enabled when the pool is rewound or the checkpoint has been discarded. +.It Sy device_removal +.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:device_removal" +.It GUID Ta com.delphix:device_removal +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +This feature enables the "zpool remove" subcommand to remove top-level +vdevs, evacuating them to reduce the total size of the pool. +.Pp +This feature becomes +.Sy active +when the "zpool remove" command is used +on a top-level vdev, and will never return to being +.Sy enabled . +.It Sy obsolete_counts +.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:obsolete_counts" +.It GUID Ta com.delphix:obsolete_counts +.It READ\-ONLY COMPATIBLE Ta yes +.It DEPENDENCIES Ta device_removal +.El +.Pp +This feature is an enhancement of device_removal, which will over time +reduce the memory used to track removed devices. When indirect blocks +are freed or remapped, we note that their part of the indirect mapping +is "obsolete", i.e. no longer needed. See also the "zfs remap" +subcommand in +.Xr zfs 8 . + +This feature becomes +.Sy active +when the "zpool remove" command is +used on a top-level vdev, and will never return to being +.Sy enabled . .It Sy large_blocks .Bl -column "READ\-ONLY COMPATIBLE" "org.open-zfs:large_block" .It GUID Ta org.open-zfs:large_block Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Wed Apr 18 20:09:26 2018 (r332738) +++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Wed Apr 18 20:31:42 2018 (r332739) @@ -21,7 +21,7 @@ .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2011, Justin T. Gibbs .\" Copyright (c) 2012, Glen Barber -.\" Copyright (c) 2013 by Delphix. All Rights Reserved. +.\" Copyright (c) 2012, 2017 by Delphix. All Rights Reserved. .\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright (c) 2017 Datto Inc. .\" @@ -149,8 +149,13 @@ .Ar pool .Nm .Cm remove +.Op Fl np .Ar pool device ... .Nm +.Cm remove +.Fl s +.Ar pool +.Nm .Cm reopen .Ar pool .Nm @@ -508,8 +513,8 @@ Multiple log devices can also be specified, and they c section for an example of mirroring multiple log devices. .Pp Log devices can be added, replaced, attached, detached, imported and exported -as part of the larger pool. Mirrored log devices can be removed by specifying -the top-level mirror for the log. +as part of the larger pool. +Mirrored devices can be removed by specifying the top-level mirror vdev. .Ss Cache devices Devices can be added to a storage pool as "cache devices." These devices provide an additional layer of caching between main memory and disk. For @@ -1574,19 +1579,55 @@ devices in this pool are online and healthy before per .It Xo .Nm .Cm remove +.Op Fl np .Ar pool device ... .Xc .Pp -Removes the specified device from the pool. This command currently only -supports removing hot spares, cache, and log devices. A mirrored log device can -be removed by specifying the top-level mirror for the log. Non-log devices that -are part of a mirrored configuration can be removed using the +Removes the specified device from the pool. +This command currently only supports removing hot spares, cache, log +devices and mirrored top-level vdevs (mirror of leaf devices); but not raidz. +.sp +Removing a top-level vdev reduces the total amount of space in the storage pool. +The specified device will be evacuated by copying all allocated space from it to +the other devices in the pool. +In this case, the +.Nm zpool Cm remove +command initiates the removal and returns, while the evacuation continues in +the background. +The removal progress can be monitored with +.Nm zpool Cm status. +This feature must be enabled to be used, see +.Xr zpool-features 5 +.Pp +A mirrored top-level device (log or data) can be removed by specifying the +top-level mirror for the same. +Non-log devices or data devices that are part of a mirrored configuration can +be removed using the .Qq Nm Cm detach -command. Non-redundant and -.No raidz -devices cannot be removed from a pool. +command. +.Bl -tag -width Ds +.It Fl n +Do not actually perform the removal ("no-op"). +Instead, print the estimated amount of memory that will be used by the +mapping table after the removal completes. +This is nonzero only for top-level vdevs. +.El +.Bl -tag -width Ds +.It Fl p +Used in conjunction with the +.Fl n +flag, displays numbers as parsable (exact) values. +.El .It Xo .Nm +.Cm remove +.Fl s +.Ar pool +.Xc +.Pp +Stops and cancels an in-progress removal of a top-level vdev. +.It Xo +.Nm .Cm reopen .Ar pool .Xc @@ -2068,11 +2109,13 @@ data 23.9G 14.6G 9.30G 48% - 61% .Ed .It Xo .Sy Example 16 -Removing a Mirrored Log Device +Removing a Mirrored top-level (Log or Data) Device .Xc .Pp -The following command removes the mirrored log device -.Em mirror-2 . +The following commands remove the mirrored log device +.Sy mirror-2 +and mirrored top-level data device +.Sy mirror-1 . .Pp Given this configuration: .Bd -literal -offset 2n @@ -2100,6 +2143,13 @@ The command to remove the mirrored log is: .Bd -literal -offset 2n .Li # Ic zpool remove tank mirror-2 +.Ed +.Pp +The command to remove the mirrored data +.Em mirror-1 +is: +.Bd -literal -offset 2n +.Li # Ic zpool remove tank mirror-1 .Ed .It Xo .Sy Example 17 From owner-svn-src-all@freebsd.org Wed Apr 18 21:15:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F5D0F8118D; Wed, 18 Apr 2018 21:15:38 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660067.outbound.protection.outlook.com [40.107.66.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88FF680AD5; Wed, 18 Apr 2018 21:15:37 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM (52.132.66.153) by YQBPR0101MB1252.CANPRD01.PROD.OUTLOOK.COM (52.132.68.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.12; Wed, 18 Apr 2018 21:15:36 +0000 Received: from YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM ([fe80::893c:efc2:d71f:945a]) by YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM ([fe80::893c:efc2:d71f:945a%13]) with mapi id 15.20.0696.013; Wed, 18 Apr 2018 21:15:36 +0000 From: Rick Macklem To: Julian Elischer , Konstantin Belousov CC: Andriy Gapon , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r332559 - head/usr.sbin/mountd Thread-Topic: svn commit: r332559 - head/usr.sbin/mountd Thread-Index: AQHT1d2LvqfGyf/rSkGmX+1c3ssiQaQE5HwAgAESHgCAAQ1uCQ== Date: Wed, 18 Apr 2018 21:15:36 +0000 Message-ID: References: <20180417123212.GM1774@kib.kiev.ua>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YQBPR0101MB1252; 7:S+aUh+9q9NBnYcWyZoI6c/itw8uqd20bJgFNwxuIdmYY9MvM31p28evaoItVXTqpKWj5IGrknCEDmX6oGd0QbXfk53FT+WoWWrULOO/QfsQJijgEJGrXuK0k3LhMQter9wX6yu+ajPDFKFK9utP6tlNhXB5OflUnKKRWOCWaqXUTSb2q7O7loSSLvpNPyxNAKZP1bfLml2knP86rOyVRe2IBcfrrXJvwOPds1BYDBr/DaH7CQj+p1VljLrJpNYML x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YQBPR0101MB1252; x-ms-traffictypediagnostic: YQBPR0101MB1252: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231232)(944501327)(52105095)(93006095)(93001095)(6041310)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:YQBPR0101MB1252; BCL:0; PCL:0; RULEID:; SRVR:YQBPR0101MB1252; x-forefront-prvs: 06469BCC91 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(396003)(376002)(346002)(39860400002)(366004)(186003)(316002)(81166006)(5660300001)(8936002)(786003)(2900100001)(6436002)(86362001)(3280700002)(110136005)(3660700001)(54906003)(33656002)(74482002)(25786009)(6506007)(26005)(102836004)(4326008)(6246003)(39060400002)(446003)(53936002)(476003)(14454004)(11346002)(5250100002)(7696005)(55016002)(229853002)(76176011)(9686003)(478600001)(305945005)(2906002)(8676002)(74316002)(59450400001)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:YQBPR0101MB1252; H:YQBPR0101MB1042.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; MLV:ovrnspm; PTR:InfoNoRecords; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: fvFyXHAhfHoG9pFKqP+9OOY0W+0o7ifrF2tiuMBxvJMAUOeE+TcFLssYKe94gA2uhtNSK6OYh7KbPcVWHrU6KTe/H1p8bZx5jlO6vWAZJ2GaTsWGOU59Vf/4q4eku6/ZMHd+p0nCYpE8p4Ewq1IVDnnBnE8N55KrNM3UNoN8u9cAbZ5C3TIhcVT7MtDGWEY6 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 02ebc62b-a564-46f9-f257-08d5a5718740 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 02ebc62b-a564-46f9-f257-08d5a5718740 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2018 21:15:36.1548 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB1252 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 21:15:38 -0000 Julian Elischer wrote: [stuff snipped] >our issue is that we make a server that combines CIFS/SMB access (via >samba), credential setting from a company wide AD server (windows) >via winbindd (samba) via nsswitch.. and NFS. > >The problem is that when one looks up a user name from the AD server >One can get back a credential with a large number of groups, because >some companies use windows groups extensively. SO a sinel user may be >in a group for every project they are involved with and a method of >giving them access to files related to a project. >In this scenario a group manager may be given access to a lot of groups. > >A user looking at a file via NFS needs to be able to see what he needs >and still be blocked as per company policy. >I am investigating the new user-manager daemon may help but I don't >fully understand it yet. >I gather it maps an incoming request to a set of groups as defined on >the server rather than on the client, but I'm not sure yet how that >relates to mountd. I am happy to say I know nothing about AD, but I thought it included an LDAP service? If there is a way to configure FreeBSD so that getgrouplist(3= ) gets this list of AD groups, then "nfsuserd -manage-gids" on the NFS server should do what you want. (It takes the "uid" from the AUTH_SYS RPC request header and then creates a list of groups for that "uid" via getgrouplist(3)= . It basically does a getpwuid() and then uses the pw_name as the first arg to getgrouplist(3). It ignores the list of groups in the RPC header and, therefore, is not limi= ted to 16.) =20 If getgrouplist(3) can't see the set of AD groups, then something needs to = be done to make that work. rick From owner-svn-src-all@freebsd.org Wed Apr 18 21:31:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8903F82366; Wed, 18 Apr 2018 21:31:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BCE2841CF; Wed, 18 Apr 2018 21:31:14 +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 86834205D5; Wed, 18 Apr 2018 21:31:14 +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 w3ILVE6J018067; Wed, 18 Apr 2018 21:31:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3ILVDtB018055; Wed, 18 Apr 2018 21:31:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201804182131.w3ILVDtB018055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 18 Apr 2018 21:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332740 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/kern X-SVN-Commit-Revision: 332740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 21:31:15 -0000 Author: kib Date: Wed Apr 18 21:31:13 2018 New Revision: 332740 URL: https://svnweb.freebsd.org/changeset/base/332740 Log: Add PROC_PDEATHSIG_SET to procctl interface. Allow processes to request the delivery of a signal upon death of their parent process. Supposed consumer of the feature is PostgreSQL. Submitted by: Thomas Munro Reviewed by: jilles, mjg MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D15106 Added: head/tests/sys/kern/pdeathsig.c (contents, props changed) head/tests/sys/kern/pdeathsig_helper.c (contents, props changed) Modified: head/lib/libc/sys/procctl.2 head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_procctl.c head/sys/kern/kern_thread.c head/sys/sys/proc.h head/sys/sys/procctl.h head/tests/sys/kern/Makefile Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Wed Apr 18 20:31:42 2018 (r332739) +++ head/lib/libc/sys/procctl.2 Wed Apr 18 21:31:13 2018 (r332740) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 21, 2017 +.Dd April 18, 2018 .Dt PROCCTL 2 .Os .Sh NAME @@ -391,6 +391,37 @@ otherwise. See the note about sysctl .Dv kern.trap_enotcap above, which gives independent global control of signal delivery. +.It Dv PROC_PDEATHSIG_SET +Request the delivery of a signal when the parent of the calling +process exits. +.Fa idtype +must be +.Dv P_PID +and +.Fa id +must be the either caller's pid or zero, with no difference in effect. +The value is cleared for child processes +and when executing set-user-ID or set-group-ID binaries. +.Fa arg +must point to a value of type +.Vt int +indicating the signal +that should be delivered to the caller. +Use zero to cancel a previously requested signal delivery. +.It Dv PROC_PDEATHSIG_GET +Query the current signal number that will be delivered when the parent +of the calling process exits. +.Fa idtype +must be +.Dv P_PID +and +.Fa id +must be the either caller's pid or zero, with no difference in effect. +.Fa arg +must point to a memory location that can hold a value of type +.Vt int . +If signal delivery has not been requested, it will contain zero +on return. .El .Sh NOTES Disabling tracing on a process should not be considered a security @@ -487,6 +518,15 @@ parameter for the or .Dv PROC_TRAPCAP_CTL request is invalid. +.It Bq Er EINVAL +The +.Dv PROC_PDEATHSIG_SET +or +.Dv PROC_PDEATHSIG_GET +request referenced an unsupported +.Fa id , +.Fa idtype +or invalid signal number. .El .Sh SEE ALSO .Xr dtrace 1 , @@ -506,3 +546,8 @@ function appeared in The reaper facility is based on a similar feature of Linux and DragonflyBSD, and first appeared in .Fx 10.2 . +The +.Dv PROC_PDEATHSIG_SET +facility is based on the prctl(PR_SET_PDEATHSIG, ...) feature of Linux, +and first appeared in +.Fx 12.0 . Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 18 20:31:42 2018 (r332739) +++ head/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 18 21:31:13 2018 (r332740) @@ -3352,7 +3352,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ union { struct procctl_reaper_pids32 rp; } x32; - int error, error1, flags; + int error, error1, flags, signum; switch (uap->com) { case PROC_SPROTECT: @@ -3390,6 +3390,15 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ case PROC_TRAPCAP_STATUS: data = &flags; break; + case PROC_PDEATHSIG_SET: + error = copyin(uap->data, &signum, sizeof(signum)); + if (error != 0) + return (error); + data = &signum; + break; + case PROC_PDEATHSIG_GET: + data = &signum; + break; default: return (EINVAL); } @@ -3409,6 +3418,10 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ case PROC_TRAPCAP_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); + break; + case PROC_PDEATHSIG_GET: + if (error == 0) + error = copyout(&signum, uap->data, sizeof(signum)); break; } return (error); Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Apr 18 20:31:42 2018 (r332739) +++ head/sys/kern/kern_exec.c Wed Apr 18 21:31:13 2018 (r332740) @@ -522,6 +522,10 @@ interpret: credential_changing |= will_transition; #endif + /* Don't inherit PROC_PDEATHSIG_SET value if setuid/setgid. */ + if (credential_changing) + imgp->proc->p_pdeathsig = 0; + if (credential_changing && #ifdef CAPABILITY_MODE ((oldcred->cr_flags & CRED_FLAG_CAPMODE) == 0) && Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Wed Apr 18 20:31:42 2018 (r332739) +++ head/sys/kern/kern_exit.c Wed Apr 18 21:31:13 2018 (r332740) @@ -480,6 +480,12 @@ exit1(struct thread *td, int rval, int signo) PROC_LOCK(q->p_reaper); pksignal(q->p_reaper, SIGCHLD, ksi1); PROC_UNLOCK(q->p_reaper); + } else if (q->p_pdeathsig > 0) { + /* + * The child asked to received a signal + * when we exit. + */ + kern_psignal(q, q->p_pdeathsig); } } else { /* @@ -520,6 +526,13 @@ exit1(struct thread *td, int rval, int signo) */ while ((q = LIST_FIRST(&p->p_orphans)) != NULL) { PROC_LOCK(q); + /* + * If we are the real parent of this process + * but it has been reparented to a debugger, then + * check if it asked for a signal when we exit. + */ + if (q->p_pdeathsig > 0) + kern_psignal(q, q->p_pdeathsig); CTR2(KTR_PTRACE, "exit: pid %d, clearing orphan %d", p->p_pid, q->p_pid); clear_orphan(q); Modified: head/sys/kern/kern_procctl.c ============================================================================== --- head/sys/kern/kern_procctl.c Wed Apr 18 20:31:42 2018 (r332739) +++ head/sys/kern/kern_procctl.c Wed Apr 18 21:31:13 2018 (r332740) @@ -431,7 +431,7 @@ sys_procctl(struct thread *td, struct procctl_args *ua struct procctl_reaper_pids rp; struct procctl_reaper_kill rk; } x; - int error, error1, flags; + int error, error1, flags, signum; switch (uap->com) { case PROC_SPROTECT: @@ -467,6 +467,15 @@ sys_procctl(struct thread *td, struct procctl_args *ua case PROC_TRAPCAP_STATUS: data = &flags; break; + case PROC_PDEATHSIG_SET: + error = copyin(uap->data, &signum, sizeof(signum)); + if (error != 0) + return (error); + data = &signum; + break; + case PROC_PDEATHSIG_GET: + data = &signum; + break; default: return (EINVAL); } @@ -486,6 +495,10 @@ sys_procctl(struct thread *td, struct procctl_args *ua if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; + case PROC_PDEATHSIG_GET: + if (error == 0) + error = copyout(&signum, uap->data, sizeof(signum)); + break; } return (error); } @@ -527,6 +540,7 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t struct pgrp *pg; struct proc *p; int error, first_error, ok; + int signum; bool tree_locked; switch (com) { @@ -537,8 +551,31 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t case PROC_REAP_KILL: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_PDEATHSIG_SET: + case PROC_PDEATHSIG_GET: if (idtype != P_PID) return (EINVAL); + } + + switch (com) { + case PROC_PDEATHSIG_SET: + signum = *(int *)data; + p = td->td_proc; + if ((id != 0 && id != p->p_pid) || + (signum != 0 && !_SIG_VALID(signum))) + return (EINVAL); + PROC_LOCK(p); + p->p_pdeathsig = signum; + PROC_UNLOCK(p); + return (0); + case PROC_PDEATHSIG_GET: + p = td->td_proc; + if (id != 0 && id != p->p_pid) + return (EINVAL); + PROC_LOCK(p); + *(int *)data = p->p_pdeathsig; + PROC_UNLOCK(p); + return (0); } switch (com) { Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed Apr 18 20:31:42 2018 (r332739) +++ head/sys/kern/kern_thread.c Wed Apr 18 21:31:13 2018 (r332740) @@ -91,7 +91,7 @@ _Static_assert(offsetof(struct proc, p_pid) == 0xbc, "struct proc KBI p_pid"); _Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, +_Static_assert(offsetof(struct proc, p_comm) == 0x3e4, "struct proc KBI p_comm"); _Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8, "struct proc KBI p_emuldata"); @@ -111,9 +111,9 @@ _Static_assert(offsetof(struct proc, p_pid) == 0x74, "struct proc KBI p_pid"); _Static_assert(offsetof(struct proc, p_filemon) == 0x27c, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x288, +_Static_assert(offsetof(struct proc, p_comm) == 0x28c, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x314, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x318, "struct proc KBI p_emuldata"); #endif Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Apr 18 20:31:42 2018 (r332739) +++ head/sys/sys/proc.h Wed Apr 18 21:31:13 2018 (r332740) @@ -624,6 +624,7 @@ struct proc { u_int p_treeflag; /* (e) P_TREE flags */ int p_pendingexits; /* (c) Count of pending thread exits. */ struct filemon *p_filemon; /* (c) filemon-specific data. */ + int p_pdeathsig; /* (c) Signal from parent on exit. */ /* End area that is zeroed on creation. */ #define p_endzero p_magic Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Wed Apr 18 20:31:42 2018 (r332739) +++ head/sys/sys/procctl.h Wed Apr 18 21:31:13 2018 (r332740) @@ -51,6 +51,8 @@ #define PROC_TRACE_STATUS 8 /* query tracing status */ #define PROC_TRAPCAP_CTL 9 /* trap capability errors */ #define PROC_TRAPCAP_STATUS 10 /* query trap capability status */ +#define PROC_PDEATHSIG_SET 11 /* set parent death signal */ +#define PROC_PDEATHSIG_GET 12 /* get parent death signal */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Wed Apr 18 20:31:42 2018 (r332739) +++ head/tests/sys/kern/Makefile Wed Apr 18 21:31:13 2018 (r332740) @@ -16,11 +16,13 @@ ATF_TESTS_C+= unix_seqpacket_test ATF_TESTS_C+= unix_passfd_test TEST_METADATA.unix_seqpacket_test+= timeout="15" ATF_TESTS_C+= waitpid_nohang +ATF_TESTS_C+= pdeathsig ATF_TESTS_SH+= coredump_phnum_test BINDIR= ${TESTSDIR} PROGS+= coredump_phnum_helper +PROGS+= pdeathsig_helper CFLAGS.sys_getrandom+= -I${SRCTOP}/sys/contrib/zstd/lib LIBADD.sys_getrandom+= zstd Added: head/tests/sys/kern/pdeathsig.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/pdeathsig.c Wed Apr 18 21:31:13 2018 (r332740) @@ -0,0 +1,343 @@ +/*- + * Copyright (c) 2018 Thomas Munro + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void +dummy_signal_handler(int signum) +{ +} + +ATF_TC_WITHOUT_HEAD(arg_validation); +ATF_TC_BODY(arg_validation, tc) +{ + int signum; + int rc; + + /* bad signal */ + signum = 8888; + rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + ATF_CHECK_EQ(-1, rc); + ATF_CHECK_EQ(EINVAL, errno); + + /* bad id type */ + signum = SIGINFO; + rc = procctl(8888, 0, PROC_PDEATHSIG_SET, &signum); + ATF_CHECK_EQ(-1, rc); + ATF_CHECK_EQ(EINVAL, errno); + + /* bad id (pid that doesn't match mine or zero) */ + signum = SIGINFO; + rc = procctl(P_PID, (((getpid() + 1) % 10) + 100), + PROC_PDEATHSIG_SET, &signum); + ATF_CHECK_EQ(-1, rc); + ATF_CHECK_EQ(EINVAL, errno); + + /* null pointer */ + signum = SIGINFO; + rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, NULL); + ATF_CHECK_EQ(-1, rc); + ATF_CHECK_EQ(EFAULT, errno); + + /* good (pid == 0) */ + signum = SIGINFO; + rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + ATF_CHECK_EQ(0, rc); + + /* good (pid == my pid) */ + signum = SIGINFO; + rc = procctl(P_PID, getpid(), PROC_PDEATHSIG_SET, &signum); + ATF_CHECK_EQ(0, rc); + + /* check that we can read the signal number back */ + signum = 0xdeadbeef; + rc = procctl(P_PID, 0, PROC_PDEATHSIG_GET, &signum); + ATF_CHECK_EQ(0, rc); + ATF_CHECK_EQ(SIGINFO, signum); +} + +ATF_TC_WITHOUT_HEAD(fork_no_inherit); +ATF_TC_BODY(fork_no_inherit, tc) +{ + int status; + int signum; + int rc; + + /* request a signal on parent death in the parent */ + signum = SIGINFO; + rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + + rc = fork(); + ATF_REQUIRE(rc != -1); + if (rc == 0) { + /* check that we didn't inherit the setting */ + signum = 0xdeadbeef; + rc = procctl(P_PID, 0, PROC_PDEATHSIG_GET, &signum); + assert(rc == 0); + assert(signum == 0); + _exit(0); + } + + /* wait for the child to exit successfully */ + waitpid(rc, &status, 0); + ATF_CHECK_EQ(0, status); +} + +ATF_TC_WITHOUT_HEAD(exec_inherit); +ATF_TC_BODY(exec_inherit, tc) +{ + int status; + int rc; + + rc = fork(); + ATF_REQUIRE(rc != -1); + if (rc == 0) { + char exec_path[1024]; + int signum; + + /* compute the path of the helper executable */ + snprintf(exec_path, sizeof(exec_path), "%s/pdeathsig_helper", + atf_tc_get_config_var(tc, "srcdir")); + + /* request a signal on parent death and register a handler */ + signum = SIGINFO; + rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + assert(rc == 0); + + /* execute helper program: it asserts that it has the setting */ + rc = execl(exec_path, exec_path, NULL); + assert(rc == 0); + _exit(0); + } + + /* wait for the child to exit successfully */ + waitpid(rc, &status, 0); + ATF_CHECK_EQ(0, status); +} + +ATF_TC_WITHOUT_HEAD(signal_delivered); +ATF_TC_BODY(signal_delivered, tc) +{ + sigset_t sigset; + int signum; + int rc; + int pipe_ca[2]; + int pipe_cb[2]; + char buffer; + + rc = pipe(pipe_ca); + ATF_REQUIRE(rc == 0); + rc = pipe(pipe_cb); + ATF_REQUIRE(rc == 0); + + rc = fork(); + ATF_REQUIRE(rc != -1); + if (rc == 0) { + rc = fork(); + assert(rc >= 0); + if (rc == 0) { + /* process C */ + signum = SIGINFO; + + /* block signals so we can handle them synchronously */ + rc = sigfillset(&sigset); + assert(rc == 0); + rc = sigprocmask(SIG_SETMASK, &sigset, NULL); + assert(rc == 0); + + /* register a dummy handler or the kernel will not queue it */ + signal(signum, dummy_signal_handler); + + /* request a signal on death of our parent B */ + rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + assert(rc == 0); + + /* tell B that we're ready for it to exit now */ + rc = write(pipe_cb[1], ".", 1); + assert(rc == 1); + + /* wait for B to die and signal us... */ + signum = 0xdeadbeef; + rc = sigwait(&sigset, &signum); + assert(rc == 0); + assert(signum == SIGINFO); + + /* tell A the test passed */ + rc = write(pipe_ca[1], ".", 1); + assert(rc == 1); + _exit(0); + } + + /* process B */ + + /* wait for C to tell us it is ready for us to exit */ + rc = read(pipe_cb[0], &buffer, 1); + assert(rc == 1); + + /* now we exit so that C gets a signal */ + _exit(0); + } + /* process A */ + + /* wait for C to tell us the test passed */ + rc = read(pipe_ca[0], &buffer, 1); + ATF_CHECK_EQ(1, rc); +} + +ATF_TC_WITHOUT_HEAD(signal_delivered_ptrace); +ATF_TC_BODY(signal_delivered_ptrace, tc) +{ + sigset_t sigset; + int signum; + int rc; + int pipe_ca[2]; + int pipe_db[2]; + int pipe_cd[2]; + char buffer; + int status; + + rc = pipe(pipe_ca); + ATF_REQUIRE(rc == 0); + rc = pipe(pipe_db); + ATF_REQUIRE(rc == 0); + rc = pipe(pipe_cd); + ATF_REQUIRE(rc == 0); + + rc = fork(); + ATF_REQUIRE(rc != -1); + if (rc == 0) { + pid_t c_pid; + + /* process B */ + + rc = fork(); + assert(rc >= 0); + if (rc == 0) { + /* process C */ + signum = SIGINFO; + + /* block signals so we can handle them synchronously */ + rc = sigfillset(&sigset); + assert(rc == 0); + rc = sigprocmask(SIG_SETMASK, &sigset, NULL); + assert(rc == 0); + + /* register a dummy handler or the kernel will not queue it */ + signal(signum, dummy_signal_handler); + + /* request a signal on parent death and register a handler */ + rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + assert(rc == 0); + + /* tell D we are ready for it to attach */ + rc = write(pipe_cd[1], ".", 1); + assert(rc == 1); + + /* wait for B to die and signal us... */ + signum = 0xdeadbeef; + rc = sigwait(&sigset, &signum); + assert(rc == 0); + assert(signum == SIGINFO); + + /* tell A the test passed */ + rc = write(pipe_ca[1], ".", 1); + assert(rc == 1); + _exit(0); + } + c_pid = rc; + + + /* fork another process to ptrace C */ + rc = fork(); + assert(rc >= 0); + if (rc == 0) { + + /* process D */ + rc = ptrace(PT_ATTACH, c_pid, 0, 0); + assert(rc == 0); + + waitpid(c_pid, &status, 0); + assert(WIFSTOPPED(status)); + assert(WSTOPSIG(status) == SIGSTOP); + + rc = ptrace(PT_CONTINUE, c_pid, (caddr_t) 1, 0); + assert(rc == 0); + + /* tell B that we're ready for it to exit now */ + rc = write(pipe_db[1], ".", 1); + assert(rc == 1); + + waitpid(c_pid, &status, 0); + assert(WIFSTOPPED(status)); + assert(WSTOPSIG(status) == SIGINFO); + + rc = ptrace(PT_CONTINUE, c_pid, (caddr_t) 1, + WSTOPSIG(status)); + assert(rc == 0); + + ptrace(PT_DETACH, c_pid, 0, 0); + + _exit(0); + } + + /* wait for D to tell us it is ready for us to exit */ + rc = read(pipe_db[0], &buffer, 1); + assert(rc == 1); + + /* now we exit so that C gets a signal */ + _exit(0); + } + + /* process A */ + + /* wait for C to tell us the test passed */ + rc = read(pipe_ca[0], &buffer, 1); + ATF_CHECK_EQ(1, rc); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, arg_validation); + ATF_TP_ADD_TC(tp, fork_no_inherit); + ATF_TP_ADD_TC(tp, exec_inherit); + ATF_TP_ADD_TC(tp, signal_delivered); + ATF_TP_ADD_TC(tp, signal_delivered_ptrace); + return (atf_no_error()); +} Added: head/tests/sys/kern/pdeathsig_helper.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/pdeathsig_helper.c Wed Apr 18 21:31:13 2018 (r332740) @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2018 Thomas Munro + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +int main(int argc, char **argv) +{ + int signum; + int rc; + + /* + * This program is executed by the pdeathsig test + * to check if the PROC_PDEATHSIG_SET setting was + * inherited. + */ + signum = 0xdeadbeef; + rc = procctl(P_PID, 0, PROC_PDEATHSIG_GET, &signum); + assert(rc == 0); + assert(signum == SIGINFO); + + return 0; +} From owner-svn-src-all@freebsd.org Wed Apr 18 22:24:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CE7AF86E1F; Wed, 18 Apr 2018 22:24:45 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA6E71E3A; Wed, 18 Apr 2018 22:24:45 +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 13BDF20F39; Wed, 18 Apr 2018 22:24:45 +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 w3IMOi4r047314; Wed, 18 Apr 2018 22:24:44 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IMOi4i047313; Wed, 18 Apr 2018 22:24:44 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201804182224.w3IMOi4i047313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Wed, 18 Apr 2018 22:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332741 - head/tools/diag/prtblknos X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/tools/diag/prtblknos X-SVN-Commit-Revision: 332741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 22:24:45 -0000 Author: mckusick Date: Wed Apr 18 22:24:44 2018 New Revision: 332741 URL: https://svnweb.freebsd.org/changeset/base/332741 Log: Check the inode type and only attempt to print block lists for regular files, directories, and symbolic links that require external storage. Correct the handling of files with holes and files that have one or more large blocks and end with a fragment. Reported by: bde Modified: head/tools/diag/prtblknos/prtblknos.c Modified: head/tools/diag/prtblknos/prtblknos.c ============================================================================== --- head/tools/diag/prtblknos/prtblknos.c Wed Apr 18 21:31:13 2018 (r332740) +++ head/tools/diag/prtblknos/prtblknos.c Wed Apr 18 22:24:44 2018 (r332741) @@ -49,21 +49,65 @@ prtblknos(disk, dp) struct uufsd *disk; union dinode *dp; { - int i, len, lbn, frags, numblks, blksperindir; + int i, len, lbn, mode, frags, numblks, blksperindir; ufs2_daddr_t blkno; struct fs *fs; off_t size; fs = (struct fs *)&disk->d_sb; - if (fs->fs_magic == FS_UFS1_MAGIC) + if (fs->fs_magic == FS_UFS1_MAGIC) { size = dp->dp1.di_size; - else + mode = dp->dp1.di_mode; + } else { size = dp->dp2.di_size; - numblks = howmany(size, fs->fs_bsize); - if (numblks == 0) { - printf(" empty file\n"); + mode = dp->dp2.di_mode; + } + switch (mode & IFMT) { + case IFIFO: + printf("fifo\n"); return; + case IFCHR: + printf("character device\n"); + return; + case IFBLK: + printf("block device\n"); + return; + case IFSOCK: + printf("socket\n"); + return; + case IFWHT: + printf("whiteout\n"); + return; + case IFLNK: + if (size == 0) { + printf("empty symbolic link\n"); + return; + } + if (size < fs->fs_maxsymlinklen) { + printf("symbolic link referencing %s\n", + (fs->fs_magic == FS_UFS1_MAGIC) ? + (char *)dp->dp1.di_db : + (char *)dp->dp2.di_db); + return; + } + printf("symbolic link\n"); + break; + case IFREG: + if (size == 0) { + printf("empty file\n"); + return; + } + printf("regular file, size %ld\n", size); + break; + case IFDIR: + if (size == 0) { + printf("empty directory\n"); + return; + } + printf("directory, size %ld\n", size); + break; } + numblks = howmany(size, fs->fs_bsize); len = numblks < UFS_NDADDR ? numblks : UFS_NDADDR; for (i = 0; i < len; i++) { if (i < numblks - 1) @@ -110,6 +154,11 @@ indirprt(disk, level, blksperindir, lbn, blkno, lastlb int i, last; fs = (struct fs *)&disk->d_sb; + if (blkno == 0) { + printblk(fs, lbn, blkno, + blksperindir * NINDIR(fs) * fs->fs_frag, lastlbn); + return; + } printblk(fs, lbn, blkno, fs->fs_frag, -level); /* read in the indirect block. */ if (bread(disk, fsbtodb(fs, blkno), indir, fs->fs_bsize) == -1) @@ -178,12 +227,12 @@ printblk(fs, lbn, blkno, numblks, lastlbn) if (lastlbn <= 0) goto flush; if (seq == 0) { - seq = 1; + seq = howmany(numblks, fs->fs_frag); firstblk = blkno; return; } if (lbn == 0) { - seq = 1; + seq = howmany(numblks, fs->fs_frag); lastblk = 0; firstblk = blkno; lastindirblk = 0; @@ -192,8 +241,8 @@ printblk(fs, lbn, blkno, numblks, lastlbn) if (lbn < lastlbn && ((firstblk == 0 && blkno == 0) || (firstblk == BLK_NOCOPY && blkno == BLK_NOCOPY) || (firstblk == BLK_SNAP && blkno == BLK_SNAP) || - blkno == firstblk + seq * numblks)) { - seq++; + blkno == firstblk + seq * fs->fs_frag)) { + seq += howmany(numblks, fs->fs_frag); return; } flush: From owner-svn-src-all@freebsd.org Wed Apr 18 23:08:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFD8CF8A840; Wed, 18 Apr 2018 23:08:10 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF32781A9; Wed, 18 Apr 2018 23:08:10 +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 83C8A215DD; Wed, 18 Apr 2018 23:08:10 +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 w3IN8AOL067790; Wed, 18 Apr 2018 23:08:10 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3IN8Aro067788; Wed, 18 Apr 2018 23:08:10 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201804182308.w3IN8Aro067788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Wed, 18 Apr 2018 23:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332742 - head/tools/diag/prtblknos X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/tools/diag/prtblknos X-SVN-Commit-Revision: 332742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2018 23:08:11 -0000 Author: mckusick Date: Wed Apr 18 23:08:10 2018 New Revision: 332742 URL: https://svnweb.freebsd.org/changeset/base/332742 Log: In addition to the existing argument format: prtblknos filesystem_device inode ... add an additional argument format: prtblknos file which is more convenient than figuring out the filesystem and inode number for "file". When given a list of multiple inodes, rather than exiting the program on an error with one of them, skip over it and continue with the next one. Submitted by: bde Modified: head/tools/diag/prtblknos/main.c head/tools/diag/prtblknos/prtblknos.c Modified: head/tools/diag/prtblknos/main.c ============================================================================== --- head/tools/diag/prtblknos/main.c Wed Apr 18 22:24:44 2018 (r332741) +++ head/tools/diag/prtblknos/main.c Wed Apr 18 23:08:10 2018 (r332742) @@ -31,6 +31,7 @@ #include #include #include +#include #include union dinode { @@ -48,11 +49,30 @@ main(argc, argv) struct uufsd disk; union dinode *dp; struct fs *fs; + struct stat sb; + struct statfs sfb; + char *xargv[4]; + char ibuf[64]; char *fsname; int inonum, error; + if (argc == 2) { + if (stat(argv[1], &sb) != 0) + err(1, "stat(%s)", argv[1]); + if (statfs(argv[1], &sfb) != 0) + err(1, "statfs(%s)", argv[1]); + xargv[0] = argv[0]; + xargv[1] = sfb.f_mntfromname; + sprintf(ibuf, "%jd", (intmax_t)sb.st_ino); + xargv[2] = ibuf; + xargv[3] = NULL; + argv = xargv; + argc = 3; + } if (argc < 3) { - (void)fprintf(stderr,"usage: prtblknos filesystem inode ...\n"); + (void)fprintf(stderr, "%s\n%s\n", + "usage: prtblknos filename", + " prtblknos filesystem inode ..."); exit(1); } @@ -60,7 +80,7 @@ main(argc, argv) /* get the superblock. */ if ((error = ufs_disk_fillout(&disk, fsname)) < 0) - errx(1, "Cannot find file system superblock on %s\n", fsname); + err(1, "Cannot access file system superblock on %s", fsname); fs = (struct fs *)&disk.d_sb; /* remaining arguments are inode numbers. */ @@ -68,11 +88,11 @@ main(argc, argv) /* get the inode number. */ if ((inonum = atoi(*argv)) <= 0 || inonum >= fs->fs_ipg * fs->fs_ncg) - errx(1, "%s is not a valid inode number", *argv); - (void)printf("%d:", inonum); + warnx("%s is not a valid inode number", *argv); + (void)printf("%d: ", inonum); if ((error = getino(&disk, (void **)&dp, inonum, NULL)) < 0) - err(1, "Read of inode %d on %s failed", inonum, fsname); + warn("Read of inode %d on %s failed", inonum, fsname); prtblknos(&disk, dp); } Modified: head/tools/diag/prtblknos/prtblknos.c ============================================================================== --- head/tools/diag/prtblknos/prtblknos.c Wed Apr 18 22:24:44 2018 (r332741) +++ head/tools/diag/prtblknos/prtblknos.c Wed Apr 18 23:08:10 2018 (r332742) @@ -161,8 +161,13 @@ indirprt(disk, level, blksperindir, lbn, blkno, lastlb } printblk(fs, lbn, blkno, fs->fs_frag, -level); /* read in the indirect block. */ - if (bread(disk, fsbtodb(fs, blkno), indir, fs->fs_bsize) == -1) - err(1, "Read of indirect block %jd failed", (intmax_t)blkno); + if (bread(disk, fsbtodb(fs, blkno), indir, fs->fs_bsize) == -1) { + warn("Read of indirect block %jd failed", (intmax_t)blkno); + /* List the unreadable part as a hole */ + printblk(fs, lbn, 0, + blksperindir * NINDIR(fs) * fs->fs_frag, lastlbn); + return; + } last = howmany(lastlbn - lbn, blksperindir) < NINDIR(fs) ? howmany(lastlbn - lbn, blksperindir) : NINDIR(fs); if (blksperindir == 1) { From owner-svn-src-all@freebsd.org Thu Apr 19 00:11:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0371F8E8A6; Thu, 19 Apr 2018 00:11:02 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C649863C8; Thu, 19 Apr 2018 00:11:02 +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 675E821F85; Thu, 19 Apr 2018 00:11:02 +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 w3J0B23b097078; Thu, 19 Apr 2018 00:11:02 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J0B22C097077; Thu, 19 Apr 2018 00:11:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201804190011.w3J0B22C097077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 19 Apr 2018 00:11:02 +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: r332743 - in stable: 10/sys/x86/x86 11/sys/x86/x86 X-SVN-Group: stable-10 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/sys/x86/x86 11/sys/x86/x86 X-SVN-Commit-Revision: 332743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 00:11:02 -0000 Author: jhb Date: Thu Apr 19 00:11:02 2018 New Revision: 332743 URL: https://svnweb.freebsd.org/changeset/base/332743 Log: MFC 331466: Add a workaround to the hypervisor detection for older versions of KVM. Originally KVM set %eax to 0 in the cpuid leaf 0x4000000 rather than to the highest supported leaf in the hypervisor "branch". Detect this case and fixup the %eax value so that the hypervisor is still detected. Modified: stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/x86/x86/identcpu.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Wed Apr 18 23:08:10 2018 (r332742) +++ stable/10/sys/x86/x86/identcpu.c Thu Apr 19 00:11:02 2018 (r332743) @@ -1247,6 +1247,18 @@ identify_hypervisor(void) if (cpu_feature2 & CPUID2_HV) { vm_guest = VM_GUEST_VM; do_cpuid(0x40000000, regs); + + /* + * KVM from Linux kernels prior to commit + * 57c22e5f35aa4b9b2fe11f73f3e62bbf9ef36190 set %eax + * to 0 rather than a valid hv_high value. Check for + * the KVM signature bytes and fixup %eax to the + * highest supported leaf in that case. + */ + if (regs[0] == 0 && regs[1] == 0x4b4d564b && + regs[2] == 0x564b4d56 && regs[3] == 0x0000004d) + regs[0] = 0x40000001; + if (regs[0] >= 0x40000000) { hv_high = regs[0]; ((u_int *)&hv_vendor)[0] = regs[1]; From owner-svn-src-all@freebsd.org Thu Apr 19 00:11:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF188F8E8A7; Thu, 19 Apr 2018 00:11:02 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1C05863CA; Thu, 19 Apr 2018 00:11:02 +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 9CBC321F86; Thu, 19 Apr 2018 00:11:02 +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 w3J0B2TO097084; Thu, 19 Apr 2018 00:11:02 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J0B2u2097083; Thu, 19 Apr 2018 00:11:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201804190011.w3J0B2u2097083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 19 Apr 2018 00:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332743 - in stable: 10/sys/x86/x86 11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/sys/x86/x86 11/sys/x86/x86 X-SVN-Commit-Revision: 332743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 00:11:03 -0000 Author: jhb Date: Thu Apr 19 00:11:02 2018 New Revision: 332743 URL: https://svnweb.freebsd.org/changeset/base/332743 Log: MFC 331466: Add a workaround to the hypervisor detection for older versions of KVM. Originally KVM set %eax to 0 in the cpuid leaf 0x4000000 rather than to the highest supported leaf in the hypervisor "branch". Detect this case and fixup the %eax value so that the hypervisor is still detected. Modified: stable/11/sys/x86/x86/identcpu.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/x86/x86/identcpu.c ============================================================================== --- stable/11/sys/x86/x86/identcpu.c Wed Apr 18 23:08:10 2018 (r332742) +++ stable/11/sys/x86/x86/identcpu.c Thu Apr 19 00:11:02 2018 (r332743) @@ -1303,6 +1303,18 @@ identify_hypervisor(void) if (cpu_feature2 & CPUID2_HV) { vm_guest = VM_GUEST_VM; do_cpuid(0x40000000, regs); + + /* + * KVM from Linux kernels prior to commit + * 57c22e5f35aa4b9b2fe11f73f3e62bbf9ef36190 set %eax + * to 0 rather than a valid hv_high value. Check for + * the KVM signature bytes and fixup %eax to the + * highest supported leaf in that case. + */ + if (regs[0] == 0 && regs[1] == 0x4b4d564b && + regs[2] == 0x564b4d56 && regs[3] == 0x0000004d) + regs[0] = 0x40000001; + if (regs[0] >= 0x40000000) { hv_high = regs[0]; ((u_int *)&hv_vendor)[0] = regs[1]; From owner-svn-src-all@freebsd.org Thu Apr 19 00:40:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F160F90D9D; Thu, 19 Apr 2018 00:40:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF5B36C726; Thu, 19 Apr 2018 00:40: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 D9DF82241A; Thu, 19 Apr 2018 00:40: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 w3J0eYdW012866; Thu, 19 Apr 2018 00:40:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J0eYFi012865; Thu, 19 Apr 2018 00:40:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804190040.w3J0eYFi012865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 19 Apr 2018 00:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332744 - stable/11/sys/dev/vt/font X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/vt/font X-SVN-Commit-Revision: 332744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 00:40:36 -0000 Author: emaste Date: Thu Apr 19 00:40:34 2018 New Revision: 332744 URL: https://svnweb.freebsd.org/changeset/base/332744 Log: MFC r332452: Update vt(4) "Terminus BSD Console" font to v4.46 "Terminus BSD Console" is a derivative of Terminus that is provided by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the FreeBSD vt(4) console and other BSDs. PR: 227409 Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/vt/font/vt_font_default.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/font/vt_font_default.c ============================================================================== --- stable/11/sys/dev/vt/font/vt_font_default.c Thu Apr 19 00:11:02 2018 (r332743) +++ stable/11/sys/dev/vt/font/vt_font_default.c Thu Apr 19 00:40:34 2018 (r332744) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include -static uint8_t font_bytes[1477 * 16] = { +static uint8_t font_bytes[2224 * 16] = { 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, @@ -186,9 +186,9 @@ static uint8_t font_bytes[1477 * 16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, - 0x10, 0x10, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x08, - 0x10, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x38, 0x04, 0x18, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x04, + 0x08, 0x10, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x04, 0x18, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x7a, 0x40, 0x40, 0x40, 0x00, @@ -196,7 +196,7 @@ static uint8_t font_bytes[1477 * 16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x20, 0x00, - 0x00, 0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x48, 0x24, 0x12, 0x24, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, @@ -338,7 +338,7 @@ static uint8_t font_bytes[1477 * 16] = { 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x40, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xff, 0x42, 0x42, 0x7e, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf8, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4c, 0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x58, 0x00, 0x30, 0x10, 0x10, @@ -494,222 +494,258 @@ static uint8_t font_bytes[1477 * 16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x03, 0x00, 0x32, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, - 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x3c, 0x42, - 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, - 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x42, 0x42, - 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x80, 0x38, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x82, - 0x82, 0x44, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x66, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x48, 0x48, 0x00, 0x30, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x44, 0x82, 0x82, 0xfe, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x5a, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, - 0x28, 0x28, 0x44, 0x44, 0x44, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, - 0x20, 0x10, 0x08, 0x08, 0x10, 0x20, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x7c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, - 0x92, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, + 0x18, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x10, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x7e, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x80, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x40, 0x7e, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x38, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, + 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x66, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x00, 0x3a, 0x46, 0x44, 0x44, 0x44, 0x46, 0x3a, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x3c, 0x42, 0x40, - 0x38, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, - 0x00, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x02, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x24, 0x00, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x10, 0x48, 0x48, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, + 0x28, 0x28, 0x44, 0x44, 0x44, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x5a, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, + 0x44, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x20, 0x10, 0x08, 0x08, + 0x10, 0x20, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, + 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x42, 0x24, 0x24, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x3a, 0x46, 0x44, 0x44, 0x44, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x44, 0x44, 0x48, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, - 0x44, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x3e, 0x10, - 0x08, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0x04, 0x08, 0x10, 0x20, 0x40, 0x40, 0x40, 0x40, 0x3c, - 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x7c, 0x44, + 0x00, 0x00, 0x08, 0x10, 0x00, 0x3c, 0x42, 0x40, 0x38, 0x40, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x08, 0x10, + 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x10, 0x00, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x44, + 0x44, 0x44, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, + 0x44, 0x48, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, + 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x3e, 0x10, 0x08, 0x3c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x04, + 0x08, 0x10, 0x20, 0x40, 0x40, 0x40, 0x40, 0x3c, 0x02, 0x02, 0x04, 0x00, + 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x7c, 0x44, 0x44, 0x44, 0x44, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, + 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3e, 0x40, 0x40, 0x40, 0x3c, 0x40, 0x40, 0x40, 0x40, 0x3c, + 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x40, 0x3c, + 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x44, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x7c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, + 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x82, 0x92, + 0x92, 0x92, 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x20, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x40, 0x40, 0x40, 0x3c, 0x40, - 0x40, 0x40, 0x40, 0x3c, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, + 0x00, 0x44, 0x82, 0x92, 0x92, 0x92, 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x3e, 0x04, 0xc4, 0x44, 0x44, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc2, 0x24, 0x18, 0x10, 0x30, 0x48, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, - 0x40, 0x40, 0x40, 0x3c, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3e, 0x44, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, + 0x40, 0x40, 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x4c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x24, - 0x24, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, - 0x92, 0x92, 0x92, 0x7c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x44, 0x82, 0x92, 0x92, 0x92, 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x48, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, - 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x00, 0x44, 0x82, 0x92, 0x92, 0x92, 0x92, 0x6c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x7e, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x20, - 0x20, 0x3c, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x10, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x78, 0x40, - 0x40, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x50, - 0x90, 0x9c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x90, 0x90, 0x90, 0x9c, 0xf2, 0x92, 0x92, 0x92, 0x92, 0x9c, + 0x00, 0x1e, 0x20, 0x40, 0x7c, 0x40, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x04, 0x02, 0x3e, 0x02, 0x04, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x20, 0x20, 0x3c, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x42, 0x44, - 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x08, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x18, 0x18, 0x00, 0x00, - 0x00, 0x00, 0x7c, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0xfe, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, - 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, - 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x12, - 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0x92, 0x92, 0x92, 0x92, 0x92, - 0x92, 0x92, 0x92, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3f, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x02, + 0x22, 0x22, 0x22, 0x24, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7e, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x50, 0x90, 0x9c, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90, + 0x90, 0x9c, 0xf2, 0x92, 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0x20, 0x20, 0x3c, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x42, 0x44, 0x48, 0x50, 0x60, 0x60, + 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x42, 0x42, + 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x18, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x40, + 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xfe, + 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x54, 0x38, 0x54, + 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x18, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x12, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x7c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, - 0x92, 0x92, 0x92, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, - 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7f, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x82, 0xf2, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, - 0x02, 0x02, 0x1e, 0x02, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x8c, 0x92, 0x92, 0x92, 0x92, 0xf2, 0x92, 0x92, 0x92, 0x8c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x0a, 0x12, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x40, + 0x92, 0x92, 0x92, 0x7f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x44, 0x44, 0x48, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, + 0x00, 0x00, 0x82, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0xf2, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x02, 0x1e, 0x02, + 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x92, + 0x92, 0x92, 0x92, 0xf2, 0x92, 0x92, 0x92, 0x8c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3e, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x0a, 0x12, 0x22, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x40, 0x40, 0x7c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, + 0x44, 0x48, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x54, + 0x38, 0x54, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xc6, 0xaa, + 0x92, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x7f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x20, 0x3c, 0x22, 0x22, 0x22, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0xf2, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x78, + 0x44, 0x44, 0x44, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x02, 0x1e, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x92, 0x92, 0xf2, 0x92, 0x92, 0x8c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x42, + 0x3e, 0x12, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, + 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x0c, 0x00, + 0x00, 0x00, 0x08, 0x10, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, + 0x78, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x70, 0x90, 0x9c, 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90, 0x9c, 0xf2, 0x92, 0x92, 0x9c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x42, 0x44, 0x48, + 0x70, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, + 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, + 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, 0x40, 0x7c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, + 0x78, 0x20, 0x20, 0x3c, 0x22, 0x22, 0x22, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0x82, 0x44, 0x28, 0x38, 0x54, 0x92, 0x92, 0x92, 0x92, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x44, 0x28, + 0x38, 0x54, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7e, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x02, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0xf8, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x82, 0xc6, 0xaa, 0x92, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x7c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3f, + 0x00, 0x7e, 0x40, 0x40, 0xf8, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, + 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, + 0x78, 0x44, 0x44, 0x44, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, + 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x92, 0x93, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x93, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x02, 0x1c, 0x02, + 0x02, 0x42, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x42, 0x44, 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x43, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x48, + 0x70, 0x48, 0x44, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x54, 0x58, 0x70, 0x70, 0x58, 0x54, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x54, 0x58, 0x70, 0x58, 0x54, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x44, 0x48, 0x50, 0x60, 0x60, + 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc2, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, - 0x3e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7f, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x3c, - 0x22, 0x22, 0x22, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x78, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, - 0x1e, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x8c, 0x92, 0x92, 0xf2, 0x92, 0x92, 0x8c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x42, 0x3e, 0x12, 0x22, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf8, 0x40, 0x7c, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x10, - 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x78, 0x40, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x90, 0x9c, - 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x90, 0x90, 0x9c, 0xf2, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x00, 0x42, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x00, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x18, 0x18, 0x00, 0x00, - 0x02, 0x02, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7e, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, - 0x40, 0x40, 0xf8, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0xf8, 0x40, 0x40, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x7c, - 0x42, 0x42, 0x42, 0x42, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x7e, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x04, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x92, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x92, 0x93, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x54, - 0x38, 0x54, 0x92, 0x93, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, - 0x42, 0x02, 0x1c, 0x02, 0x02, 0x42, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, - 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x42, 0x44, 0x48, 0x50, 0x60, 0x60, - 0x50, 0x48, 0x44, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x44, 0x48, 0x70, 0x48, 0x44, 0x43, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x54, 0x58, 0x70, 0x70, 0x58, 0x54, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x54, 0x58, - 0x70, 0x58, 0x54, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x44, - 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, - 0x42, 0x42, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x47, 0x44, 0x44, 0x44, 0x7c, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x44, 0x44, - 0x7c, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, - 0x42, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x42, 0x3c, - 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x10, - 0x7c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x7c, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x42, 0x43, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x24, - 0x18, 0x24, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x03, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x4a, 0x4a, 0x3e, - 0x0a, 0x0a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x4a, 0x4a, 0x3e, 0x0a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7c, - 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, - 0x42, 0x02, 0x02, 0x7e, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x02, 0x02, 0x7e, 0x42, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x92, 0x92, 0x92, 0x54, 0x38, - 0x54, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, + 0x7e, 0x42, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x47, 0x44, + 0x44, 0x44, 0x7c, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x44, 0x44, 0x7c, 0x44, 0x44, 0x44, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x40, 0x40, 0x40, + 0x40, 0x42, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x10, 0x7c, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, + 0x44, 0x28, 0x28, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x24, 0x18, 0x24, 0x42, 0x43, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, + 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x42, 0x42, 0x4a, 0x4a, 0x3e, 0x0a, 0x0a, 0x02, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4a, 0x4a, + 0x3e, 0x0a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, + 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x00, 0x92, 0x92, 0x92, 0x54, 0x38, + 0x54, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x00, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, - 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, - 0x1c, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x42, 0x42, - 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, + 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, 0x02, 0x7e, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x02, 0x02, + 0x7e, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x92, + 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0x44, 0x00, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x02, 0x1c, + 0x02, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, + 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x3c, 0x00, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x46, 0x4a, + 0x52, 0x62, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, - 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, 0x02, 0x1e, - 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, - 0x00, 0x3c, 0x42, 0x02, 0x1e, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x3c, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x00, 0x42, + 0x42, 0x02, 0x02, 0x1e, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, 0x1e, 0x02, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, + 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x02, 0x02, 0x3c, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, - 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x48, 0x00, 0x82, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0x8a, 0xf2, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x00, 0x82, 0x82, 0xf2, - 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, + 0x12, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x00, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x3c, 0x00, 0x24, 0x24, 0x00, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x00, 0x82, 0x82, 0x82, 0xf2, 0x8a, + 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, + 0x00, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x78, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x78, + 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x3e, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x42, 0x44, 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x42, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x42, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, + 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x7e, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x30, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x10, 0x10, 0x00, + 0x10, 0x10, 0x82, 0xc6, 0xaa, 0x92, 0x92, 0x82, 0x82, 0x82, 0x82, 0x82, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0xfc, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xc6, + 0xaa, 0x92, 0x92, 0x82, 0x82, 0x82, 0x82, 0x82, 0x00, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, + 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x42, 0x42, 0x42, 0x62, 0x52, 0x4a, + 0x46, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, + 0x00, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x42, 0x42, 0x62, 0x52, 0x4a, 0x46, 0x42, 0x42, 0x42, + 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0xfe, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0e, + 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x40, 0x40, 0x3c, 0x00, 0x10, 0x10, 0x00, 0x32, 0x4c, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x7e, @@ -753,26 +789,90 @@ static uint8_t font_bytes[1477 * 16] = { 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x24, 0x24, - 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x24, 0x24, - 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf0, 0x88, 0x88, 0x88, 0xf4, 0x84, 0x8e, 0x84, 0x84, 0x82, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x40, 0xf8, 0x40, - 0xf8, 0x40, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, - 0x10, 0x1c, 0x70, 0x1c, 0x70, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x24, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x30, 0x10, + 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x0c, 0x14, 0x3e, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x04, 0x04, 0x38, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x20, 0x38, + 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x04, 0x08, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, + 0x1c, 0x04, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, + 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x10, 0x10, 0x10, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x08, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x24, + 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x24, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x30, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x24, 0x04, 0x08, 0x10, 0x3c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x18, 0x04, 0x04, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x0c, 0x14, 0x3e, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x20, 0x38, 0x24, 0x24, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, + 0x04, 0x08, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x24, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x1c, 0x04, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x08, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x04, 0x1c, 0x24, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x24, 0x3c, 0x20, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x28, 0x10, 0x28, + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x38, 0x04, 0x3c, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x20, 0x38, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x24, 0x28, 0x30, 0x28, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x78, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x24, 0x24, 0x24, + 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0xf0, 0x88, 0x88, 0x88, 0xf4, 0x84, + 0x8e, 0x84, 0x84, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x22, 0x40, 0xf8, 0x40, 0xf8, 0x40, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0x10, 0x10, 0x1c, 0x70, 0x1c, 0x70, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x52, 0x52, 0x50, 0x50, 0x50, + 0x50, 0x52, 0x52, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x62, 0x52, 0x6a, 0x56, 0x4a, 0x46, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x96, 0x96, 0xd0, 0xf0, 0xf0, 0xb0, 0x96, 0x90, 0x96, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x55, 0x55, 0x51, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x40, 0xfe, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0xfe, - 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x42, 0xff, 0x42, 0x24, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x52, 0x52, 0x52, 0x52, 0x52, + 0x52, 0x52, 0x5a, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xa4, + 0xa4, 0xa4, 0xa4, 0xb8, 0xa8, 0xb4, 0xaa, 0xe6, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfb, 0x55, 0x55, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x06, 0x0a, 0x14, 0x28, + 0x50, 0x60, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, + 0x22, 0x22, 0x34, 0x58, 0x88, 0x88, 0x84, 0x44, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, 0xfe, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, - 0x10, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, + 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x04, 0xfe, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x54, 0x38, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x42, 0xff, + 0x42, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, + 0x54, 0x10, 0x10, 0x10, 0x10, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0xfe, 0x42, 0x22, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x84, 0xfe, + 0x84, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, 0x54, 0x38, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x22, 0x42, 0xfe, 0x40, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x30, 0x50, 0x92, 0x82, + 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x20, 0x40, 0xfe, 0x00, 0xfe, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0xfe, 0x00, 0xfe, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7e, 0xc0, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, @@ -781,34 +881,90 @@ static uint8_t font_bytes[1477 * 16] = { 0x28, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x7e, 0xc3, 0x7e, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x28, 0x28, 0x28, 0x28, 0x6c, 0x38, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x02, 0x02, 0x7e, - 0x02, 0x02, 0x02, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, - 0x7c, 0x8a, 0x92, 0x92, 0xa2, 0x7c, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x82, 0x7c, 0x44, 0x44, + 0x28, 0x28, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, + 0x02, 0x02, 0x02, 0x7e, 0x02, 0x02, 0x02, 0x7e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x7e, 0x0a, 0x0a, 0x12, 0x7e, 0x12, 0x22, 0x22, 0x7e, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x7c, 0x8a, 0x92, 0x92, + 0xa2, 0x7c, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, + 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x20, 0x40, 0x40, 0x7e, 0x40, 0x40, 0x20, 0x1e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x20, 0x40, 0x7e, - 0x40, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x06, 0x04, 0x04, 0x04, 0x04, 0x44, 0x44, 0x44, 0x24, 0x14, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x92, 0x92, - 0x92, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, - 0x28, 0x28, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4c, 0x00, - 0x32, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x7e, 0x08, 0x10, 0x7e, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x10, - 0x08, 0x04, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x10, 0x08, 0x04, 0x08, 0x10, 0x20, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, 0x82, 0x82, 0x82, 0xfe, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1e, 0x24, 0x44, 0x48, 0x7e, + 0x48, 0x50, 0x30, 0x3e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1e, 0x20, 0x40, 0x7e, 0x40, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x78, 0x04, 0x02, 0x02, 0x7e, 0x02, 0x02, 0x04, 0x78, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x78, 0x24, 0x22, 0x12, 0x7e, + 0x12, 0x0a, 0x0c, 0x7c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x78, 0x04, 0x02, 0x7e, 0x02, 0x04, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, + 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x04, + 0x04, 0x04, 0x44, 0x44, 0x44, 0x24, 0x14, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x92, 0x92, 0x92, 0x7c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4c, 0x00, 0x32, 0x4c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7e, 0x08, 0x10, + 0x7e, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x10, 0x08, 0x04, 0x00, 0x3e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x08, + 0x10, 0x20, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, + 0x12, 0x24, 0x48, 0x90, 0x48, 0x24, 0x12, 0x09, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x90, 0x48, 0x24, 0x12, 0x09, 0x12, 0x24, 0x48, 0x90, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7c, 0x02, 0x02, 0x02, 0x02, 0x02, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x3e, 0x00, 0x7e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x7c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, + 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, + 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x90, 0x90, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x20, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x08, 0x04, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x10, 0x10, 0x20, 0x40, 0x7c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7c, + 0x7c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x7c, 0x0e, 0x10, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xc0, 0xc0, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x0e, 0xe0, 0x10, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06, 0x06, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0xe0, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -823,236 +979,584 @@ static uint8_t font_bytes[1477 * 16] = { 0x00, 0x70, 0x88, 0x80, 0x80, 0x88, 0x70, 0x00, 0x1e, 0x11, 0x11, 0x1e, 0x12, 0x11, 0x00, 0x00, 0x00, 0x88, 0xc8, 0xa8, 0x98, 0x88, 0x88, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, - 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, - 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, - 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x10, 0x10, 0x10, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, + 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, + 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, - 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, + 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, - 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf8, - 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x10, 0x10, 0x10, 0x10, + 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, + 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, + 0xf8, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x18, 0x18, 0x18, + 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0xf0, 0x00, 0x00, 0x00, + 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, - 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xff, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x1f, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xff, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x10, 0x10, 0x10, + 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xf0, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, + 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, - 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x10, - 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x3f, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x2f, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, - 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf8, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0xe8, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x20, 0x3f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x10, - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x08, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, - 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x2f, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x20, 0x2f, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x10, - 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0xe8, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x08, 0xe8, 0x28, 0x28, 0x28, + 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xf8, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, + 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, + 0x2f, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0x10, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, + 0xe8, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x1f, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x20, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0xf0, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xf8, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x08, + 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x1f, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x20, + 0x2f, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0xf0, 0x10, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x08, + 0xe8, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0x00, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xef, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x10, - 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, 0xef, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x07, + 0xef, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0xff, 0x10, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, + 0xef, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, + 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, + 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x81, 0x81, 0x42, 0x42, + 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Apr 19 00:50:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AE4BF91779; Thu, 19 Apr 2018 00:50:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A660D6F418; Thu, 19 Apr 2018 00:50:51 +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 86A35225CF; Thu, 19 Apr 2018 00:50:51 +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 w3J0oph7020019; Thu, 19 Apr 2018 00:50:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J0opqj020018; Thu, 19 Apr 2018 00:50:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804190050.w3J0opqj020018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 19 Apr 2018 00:50:51 +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: r332745 - stable/10/sys/dev/vt/font X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/dev/vt/font X-SVN-Commit-Revision: 332745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 00:50:52 -0000 Author: emaste Date: Thu Apr 19 00:50:51 2018 New Revision: 332745 URL: https://svnweb.freebsd.org/changeset/base/332745 Log: MFC r332452: Update vt(4) "Terminus BSD Console" font to v4.46 "Terminus BSD Console" is a derivative of Terminus that is provided by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the FreeBSD vt(4) console and other BSDs. PR: 227409 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/font/vt_font_default.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/font/vt_font_default.c ============================================================================== --- stable/10/sys/dev/vt/font/vt_font_default.c Thu Apr 19 00:40:34 2018 (r332744) +++ stable/10/sys/dev/vt/font/vt_font_default.c Thu Apr 19 00:50:51 2018 (r332745) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include -static uint8_t font_bytes[1477 * 16] = { +static uint8_t font_bytes[2224 * 16] = { 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, @@ -186,9 +186,9 @@ static uint8_t font_bytes[1477 * 16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, - 0x10, 0x10, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x08, - 0x10, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x38, 0x04, 0x18, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x04, + 0x08, 0x10, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x04, 0x18, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x7a, 0x40, 0x40, 0x40, 0x00, @@ -196,7 +196,7 @@ static uint8_t font_bytes[1477 * 16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x20, 0x00, - 0x00, 0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x48, 0x24, 0x12, 0x24, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, @@ -338,7 +338,7 @@ static uint8_t font_bytes[1477 * 16] = { 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x40, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xff, 0x42, 0x42, 0x7e, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf8, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4c, 0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x58, 0x00, 0x30, 0x10, 0x10, @@ -494,222 +494,258 @@ static uint8_t font_bytes[1477 * 16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x03, 0x00, 0x32, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, - 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x3c, 0x42, - 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, - 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x42, 0x42, - 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x80, 0x38, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x82, - 0x82, 0x44, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x66, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x48, 0x48, 0x00, 0x30, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x44, 0x82, 0x82, 0xfe, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x5a, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, - 0x28, 0x28, 0x44, 0x44, 0x44, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, - 0x20, 0x10, 0x08, 0x08, 0x10, 0x20, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x7c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, - 0x92, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, + 0x18, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x10, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x7e, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x80, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x40, 0x7e, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x38, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, + 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x66, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x00, 0x3a, 0x46, 0x44, 0x44, 0x44, 0x46, 0x3a, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x3c, 0x42, 0x40, - 0x38, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, - 0x00, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x02, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x24, 0x00, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x10, 0x48, 0x48, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, + 0x28, 0x28, 0x44, 0x44, 0x44, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x5a, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, + 0x44, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x20, 0x10, 0x08, 0x08, + 0x10, 0x20, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, + 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x42, 0x24, 0x24, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x3a, 0x46, 0x44, 0x44, 0x44, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x44, 0x44, 0x48, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, - 0x44, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x3e, 0x10, - 0x08, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0x04, 0x08, 0x10, 0x20, 0x40, 0x40, 0x40, 0x40, 0x3c, - 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x7c, 0x44, + 0x00, 0x00, 0x08, 0x10, 0x00, 0x3c, 0x42, 0x40, 0x38, 0x40, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x08, 0x10, + 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x10, 0x00, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x44, + 0x44, 0x44, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, + 0x44, 0x48, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, + 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x3e, 0x10, 0x08, 0x3c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x04, + 0x08, 0x10, 0x20, 0x40, 0x40, 0x40, 0x40, 0x3c, 0x02, 0x02, 0x04, 0x00, + 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x7c, 0x44, 0x44, 0x44, 0x44, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, + 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3e, 0x40, 0x40, 0x40, 0x3c, 0x40, 0x40, 0x40, 0x40, 0x3c, + 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x40, 0x3c, + 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x44, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x7c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, + 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x82, 0x92, + 0x92, 0x92, 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x20, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x40, 0x40, 0x40, 0x3c, 0x40, - 0x40, 0x40, 0x40, 0x3c, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, + 0x00, 0x44, 0x82, 0x92, 0x92, 0x92, 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x3e, 0x04, 0xc4, 0x44, 0x44, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc2, 0x24, 0x18, 0x10, 0x30, 0x48, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, - 0x40, 0x40, 0x40, 0x3c, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3e, 0x44, 0x44, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, + 0x40, 0x40, 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x4c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x24, - 0x24, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, - 0x92, 0x92, 0x92, 0x7c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x44, 0x82, 0x92, 0x92, 0x92, 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x48, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, - 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x00, 0x44, 0x82, 0x92, 0x92, 0x92, 0x92, 0x6c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x7e, 0x42, - 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x20, - 0x20, 0x3c, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x10, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x78, 0x40, - 0x40, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x50, - 0x90, 0x9c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x90, 0x90, 0x90, 0x9c, 0xf2, 0x92, 0x92, 0x92, 0x92, 0x9c, + 0x00, 0x1e, 0x20, 0x40, 0x7c, 0x40, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x04, 0x02, 0x3e, 0x02, 0x04, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x20, 0x20, 0x3c, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x42, 0x44, - 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x08, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x18, 0x18, 0x00, 0x00, - 0x00, 0x00, 0x7c, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0xfe, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, - 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, - 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x12, - 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0x92, 0x92, 0x92, 0x92, 0x92, - 0x92, 0x92, 0x92, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3f, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x02, + 0x22, 0x22, 0x22, 0x24, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7e, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x50, 0x90, 0x9c, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90, + 0x90, 0x9c, 0xf2, 0x92, 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0x20, 0x20, 0x3c, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x42, 0x44, 0x48, 0x50, 0x60, 0x60, + 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x42, 0x42, + 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x18, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x40, + 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xfe, + 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x54, 0x38, 0x54, + 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x18, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x12, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x7c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, - 0x92, 0x92, 0x92, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, - 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7f, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x82, 0xf2, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, - 0x02, 0x02, 0x1e, 0x02, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x8c, 0x92, 0x92, 0x92, 0x92, 0xf2, 0x92, 0x92, 0x92, 0x8c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x0a, 0x12, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x40, + 0x92, 0x92, 0x92, 0x7f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x44, 0x44, 0x48, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x7c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, + 0x00, 0x00, 0x82, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0xf2, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x02, 0x1e, 0x02, + 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x92, + 0x92, 0x92, 0x92, 0xf2, 0x92, 0x92, 0x92, 0x8c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3e, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x0a, 0x12, 0x22, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x40, 0x40, 0x7c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, + 0x44, 0x48, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x54, + 0x38, 0x54, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xc6, 0xaa, + 0x92, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x7f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x20, 0x3c, 0x22, 0x22, 0x22, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0xf2, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x78, + 0x44, 0x44, 0x44, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x02, 0x1e, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x92, 0x92, 0xf2, 0x92, 0x92, 0x8c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x42, + 0x3e, 0x12, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, + 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x0c, 0x00, + 0x00, 0x00, 0x08, 0x10, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, + 0x78, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x70, 0x90, 0x9c, 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90, 0x9c, 0xf2, 0x92, 0x92, 0x9c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x42, 0x44, 0x48, + 0x70, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, + 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, + 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, 0x40, 0x7c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, + 0x78, 0x20, 0x20, 0x3c, 0x22, 0x22, 0x22, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0x82, 0x44, 0x28, 0x38, 0x54, 0x92, 0x92, 0x92, 0x92, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x44, 0x28, + 0x38, 0x54, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7e, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x02, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0xf8, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x82, 0xc6, 0xaa, 0x92, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x7c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7c, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3f, + 0x00, 0x7e, 0x40, 0x40, 0xf8, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, + 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, + 0x78, 0x44, 0x44, 0x44, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, + 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x92, 0x93, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x93, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x02, 0x1c, 0x02, + 0x02, 0x42, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x42, 0x44, 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x43, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x48, + 0x70, 0x48, 0x44, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x54, 0x58, 0x70, 0x70, 0x58, 0x54, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x54, 0x58, 0x70, 0x58, 0x54, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x44, 0x48, 0x50, 0x60, 0x60, + 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc2, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, - 0x3e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7e, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x7f, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x3c, - 0x22, 0x22, 0x22, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x78, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, - 0x1e, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x8c, 0x92, 0x92, 0xf2, 0x92, 0x92, 0x8c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x42, 0x3e, 0x12, 0x22, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf8, 0x40, 0x7c, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x42, 0x02, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x10, - 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x78, 0x40, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x90, 0x9c, - 0x92, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x90, 0x90, 0x9c, 0xf2, 0x92, 0x92, 0x9c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0x00, 0x42, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x00, 0x42, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x18, 0x18, 0x00, 0x00, - 0x02, 0x02, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7e, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, - 0x40, 0x40, 0xf8, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0xf8, 0x40, 0x40, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x40, 0x7c, - 0x42, 0x42, 0x42, 0x42, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x7e, 0x40, 0x40, 0x78, 0x44, 0x44, 0x44, 0x04, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x92, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x92, 0x93, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x54, - 0x38, 0x54, 0x92, 0x93, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, - 0x42, 0x02, 0x1c, 0x02, 0x02, 0x42, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, - 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x42, 0x44, 0x48, 0x50, 0x60, 0x60, - 0x50, 0x48, 0x44, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x44, 0x48, 0x70, 0x48, 0x44, 0x43, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x54, 0x58, 0x70, 0x70, 0x58, 0x54, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x54, 0x58, - 0x70, 0x58, 0x54, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x44, - 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, - 0x42, 0x42, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x47, 0x44, 0x44, 0x44, 0x7c, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x44, 0x44, - 0x7c, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, - 0x42, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x42, 0x3c, - 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x10, - 0x7c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x7c, 0x10, 0x10, 0x00, - 0x00, 0x00, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x42, 0x43, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x24, - 0x18, 0x24, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, - 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x03, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x4a, 0x4a, 0x3e, - 0x0a, 0x0a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x4a, 0x4a, 0x3e, 0x0a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7c, - 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, - 0x42, 0x02, 0x02, 0x7e, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x02, 0x02, 0x7e, 0x42, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x92, 0x92, 0x92, 0x54, 0x38, - 0x54, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, + 0x7e, 0x42, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x47, 0x44, + 0x44, 0x44, 0x7c, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x44, 0x44, 0x7c, 0x44, 0x44, 0x44, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x40, 0x40, 0x40, + 0x40, 0x42, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x42, 0x3c, 0x10, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x10, 0x7c, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, + 0x44, 0x28, 0x28, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x42, 0x43, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x24, 0x18, 0x24, 0x42, 0x43, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, + 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x42, 0x42, 0x4a, 0x4a, 0x3e, 0x0a, 0x0a, 0x02, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4a, 0x4a, + 0x3e, 0x0a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, + 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x00, 0x92, 0x92, 0x92, 0x54, 0x38, + 0x54, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x00, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, - 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, - 0x1c, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x42, 0x42, - 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, + 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, 0x02, 0x7e, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x02, 0x02, + 0x7e, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x92, + 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0x44, 0x00, 0x92, 0x92, 0x54, 0x38, 0x54, 0x92, 0x92, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x02, 0x1c, + 0x02, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, + 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x3c, 0x00, 0x42, 0x42, 0x42, 0x46, 0x4a, 0x52, 0x62, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x46, 0x4a, + 0x52, 0x62, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, - 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, 0x02, 0x1e, - 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, - 0x00, 0x3c, 0x42, 0x02, 0x1e, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x3c, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x00, 0x42, + 0x42, 0x02, 0x02, 0x1e, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, 0x1e, 0x02, 0x42, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, + 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x02, 0x02, 0x3c, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3e, - 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, - 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x48, 0x00, 0x82, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0x8a, 0xf2, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x00, 0x82, 0x82, 0xf2, - 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, + 0x12, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x00, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x3c, 0x00, 0x24, 0x24, 0x00, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x00, 0x82, 0x82, 0x82, 0xf2, 0x8a, + 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, + 0x00, 0x82, 0x82, 0xf2, 0x8a, 0x8a, 0x8a, 0xf2, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x78, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x78, + 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x3e, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x3e, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x42, 0x44, 0x48, 0x50, 0x60, 0x60, 0x50, 0x48, 0x44, 0x42, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x42, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, + 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x7e, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x30, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x10, 0x10, 0x00, + 0x10, 0x10, 0x82, 0xc6, 0xaa, 0x92, 0x92, 0x82, 0x82, 0x82, 0x82, 0x82, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0xfc, 0x92, 0x92, + 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xc6, + 0xaa, 0x92, 0x92, 0x82, 0x82, 0x82, 0x82, 0x82, 0x00, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, + 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x42, 0x42, 0x42, 0x62, 0x52, 0x4a, + 0x46, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, + 0x00, 0x7c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x42, 0x42, 0x62, 0x52, 0x4a, 0x46, 0x42, 0x42, 0x42, + 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0xfe, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0e, + 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x7e, 0x40, 0x40, 0x3c, 0x00, 0x10, 0x10, 0x00, 0x32, 0x4c, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x7e, @@ -753,26 +789,90 @@ static uint8_t font_bytes[1477 * 16] = { 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x24, 0x24, - 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x24, 0x24, - 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xf0, 0x88, 0x88, 0x88, 0xf4, 0x84, 0x8e, 0x84, 0x84, 0x82, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x40, 0xf8, 0x40, - 0xf8, 0x40, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, - 0x10, 0x1c, 0x70, 0x1c, 0x70, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x24, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x30, 0x10, + 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x0c, 0x14, 0x3e, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x04, 0x04, 0x38, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x20, 0x38, + 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x04, 0x08, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, + 0x1c, 0x04, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, + 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x10, 0x10, 0x10, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x08, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x24, + 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x24, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x30, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x24, 0x04, 0x08, 0x10, 0x3c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x18, 0x04, 0x04, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x0c, 0x14, 0x3e, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x20, 0x38, 0x24, 0x24, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, + 0x04, 0x08, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x24, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x1c, 0x04, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x08, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x04, 0x1c, 0x24, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x24, 0x3c, 0x20, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x28, 0x10, 0x28, + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x38, 0x04, 0x3c, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x20, 0x38, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x24, 0x28, 0x30, 0x28, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x78, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x24, 0x24, 0x24, + 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0xf0, 0x88, 0x88, 0x88, 0xf4, 0x84, + 0x8e, 0x84, 0x84, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x22, 0x40, 0xf8, 0x40, 0xf8, 0x40, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0x10, 0x10, 0x1c, 0x70, 0x1c, 0x70, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x52, 0x52, 0x50, 0x50, 0x50, + 0x50, 0x52, 0x52, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, + 0x62, 0x52, 0x6a, 0x56, 0x4a, 0x46, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x96, 0x96, 0xd0, 0xf0, 0xf0, 0xb0, 0x96, 0x90, 0x96, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x55, 0x55, 0x51, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x40, 0xfe, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0xfe, - 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x42, 0xff, 0x42, 0x24, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x52, 0x52, 0x52, 0x52, 0x52, + 0x52, 0x52, 0x5a, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xa4, + 0xa4, 0xa4, 0xa4, 0xb8, 0xa8, 0xb4, 0xaa, 0xe6, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfb, 0x55, 0x55, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x06, 0x0a, 0x14, 0x28, + 0x50, 0x60, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, + 0x22, 0x22, 0x34, 0x58, 0x88, 0x88, 0x84, 0x44, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, 0xfe, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, - 0x10, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, + 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x04, 0xfe, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x54, 0x38, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x42, 0xff, + 0x42, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, + 0x54, 0x10, 0x10, 0x10, 0x10, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0xfe, 0x42, 0x22, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x84, 0xfe, + 0x84, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x54, 0x10, 0x10, 0x10, 0x54, 0x38, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x22, 0x42, 0xfe, 0x40, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x30, 0x50, 0x92, 0x82, + 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x20, 0x40, 0xfe, 0x00, 0xfe, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0xfe, 0x00, 0xfe, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7e, 0xc0, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, @@ -781,34 +881,90 @@ static uint8_t font_bytes[1477 * 16] = { 0x28, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x7e, 0xc3, 0x7e, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x28, 0x28, 0x28, 0x28, 0x6c, 0x38, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x02, 0x02, 0x7e, - 0x02, 0x02, 0x02, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, - 0x7c, 0x8a, 0x92, 0x92, 0xa2, 0x7c, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x82, 0x7c, 0x44, 0x44, + 0x28, 0x28, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, + 0x02, 0x02, 0x02, 0x7e, 0x02, 0x02, 0x02, 0x7e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x7e, 0x0a, 0x0a, 0x12, 0x7e, 0x12, 0x22, 0x22, 0x7e, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x7c, 0x8a, 0x92, 0x92, + 0xa2, 0x7c, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, + 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x20, 0x40, 0x40, 0x7e, 0x40, 0x40, 0x20, 0x1e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x20, 0x40, 0x7e, - 0x40, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x06, 0x04, 0x04, 0x04, 0x04, 0x44, 0x44, 0x44, 0x24, 0x14, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x92, 0x92, - 0x92, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, - 0x28, 0x28, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4c, 0x00, - 0x32, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x7e, 0x08, 0x10, 0x7e, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x10, - 0x08, 0x04, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x10, 0x08, 0x04, 0x08, 0x10, 0x20, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, 0x82, 0x82, 0x82, 0xfe, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1e, 0x24, 0x44, 0x48, 0x7e, + 0x48, 0x50, 0x30, 0x3e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1e, 0x20, 0x40, 0x7e, 0x40, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x78, 0x04, 0x02, 0x02, 0x7e, 0x02, 0x02, 0x04, 0x78, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x78, 0x24, 0x22, 0x12, 0x7e, + 0x12, 0x0a, 0x0c, 0x7c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x78, 0x04, 0x02, 0x7e, 0x02, 0x04, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, + 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x04, + 0x04, 0x04, 0x44, 0x44, 0x44, 0x24, 0x14, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x92, 0x92, 0x92, 0x7c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, + 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4c, 0x00, 0x32, 0x4c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7e, 0x08, 0x10, + 0x7e, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x10, 0x08, 0x04, 0x00, 0x3e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x08, + 0x10, 0x20, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, + 0x12, 0x24, 0x48, 0x90, 0x48, 0x24, 0x12, 0x09, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x90, 0x48, 0x24, 0x12, 0x09, 0x12, 0x24, 0x48, 0x90, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7c, 0x02, 0x02, 0x02, 0x02, 0x02, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x3e, 0x00, 0x7e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x7c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, + 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, + 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x90, 0x90, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x20, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x08, 0x04, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x10, 0x10, 0x20, 0x40, 0x7c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7c, + 0x7c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x7c, 0x0e, 0x10, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xc0, 0xc0, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x0e, 0xe0, 0x10, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06, 0x06, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0xe0, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -823,236 +979,584 @@ static uint8_t font_bytes[1477 * 16] = { 0x00, 0x70, 0x88, 0x80, 0x80, 0x88, 0x70, 0x00, 0x1e, 0x11, 0x11, 0x1e, 0x12, 0x11, 0x00, 0x00, 0x00, 0x88, 0xc8, 0xa8, 0x98, 0x88, 0x88, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, - 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, - 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, - 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x10, 0x10, 0x10, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, + 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, + 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, - 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, + 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, - 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf8, - 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x10, 0x10, 0x10, 0x10, + 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x1f, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, + 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0xf0, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, + 0xf8, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x18, 0x18, 0x18, + 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0xf0, 0x00, 0x00, 0x00, + 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, - 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xff, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x1f, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xff, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x10, 0x10, 0x10, + 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, - 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xf0, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, + 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, - 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x10, - 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x3f, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x2f, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, - 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf8, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0xe8, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x20, 0x3f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x10, - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x08, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, - 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x2f, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x20, 0x2f, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x10, - 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0xe8, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x08, 0xe8, 0x28, 0x28, 0x28, + 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xf8, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, + 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, + 0x2f, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0x10, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, + 0xe8, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x1f, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x20, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0xf0, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xf8, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x08, + 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x1f, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2f, 0x20, + 0x2f, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0xf0, 0x10, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xe8, 0x08, + 0xe8, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0x00, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xef, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x10, - 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, 0xef, 0x28, 0x28, 0x28, - 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x07, + 0xef, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0xff, 0x10, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0xef, 0x00, + 0xef, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, + 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, + 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x81, 0x81, 0x42, 0x42, + 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Apr 19 01:10:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9878BF930F6; Thu, 19 Apr 2018 01:10:54 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AAF172A21; Thu, 19 Apr 2018 01:10:54 +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 3D87522900; Thu, 19 Apr 2018 01:10:54 +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 w3J1As2U027699; Thu, 19 Apr 2018 01:10:54 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J1AsHw027698; Thu, 19 Apr 2018 01:10:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804190110.w3J1AsHw027698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Apr 2018 01:10: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: r332746 - stable/11/stand/efi/boot1 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/stand/efi/boot1 X-SVN-Commit-Revision: 332746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 01:10:54 -0000 Author: kevans Date: Thu Apr 19 01:10:53 2018 New Revision: 332746 URL: https://svnweb.freebsd.org/changeset/base/332746 Log: MFC r332561,r332573: Rename volume label for ESP MFC r332561: Rename volume label for ESP Harry Schmalzbauer reports that some firmware, in his experience, trips over the ESP we install due to the volume label. It has been theorized that this is due to some confusion with the label and the path on the ESP to boot1.efi. Regardless, Harry found that renaming the label seems to fix it. MFC r332573: Regenerate FAT templates after r332561 PR: 214282 Modified: stable/11/stand/efi/boot1/fat-amd64.tmpl.xz stable/11/stand/efi/boot1/fat-arm.tmpl.xz stable/11/stand/efi/boot1/fat-arm64.tmpl.xz stable/11/stand/efi/boot1/fat-i386.tmpl.xz stable/11/stand/efi/boot1/generate-fat.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/efi/boot1/fat-amd64.tmpl.xz ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/11/stand/efi/boot1/fat-arm.tmpl.xz ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/11/stand/efi/boot1/fat-arm64.tmpl.xz ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/11/stand/efi/boot1/fat-i386.tmpl.xz ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/11/stand/efi/boot1/generate-fat.sh ============================================================================== --- stable/11/stand/efi/boot1/generate-fat.sh Thu Apr 19 00:50:51 2018 (r332745) +++ stable/11/stand/efi/boot1/generate-fat.sh Thu Apr 19 01:10:53 2018 (r332746) @@ -42,7 +42,7 @@ while read ARCH FILENAME; do dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE DEVICE=`mdconfig -a -f $OUTPUT_FILE` - newfs_msdos -F 12 -L EFI $DEVICE + newfs_msdos -F 12 -L EFISYS $DEVICE mkdir stub mount -t msdosfs /dev/$DEVICE stub From owner-svn-src-all@freebsd.org Thu Apr 19 01:14:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51B03F935D9; Thu, 19 Apr 2018 01:14:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE1267494D; Thu, 19 Apr 2018 01:14:01 +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 E6EA522A9B; Thu, 19 Apr 2018 01:14:01 +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 w3J1E18S032512; Thu, 19 Apr 2018 01:14:01 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J1E18c032511; Thu, 19 Apr 2018 01:14:01 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804190114.w3J1E18c032511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Apr 2018 01:14: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: r332747 - stable/11/usr.sbin/cron/cron X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.sbin/cron/cron X-SVN-Commit-Revision: 332747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 01:14:02 -0000 Author: kevans Date: Thu Apr 19 01:14:01 2018 New Revision: 332747 URL: https://svnweb.freebsd.org/changeset/base/332747 Log: MFC r332429, r332431 r332429: cron(8): Reload database if an existing job in cron.d changed as well Directory mtime will only change if a file is added or removed, not modified. For /var/cron/tabs, this is fine because of how crontab(1) manages it using temp files so all crontab(1) changes will trigger a reload of the database. For /etc/cron.d and /usr/local/etc/cron.d, this is not necessarily the case. Instead of checking their mtime, we should descend into them and check mtime on all jobs also. r332431: cron(8): Correct test sense We're about to use the result of fstat(2) either way, so don't do that if it fails... Modified: stable/11/usr.sbin/cron/cron/database.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/cron/cron/database.c ============================================================================== --- stable/11/usr.sbin/cron/cron/database.c Thu Apr 19 01:10:53 2018 (r332746) +++ stable/11/usr.sbin/cron/cron/database.c Thu Apr 19 01:14:01 2018 (r332747) @@ -56,7 +56,7 @@ load_database(old_db) { SYSCRONTABS }, { LOCALSYSCRONTABS } }; - int i; + int i, ret; Debug(DLOAD, ("[%d] load_database()\n", getpid())) @@ -79,6 +79,18 @@ load_database(old_db) for (i = 0; i < nitems(syscrontabs); i++) { if (stat(syscrontabs[i].name, &syscrontabs[i].st) != -1) { maxmtime = TMAX(syscrontabs[i].st.st_mtime, maxmtime); + /* Traverse into directory */ + if (!(dir = opendir(syscrontabs[i].name))) + continue; + while (NULL != (dp = readdir(dir))) { + if (dp->d_name[0] == '.') + continue; + ret = fstatat(dirfd(dir), dp->d_name, &st, 0); + if (ret != 0 || !S_ISREG(st.st_mode)) + continue; + maxmtime = TMAX(st.st_mtime, maxmtime); + } + closedir(dir); } else { syscrontabs[i].st.st_mtime = 0; } From owner-svn-src-all@freebsd.org Thu Apr 19 01:15:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BFA8F938BF; Thu, 19 Apr 2018 01:15:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2DD375396; Thu, 19 Apr 2018 01:15:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD98022AA5; Thu, 19 Apr 2018 01:15:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J1FJ5p032619; Thu, 19 Apr 2018 01:15:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J1FJMe032614; Thu, 19 Apr 2018 01:15:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804190115.w3J1FJMe032614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Apr 2018 01:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332748 - in stable/11/stand/efi: include libefi loader X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/stand/efi: include libefi loader X-SVN-Commit-Revision: 332748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 01:15:20 -0000 Author: kevans Date: Thu Apr 19 01:15:19 2018 New Revision: 332748 URL: https://svnweb.freebsd.org/changeset/base/332748 Log: MFC r332416: Refactor currdev setting Refactor the currdev setting to find the device we booted from. Limit searching when we don't already have a reasonable currdev from that to the same device only. Search a little harder for ZFS volumes as that's needed for loader.efi to live on an ESP. Modified: stable/11/stand/efi/include/efilib.h stable/11/stand/efi/include/efizfs.h stable/11/stand/efi/libefi/efipart.c stable/11/stand/efi/libefi/efizfs.c stable/11/stand/efi/loader/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/efi/include/efilib.h ============================================================================== --- stable/11/stand/efi/include/efilib.h Thu Apr 19 01:14:01 2018 (r332747) +++ stable/11/stand/efi/include/efilib.h Thu Apr 19 01:15:19 2018 (r332748) @@ -59,10 +59,13 @@ typedef struct pdinfo uint32_t pd_unit; /* unit number */ uint32_t pd_open; /* reference counter */ void *pd_bcache; /* buffer cache data */ + struct pdinfo *pd_parent; /* Linked items (eg partitions) */ + struct devsw *pd_devsw; /* Back pointer to devsw */ } pdinfo_t; pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *dev); pdinfo_t *efiblk_get_pdinfo(struct devdesc *dev); +pdinfo_t *efiblk_get_pdinfo_by_handle(EFI_HANDLE h); void *efi_get_table(EFI_GUID *tbl); Modified: stable/11/stand/efi/include/efizfs.h ============================================================================== --- stable/11/stand/efi/include/efizfs.h Thu Apr 19 01:14:01 2018 (r332747) +++ stable/11/stand/efi/include/efizfs.h Thu Apr 19 01:15:19 2018 (r332748) @@ -48,6 +48,7 @@ extern void efi_zfs_probe(void); extern zfsinfo_list_t *efizfs_get_zfsinfo_list(void); extern bool efi_zfs_is_preferred(EFI_HANDLE *h); extern EFI_HANDLE efizfs_get_handle_by_guid(uint64_t); +extern bool efizfs_get_guid_by_handle(EFI_HANDLE, uint64_t *); #endif Modified: stable/11/stand/efi/libefi/efipart.c ============================================================================== --- stable/11/stand/efi/libefi/efipart.c Thu Apr 19 01:14:01 2018 (r332747) +++ stable/11/stand/efi/libefi/efipart.c Thu Apr 19 01:15:19 2018 (r332748) @@ -119,6 +119,7 @@ efiblk_get_pdinfo_list(struct devsw *dev) return (NULL); } +/* XXX this gets called way way too often, investigate */ pdinfo_t * efiblk_get_pdinfo(struct devdesc *dev) { @@ -136,6 +137,40 @@ efiblk_get_pdinfo(struct devdesc *dev) return (pd); } +static bool +same_handle(pdinfo_t *pd, EFI_HANDLE h) +{ + + return (pd->pd_handle == h || pd->pd_alias == h); +} + +pdinfo_t * +efiblk_get_pdinfo_by_handle(EFI_HANDLE h) +{ + pdinfo_t *dp, *pp; + + /* + * Check hard disks, then cd, then floppy + */ + STAILQ_FOREACH(dp, &hdinfo, pd_link) { + if (same_handle(dp, h)) + return (dp); + STAILQ_FOREACH(pp, &dp->pd_part, pd_link) { + if (same_handle(pp, h)) + return (pp); + } + } + STAILQ_FOREACH(dp, &cdinfo, pd_link) { + if (same_handle(dp, h)) + return (dp); + } + STAILQ_FOREACH(dp, &fdinfo, pd_link) { + if (same_handle(dp, h)) + return (dp); + } + return (NULL); +} + static int efiblk_pdinfo_count(pdinfo_list_t *pdi) { @@ -294,6 +329,8 @@ efipart_fdinfo_add(EFI_HANDLE handle, uint32_t uid, EF fd->pd_unit = uid; fd->pd_handle = handle; fd->pd_devpath = devpath; + fd->pd_parent = NULL; + fd->pd_devsw = &efipart_fddev; STAILQ_INSERT_TAIL(&fdinfo, fd, pd_link); return (0); } @@ -364,6 +401,8 @@ efipart_cdinfo_add(EFI_HANDLE handle, EFI_HANDLE alias cd->pd_unit = unit; cd->pd_alias = alias; cd->pd_devpath = devpath; + cd->pd_parent = NULL; + cd->pd_devsw = &efipart_cddev; STAILQ_INSERT_TAIL(&cdinfo, cd, pd_link); return (0); } @@ -489,6 +528,8 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE pd->pd_handle = part_handle; pd->pd_unit = node->PartitionNumber; pd->pd_devpath = part_devpath; + pd->pd_parent = hd; + pd->pd_devsw = &efipart_hddev; STAILQ_INSERT_TAIL(&hd->pd_part, pd, pd_link); return (0); } @@ -505,6 +546,8 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE hd->pd_handle = disk_handle; hd->pd_unit = unit; hd->pd_devpath = disk_devpath; + hd->pd_parent = NULL; + hd->pd_devsw = &efipart_hddev; STAILQ_INSERT_TAIL(&hdinfo, hd, pd_link); if (part_devpath == NULL) @@ -521,6 +564,8 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE pd->pd_handle = part_handle; pd->pd_unit = node->PartitionNumber; pd->pd_devpath = part_devpath; + pd->pd_parent = hd; + pd->pd_devsw = &efipart_hddev; STAILQ_INSERT_TAIL(&hd->pd_part, pd, pd_link); return (0); @@ -579,6 +624,8 @@ efipart_hdinfo_add_filepath(EFI_HANDLE disk_handle) pd->pd_handle = disk_handle; pd->pd_unit = unit; pd->pd_devpath = devpath; + pd->pd_parent = NULL; + pd->pd_devsw = &efipart_hddev; STAILQ_INSERT_TAIL(&hdinfo, pd, pd_link); free(pathname); return (0); @@ -609,6 +656,8 @@ efipart_hdinfo_add_filepath(EFI_HANDLE disk_handle) pd->pd_handle = disk_handle; pd->pd_unit = unit; pd->pd_devpath = devpath; + pd->pd_parent = last; + pd->pd_devsw = &efipart_hddev; STAILQ_INSERT_TAIL(&last->pd_part, pd, pd_link); free(pathname); return (0); Modified: stable/11/stand/efi/libefi/efizfs.c ============================================================================== --- stable/11/stand/efi/libefi/efizfs.c Thu Apr 19 01:14:01 2018 (r332747) +++ stable/11/stand/efi/libefi/efizfs.c Thu Apr 19 01:15:19 2018 (r332748) @@ -64,6 +64,22 @@ efizfs_get_handle_by_guid(uint64_t guid) return (NULL); } +bool +efizfs_get_guid_by_handle(EFI_HANDLE handle, uint64_t *guid) +{ + zfsinfo_t *zi; + + if (guid == NULL) + return (false); + STAILQ_FOREACH(zi, &zfsinfo, zi_link) { + if (zi->zi_handle == handle) { + *guid = zi->zi_pool_guid; + return (true); + } + } + return (false); +} + static void insert_zfs(EFI_HANDLE handle, uint64_t guid) { Modified: stable/11/stand/efi/loader/main.c ============================================================================== --- stable/11/stand/efi/loader/main.c Thu Apr 19 01:14:01 2018 (r332747) +++ stable/11/stand/efi/loader/main.c Thu Apr 19 01:15:19 2018 (r332748) @@ -78,6 +78,15 @@ EFI_GUID inputid = SIMPLE_TEXT_INPUT_PROTOCOL; static EFI_LOADED_IMAGE *img; +/* + * Number of seconds to wait for a keystroke before exiting with failure + * in the event no currdev is found. -2 means always break, -1 means + * never break, 0 means poll once and then reboot, > 0 means wait for + * that many seconds. "fail_timeout" can be set in the environment as + * well. + */ +static int fail_timeout = 5; + #ifdef EFI_ZFS_BOOT bool efi_zfs_is_preferred(EFI_HANDLE *h) @@ -169,113 +178,183 @@ out: } static void -set_devdesc_currdev(struct devsw *dev, int unit) +set_currdev_devdesc(struct devdesc *currdev) { + const char *devname; + + devname = efi_fmtdev(currdev); + + printf("Setting currdev to %s\n", devname); + + env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, env_nounset); + env_setenv("loaddev", EV_VOLATILE, devname, env_noset, env_nounset); +} + +static void +set_currdev_devsw(struct devsw *dev, int unit) +{ struct devdesc currdev; - char *devname; currdev.d_dev = dev; currdev.d_unit = unit; + + set_currdev_devdesc(&currdev); +} + +static void +set_currdev_pdinfo(pdinfo_t *dp) +{ + + /* + * Disks are special: they have partitions. if the parent + * pointer is non-null, we're a partition not a full disk + * and we need to adjust currdev appropriately. + */ + if (dp->pd_devsw->dv_type == DEVT_DISK) { + struct disk_devdesc currdev; + + currdev.dd.d_dev = dp->pd_devsw; + if (dp->pd_parent == NULL) { + currdev.dd.d_unit = dp->pd_unit; + currdev.d_slice = -1; + currdev.d_partition = -1; + } else { + currdev.dd.d_unit = dp->pd_parent->pd_unit; + currdev.d_slice = dp->pd_unit; + currdev.d_partition = 255; /* Assumes GPT */ + } + set_currdev_devdesc((struct devdesc *)&currdev); + } else { + set_currdev_devsw(dp->pd_devsw, dp->pd_unit); + } +} + +static bool +sanity_check_currdev(void) +{ + struct stat st; + + return (stat("/boot/defaults/loader.conf", &st) == 0); +} + +#ifdef EFI_ZFS_BOOT +static bool +probe_zfs_currdev(uint64_t guid) +{ + char *devname; + struct zfs_devdesc currdev; + + currdev.dd.d_dev = &zfs_dev; + currdev.dd.d_unit = 0; + currdev.pool_guid = guid; + currdev.root_guid = 0; + set_currdev_devdesc((struct devdesc *)&currdev); devname = efi_fmtdev(&currdev); + init_zfs_bootenv(devname); - env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, - env_nounset); - env_setenv("loaddev", EV_VOLATILE, devname, env_noset, env_nounset); + return (sanity_check_currdev()); } +#endif +static bool +try_as_currdev(pdinfo_t *hd, pdinfo_t *pp) +{ + uint64_t guid; + +#ifdef EFI_ZFS_BOOT + /* + * If there's a zpool on this device, try it as a ZFS + * filesystem, which has somewhat different setup than all + * other types of fs due to imperfect loader integration. + * This all stems from ZFS being both a device (zpool) and + * a filesystem, plus the boot env feature. + */ + if (efizfs_get_guid_by_handle(pp->pd_handle, &guid)) + return (probe_zfs_currdev(guid)); +#endif + /* + * All other filesystems just need the pdinfo + * initialized in the standard way. + */ + set_currdev_pdinfo(pp); + return (sanity_check_currdev()); +} + static int find_currdev(EFI_LOADED_IMAGE *img) { - pdinfo_list_t *pdi_list; pdinfo_t *dp, *pp; EFI_DEVICE_PATH *devpath, *copy; EFI_HANDLE h; - char *devname; + CHAR16 *text; struct devsw *dev; int unit; uint64_t extra; #ifdef EFI_ZFS_BOOT - /* Did efi_zfs_probe() detect the boot pool? */ + /* + * Did efi_zfs_probe() detect the boot pool? If so, use the zpool + * it found, if it's sane. ZFS is the only thing that looks for + * disks and pools to boot. This may change in the future, however, + * if we allow specifying which pool to boot from via UEFI variables + * rather than the bootenv stuff that FreeBSD uses today. + */ if (pool_guid != 0) { - struct zfs_devdesc currdev; - - currdev.dd.d_dev = &zfs_dev; - currdev.dd.d_unit = 0; - currdev.pool_guid = pool_guid; - currdev.root_guid = 0; - devname = efi_fmtdev(&currdev); - - env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, - env_nounset); - env_setenv("loaddev", EV_VOLATILE, devname, env_noset, - env_nounset); - init_zfs_bootenv(devname); - return (0); + printf("Trying ZFS pool\n"); + if (probe_zfs_currdev(pool_guid)) + return (0); } #endif /* EFI_ZFS_BOOT */ - /* We have device lists for hd, cd, fd, walk them all. */ - pdi_list = efiblk_get_pdinfo_list(&efipart_hddev); - STAILQ_FOREACH(dp, pdi_list, pd_link) { - struct disk_devdesc currdev; - - currdev.dd.d_dev = &efipart_hddev; - currdev.dd.d_unit = dp->pd_unit; - currdev.d_slice = -1; - currdev.d_partition = -1; - - if (dp->pd_handle == img->DeviceHandle) { - devname = efi_fmtdev(&currdev); - - env_setenv("currdev", EV_VOLATILE, devname, - efi_setcurrdev, env_nounset); - env_setenv("loaddev", EV_VOLATILE, devname, - env_noset, env_nounset); - return (0); + /* + * Try to find the block device by its handle based on the + * image we're booting. If we can't find a sane partition, + * search all the other partitions of the disk. We do not + * search other disks because it's a violation of the UEFI + * boot protocol to do so. We fail and let UEFI go on to + * the next candidate. + */ + dp = efiblk_get_pdinfo_by_handle(img->DeviceHandle); + if (dp != NULL) { + text = efi_devpath_name(dp->pd_devpath); + if (text != NULL) { + printf("Trying ESP: %S\n", text); + efi_free_devpath_name(text); } - /* Assuming GPT partitioning. */ - STAILQ_FOREACH(pp, &dp->pd_part, pd_link) { - if (pp->pd_handle == img->DeviceHandle) { - currdev.d_slice = pp->pd_unit; - currdev.d_partition = 255; - devname = efi_fmtdev(&currdev); - - env_setenv("currdev", EV_VOLATILE, devname, - efi_setcurrdev, env_nounset); - env_setenv("loaddev", EV_VOLATILE, devname, - env_noset, env_nounset); - return (0); + set_currdev_pdinfo(dp); + if (sanity_check_currdev()) + return (0); + if (dp->pd_parent != NULL) { + dp = dp->pd_parent; + STAILQ_FOREACH(pp, &dp->pd_part, pd_link) { + text = efi_devpath_name(pp->pd_devpath); + if (text != NULL) { + printf("And now the part: %S\n", text); + efi_free_devpath_name(text); + } + /* + * Roll up the ZFS special case + * for those partitions that have + * zpools on them + */ + if (try_as_currdev(dp, pp)) + return (0); } } + } else { + printf("Can't find device by handle\n"); } - pdi_list = efiblk_get_pdinfo_list(&efipart_cddev); - STAILQ_FOREACH(dp, pdi_list, pd_link) { - if (dp->pd_handle == img->DeviceHandle || - dp->pd_alias == img->DeviceHandle) { - set_devdesc_currdev(&efipart_cddev, dp->pd_unit); - return (0); - } - } - - pdi_list = efiblk_get_pdinfo_list(&efipart_fddev); - STAILQ_FOREACH(dp, pdi_list, pd_link) { - if (dp->pd_handle == img->DeviceHandle) { - set_devdesc_currdev(&efipart_fddev, dp->pd_unit); - return (0); - } - } - /* * Try the device handle from our loaded image first. If that * fails, use the device path from the loaded image and see if * any of the nodes in that path match one of the enumerated - * handles. + * handles. Currently, this handle list is only for netboot. */ if (efi_handle_lookup(img->DeviceHandle, &dev, &unit, &extra) == 0) { - set_devdesc_currdev(dev, unit); - return (0); + set_currdev_devsw(dev, unit); + if (sanity_check_currdev()) + return (0); } copy = NULL; @@ -289,8 +368,9 @@ find_currdev(EFI_LOADED_IMAGE *img) copy = NULL; if (efi_handle_lookup(h, &dev, &unit, &extra) == 0) { - set_devdesc_currdev(dev, unit); - return (0); + set_currdev_devsw(dev, unit); + if (sanity_check_currdev()) + return (0); } devpath = efi_lookup_devpath(h); @@ -304,6 +384,33 @@ find_currdev(EFI_LOADED_IMAGE *img) return (ENOENT); } +static bool +interactive_interrupt(const char *msg) +{ + time_t now, then, last; + + last = 0; + now = then = getsecs(); + printf("%s\n", msg); + if (fail_timeout == -2) /* Always break to OK */ + return (true); + if (fail_timeout == -1) /* Never break to OK */ + return (false); + do { + if (last != now) { + printf("press any key to interrupt reboot in %d seconds\r", + fail_timeout - (int)(now - then)); + last = now; + } + + /* XXX no pause or timeout wait for char */ + if (ischar()) + return (true); + now = getsecs(); + } while (now - then < fail_timeout); + return (false); +} + EFI_STATUS main(int argc, CHAR16 *argv[]) { @@ -312,12 +419,13 @@ main(int argc, CHAR16 *argv[]) int i, j, vargood, howto; UINTN k; int has_kbd; + char *s; + EFI_DEVICE_PATH *imgpath; CHAR16 *text; + EFI_STATUS status; UINT16 boot_current; size_t sz; UINT16 boot_order[100]; - EFI_DEVICE_PATH *imgpath; - EFI_STATUS status; #if !defined(__arm__) char buf[40]; #endif @@ -356,12 +464,15 @@ main(int argc, CHAR16 *argv[]) /* * Parse the args to set the console settings, etc * boot1.efi passes these in, if it can read /boot.config or /boot/config - * or iPXE may be setup to pass these in. + * or iPXE may be setup to pass these in. Or the optional argument in the + * boot environment was used to pass these arguments in (in which case + * neither /boot.config nor /boot/config are consulted). * * Loop through the args, and for each one that contains an '=' that is * not the first character, add it to the environment. This allows * loader and kernel env vars to be passed on the command line. Convert - * args from UCS-2 to ASCII (16 to 8 bit) as they are copied. + * args from UCS-2 to ASCII (16 to 8 bit) as they are copied (though this + * method is flawed for non-ASCII characters). */ howto = 0; for (i = 1; i < argc; i++) { @@ -441,6 +552,10 @@ main(int argc, CHAR16 *argv[]) for (i = 0; howto_names[i].ev != NULL; i++) if (howto & howto_names[i].mask) setenv(howto_names[i].ev, "YES", 1); + + /* + * XXX we need fallback to this stuff after looking at the ConIn, ConOut and ConErr variables + */ if (howto & RB_MULTIPLE) { if (howto & RB_SERIAL) setenv("console", "comconsole efi" , 1); @@ -448,13 +563,17 @@ main(int argc, CHAR16 *argv[]) setenv("console", "efi comconsole" , 1); } else if (howto & RB_SERIAL) { setenv("console", "comconsole" , 1); - } + } else + setenv("console", "efi", 1); if (efi_copy_init()) { printf("failed to allocate staging area\n"); return (EFI_BUFFER_TOO_SMALL); } + if ((s = getenv("fail_timeout")) != NULL) + fail_timeout = strtol(s, NULL, 10); + /* * Scan the BLOCK IO MEDIA handles then * march through the device switch probing for things. @@ -479,6 +598,7 @@ main(int argc, CHAR16 *argv[]) printf("\n%s", bootprog_info); + /* Determine the devpath of our image so we can prefer it. */ text = efi_devpath_name(img->FilePath); if (text != NULL) { printf(" Load Path: %S\n", text); @@ -520,8 +640,16 @@ main(int argc, CHAR16 *argv[]) */ BS->SetWatchdogTimer(0, 0, 0, NULL); + /* + * Try and find a good currdev based on the image that was booted. + * It might be desirable here to have a short pause to allow falling + * through to the boot loader instead of returning instantly to follow + * the boot protocol and also allow an escape hatch for users wishing + * to try something different. + */ if (find_currdev(img) != 0) - return (EFI_NOT_FOUND); + if (!interactive_interrupt("Failed to find bootable partition")) + return (EFI_NOT_FOUND); efi_init_environment(); setenv("LINES", "24", 1); /* optional */ From owner-svn-src-all@freebsd.org Thu Apr 19 02:06:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA1B1F989B7; Thu, 19 Apr 2018 02:06:34 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 37C0C7EB79; Thu, 19 Apr 2018 02:06:33 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (220-253-154-11.dyn.iinet.net.au [220.253.154.11]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id w3J26RAq034335 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 18 Apr 2018 19:06:30 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r332559 - head/usr.sbin/mountd To: Rick Macklem , Konstantin Belousov Cc: Andriy Gapon , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <20180417123212.GM1774@kib.kiev.ua> From: Julian Elischer Message-ID: Date: Thu, 19 Apr 2018 10:06:22 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 02:06:35 -0000 On 19/4/18 5:15 am, Rick Macklem wrote: > Julian Elischer wrote: > [stuff snipped] >> our issue is that we make a server that combines CIFS/SMB access (via >> samba), credential setting from a company wide AD server (windows) >> via winbindd (samba) via nsswitch.. and NFS. >> >> The problem is that when one looks up a user name from the AD server >> One can get back a credential with a large number of groups, because >> some companies use windows groups extensively. SO a sinel user may be >> in a group for every project they are involved with and a method of >> giving them access to files related to a project. >> In this scenario a group manager may be given access to a lot of groups. >> >> A user looking at a file via NFS needs to be able to see what he needs >> and still be blocked as per company policy. >> I am investigating the new user-manager daemon may help but I don't >> fully understand it yet. >> I gather it maps an incoming request to a set of groups as defined on >> the server rather than on the client, but I'm not sure yet how that >> relates to mountd. > I am happy to say I know nothing about AD, but I thought it included an > LDAP service? yes and this what is used when  one uses ldap against an AD server. (which seems to work) > If there is a way to configure FreeBSD so that getgrouplist(3) > gets this list of AD groups, then "nfsuserd -manage-gids" on the NFS server > should do what you want. (It takes the "uid" from the AUTH_SYS RPC request > header and then creates a list of groups for that "uid" via getgrouplist(3). > It basically does a getpwuid() and then uses the pw_name as the first arg > to getgrouplist(3). > It ignores the list of groups in the RPC header and, therefore, is not limited > to 16.) yes that is what I was referring to in my previous email getgrouplist(3) does the right thing as far as I know. > > If getgrouplist(3) can't see the set of AD groups, then something needs to be > done to make that work. > > rick > > From owner-svn-src-all@freebsd.org Thu Apr 19 02:47:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8B34F9E4EE; Thu, 19 Apr 2018 02:47:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BC3C87E9A; Thu, 19 Apr 2018 02:47:22 +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 66B3A23B12; Thu, 19 Apr 2018 02:47:22 +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 w3J2lM5m076989; Thu, 19 Apr 2018 02:47:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J2lMj4076987; Thu, 19 Apr 2018 02:47:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201804190247.w3J2lMj4076987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 19 Apr 2018 02:47: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: r332749 - in stable/11/sys: fs/ext2fs ufs/ufs X-SVN-Group: stable-11 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: in stable/11/sys: fs/ext2fs ufs/ufs X-SVN-Commit-Revision: 332749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 02:47:22 -0000 Author: pfg Date: Thu Apr 19 02:47:21 2018 New Revision: 332749 URL: https://svnweb.freebsd.org/changeset/base/332749 Log: MFC r328957: {ext2|ufs}_readdir: Avoid setting negative ncookies. ncookies cannot be negative or the allocator will fail. This should only happen if a caller is very broken but we can still try to survive the event. We should probably also verify for uio_resid > MAXPHYS but in that case it is not clear that just clipping the ncookies value is an adequate response. Modified: stable/11/sys/fs/ext2fs/ext2_lookup.c stable/11/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/11/sys/fs/ext2fs/ext2_lookup.c Thu Apr 19 01:15:19 2018 (r332748) +++ stable/11/sys/fs/ext2fs/ext2_lookup.c Thu Apr 19 02:47:21 2018 (r332749) @@ -150,7 +150,10 @@ ext2_readdir(struct vop_readdir_args *ap) return (EINVAL); ip = VTOI(vp); if (ap->a_ncookies != NULL) { - ncookies = uio->uio_resid; + if (uio->uio_resid < 0) + ncookies = 0; + else + ncookies = uio->uio_resid; if (uio->uio_offset >= ip->i_size) ncookies = 0; else if (ip->i_size - uio->uio_offset < ncookies) Modified: stable/11/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_vnops.c Thu Apr 19 01:15:19 2018 (r332748) +++ stable/11/sys/ufs/ufs/ufs_vnops.c Thu Apr 19 02:47:21 2018 (r332749) @@ -2177,7 +2177,10 @@ ufs_readdir(ap) if (ip->i_effnlink == 0) return (0); if (ap->a_ncookies != NULL) { - ncookies = uio->uio_resid; + if (uio->uio_resid < 0) + ncookies = 0; + else + ncookies = uio->uio_resid; if (uio->uio_offset >= ip->i_size) ncookies = 0; else if (ip->i_size - uio->uio_offset < ncookies) From owner-svn-src-all@freebsd.org Thu Apr 19 02:50:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E7E4F9E7EF; Thu, 19 Apr 2018 02:50:16 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 523366802F; Thu, 19 Apr 2018 02:50:16 +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 4D16D23B27; Thu, 19 Apr 2018 02:50:16 +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 w3J2oGRi077155; Thu, 19 Apr 2018 02:50:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J2oGVu077152; Thu, 19 Apr 2018 02:50:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201804190250.w3J2oGVu077152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 19 Apr 2018 02:50:16 +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: r332750 - in stable/10/sys: fs/ext2fs ufs/ufs X-SVN-Group: stable-10 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: in stable/10/sys: fs/ext2fs ufs/ufs X-SVN-Commit-Revision: 332750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 02:50:16 -0000 Author: pfg Date: Thu Apr 19 02:50:15 2018 New Revision: 332750 URL: https://svnweb.freebsd.org/changeset/base/332750 Log: MFC r328957: {ext2|ufs}_readdir: Avoid setting negative ncookies. ncookies cannot be negative or the allocator will fail. This should only happen if a caller is very broken but we can still try to survive the event. We should probably also verify for uio_resid > MAXPHYS but in that case it is not clear that just clipping the ncookies value is an adequate response. Modified: stable/10/sys/fs/ext2fs/ext2_lookup.c stable/10/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_lookup.c Thu Apr 19 02:47:21 2018 (r332749) +++ stable/10/sys/fs/ext2fs/ext2_lookup.c Thu Apr 19 02:50:15 2018 (r332750) @@ -150,7 +150,10 @@ ext2_readdir(struct vop_readdir_args *ap) return (EINVAL); ip = VTOI(vp); if (ap->a_ncookies != NULL) { - ncookies = uio->uio_resid; + if (uio->uio_resid < 0) + ncookies = 0; + else + ncookies = uio->uio_resid; if (uio->uio_offset >= ip->i_size) ncookies = 0; else if (ip->i_size - uio->uio_offset < ncookies) Modified: stable/10/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_vnops.c Thu Apr 19 02:47:21 2018 (r332749) +++ stable/10/sys/ufs/ufs/ufs_vnops.c Thu Apr 19 02:50:15 2018 (r332750) @@ -2179,7 +2179,10 @@ ufs_readdir(ap) if (ip->i_effnlink == 0) return (0); if (ap->a_ncookies != NULL) { - ncookies = uio->uio_resid; + if (uio->uio_resid < 0) + ncookies = 0; + else + ncookies = uio->uio_resid; if (uio->uio_offset >= ip->i_size) ncookies = 0; else if (ip->i_size - uio->uio_offset < ncookies) From owner-svn-src-all@freebsd.org Thu Apr 19 03:31:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFBD1FA35F4; Thu, 19 Apr 2018 03:31:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F0C77278F; Thu, 19 Apr 2018 03:31: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 6856F242D2; Thu, 19 Apr 2018 03:31: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 w3J3VgCN001509; Thu, 19 Apr 2018 03:31:42 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J3VgaA001507; Thu, 19 Apr 2018 03:31:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804190331.w3J3VgaA001507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Apr 2018 03:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332751 - in head/stand/efi: boot1 loader X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/stand/efi: boot1 loader X-SVN-Commit-Revision: 332751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 03:31:42 -0000 Author: kevans Date: Thu Apr 19 03:31:41 2018 New Revision: 332751 URL: https://svnweb.freebsd.org/changeset/base/332751 Log: efi loader: Address two nits with recent graphics changes - We should be setting a known graphics mode on conout, but we aren't. - We shouldn't be setting gop mode if we didn't find a good resolution to set, but we were. This made efi_max_resolution=1x1 effectively worthless, since it would always set gop mode 0 if nothing else. Modified: head/stand/efi/boot1/boot1.c head/stand/efi/loader/framebuffer.c Modified: head/stand/efi/boot1/boot1.c ============================================================================== --- head/stand/efi/boot1/boot1.c Thu Apr 19 02:50:15 2018 (r332750) +++ head/stand/efi/boot1/boot1.c Thu Apr 19 03:31:41 2018 (r332751) @@ -415,6 +415,8 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) */ conout = ST->ConOut; conout->Reset(conout, TRUE); + /* Explicitly set conout to mode 0, 80x25 */ + conout->SetMode(conout, 0); conout->EnableCursor(conout, TRUE); conout->ClearScreen(conout); Modified: head/stand/efi/loader/framebuffer.c ============================================================================== --- head/stand/efi/loader/framebuffer.c Thu Apr 19 02:50:15 2018 (r332750) +++ head/stand/efi/loader/framebuffer.c Thu Apr 19 03:31:41 2018 (r332751) @@ -577,12 +577,14 @@ gop_autoresize(EFI_GRAPHICS_OUTPUT *gop) } } - status = gop->SetMode(gop, best_mode); - if (EFI_ERROR(status)) { - snprintf(command_errbuf, sizeof(command_errbuf), - "gop_autoresize: Unable to set mode to %u (error=%lu)", - mode, EFI_ERROR_CODE(status)); - return (CMD_ERROR); + if (maxdim != 0) { + status = gop->SetMode(gop, best_mode); + if (EFI_ERROR(status)) { + snprintf(command_errbuf, sizeof(command_errbuf), + "gop_autoresize: Unable to set mode to %u (error=%lu)", + mode, EFI_ERROR_CODE(status)); + return (CMD_ERROR); + } } return (CMD_OK); } From owner-svn-src-all@freebsd.org Thu Apr 19 03:38:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A103CFA3FB7; Thu, 19 Apr 2018 03:38:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C906973439; Thu, 19 Apr 2018 03:38:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 78E171C239; Thu, 19 Apr 2018 03:38:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f52.google.com with SMTP id z130-v6so5637928lff.5; Wed, 18 Apr 2018 20:38:00 -0700 (PDT) X-Gm-Message-State: ALQs6tCZwdsKFEYlzweerhk8fqMEZqSiM7IwRxe2j60E8GbGv7z8FQy5 /D03F+kt0d2YOfBOwFO8ZX0HMXh8NS22hVNSHSg= X-Google-Smtp-Source: AIpwx4+4FKb6+06Lhl2BfUIz8N2HqtF7xhmtWEIGaEsY+FgF3x3Iua8v7R+uFkRO+lIwYeXY7FlXF4WHHsdgCd2RyS4= X-Received: by 2002:a19:d850:: with SMTP id p77-v6mr2919878lfg.52.1524109079015; Wed, 18 Apr 2018 20:37:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.129.90 with HTTP; Wed, 18 Apr 2018 20:37:38 -0700 (PDT) In-Reply-To: <201804190331.w3J3VgaA001507@repo.freebsd.org> References: <201804190331.w3J3VgaA001507@repo.freebsd.org> From: Kyle Evans Date: Wed, 18 Apr 2018 22:37:38 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332751 - in head/stand/efi: boot1 loader To: Kyle Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 03:38:01 -0000 On Wed, Apr 18, 2018 at 10:31 PM, Kyle Evans wrote: > Author: kevans > Date: Thu Apr 19 03:31:41 2018 > New Revision: 332751 > URL: https://svnweb.freebsd.org/changeset/base/332751 > > Log: > efi loader: Address two nits with recent graphics changes > > - We should be setting a known graphics mode on conout, but we aren't. This should read "known text mode," and mode 0 was chosen simply because it's defined by the standard to be available (and 80x25). > - We shouldn't be setting gop mode if we didn't find a good resolution to > set, but we were. This made efi_max_resolution=1x1 effectively worthless, > since it would always set gop mode 0 if nothing else. > > Modified: > head/stand/efi/boot1/boot1.c > head/stand/efi/loader/framebuffer.c > > Modified: head/stand/efi/boot1/boot1.c From owner-svn-src-all@freebsd.org Thu Apr 19 05:06:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2F4AFA9D51; Thu, 19 Apr 2018 05:06:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71D96686AC; Thu, 19 Apr 2018 05:06:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AFC02529A; Thu, 19 Apr 2018 05:06:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J56vit047207; Thu, 19 Apr 2018 05:06:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J56vg9047202; Thu, 19 Apr 2018 05:06:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190506.w3J56vg9047202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 05:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332752 - in head/sys: amd64/amd64 i386/i386 powerpc/powerpc sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 powerpc/powerpc sys X-SVN-Commit-Revision: 332752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 05:06:58 -0000 Author: avg Date: Thu Apr 19 05:06:56 2018 New Revision: 332752 URL: https://svnweb.freebsd.org/changeset/base/332752 Log: set kdb_why to "trap" when calling kdb_trap from trap_fatal This will allow to hook a ddb script to "kdb.enter.trap" event. Previously there was no specific name for this event, so it could only be handled by either "kdb.enter.unknown" or "kdb.enter.default" hooks. Both are very unspecific. Having a specific event is useful because the fatal trap condition is very similar to panic but it has an additional property that the current stack frame is the frame where the trap occurred. So, both a register dump and a stack bottom dump have additional information that can help analyze the problem. I have added the event only on architectures that have trap_fatal() function defined. I haven't looked at other architectures. Their maintainers can add support for the event later. Sample script: kdb.enter.trap=bt; show reg; x/aS $rsp,20; x/agx $rsp,20 Reviewed by: kib, jhb, markj MFC after: 11 days Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D15093 Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c head/sys/powerpc/powerpc/trap.c head/sys/sys/kdb.h Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Thu Apr 19 03:31:41 2018 (r332751) +++ head/sys/amd64/amd64/trap.c Thu Apr 19 05:06:56 2018 (r332752) @@ -761,6 +761,9 @@ trap_fatal(frame, eva) u_int type; struct soft_segment_descriptor softseg; char *msg; +#ifdef KDB + bool handled; +#endif code = frame->tf_err; type = frame->tf_trapno; @@ -811,9 +814,13 @@ trap_fatal(frame, eva) curproc->p_pid, curthread->td_name); #ifdef KDB - if (debugger_on_panic) - if (kdb_trap(type, 0, frame)) + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; + handled = kdb_trap(type, 0, frame); + kdb_why = KDB_WHY_UNSET; + if (handled) return; + } #endif printf("trap number = %d\n", type); if (type <= MAX_TRAP_MSG) Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Thu Apr 19 03:31:41 2018 (r332751) +++ head/sys/i386/i386/trap.c Thu Apr 19 05:06:56 2018 (r332752) @@ -879,6 +879,9 @@ trap_fatal(frame, eva) int code, ss, esp; u_int type; struct soft_segment_descriptor softseg; +#ifdef KDB + bool handled; +#endif code = frame->tf_err; type = frame->tf_trapno; @@ -940,12 +943,13 @@ trap_fatal(frame, eva) #ifdef KDB if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; frame->tf_err = eva; /* smuggle fault address to ddb */ - if (kdb_trap(type, 0, frame)) { - frame->tf_err = code; /* restore error code */ + handled = kdb_trap(type, 0, frame); + frame->tf_err = code; /* restore error code */ + kdb_why = KDB_WHY_UNSET; + if (handled) return; - } - frame->tf_err = code; /* restore error code */ } #endif printf("trap number = %d\n", type); Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Thu Apr 19 03:31:41 2018 (r332751) +++ head/sys/powerpc/powerpc/trap.c Thu Apr 19 05:06:56 2018 (r332752) @@ -449,11 +449,19 @@ trap(struct trapframe *frame) static void trap_fatal(struct trapframe *frame) { +#ifdef KDB + bool handled; +#endif printtrap(frame->exc, frame, 1, (frame->srr1 & PSL_PR)); #ifdef KDB - if (debugger_on_panic && kdb_trap(frame->exc, 0, frame)) - return; + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; + handled = kdb_trap(frame->exc, 0, frame); + kdb_why = KDB_WHY_UNSET; + if (handled) + return; + } #endif panic("%s trap", trapname(frame->exc)); } Modified: head/sys/sys/kdb.h ============================================================================== --- head/sys/sys/kdb.h Thu Apr 19 03:31:41 2018 (r332751) +++ head/sys/sys/kdb.h Thu Apr 19 05:06:56 2018 (r332752) @@ -101,6 +101,7 @@ extern const char * volatile kdb_why; #define KDB_WHY_UNSET NULL /* No reason set. */ #define KDB_WHY_PANIC "panic" /* panic() was called. */ #define KDB_WHY_KASSERT "kassert" /* kassert failed. */ +#define KDB_WHY_TRAP "trap" /* Fatal trap. */ #define KDB_WHY_SYSCTL "sysctl" /* Sysctl entered debugger. */ #define KDB_WHY_BOOTFLAGS "bootflags" /* Boot flags were set. */ #define KDB_WHY_WITNESS "witness" /* Witness entered debugger. */ From owner-svn-src-all@freebsd.org Thu Apr 19 05:37:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 191A5F80B56; Thu, 19 Apr 2018 05:37:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF8936D6E6; Thu, 19 Apr 2018 05:37:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA74B25792; Thu, 19 Apr 2018 05:37:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J5bWdS062001; Thu, 19 Apr 2018 05:37:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J5bW03061999; Thu, 19 Apr 2018 05:37:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190537.w3J5bW03061999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 05:37: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: r332753 - in stable/11: sbin/mount sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11: sbin/mount sys/kern X-SVN-Commit-Revision: 332753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 05:37:33 -0000 Author: avg Date: Thu Apr 19 05:37:32 2018 New Revision: 332753 URL: https://svnweb.freebsd.org/changeset/base/332753 Log: MFC r331616: vfs_donmount: in certain cases try r/o mount if r/w mount fails If the operation is not an update, if neither r/w nor r/o mode is explicitly requested, if the error code hints at the possibility of the media being read-only, and if the fallback is allowed, then we can try to automatically downgrade to the readonly mode. This is especially useful for auto-mounting of removable media that sometimes can happen to be write-protected. The fallback to r/o is not enabled by default. It can be requested on a per-mount basis with a new mount option, 'autoro'. Or it can be globally allowed by setting vfs.default_autoro. Relnotes: yes Modified: stable/11/sbin/mount/mount.8 stable/11/sys/kern/vfs_mount.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount/mount.8 ============================================================================== --- stable/11/sbin/mount/mount.8 Thu Apr 19 05:06:56 2018 (r332752) +++ stable/11/sbin/mount/mount.8 Thu Apr 19 05:37:32 2018 (r332753) @@ -155,6 +155,10 @@ This flag indicates that the file system was mounted b .Xr automountd 8 . Automounted file systems are automatically unmounted by .Xr autounmountd 8 . +.It Cm autoro +Mount the file system read-write. +If that fails with an error that suggests that the media could be read-only, +then automatically try to mount the file system read-only. .It Cm current When used with the .Fl u Modified: stable/11/sys/kern/vfs_mount.c ============================================================================== --- stable/11/sys/kern/vfs_mount.c Thu Apr 19 05:06:56 2018 (r332752) +++ stable/11/sys/kern/vfs_mount.c Thu Apr 19 05:37:32 2018 (r332753) @@ -78,6 +78,10 @@ static int usermount = 0; SYSCTL_INT(_vfs, OID_AUTO, usermount, CTLFLAG_RW, &usermount, 0, "Unprivileged users may mount and unmount file systems"); +static bool default_autoro = false; +SYSCTL_BOOL(_vfs, OID_AUTO, default_autoro, CTLFLAG_RW, &default_autoro, 0, + "Retry failed r/w mount as r/o if no explicit ro/rw option is specified"); + MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); MALLOC_DEFINE(M_STATFS, "statfs", "statfs structure"); static uma_zone_t mount_zone; @@ -534,6 +538,31 @@ vfs_mount_destroy(struct mount *mp) uma_zfree(mount_zone, mp); } +static bool +vfs_should_downgrade_to_ro_mount(uint64_t fsflags, int error) +{ + /* This is an upgrade of an exisiting mount. */ + if ((fsflags & MNT_UPDATE) != 0) + return (false); + /* This is already an R/O mount. */ + if ((fsflags & MNT_RDONLY) != 0) + return (false); + + switch (error) { + case ENODEV: /* generic, geom, ... */ + case EACCES: /* cam/scsi, ... */ + case EROFS: /* md, mmcsd, ... */ + /* + * These errors can be returned by the storage layer to signal + * that the media is read-only. No harm in the R/O mount + * attempt if the error was returned for some other reason. + */ + return (true); + default: + return (false); + } +} + int vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) { @@ -541,10 +570,12 @@ vfs_donmount(struct thread *td, uint64_t fsflags, stru struct vfsopt *opt, *tmp_opt; char *fstype, *fspath, *errmsg; int error, fstypelen, fspathlen, errmsg_len, errmsg_pos; + bool autoro; errmsg = fspath = NULL; errmsg_len = fspathlen = 0; errmsg_pos = -1; + autoro = default_autoro; error = vfs_buildopts(fsoptions, &optlist); if (error) @@ -636,17 +667,28 @@ vfs_donmount(struct thread *td, uint64_t fsflags, stru free(opt->name, M_MOUNT); opt->name = strdup("nonosymfollow", M_MOUNT); } - else if (strcmp(opt->name, "noro") == 0) + else if (strcmp(opt->name, "noro") == 0) { fsflags &= ~MNT_RDONLY; - else if (strcmp(opt->name, "rw") == 0) + autoro = false; + } + else if (strcmp(opt->name, "rw") == 0) { fsflags &= ~MNT_RDONLY; - else if (strcmp(opt->name, "ro") == 0) + autoro = false; + } + else if (strcmp(opt->name, "ro") == 0) { fsflags |= MNT_RDONLY; + autoro = false; + } else if (strcmp(opt->name, "rdonly") == 0) { free(opt->name, M_MOUNT); opt->name = strdup("ro", M_MOUNT); fsflags |= MNT_RDONLY; + autoro = false; } + else if (strcmp(opt->name, "autoro") == 0) { + vfs_freeopt(optlist, opt); + autoro = true; + } else if (strcmp(opt->name, "suiddir") == 0) fsflags |= MNT_SUIDDIR; else if (strcmp(opt->name, "sync") == 0) @@ -670,6 +712,19 @@ vfs_donmount(struct thread *td, uint64_t fsflags, stru } error = vfs_domount(td, fstype, fspath, fsflags, &optlist); + + /* + * See if we can mount in the read-only mode if the error code suggests + * that it could be possible and the mount options allow for that. + * Never try it if "[no]{ro|rw}" has been explicitly requested and not + * overridden by "autoro". + */ + if (autoro && vfs_should_downgrade_to_ro_mount(fsflags, error)) { + printf("%s: R/W mount failed, possibly R/O media," + " trying R/O mount\n", __func__); + fsflags |= MNT_RDONLY; + error = vfs_domount(td, fstype, fspath, fsflags, &optlist); + } bail: /* copyout the errmsg */ if (errmsg_pos != -1 && ((2 * errmsg_pos + 1) < fsoptions->uio_iovcnt) From owner-svn-src-all@freebsd.org Thu Apr 19 05:52:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC0D5F81D03; Thu, 19 Apr 2018 05:52:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 72592707A1; Thu, 19 Apr 2018 05:52:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A55125AB0; Thu, 19 Apr 2018 05:52:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J5qlfp071829; Thu, 19 Apr 2018 05:52:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J5qlnd071827; Thu, 19 Apr 2018 05:52:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190552.w3J5qlnd071827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 05:52:47 +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: r332754 - in stable/10: sbin/mount sys/kern X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10: sbin/mount sys/kern X-SVN-Commit-Revision: 332754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 05:52:48 -0000 Author: avg Date: Thu Apr 19 05:52:47 2018 New Revision: 332754 URL: https://svnweb.freebsd.org/changeset/base/332754 Log: MFC r331616: vfs_donmount: in certain cases try r/o mount if r/w mount fails If the operation is not an update, if neither r/w nor r/o mode is explicitly requested, if the error code hints at the possibility of the media being read-only, and if the fallback is allowed, then we can try to automatically downgrade to the readonly mode. This is especially useful for auto-mounting of removable media that sometimes can happen to be write-protected. The fallback to r/o is not enabled by default. It can be requested on a per-mount basis with a new mount option, 'autoro'. Or it can be globally allowed by setting vfs.default_autoro. stable/10 note: this branch does not have SYSCTL_BOOL, so SYSCTL_INT is used instead. Relnotes: yes Modified: stable/10/sbin/mount/mount.8 stable/10/sys/kern/vfs_mount.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount/mount.8 ============================================================================== --- stable/10/sbin/mount/mount.8 Thu Apr 19 05:37:32 2018 (r332753) +++ stable/10/sbin/mount/mount.8 Thu Apr 19 05:52:47 2018 (r332754) @@ -155,6 +155,10 @@ This flag indicates that the file system was mounted b .Xr automountd 8 . Automounted file systems are automatically unmounted by .Xr autounmountd 8 . +.It Cm autoro +Mount the file system read-write. +If that fails with an error that suggests that the media could be read-only, +then automatically try to mount the file system read-only. .It Cm current When used with the .Fl u Modified: stable/10/sys/kern/vfs_mount.c ============================================================================== --- stable/10/sys/kern/vfs_mount.c Thu Apr 19 05:37:32 2018 (r332753) +++ stable/10/sys/kern/vfs_mount.c Thu Apr 19 05:52:47 2018 (r332754) @@ -78,6 +78,10 @@ static int usermount = 0; SYSCTL_INT(_vfs, OID_AUTO, usermount, CTLFLAG_RW, &usermount, 0, "Unprivileged users may mount and unmount file systems"); +static int default_autoro = false; +SYSCTL_INT(_vfs, OID_AUTO, default_autoro, CTLFLAG_RW, &default_autoro, 0, + "Retry failed r/w mount as r/o if no explicit ro/rw option is specified"); + MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); static uma_zone_t mount_zone; @@ -532,6 +536,31 @@ vfs_mount_destroy(struct mount *mp) uma_zfree(mount_zone, mp); } +static bool +vfs_should_downgrade_to_ro_mount(uint64_t fsflags, int error) +{ + /* This is an upgrade of an exisiting mount. */ + if ((fsflags & MNT_UPDATE) != 0) + return (false); + /* This is already an R/O mount. */ + if ((fsflags & MNT_RDONLY) != 0) + return (false); + + switch (error) { + case ENODEV: /* generic, geom, ... */ + case EACCES: /* cam/scsi, ... */ + case EROFS: /* md, mmcsd, ... */ + /* + * These errors can be returned by the storage layer to signal + * that the media is read-only. No harm in the R/O mount + * attempt if the error was returned for some other reason. + */ + return (true); + default: + return (false); + } +} + int vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) { @@ -539,10 +568,12 @@ vfs_donmount(struct thread *td, uint64_t fsflags, stru struct vfsopt *opt, *tmp_opt; char *fstype, *fspath, *errmsg; int error, fstypelen, fspathlen, errmsg_len, errmsg_pos; + bool autoro; errmsg = fspath = NULL; errmsg_len = fspathlen = 0; errmsg_pos = -1; + autoro = default_autoro; error = vfs_buildopts(fsoptions, &optlist); if (error) @@ -634,17 +665,28 @@ vfs_donmount(struct thread *td, uint64_t fsflags, stru free(opt->name, M_MOUNT); opt->name = strdup("nonosymfollow", M_MOUNT); } - else if (strcmp(opt->name, "noro") == 0) + else if (strcmp(opt->name, "noro") == 0) { fsflags &= ~MNT_RDONLY; - else if (strcmp(opt->name, "rw") == 0) + autoro = false; + } + else if (strcmp(opt->name, "rw") == 0) { fsflags &= ~MNT_RDONLY; - else if (strcmp(opt->name, "ro") == 0) + autoro = false; + } + else if (strcmp(opt->name, "ro") == 0) { fsflags |= MNT_RDONLY; + autoro = false; + } else if (strcmp(opt->name, "rdonly") == 0) { free(opt->name, M_MOUNT); opt->name = strdup("ro", M_MOUNT); fsflags |= MNT_RDONLY; + autoro = false; } + else if (strcmp(opt->name, "autoro") == 0) { + vfs_freeopt(optlist, opt); + autoro = true; + } else if (strcmp(opt->name, "suiddir") == 0) fsflags |= MNT_SUIDDIR; else if (strcmp(opt->name, "sync") == 0) @@ -668,6 +710,19 @@ vfs_donmount(struct thread *td, uint64_t fsflags, stru } error = vfs_domount(td, fstype, fspath, fsflags, &optlist); + + /* + * See if we can mount in the read-only mode if the error code suggests + * that it could be possible and the mount options allow for that. + * Never try it if "[no]{ro|rw}" has been explicitly requested and not + * overridden by "autoro". + */ + if (autoro && vfs_should_downgrade_to_ro_mount(fsflags, error)) { + printf("%s: R/W mount failed, possibly R/O media," + " trying R/O mount\n", __func__); + fsflags |= MNT_RDONLY; + error = vfs_domount(td, fstype, fspath, fsflags, &optlist); + } bail: /* copyout the errmsg */ if (errmsg_pos != -1 && ((2 * errmsg_pos + 1) < fsoptions->uio_iovcnt) From owner-svn-src-all@freebsd.org Thu Apr 19 06:03:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43ED4F82980; Thu, 19 Apr 2018 06:03:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 563FC72AF5; Thu, 19 Apr 2018 06:03:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A21025C57; Thu, 19 Apr 2018 06:03:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J63pvg076649; Thu, 19 Apr 2018 06:03:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J63ogP076646; Thu, 19 Apr 2018 06:03:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190603.w3J63ogP076646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 06:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332755 - in stable/11/sys: cddl/contrib/opensolaris/uts/common/fs kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: cddl/contrib/opensolaris/uts/common/fs kern sys X-SVN-Commit-Revision: 332755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 06:03:52 -0000 Author: avg Date: Thu Apr 19 06:03:50 2018 New Revision: 332755 URL: https://svnweb.freebsd.org/changeset/base/332755 Log: MFC r331666: ZFS vn_rele_async: catch up with the use of refcount(9) for the vnode use count It's not sufficient nor required to use the vnode interlock when checking if we are going to drop the last use count as the code in vputx() uses refcount (atomic) operations for both checking and decrementing the use code. Apply the same method to vn_rele_async(). While here, remove vn_rele_inactive(), a wrapper around vrele() that didn't add any value. Also, the change required making vfs_refcount_release_if_not_last() public. I've made vfs_refcount_acquire_if_not_zero() public as well. They are in sys/refcount.h now. While making the move I've dropped the vfs_ prefix. Sponsored by: Panzura Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c stable/11/sys/kern/vfs_subr.c stable/11/sys/sys/refcount.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c Thu Apr 19 05:52:47 2018 (r332754) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c Thu Apr 19 06:03:50 2018 (r332755) @@ -72,12 +72,6 @@ xva_getxoptattr(xvattr_t *xvap) return (xoap); } -static void -vn_rele_inactive(vnode_t *vp) -{ - vrele(vp); -} - /* * Like vn_rele() except if we are going to call VOP_INACTIVE() then do it * asynchronously using a taskq. This can avoid deadlocks caused by re-entering @@ -92,13 +86,10 @@ void vn_rele_async(vnode_t *vp, taskq_t *taskq) { VERIFY(vp->v_count > 0); - VI_LOCK(vp); - if (vp->v_count == 1 && !(vp->v_iflag & VI_DOINGINACT)) { - VI_UNLOCK(vp); - VERIFY(taskq_dispatch((taskq_t *)taskq, - (task_func_t *)vn_rele_inactive, vp, TQ_SLEEP) != 0); + if (refcount_release_if_not_last(&vp->v_usecount)) { + vdrop(vp); return; } - refcount_release(&vp->v_usecount); - vdropl(vp); + VERIFY(taskq_dispatch((taskq_t *)taskq, + (task_func_t *)vrele, vp, TQ_SLEEP) != 0); } Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Thu Apr 19 05:52:47 2018 (r332754) +++ stable/11/sys/kern/vfs_subr.c Thu Apr 19 06:03:50 2018 (r332755) @@ -2389,37 +2389,6 @@ reassignbuf(struct buf *bp) BO_UNLOCK(bo); } -/* - * A temporary hack until refcount_* APIs are sorted out. - */ -static __inline int -vfs_refcount_acquire_if_not_zero(volatile u_int *count) -{ - u_int old; - - old = *count; - for (;;) { - if (old == 0) - return (0); - if (atomic_fcmpset_int(count, &old, old + 1)) - return (1); - } -} - -static __inline int -vfs_refcount_release_if_not_last(volatile u_int *count) -{ - u_int old; - - old = *count; - for (;;) { - if (old == 1) - return (0); - if (atomic_fcmpset_int(count, &old, old - 1)) - return (1); - } -} - static void v_init_counters(struct vnode *vp) { @@ -2459,7 +2428,7 @@ v_incr_usecount(struct vnode *vp) CTR2(KTR_VFS, "%s: vp %p", __func__, vp); if (vp->v_type != VCHR && - vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) { + refcount_acquire_if_not_zero(&vp->v_usecount)) { VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp, ("vnode with usecount and VI_OWEINACT set")); } else { @@ -2551,7 +2520,7 @@ vget(struct vnode *vp, int flags, struct thread *td) * Upgrade our holdcnt to a usecount. */ if (vp->v_type == VCHR || - !vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) { + !refcount_acquire_if_not_zero(&vp->v_usecount)) { VI_LOCK(vp); if ((vp->v_iflag & VI_OWEINACT) == 0) { oweinact = 0; @@ -2654,7 +2623,7 @@ vputx(struct vnode *vp, int func) CTR2(KTR_VFS, "%s: vp %p", __func__, vp); if (vp->v_type != VCHR && - vfs_refcount_release_if_not_last(&vp->v_usecount)) { + refcount_release_if_not_last(&vp->v_usecount)) { if (func == VPUTX_VPUT) VOP_UNLOCK(vp, 0); vdrop(vp); @@ -2770,7 +2739,7 @@ _vhold(struct vnode *vp, bool locked) ASSERT_VI_UNLOCKED(vp, __func__); CTR2(KTR_VFS, "%s: vp %p", __func__, vp); if (!locked) { - if (vfs_refcount_acquire_if_not_zero(&vp->v_holdcnt)) { + if (refcount_acquire_if_not_zero(&vp->v_holdcnt)) { VNASSERT((vp->v_iflag & VI_FREE) == 0, vp, ("_vhold: vnode with holdcnt is free")); return; @@ -2831,7 +2800,7 @@ _vdrop(struct vnode *vp, bool locked) if ((int)vp->v_holdcnt <= 0) panic("vdrop: holdcnt %d", vp->v_holdcnt); if (!locked) { - if (vfs_refcount_release_if_not_last(&vp->v_holdcnt)) + if (refcount_release_if_not_last(&vp->v_holdcnt)) return; VI_LOCK(vp); } Modified: stable/11/sys/sys/refcount.h ============================================================================== --- stable/11/sys/sys/refcount.h Thu Apr 19 05:52:47 2018 (r332754) +++ stable/11/sys/sys/refcount.h Thu Apr 19 06:03:50 2018 (r332755) @@ -74,4 +74,35 @@ refcount_release(volatile u_int *count) return (1); } +/* + * A temporary hack until refcount_* APIs are sorted out. + */ +static __inline int +refcount_acquire_if_not_zero(volatile u_int *count) +{ + u_int old; + + old = *count; + for (;;) { + if (old == 0) + return (0); + if (atomic_fcmpset_int(count, &old, old + 1)) + return (1); + } +} + +static __inline int +refcount_release_if_not_last(volatile u_int *count) +{ + u_int old; + + old = *count; + for (;;) { + if (old == 1) + return (0); + if (atomic_fcmpset_int(count, &old, old - 1)) + return (1); + } +} + #endif /* ! __SYS_REFCOUNT_H__ */ From owner-svn-src-all@freebsd.org Thu Apr 19 06:09:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6B08F83045; Thu, 19 Apr 2018 06:09:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 681E2737E1; Thu, 19 Apr 2018 06:09:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62DC025C61; Thu, 19 Apr 2018 06:09:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J69BxV076885; Thu, 19 Apr 2018 06:09:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J69B99076883; Thu, 19 Apr 2018 06:09:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190609.w3J69B99076883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 06:09:11 +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: r332756 - in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 332756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 06:09:11 -0000 Author: avg Date: Thu Apr 19 06:09:10 2018 New Revision: 332756 URL: https://svnweb.freebsd.org/changeset/base/332756 Log: MFC r331874: x86 cpu_reset_proxy: no need to stop_cpus() the original processor Modified: stable/11/sys/amd64/amd64/vm_machdep.c stable/11/sys/i386/i386/vm_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:03:50 2018 (r332755) +++ stable/11/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:09:10 2018 (r332756) @@ -566,14 +566,11 @@ cpu_set_user_tls(struct thread *td, void *tls_base) static void cpu_reset_proxy() { - cpuset_t tcrp; cpu_reset_proxy_active = 1; while (cpu_reset_proxy_active == 1) ia32_pause(); /* Wait for other cpu to see that we've started */ - CPU_SETOF(cpu_reset_proxyid, &tcrp); - stop_cpus(tcrp); printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); DELAY(1000000); cpu_reset_real(); @@ -613,7 +610,6 @@ cpu_reset() } if (cpu_reset_proxy_active == 0) printf("cpu_reset: Failed to restart BSP\n"); - enable_intr(); cpu_reset_proxy_active = 2; while (1) Modified: stable/11/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/11/sys/i386/i386/vm_machdep.c Thu Apr 19 06:03:50 2018 (r332755) +++ stable/11/sys/i386/i386/vm_machdep.c Thu Apr 19 06:09:10 2018 (r332756) @@ -590,14 +590,11 @@ kvtop(void *addr) static void cpu_reset_proxy() { - cpuset_t tcrp; cpu_reset_proxy_active = 1; while (cpu_reset_proxy_active == 1) ia32_pause(); /* Wait for other cpu to see that we've started */ - CPU_SETOF(cpu_reset_proxyid, &tcrp); - stop_cpus(tcrp); printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); DELAY(1000000); cpu_reset_real(); @@ -645,7 +642,6 @@ cpu_reset() } if (cpu_reset_proxy_active == 0) printf("cpu_reset: Failed to restart BSP\n"); - enable_intr(); cpu_reset_proxy_active = 2; while (1) From owner-svn-src-all@freebsd.org Thu Apr 19 06:13:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7B2AF835A4; Thu, 19 Apr 2018 06:13:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59320758BB; Thu, 19 Apr 2018 06:13:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50D3625DEA; Thu, 19 Apr 2018 06:13:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J6DgnM081871; Thu, 19 Apr 2018 06:13:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J6DfXa081869; Thu, 19 Apr 2018 06:13:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190613.w3J6DfXa081869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 06:13:41 +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: r332757 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 332757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 06:13:42 -0000 Author: avg Date: Thu Apr 19 06:13:41 2018 New Revision: 332757 URL: https://svnweb.freebsd.org/changeset/base/332757 Log: MFC r331874: x86 cpu_reset_proxy: no need to stop_cpus() the original processor Modified: stable/10/sys/amd64/amd64/vm_machdep.c stable/10/sys/i386/i386/vm_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:09:10 2018 (r332756) +++ stable/10/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:13:41 2018 (r332757) @@ -571,14 +571,11 @@ cpu_set_user_tls(struct thread *td, void *tls_base) static void cpu_reset_proxy() { - cpuset_t tcrp; cpu_reset_proxy_active = 1; while (cpu_reset_proxy_active == 1) ia32_pause(); /* Wait for other cpu to see that we've started */ - CPU_SETOF(cpu_reset_proxyid, &tcrp); - stop_cpus(tcrp); printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); DELAY(1000000); cpu_reset_real(); @@ -618,7 +615,6 @@ cpu_reset() } if (cpu_reset_proxy_active == 0) printf("cpu_reset: Failed to restart BSP\n"); - enable_intr(); cpu_reset_proxy_active = 2; while (1) Modified: stable/10/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/10/sys/i386/i386/vm_machdep.c Thu Apr 19 06:09:10 2018 (r332756) +++ stable/10/sys/i386/i386/vm_machdep.c Thu Apr 19 06:13:41 2018 (r332757) @@ -645,14 +645,11 @@ kvtop(void *addr) static void cpu_reset_proxy() { - cpuset_t tcrp; cpu_reset_proxy_active = 1; while (cpu_reset_proxy_active == 1) ia32_pause(); /* Wait for other cpu to see that we've started */ - CPU_SETOF(cpu_reset_proxyid, &tcrp); - stop_cpus(tcrp); printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); DELAY(1000000); cpu_reset_real(); @@ -700,7 +697,6 @@ cpu_reset() } if (cpu_reset_proxy_active == 0) printf("cpu_reset: Failed to restart BSP\n"); - enable_intr(); cpu_reset_proxy_active = 2; while (1) From owner-svn-src-all@freebsd.org Thu Apr 19 06:18:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D682F83BCC; Thu, 19 Apr 2018 06:18:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D7F076583; Thu, 19 Apr 2018 06:18:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DF5A25DEE; Thu, 19 Apr 2018 06:18:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J6ILRF082128; Thu, 19 Apr 2018 06:18:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J6ILeu082126; Thu, 19 Apr 2018 06:18:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190618.w3J6ILeu082126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 06:18: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: r332758 - in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 332758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 06:18:22 -0000 Author: avg Date: Thu Apr 19 06:18:21 2018 New Revision: 332758 URL: https://svnweb.freebsd.org/changeset/base/332758 Log: MFC r331875: x86 cpu_reset: if failed to switch to BSP proceed to cpu_reset_real Modified: stable/11/sys/amd64/amd64/vm_machdep.c stable/11/sys/i386/i386/vm_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:13:41 2018 (r332757) +++ stable/11/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:18:21 2018 (r332758) @@ -608,13 +608,14 @@ cpu_reset() ia32_pause(); cnt++; /* Wait for BSP to announce restart */ } - if (cpu_reset_proxy_active == 0) + if (cpu_reset_proxy_active == 0) { printf("cpu_reset: Failed to restart BSP\n"); - cpu_reset_proxy_active = 2; - - while (1) - ia32_pause(); - /* NOTREACHED */ + } else { + cpu_reset_proxy_active = 2; + while (1) + ia32_pause(); + /* NOTREACHED */ + } } DELAY(1000000); Modified: stable/11/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/11/sys/i386/i386/vm_machdep.c Thu Apr 19 06:13:41 2018 (r332757) +++ stable/11/sys/i386/i386/vm_machdep.c Thu Apr 19 06:18:21 2018 (r332758) @@ -640,13 +640,14 @@ cpu_reset() ia32_pause(); cnt++; /* Wait for BSP to announce restart */ } - if (cpu_reset_proxy_active == 0) + if (cpu_reset_proxy_active == 0) { printf("cpu_reset: Failed to restart BSP\n"); - cpu_reset_proxy_active = 2; - - while (1) - ia32_pause(); - /* NOTREACHED */ + } else { + cpu_reset_proxy_active = 2; + while (1) + ia32_pause(); + /* NOTREACHED */ + } } DELAY(1000000); From owner-svn-src-all@freebsd.org Thu Apr 19 06:20:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFE14F83FA4; Thu, 19 Apr 2018 06:20:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93D81768FE; Thu, 19 Apr 2018 06:20:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E54925E0E; Thu, 19 Apr 2018 06:20:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J6KrqK085489; Thu, 19 Apr 2018 06:20:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J6KrPE085487; Thu, 19 Apr 2018 06:20:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190620.w3J6KrPE085487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 06:20:53 +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: r332759 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 332759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 06:20:54 -0000 Author: avg Date: Thu Apr 19 06:20:53 2018 New Revision: 332759 URL: https://svnweb.freebsd.org/changeset/base/332759 Log: MFC r331875: x86 cpu_reset: if failed to switch to BSP proceed to cpu_reset_real Modified: stable/10/sys/amd64/amd64/vm_machdep.c stable/10/sys/i386/i386/vm_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:18:21 2018 (r332758) +++ stable/10/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:20:53 2018 (r332759) @@ -613,13 +613,14 @@ cpu_reset() ia32_pause(); cnt++; /* Wait for BSP to announce restart */ } - if (cpu_reset_proxy_active == 0) + if (cpu_reset_proxy_active == 0) { printf("cpu_reset: Failed to restart BSP\n"); - cpu_reset_proxy_active = 2; - - while (1) - ia32_pause(); - /* NOTREACHED */ + } else { + cpu_reset_proxy_active = 2; + while (1) + ia32_pause(); + /* NOTREACHED */ + } } DELAY(1000000); Modified: stable/10/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/10/sys/i386/i386/vm_machdep.c Thu Apr 19 06:18:21 2018 (r332758) +++ stable/10/sys/i386/i386/vm_machdep.c Thu Apr 19 06:20:53 2018 (r332759) @@ -695,13 +695,14 @@ cpu_reset() ia32_pause(); cnt++; /* Wait for BSP to announce restart */ } - if (cpu_reset_proxy_active == 0) + if (cpu_reset_proxy_active == 0) { printf("cpu_reset: Failed to restart BSP\n"); - cpu_reset_proxy_active = 2; - - while (1) - ia32_pause(); - /* NOTREACHED */ + } else { + cpu_reset_proxy_active = 2; + while (1) + ia32_pause(); + /* NOTREACHED */ + } } DELAY(1000000); From owner-svn-src-all@freebsd.org Thu Apr 19 07:15:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FD4AF88773; Thu, 19 Apr 2018 07:15:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2319984A33; Thu, 19 Apr 2018 07:15:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18A1D26748; Thu, 19 Apr 2018 07:15:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J7FeAj013352; Thu, 19 Apr 2018 07:15:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J7FefD013349; Thu, 19 Apr 2018 07:15:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190715.w3J7FefD013349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 07:15: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: r332760 - in stable/11/sys: amd64/amd64 i386/i386 x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 i386/i386 x86/x86 X-SVN-Commit-Revision: 332760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 07:15:41 -0000 Author: avg Date: Thu Apr 19 07:15:40 2018 New Revision: 332760 URL: https://svnweb.freebsd.org/changeset/base/332760 Log: MFC r331878: unify amd64 and i386 cpu_reset() in x86/cpu_machdep.c stable/11 note: PC98 support was removed in head, so in this branch it needed to be handled directly Modified: stable/11/sys/amd64/amd64/vm_machdep.c stable/11/sys/i386/i386/vm_machdep.c stable/11/sys/x86/x86/cpu_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/vm_machdep.c Thu Apr 19 06:20:53 2018 (r332759) +++ stable/11/sys/amd64/amd64/vm_machdep.c Thu Apr 19 07:15:40 2018 (r332760) @@ -80,15 +80,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - -static void cpu_reset_real(void); -#ifdef SMP -static void cpu_reset_proxy(void); -static u_int cpu_reset_proxyid; -static volatile u_int cpu_reset_proxy_active; -#endif - _Static_assert(OFFSETOF_CURTHREAD == offsetof(struct pcpu, pc_curthread), "OFFSETOF_CURTHREAD does not correspond with offset of pc_curthread."); _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb), @@ -560,129 +551,6 @@ cpu_set_user_tls(struct thread *td, void *tls_base) #endif pcb->pcb_fsbase = (register_t)tls_base; return (0); -} - -#ifdef SMP -static void -cpu_reset_proxy() -{ - - cpu_reset_proxy_active = 1; - while (cpu_reset_proxy_active == 1) - ia32_pause(); /* Wait for other cpu to see that we've started */ - - printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); - DELAY(1000000); - cpu_reset_real(); -} -#endif - -void -cpu_reset() -{ -#ifdef SMP - cpuset_t map; - u_int cnt; - - if (smp_started) { - map = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &map); - CPU_NAND(&map, &stopped_cpus); - if (!CPU_EMPTY(&map)) { - printf("cpu_reset: Stopping other CPUs\n"); - stop_cpus(map); - } - - if (PCPU_GET(cpuid) != 0) { - cpu_reset_proxyid = PCPU_GET(cpuid); - cpustop_restartfunc = cpu_reset_proxy; - cpu_reset_proxy_active = 0; - printf("cpu_reset: Restarting BSP\n"); - - /* Restart CPU #0. */ - CPU_SETOF(0, &started_cpus); - wmb(); - - cnt = 0; - while (cpu_reset_proxy_active == 0 && cnt < 10000000) { - ia32_pause(); - cnt++; /* Wait for BSP to announce restart */ - } - if (cpu_reset_proxy_active == 0) { - printf("cpu_reset: Failed to restart BSP\n"); - } else { - cpu_reset_proxy_active = 2; - while (1) - ia32_pause(); - /* NOTREACHED */ - } - } - - DELAY(1000000); - } -#endif - cpu_reset_real(); - /* NOTREACHED */ -} - -static void -cpu_reset_real() -{ - struct region_descriptor null_idt; - int b; - - disable_intr(); - - /* - * Attempt to do a CPU reset via the keyboard controller, - * do not turn off GateA20, as any machine that fails - * to do the reset here would then end up in no man's land. - */ - outb(IO_KBD + 4, 0xFE); - DELAY(500000); /* wait 0.5 sec to see if that did it */ - - /* - * Attempt to force a reset via the Reset Control register at - * I/O port 0xcf9. Bit 2 forces a system reset when it - * transitions from 0 to 1. Bit 1 selects the type of reset - * to attempt: 0 selects a "soft" reset, and 1 selects a - * "hard" reset. We try a "hard" reset. The first write sets - * bit 1 to select a "hard" reset and clears bit 2. The - * second write forces a 0 -> 1 transition in bit 2 to trigger - * a reset. - */ - outb(0xcf9, 0x2); - outb(0xcf9, 0x6); - DELAY(500000); /* wait 0.5 sec to see if that did it */ - - /* - * Attempt to force a reset via the Fast A20 and Init register - * at I/O port 0x92. Bit 1 serves as an alternate A20 gate. - * Bit 0 asserts INIT# when set to 1. We are careful to only - * preserve bit 1 while setting bit 0. We also must clear bit - * 0 before setting it if it isn't already clear. - */ - b = inb(0x92); - if (b != 0xff) { - if ((b & 0x1) != 0) - outb(0x92, b & 0xfe); - outb(0x92, b | 0x1); - DELAY(500000); /* wait 0.5 sec to see if that did it */ - } - - printf("No known reset method worked, attempting CPU shutdown\n"); - DELAY(1000000); /* wait 1 sec for printf to complete */ - - /* Wipe the IDT. */ - null_idt.rd_limit = 0; - null_idt.rd_base = 0; - lidt(&null_idt); - - /* "good night, sweet prince .... " */ - breakpoint(); - - /* NOTREACHED */ - while(1); } /* Modified: stable/11/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/11/sys/i386/i386/vm_machdep.c Thu Apr 19 06:20:53 2018 (r332759) +++ stable/11/sys/i386/i386/vm_machdep.c Thu Apr 19 07:15:40 2018 (r332760) @@ -78,10 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef CPU_ELAN -#include -#endif - #include #include #include @@ -89,12 +85,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef PC98 -#include -#else -#include -#endif - #ifdef XBOX #include #endif @@ -110,13 +100,6 @@ _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu _Static_assert(__OFFSETOF_MONITORBUF == offsetof(struct pcpu, pc_monitorbuf), "__OFFSETOF_MONINORBUF does not correspond with offset of pc_monitorbuf."); -static void cpu_reset_real(void); -#ifdef SMP -static void cpu_reset_proxy(void); -static u_int cpu_reset_proxyid; -static volatile u_int cpu_reset_proxy_active; -#endif - union savefpu * get_pcb_user_save_td(struct thread *td) { @@ -584,162 +567,6 @@ kvtop(void *addr) if (pa == 0) panic("kvtop: zero page frame"); return (pa); -} - -#ifdef SMP -static void -cpu_reset_proxy() -{ - - cpu_reset_proxy_active = 1; - while (cpu_reset_proxy_active == 1) - ia32_pause(); /* Wait for other cpu to see that we've started */ - - printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); - DELAY(1000000); - cpu_reset_real(); -} -#endif - -void -cpu_reset() -{ -#ifdef XBOX - if (arch_i386_is_xbox) { - /* Kick the PIC16L, it can reboot the box */ - pic16l_reboot(); - for (;;); - } -#endif - -#ifdef SMP - cpuset_t map; - u_int cnt; - - if (smp_started) { - map = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &map); - CPU_NAND(&map, &stopped_cpus); - if (!CPU_EMPTY(&map)) { - printf("cpu_reset: Stopping other CPUs\n"); - stop_cpus(map); - } - - if (PCPU_GET(cpuid) != 0) { - cpu_reset_proxyid = PCPU_GET(cpuid); - cpustop_restartfunc = cpu_reset_proxy; - cpu_reset_proxy_active = 0; - printf("cpu_reset: Restarting BSP\n"); - - /* Restart CPU #0. */ - CPU_SETOF(0, &started_cpus); - wmb(); - - cnt = 0; - while (cpu_reset_proxy_active == 0 && cnt < 10000000) { - ia32_pause(); - cnt++; /* Wait for BSP to announce restart */ - } - if (cpu_reset_proxy_active == 0) { - printf("cpu_reset: Failed to restart BSP\n"); - } else { - cpu_reset_proxy_active = 2; - while (1) - ia32_pause(); - /* NOTREACHED */ - } - } - - DELAY(1000000); - } -#endif - cpu_reset_real(); - /* NOTREACHED */ -} - -static void -cpu_reset_real() -{ - struct region_descriptor null_idt; -#ifndef PC98 - int b; -#endif - - disable_intr(); -#ifdef CPU_ELAN - if (elan_mmcr != NULL) - elan_mmcr->RESCFG = 1; -#endif - - if (cpu == CPU_GEODE1100) { - /* Attempt Geode's own reset */ - outl(0xcf8, 0x80009044ul); - outl(0xcfc, 0xf); - } - -#ifdef PC98 - /* - * Attempt to do a CPU reset via CPU reset port. - */ - if ((inb(0x35) & 0xa0) != 0xa0) { - outb(0x37, 0x0f); /* SHUT0 = 0. */ - outb(0x37, 0x0b); /* SHUT1 = 0. */ - } - outb(0xf0, 0x00); /* Reset. */ -#else -#if !defined(BROKEN_KEYBOARD_RESET) - /* - * Attempt to do a CPU reset via the keyboard controller, - * do not turn off GateA20, as any machine that fails - * to do the reset here would then end up in no man's land. - */ - outb(IO_KBD + 4, 0xFE); - DELAY(500000); /* wait 0.5 sec to see if that did it */ -#endif - - /* - * Attempt to force a reset via the Reset Control register at - * I/O port 0xcf9. Bit 2 forces a system reset when it - * transitions from 0 to 1. Bit 1 selects the type of reset - * to attempt: 0 selects a "soft" reset, and 1 selects a - * "hard" reset. We try a "hard" reset. The first write sets - * bit 1 to select a "hard" reset and clears bit 2. The - * second write forces a 0 -> 1 transition in bit 2 to trigger - * a reset. - */ - outb(0xcf9, 0x2); - outb(0xcf9, 0x6); - DELAY(500000); /* wait 0.5 sec to see if that did it */ - - /* - * Attempt to force a reset via the Fast A20 and Init register - * at I/O port 0x92. Bit 1 serves as an alternate A20 gate. - * Bit 0 asserts INIT# when set to 1. We are careful to only - * preserve bit 1 while setting bit 0. We also must clear bit - * 0 before setting it if it isn't already clear. - */ - b = inb(0x92); - if (b != 0xff) { - if ((b & 0x1) != 0) - outb(0x92, b & 0xfe); - outb(0x92, b | 0x1); - DELAY(500000); /* wait 0.5 sec to see if that did it */ - } -#endif /* PC98 */ - - printf("No known reset method worked, attempting CPU shutdown\n"); - DELAY(1000000); /* wait 1 sec for printf to complete */ - - /* Wipe the IDT. */ - null_idt.rd_limit = 0; - null_idt.rd_base = 0; - lidt(&null_idt); - - /* "good night, sweet prince .... " */ - breakpoint(); - - /* NOTREACHED */ - while(1); } /* Modified: stable/11/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/11/sys/x86/x86/cpu_machdep.c Thu Apr 19 06:20:53 2018 (r332759) +++ stable/11/sys/x86/x86/cpu_machdep.c Thu Apr 19 07:15:40 2018 (r332760) @@ -90,6 +90,9 @@ __FBSDID("$FreeBSD$"); #ifdef SMP #include #endif +#ifdef CPU_ELAN +#include +#endif #include #include @@ -101,10 +104,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #define STATE_RUNNING 0x0 #define STATE_MWAIT 0x1 #define STATE_SLEEPING 0x2 +#ifdef SMP +static u_int cpu_reset_proxyid; +static volatile u_int cpu_reset_proxy_active; +#endif + + /* * Machine dependent boot() routine * @@ -237,6 +248,154 @@ cpu_halt(void) { for (;;) halt(); +} + +static void +cpu_reset_real(void) +{ + struct region_descriptor null_idt; +#ifndef PC98 + int b; +#endif + + disable_intr(); +#ifdef CPU_ELAN + if (elan_mmcr != NULL) + elan_mmcr->RESCFG = 1; +#endif +#ifdef __i386__ + if (cpu == CPU_GEODE1100) { + /* Attempt Geode's own reset */ + outl(0xcf8, 0x80009044ul); + outl(0xcfc, 0xf); + } +#endif +#ifdef PC98 + /* + * Attempt to do a CPU reset via CPU reset port. + */ + if ((inb(0x35) & 0xa0) != 0xa0) { + outb(0x37, 0x0f); /* SHUT0 = 0. */ + outb(0x37, 0x0b); /* SHUT1 = 0. */ + } + outb(0xf0, 0x00); /* Reset. */ +#else +#if !defined(BROKEN_KEYBOARD_RESET) + /* + * Attempt to do a CPU reset via the keyboard controller, + * do not turn off GateA20, as any machine that fails + * to do the reset here would then end up in no man's land. + */ + outb(IO_KBD + 4, 0xFE); + DELAY(500000); /* wait 0.5 sec to see if that did it */ +#endif + + /* + * Attempt to force a reset via the Reset Control register at + * I/O port 0xcf9. Bit 2 forces a system reset when it + * transitions from 0 to 1. Bit 1 selects the type of reset + * to attempt: 0 selects a "soft" reset, and 1 selects a + * "hard" reset. We try a "hard" reset. The first write sets + * bit 1 to select a "hard" reset and clears bit 2. The + * second write forces a 0 -> 1 transition in bit 2 to trigger + * a reset. + */ + outb(0xcf9, 0x2); + outb(0xcf9, 0x6); + DELAY(500000); /* wait 0.5 sec to see if that did it */ + + /* + * Attempt to force a reset via the Fast A20 and Init register + * at I/O port 0x92. Bit 1 serves as an alternate A20 gate. + * Bit 0 asserts INIT# when set to 1. We are careful to only + * preserve bit 1 while setting bit 0. We also must clear bit + * 0 before setting it if it isn't already clear. + */ + b = inb(0x92); + if (b != 0xff) { + if ((b & 0x1) != 0) + outb(0x92, b & 0xfe); + outb(0x92, b | 0x1); + DELAY(500000); /* wait 0.5 sec to see if that did it */ + } +#endif /* PC98 */ + + printf("No known reset method worked, attempting CPU shutdown\n"); + DELAY(1000000); /* wait 1 sec for printf to complete */ + + /* Wipe the IDT. */ + null_idt.rd_limit = 0; + null_idt.rd_base = 0; + lidt(&null_idt); + + /* "good night, sweet prince .... " */ + breakpoint(); + + /* NOTREACHED */ + while(1); +} + +#ifdef SMP +static void +cpu_reset_proxy(void) +{ + + cpu_reset_proxy_active = 1; + while (cpu_reset_proxy_active == 1) + ia32_pause(); /* Wait for other cpu to see that we've started */ + + printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); + DELAY(1000000); + cpu_reset_real(); +} +#endif + +void +cpu_reset(void) +{ +#ifdef SMP + cpuset_t map; + u_int cnt; + + if (smp_started) { + map = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &map); + CPU_NAND(&map, &stopped_cpus); + if (!CPU_EMPTY(&map)) { + printf("cpu_reset: Stopping other CPUs\n"); + stop_cpus(map); + } + + if (PCPU_GET(cpuid) != 0) { + cpu_reset_proxyid = PCPU_GET(cpuid); + cpustop_restartfunc = cpu_reset_proxy; + cpu_reset_proxy_active = 0; + printf("cpu_reset: Restarting BSP\n"); + + /* Restart CPU #0. */ + CPU_SETOF(0, &started_cpus); + wmb(); + + cnt = 0; + while (cpu_reset_proxy_active == 0 && cnt < 10000000) { + ia32_pause(); + cnt++; /* Wait for BSP to announce restart */ + } + if (cpu_reset_proxy_active == 0) { + printf("cpu_reset: Failed to restart BSP\n"); + } else { + cpu_reset_proxy_active = 2; + while (1) + ia32_pause(); + /* NOTREACHED */ + } + } + + DELAY(1000000); + } +#endif + cpu_reset_real(); + /* NOTREACHED */ } bool From owner-svn-src-all@freebsd.org Thu Apr 19 08:56:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F958F8F984; Thu, 19 Apr 2018 08:56:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1F997B3A5; Thu, 19 Apr 2018 08:56:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCE0027713; Thu, 19 Apr 2018 08:56:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3J8ustU063081; Thu, 19 Apr 2018 08:56:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3J8usIs063080; Thu, 19 Apr 2018 08:56:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804190856.w3J8usIs063080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Apr 2018 08:56: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: r332761 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 332761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 08:56:55 -0000 Author: avg Date: Thu Apr 19 08:56:54 2018 New Revision: 332761 URL: https://svnweb.freebsd.org/changeset/base/332761 Log: fix pc98 compilation issue in r332760 pc98 GENERIC still doesn't build, but at least there would be fewer issues to fix. Modified: stable/11/sys/x86/x86/cpu_machdep.c Modified: stable/11/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/11/sys/x86/x86/cpu_machdep.c Thu Apr 19 07:15:40 2018 (r332760) +++ stable/11/sys/x86/x86/cpu_machdep.c Thu Apr 19 08:56:54 2018 (r332761) @@ -104,7 +104,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef PC98 #include +#endif #define STATE_RUNNING 0x0 #define STATE_MWAIT 0x1 From owner-svn-src-all@freebsd.org Thu Apr 19 10:05:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BE28F946BF; Thu, 19 Apr 2018 10:05:13 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6AE6BD04; Thu, 19 Apr 2018 10:05:13 +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 338AE273; Thu, 19 Apr 2018 10:05:13 +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 w3JA5D6G097770; Thu, 19 Apr 2018 10:05:13 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JA5DED097769; Thu, 19 Apr 2018 10:05:13 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804191005.w3JA5DED097769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 19 Apr 2018 10:05: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: r332762 - 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: 332762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 10:05:13 -0000 Author: ae Date: Thu Apr 19 10:05:12 2018 New Revision: 332762 URL: https://svnweb.freebsd.org/changeset/base/332762 Log: MFC r332448: Remove printing of "not" keyword from print_ip() function. After r331668 handling of F_NOT flag done in one place by print_instruction() function. Modified: stable/11/sbin/ipfw/ipfw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw2.c ============================================================================== --- stable/11/sbin/ipfw/ipfw2.c Thu Apr 19 08:56:54 2018 (r332761) +++ stable/11/sbin/ipfw/ipfw2.c Thu Apr 19 10:05:12 2018 (r332762) @@ -1192,11 +1192,10 @@ print_ip(struct buf_pr *bp, const struct format_opts * if (d < sizeof(lookup_key)/sizeof(lookup_key[0])) arg = match_value(rule_options, lookup_key[d]); t = table_search_ctlv(fo->tstate, ((ipfw_insn *)cmd)->arg1); - bprintf(bp, "%s lookup %s %s", cmd->o.len & F_NOT ? " not": "", - arg, t); + bprintf(bp, " lookup %s %s", arg, t); return; } - bprintf(bp, "%s%s ", cmd->o.len & F_NOT ? " not": "", s); + bprintf(bp, "%s ", s); if (cmd->o.opcode == O_IP_SRC_ME || cmd->o.opcode == O_IP_DST_ME) { bprintf(bp, "me"); From owner-svn-src-all@freebsd.org Thu Apr 19 10:06:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FD20F949AA; Thu, 19 Apr 2018 10:06:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDAAF6C935; Thu, 19 Apr 2018 10:06:53 +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 D8793279; Thu, 19 Apr 2018 10:06:53 +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 w3JA6r2c098009; Thu, 19 Apr 2018 10:06:53 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JA6ri3098006; Thu, 19 Apr 2018 10:06:53 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804191006.w3JA6ri3098006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 19 Apr 2018 10:06: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: r332763 - 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: 332763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 10:06:54 -0000 Author: ae Date: Thu Apr 19 10:06:53 2018 New Revision: 332763 URL: https://svnweb.freebsd.org/changeset/base/332763 Log: MFC r332449: Remove printing of "not" keyword from print_ip6() function. After r331668 handling of F_NOT flag done in one place by print_instruction() function. Also remove unused argument from print_ip[6]() functions. Modified: stable/11/sbin/ipfw/ipfw2.c stable/11/sbin/ipfw/ipfw2.h stable/11/sbin/ipfw/ipv6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw2.c ============================================================================== --- stable/11/sbin/ipfw/ipfw2.c Thu Apr 19 10:05:12 2018 (r332762) +++ stable/11/sbin/ipfw/ipfw2.c Thu Apr 19 10:06:53 2018 (r332763) @@ -1176,8 +1176,7 @@ print_flags(struct buf_pr *bp, char const *name, ipfw_ * Print the ip address contained in a command. */ static void -print_ip(struct buf_pr *bp, const struct format_opts *fo, ipfw_insn_ip *cmd, - char const *s) +print_ip(struct buf_pr *bp, const struct format_opts *fo, ipfw_insn_ip *cmd) { struct hostent *he = NULL; struct in_addr *ia; @@ -1185,6 +1184,7 @@ print_ip(struct buf_pr *bp, const struct format_opts * uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; char *t; + bprintf(bp, " "); if (cmd->o.opcode == O_IP_DST_LOOKUP && len > F_INSN_SIZE(ipfw_insn_u32)) { uint32_t d = a[1]; const char *arg = ""; @@ -1192,11 +1192,9 @@ print_ip(struct buf_pr *bp, const struct format_opts * if (d < sizeof(lookup_key)/sizeof(lookup_key[0])) arg = match_value(rule_options, lookup_key[d]); t = table_search_ctlv(fo->tstate, ((ipfw_insn *)cmd)->arg1); - bprintf(bp, " lookup %s %s", arg, t); + bprintf(bp, "lookup %s %s", arg, t); return; } - bprintf(bp, "%s ", s); - if (cmd->o.opcode == O_IP_SRC_ME || cmd->o.opcode == O_IP_DST_ME) { bprintf(bp, "me"); return; @@ -1467,7 +1465,7 @@ print_instruction(struct buf_pr *bp, const struct form case O_IP_DST_MASK: case O_IP_DST_ME: case O_IP_DST_SET: - print_ip(bp, fo, insntod(cmd, ip), ""); + print_ip(bp, fo, insntod(cmd, ip)); break; case O_IP6_SRC: case O_IP6_SRC_MASK: @@ -1475,7 +1473,7 @@ print_instruction(struct buf_pr *bp, const struct form case O_IP6_DST: case O_IP6_DST_MASK: case O_IP6_DST_ME: - print_ip6(bp, insntod(cmd, ip6), ""); + print_ip6(bp, insntod(cmd, ip6)); break; case O_FLOW6ID: print_flow6id(bp, insntod(cmd, u32)); Modified: stable/11/sbin/ipfw/ipfw2.h ============================================================================== --- stable/11/sbin/ipfw/ipfw2.h Thu Apr 19 10:05:12 2018 (r332762) +++ stable/11/sbin/ipfw/ipfw2.h Thu Apr 19 10:06:53 2018 (r332763) @@ -401,7 +401,7 @@ int ipfw_delete_pipe(int pipe_or_queue, int n); /* ipv6.c */ void print_unreach6_code(struct buf_pr *bp, uint16_t code); -void print_ip6(struct buf_pr *bp, struct _ipfw_insn_ip6 *cmd, char const *s); +void print_ip6(struct buf_pr *bp, struct _ipfw_insn_ip6 *cmd); void print_flow6id(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd); void print_icmp6types(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd); void print_ext6hdr(struct buf_pr *bp, struct _ipfw_insn *cmd ); Modified: stable/11/sbin/ipfw/ipv6.c ============================================================================== --- stable/11/sbin/ipfw/ipv6.c Thu Apr 19 10:05:12 2018 (r332762) +++ stable/11/sbin/ipfw/ipv6.c Thu Apr 19 10:06:53 2018 (r332763) @@ -85,17 +85,15 @@ print_unreach6_code(struct buf_pr *bp, uint16_t code) * Print the ip address contained in a command. */ void -print_ip6(struct buf_pr *bp, ipfw_insn_ip6 *cmd, char const *s) +print_ip6(struct buf_pr *bp, ipfw_insn_ip6 *cmd) { struct hostent *he = NULL; int len = F_LEN((ipfw_insn *) cmd) - 1; struct in6_addr *a = &(cmd->addr6); char trad[255]; - bprintf(bp, "%s%s ", cmd->o.len & F_NOT ? " not": "", s); - if (cmd->o.opcode == O_IP6_SRC_ME || cmd->o.opcode == O_IP6_DST_ME) { - bprintf(bp, "me6"); + bprintf(bp, " me6"); return; } if (cmd->o.opcode == O_IP6) { @@ -108,7 +106,7 @@ print_ip6(struct buf_pr *bp, ipfw_insn_ip6 *cmd, char * addr/mask pairs have len = (2n+1). We convert len to n so we * use that to count the number of entries. */ - + bprintf(bp, " "); for (len = len / 4; len > 0; len -= 2, a += 2) { int mb = /* mask length */ (cmd->o.opcode == O_IP6_SRC || cmd->o.opcode == O_IP6_DST) ? From owner-svn-src-all@freebsd.org Thu Apr 19 10:08:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F404EF94BF2; Thu, 19 Apr 2018 10:08:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2B306CAEB; Thu, 19 Apr 2018 10:08:28 +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 9D7C227E; Thu, 19 Apr 2018 10:08:28 +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 w3JA8Sag098114; Thu, 19 Apr 2018 10:08:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JA8SJg098113; Thu, 19 Apr 2018 10:08:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804191008.w3JA8SJg098113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 19 Apr 2018 10:08: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: r332764 - 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: 332764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 10:08:29 -0000 Author: ae Date: Thu Apr 19 10:08:28 2018 New Revision: 332764 URL: https://svnweb.freebsd.org/changeset/base/332764 Log: MFC r332451: Fix indenting in ipv6.c file, use tabs instead of mixing tabs and spaces. Modified: stable/11/sbin/ipfw/ipv6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipv6.c ============================================================================== --- stable/11/sbin/ipfw/ipv6.c Thu Apr 19 10:06:53 2018 (r332763) +++ stable/11/sbin/ipfw/ipv6.c Thu Apr 19 10:08:28 2018 (r332764) @@ -48,11 +48,11 @@ } while (0) static struct _s_x icmp6codes[] = { - { "no-route", ICMP6_DST_UNREACH_NOROUTE }, - { "admin-prohib", ICMP6_DST_UNREACH_ADMIN }, - { "address", ICMP6_DST_UNREACH_ADDR }, - { "port", ICMP6_DST_UNREACH_NOPORT }, - { NULL, 0 } + { "no-route", ICMP6_DST_UNREACH_NOROUTE }, + { "admin-prohib", ICMP6_DST_UNREACH_ADMIN }, + { "address", ICMP6_DST_UNREACH_ADDR }, + { "port", ICMP6_DST_UNREACH_NOPORT }, + { NULL, 0 } }; void @@ -87,50 +87,54 @@ print_unreach6_code(struct buf_pr *bp, uint16_t code) void print_ip6(struct buf_pr *bp, ipfw_insn_ip6 *cmd) { - struct hostent *he = NULL; - int len = F_LEN((ipfw_insn *) cmd) - 1; - struct in6_addr *a = &(cmd->addr6); - char trad[255]; + char trad[255]; + struct hostent *he = NULL; + struct in6_addr *a = &(cmd->addr6); + int len, mb; - if (cmd->o.opcode == O_IP6_SRC_ME || cmd->o.opcode == O_IP6_DST_ME) { - bprintf(bp, " me6"); - return; - } - if (cmd->o.opcode == O_IP6) { - bprintf(bp, " ip6"); - return; - } + len = F_LEN((ipfw_insn *) cmd) - 1; + if (cmd->o.opcode == O_IP6_SRC_ME || cmd->o.opcode == O_IP6_DST_ME) { + bprintf(bp, " me6"); + return; + } + if (cmd->o.opcode == O_IP6) { + bprintf(bp, " ip6"); + return; + } - /* - * len == 4 indicates a single IP, whereas lists of 1 or more - * addr/mask pairs have len = (2n+1). We convert len to n so we - * use that to count the number of entries. - */ + /* + * len == 4 indicates a single IP, whereas lists of 1 or more + * addr/mask pairs have len = (2n+1). We convert len to n so we + * use that to count the number of entries. + */ bprintf(bp, " "); - for (len = len / 4; len > 0; len -= 2, a += 2) { - int mb = /* mask length */ - (cmd->o.opcode == O_IP6_SRC || cmd->o.opcode == O_IP6_DST) ? - 128 : contigmask((uint8_t *)&(a[1]), 128); + for (len = len / 4; len > 0; len -= 2, a += 2) { + /* mask length */ + mb = (cmd->o.opcode == O_IP6_SRC || + cmd->o.opcode == O_IP6_DST) ? 128: + contigmask((uint8_t *)&(a[1]), 128); - if (mb == 128 && co.do_resolv) - he = gethostbyaddr((char *)a, sizeof(*a), AF_INET6); - if (he != NULL) /* resolved to name */ - bprintf(bp, "%s", he->h_name); - else if (mb == 0) /* any */ - bprintf(bp, "any"); - else { /* numeric IP followed by some kind of mask */ - if (inet_ntop(AF_INET6, a, trad, sizeof( trad ) ) == NULL) - bprintf(bp, "Error ntop in print_ip6\n"); - bprintf(bp, "%s", trad ); - if (mb < 0) /* mask not contiguous */ - bprintf(bp, "/%s", - inet_ntop(AF_INET6, &a[1], trad, sizeof(trad))); - else if (mb < 128) - bprintf(bp, "/%d", mb); - } - if (len > 2) - bprintf(bp, ","); - } + if (mb == 128 && co.do_resolv) + he = gethostbyaddr((char *)a, sizeof(*a), AF_INET6); + + if (he != NULL) /* resolved to name */ + bprintf(bp, "%s", he->h_name); + else if (mb == 0) /* any */ + bprintf(bp, "any"); + else { /* numeric IP followed by some kind of mask */ + if (inet_ntop(AF_INET6, a, trad, + sizeof(trad)) == NULL) + bprintf(bp, "Error ntop in print_ip6\n"); + bprintf(bp, "%s", trad ); + if (mb < 0) /* mask not contiguous */ + bprintf(bp, "/%s", inet_ntop(AF_INET6, &a[1], + trad, sizeof(trad))); + else if (mb < 128) + bprintf(bp, "/%d", mb); + } + if (len > 2) + bprintf(bp, ","); + } } void @@ -142,163 +146,154 @@ fill_icmp6types(ipfw_insn_icmp6 *cmd, char *av, int cb bzero(cmd, sizeof(*cmd)); while (*av) { - if (*av == ',') - av++; - type = strtoul(av, &av, 0); - if (*av != ',' && *av != '\0') - errx(EX_DATAERR, "invalid ICMP6 type"); - /* - * XXX: shouldn't this be 0xFF? I can't see any reason why - * we shouldn't be able to filter all possiable values - * regardless of the ability of the rest of the kernel to do - * anything useful with them. - */ - if (type > ICMP6_MAXTYPE) - errx(EX_DATAERR, "ICMP6 type out of range"); - cmd->d[type / 32] |= ( 1 << (type % 32)); + if (*av == ',') + av++; + type = strtoul(av, &av, 0); + if (*av != ',' && *av != '\0') + errx(EX_DATAERR, "invalid ICMP6 type"); + /* + * XXX: shouldn't this be 0xFF? I can't see any reason why + * we shouldn't be able to filter all possiable values + * regardless of the ability of the rest of the kernel to do + * anything useful with them. + */ + if (type > ICMP6_MAXTYPE) + errx(EX_DATAERR, "ICMP6 type out of range"); + cmd->d[type / 32] |= ( 1 << (type % 32)); } cmd->o.opcode = O_ICMP6TYPE; cmd->o.len |= F_INSN_SIZE(ipfw_insn_icmp6); } - void print_icmp6types(struct buf_pr *bp, ipfw_insn_u32 *cmd) { - int i, j; - char sep= ' '; + int i, j; + char sep= ' '; - bprintf(bp, " ip6 icmp6types"); - for (i = 0; i < 7; i++) - for (j=0; j < 32; ++j) { - if ( (cmd->d[i] & (1 << (j))) == 0) - continue; - bprintf(bp, "%c%d", sep, (i*32 + j)); - sep = ','; - } + bprintf(bp, " ip6 icmp6types"); + for (i = 0; i < 7; i++) + for (j=0; j < 32; ++j) { + if ( (cmd->d[i] & (1 << (j))) == 0) + continue; + bprintf(bp, "%c%d", sep, (i*32 + j)); + sep = ','; + } } void print_flow6id(struct buf_pr *bp, ipfw_insn_u32 *cmd) { - uint16_t i, limit = cmd->o.arg1; - char sep = ','; + uint16_t i, limit = cmd->o.arg1; + char sep = ','; - bprintf(bp, " flow-id "); - for( i=0; i < limit; ++i) { - if (i == limit - 1) - sep = ' '; - bprintf(bp, "%d%c", cmd->d[i], sep); - } + bprintf(bp, " flow-id "); + for( i=0; i < limit; ++i) { + if (i == limit - 1) + sep = ' '; + bprintf(bp, "%d%c", cmd->d[i], sep); + } } /* structure and define for the extension header in ipv6 */ static struct _s_x ext6hdrcodes[] = { - { "frag", EXT_FRAGMENT }, - { "hopopt", EXT_HOPOPTS }, - { "route", EXT_ROUTING }, - { "dstopt", EXT_DSTOPTS }, - { "ah", EXT_AH }, - { "esp", EXT_ESP }, - { "rthdr0", EXT_RTHDR0 }, - { "rthdr2", EXT_RTHDR2 }, - { NULL, 0 } + { "frag", EXT_FRAGMENT }, + { "hopopt", EXT_HOPOPTS }, + { "route", EXT_ROUTING }, + { "dstopt", EXT_DSTOPTS }, + { "ah", EXT_AH }, + { "esp", EXT_ESP }, + { "rthdr0", EXT_RTHDR0 }, + { "rthdr2", EXT_RTHDR2 }, + { NULL, 0 } }; /* fills command for the extension header filtering */ int fill_ext6hdr( ipfw_insn *cmd, char *av) { - int tok; - char *s = av; + int tok; + char *s = av; - cmd->arg1 = 0; - - while(s) { - av = strsep( &s, ",") ; - tok = match_token(ext6hdrcodes, av); - switch (tok) { - case EXT_FRAGMENT: - cmd->arg1 |= EXT_FRAGMENT; - break; - - case EXT_HOPOPTS: - cmd->arg1 |= EXT_HOPOPTS; - break; - - case EXT_ROUTING: - cmd->arg1 |= EXT_ROUTING; - break; - - case EXT_DSTOPTS: - cmd->arg1 |= EXT_DSTOPTS; - break; - - case EXT_AH: - cmd->arg1 |= EXT_AH; - break; - - case EXT_ESP: - cmd->arg1 |= EXT_ESP; - break; - - case EXT_RTHDR0: - cmd->arg1 |= EXT_RTHDR0; - break; - - case EXT_RTHDR2: - cmd->arg1 |= EXT_RTHDR2; - break; - - default: - errx( EX_DATAERR, "invalid option for ipv6 exten header" ); - break; - } - } - if (cmd->arg1 == 0 ) - return 0; - cmd->opcode = O_EXT_HDR; - cmd->len |= F_INSN_SIZE( ipfw_insn ); - return 1; + cmd->arg1 = 0; + while(s) { + av = strsep( &s, ",") ; + tok = match_token(ext6hdrcodes, av); + switch (tok) { + case EXT_FRAGMENT: + cmd->arg1 |= EXT_FRAGMENT; + break; + case EXT_HOPOPTS: + cmd->arg1 |= EXT_HOPOPTS; + break; + case EXT_ROUTING: + cmd->arg1 |= EXT_ROUTING; + break; + case EXT_DSTOPTS: + cmd->arg1 |= EXT_DSTOPTS; + break; + case EXT_AH: + cmd->arg1 |= EXT_AH; + break; + case EXT_ESP: + cmd->arg1 |= EXT_ESP; + break; + case EXT_RTHDR0: + cmd->arg1 |= EXT_RTHDR0; + break; + case EXT_RTHDR2: + cmd->arg1 |= EXT_RTHDR2; + break; + default: + errx(EX_DATAERR, + "invalid option for ipv6 exten header"); + break; + } + } + if (cmd->arg1 == 0) + return (0); + cmd->opcode = O_EXT_HDR; + cmd->len |= F_INSN_SIZE(ipfw_insn); + return (1); } void print_ext6hdr(struct buf_pr *bp, ipfw_insn *cmd ) { - char sep = ' '; + char sep = ' '; - bprintf(bp, " extension header:"); - if (cmd->arg1 & EXT_FRAGMENT ) { - bprintf(bp, "%cfragmentation", sep); - sep = ','; - } - if (cmd->arg1 & EXT_HOPOPTS ) { - bprintf(bp, "%chop options", sep); - sep = ','; - } - if (cmd->arg1 & EXT_ROUTING ) { - bprintf(bp, "%crouting options", sep); - sep = ','; - } - if (cmd->arg1 & EXT_RTHDR0 ) { - bprintf(bp, "%crthdr0", sep); - sep = ','; - } - if (cmd->arg1 & EXT_RTHDR2 ) { - bprintf(bp, "%crthdr2", sep); - sep = ','; - } - if (cmd->arg1 & EXT_DSTOPTS ) { - bprintf(bp, "%cdestination options", sep); - sep = ','; - } - if (cmd->arg1 & EXT_AH ) { - bprintf(bp, "%cauthentication header", sep); - sep = ','; - } - if (cmd->arg1 & EXT_ESP ) { - bprintf(bp, "%cencapsulated security payload", sep); - } + bprintf(bp, " extension header:"); + if (cmd->arg1 & EXT_FRAGMENT) { + bprintf(bp, "%cfragmentation", sep); + sep = ','; + } + if (cmd->arg1 & EXT_HOPOPTS) { + bprintf(bp, "%chop options", sep); + sep = ','; + } + if (cmd->arg1 & EXT_ROUTING) { + bprintf(bp, "%crouting options", sep); + sep = ','; + } + if (cmd->arg1 & EXT_RTHDR0) { + bprintf(bp, "%crthdr0", sep); + sep = ','; + } + if (cmd->arg1 & EXT_RTHDR2) { + bprintf(bp, "%crthdr2", sep); + sep = ','; + } + if (cmd->arg1 & EXT_DSTOPTS) { + bprintf(bp, "%cdestination options", sep); + sep = ','; + } + if (cmd->arg1 & EXT_AH) { + bprintf(bp, "%cauthentication header", sep); + sep = ','; + } + if (cmd->arg1 & EXT_ESP) { + bprintf(bp, "%cencapsulated security payload", sep); + } } /* Try to find ipv6 address by hostname */ @@ -312,7 +307,7 @@ lookup_host6 (char *host, struct in6_addr *ip6addr) return(-1); memcpy(ip6addr, he->h_addr_list[0], sizeof( struct in6_addr)); } - return(0); + return (0); } From owner-svn-src-all@freebsd.org Thu Apr 19 10:11:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 367D1F95099; Thu, 19 Apr 2018 10:11:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD3546CF88; Thu, 19 Apr 2018 10:11:39 +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 BE4843D2; Thu, 19 Apr 2018 10:11:39 +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 w3JABdHk003006; Thu, 19 Apr 2018 10:11:39 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JABd5s003004; Thu, 19 Apr 2018 10:11:39 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804191011.w3JABd5s003004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 19 Apr 2018 10:11: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: r332765 - in stable/11/sys/netpfil/ipfw: . nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11/sys/netpfil/ipfw: . nat64 X-SVN-Commit-Revision: 332765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 10:11:40 -0000 Author: ae Date: Thu Apr 19 10:11:39 2018 New Revision: 332765 URL: https://svnweb.freebsd.org/changeset/base/332765 Log: MFC r316825: Use address of specific union member instead of whole union address to fix PVS-Studio warnings. MFC r316826: Avoid undefined behavior. The 'pktid' variable is modified while being used twice between sequence points, probably due to htonl() is macro. Modified: stable/11/sys/netpfil/ipfw/ip_fw_table_algo.c stable/11/sys/netpfil/ipfw/nat64/nat64stl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw_table_algo.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_table_algo.c Thu Apr 19 10:08:28 2018 (r332764) +++ stable/11/sys/netpfil/ipfw/ip_fw_table_algo.c Thu Apr 19 10:11:39 2018 (r332765) @@ -526,7 +526,8 @@ ta_dump_radix_tentry(void *ta_state, struct table_info #ifdef INET6 } else { xn = (struct radix_addr_xentry *)e; - memcpy(&tent->k, &xn->addr6.sin6_addr, sizeof(struct in6_addr)); + memcpy(&tent->k.addr6, &xn->addr6.sin6_addr, + sizeof(struct in6_addr)); tent->masklen = xn->masklen; tent->subtype = AF_INET6; tent->v.kidx = xn->value; @@ -1381,7 +1382,7 @@ ta_dump_chash_tentry(void *ta_state, struct table_info tent->v.kidx = ent->value; #ifdef INET6 } else { - memcpy(&tent->k, &ent->a.a6, sizeof(struct in6_addr)); + memcpy(&tent->k.addr6, &ent->a.a6, sizeof(struct in6_addr)); tent->masklen = cfg->mask6; tent->subtype = AF_INET6; tent->v.kidx = ent->value; @@ -3984,7 +3985,8 @@ ta_dump_kfib_tentry_int(struct sockaddr *paddr, struct if (paddr->sa_family == AF_INET6) { addr6 = (struct sockaddr_in6 *)paddr; mask6 = (struct sockaddr_in6 *)pmask; - memcpy(&tent->k, &addr6->sin6_addr, sizeof(struct in6_addr)); + memcpy(&tent->k.addr6, &addr6->sin6_addr, + sizeof(struct in6_addr)); len = 128; if (mask6 != NULL) len = contigmask((uint8_t *)&mask6->sin6_addr, 128); Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl.c Thu Apr 19 10:08:28 2018 (r332764) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl.c Thu Apr 19 10:11:39 2018 (r332765) @@ -75,7 +75,8 @@ nat64stl_log(struct pfloghdr *plog, struct mbuf *m, sa plog->action = PF_NAT; plog->dir = PF_IN; plog->rulenr = htonl(kidx); - plog->subrulenr = htonl(++pktid); + pktid++; + plog->subrulenr = htonl(pktid); plog->ruleset[0] = '\0'; strlcpy(plog->ifname, "NAT64STL", sizeof(plog->ifname)); ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); From owner-svn-src-all@freebsd.org Thu Apr 19 10:13:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58ABFF9530E; Thu, 19 Apr 2018 10:13:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2B26D299; Thu, 19 Apr 2018 10:13:29 +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 07262412; Thu, 19 Apr 2018 10:13:29 +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 w3JADSr0003119; Thu, 19 Apr 2018 10:13:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JADSw9003117; Thu, 19 Apr 2018 10:13:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804191013.w3JADSw9003117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 19 Apr 2018 10:13: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: r332766 - stable/11/sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 332766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 10:13:29 -0000 Author: ae Date: Thu Apr 19 10:13:28 2018 New Revision: 332766 URL: https://svnweb.freebsd.org/changeset/base/332766 Log: MFC r332456: Migrate NAT64 to FIB KPI. Modified: 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/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c Thu Apr 19 10:11:39 2018 (r332765) +++ stable/11/sys/netpfil/ipfw/nat64/nat64_translate.c Thu Apr 19 10:13:28 2018 (r332766) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -60,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -76,11 +78,12 @@ nat64_log(struct pfloghdr *logdata, struct mbuf *m, sa logdata->af = family; ipfw_bpf_mtap2(logdata, PFLOG_HDRLEN, m); } + #ifdef IPFIREWALL_NAT64_DIRECT_OUTPUT -static NAT64NOINLINE struct sockaddr* nat64_find_route4(struct route *ro, - in_addr_t dest, struct mbuf *m); -static NAT64NOINLINE struct sockaddr* nat64_find_route6(struct route_in6 *ro, - struct in6_addr *dest, struct mbuf *m); +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, @@ -100,28 +103,38 @@ nat64_output(struct ifnet *ifp, struct mbuf *m, static NAT64NOINLINE int nat64_output_one(struct mbuf *m, nat64_stats_block *stats, void *logdata) { - struct route_in6 ro6; - struct route ro4, *ro; + struct nhop6_basic nh6; + struct nhop4_basic nh4; + struct sockaddr_in6 dst6; + struct sockaddr_in dst4; struct sockaddr *dst; - struct ifnet *ifp; struct ip6_hdr *ip6; struct ip *ip4; + struct ifnet *ifp; int error; ip4 = mtod(m, struct ip *); switch (ip4->ip_v) { case IPVERSION: - ro = &ro4; - dst = nat64_find_route4(&ro4, ip4->ip_dst.s_addr, m); - if (dst == NULL) + dst4.sin_addr = ip4->ip_dst; + error = nat64_find_route4(&nh4, &dst4, m); + if (error != 0) NAT64STAT_INC(stats, noroute4); + else { + ifp = nh4.nh_ifp; + dst = (struct sockaddr *)&dst4; + } break; case (IPV6_VERSION >> 4): - ip6 = (struct ip6_hdr *)ip4; - ro = (struct route *)&ro6; - dst = nat64_find_route6(&ro6, &ip6->ip6_dst, m); - if (dst == NULL) + ip6 = mtod(m, struct ip6_hdr *); + dst6.sin6_addr = ip6->ip6_dst; + error = nat64_find_route6(&nh6, &dst6, m); + if (error != 0) NAT64STAT_INC(stats, noroute6); + else { + ifp = nh6.nh_ifp; + dst = (struct sockaddr *)&dst6; + } break; default: m_freem(m); @@ -129,18 +142,15 @@ nat64_output_one(struct mbuf *m, nat64_stats_block *st DPRINTF(DP_DROPS, "dropped due to unknown IP version"); return (EAFNOSUPPORT); } - if (dst == NULL) { - FREE_ROUTE(ro); + if (error != 0) { m_freem(m); return (EHOSTUNREACH); } if (logdata != NULL) nat64_log(logdata, m, dst->sa_family); - ifp = ro->ro_rt->rt_ifp; - error = (*ifp->if_output)(ifp, m, dst, ro); + error = (*ifp->if_output)(ifp, m, dst, NULL); if (error != 0) NAT64STAT_INC(stats, oerrors); - FREE_ROUTE(ro); return (error); } #else /* !IPFIREWALL_NAT64_DIRECT_OUTPUT */ @@ -470,36 +480,31 @@ fail: return (ENOMEM); } -#if __FreeBSD_version < 1100000 -#define rt_expire rt_rmx.rmx_expire -#define rt_mtu rt_rmx.rmx_mtu -#endif -static NAT64NOINLINE struct sockaddr* -nat64_find_route6(struct route_in6 *ro, struct in6_addr *dest, struct mbuf *m) +static NAT64NOINLINE int +nat64_find_route6(struct nhop6_basic *pnh, struct sockaddr_in6 *dst, + struct mbuf *m) { - struct sockaddr_in6 *dst; - struct rtentry *rt; - bzero(ro, sizeof(*ro)); - dst = (struct sockaddr_in6 *)&ro->ro_dst; + if (fib6_lookup_nh_basic(M_GETFIB(m), &dst->sin6_addr, 0, 0, 0, + pnh) != 0) + return (EHOSTUNREACH); + if (pnh->nh_flags & (NHF_BLACKHOLE | NHF_REJECT)) + return (EHOSTUNREACH); + /* + * XXX: we need to use destination address with embedded scope + * zone id, because LLTABLE uses such form of addresses for lookup. + */ dst->sin6_family = AF_INET6; dst->sin6_len = sizeof(*dst); - dst->sin6_addr = *dest; - IN6_LOOKUP_ROUTE(ro, M_GETFIB(m)); - rt = ro->ro_rt; - if (rt && (rt->rt_flags & RTF_UP) && - (rt->rt_ifp->if_flags & IFF_UP) && - (rt->rt_ifp->if_drv_flags & IFF_DRV_RUNNING)) { - if (rt->rt_flags & RTF_GATEWAY) - dst = (struct sockaddr_in6 *)rt->rt_gateway; - } else - return (NULL); - if (((rt->rt_flags & RTF_REJECT) && - (rt->rt_expire == 0 || - time_uptime < rt->rt_expire)) || - rt->rt_ifp->if_link_state == LINK_STATE_DOWN) - return (NULL); - return ((struct sockaddr *)dst); + dst->sin6_addr = pnh->nh_addr; + if (IN6_IS_SCOPE_LINKLOCAL(&dst->sin6_addr)) + dst->sin6_addr.s6_addr16[1] = + htons(pnh->nh_ifp->if_index & 0xffff); + dst->sin6_port = 0; + dst->sin6_scope_id = 0; + dst->sin6_flowinfo = 0; + + return (0); } #define NAT64_ICMP6_PLEN 64 @@ -600,32 +605,21 @@ freeit: m_freem(m); } -static NAT64NOINLINE struct sockaddr* -nat64_find_route4(struct route *ro, in_addr_t dest, struct mbuf *m) +static NAT64NOINLINE int +nat64_find_route4(struct nhop4_basic *pnh, struct sockaddr_in *dst, + struct mbuf *m) { - struct sockaddr_in *dst; - struct rtentry *rt; - bzero(ro, sizeof(*ro)); - dst = (struct sockaddr_in *)&ro->ro_dst; + if (fib4_lookup_nh_basic(M_GETFIB(m), dst->sin_addr, 0, 0, pnh) != 0) + return (EHOSTUNREACH); + if (pnh->nh_flags & (NHF_BLACKHOLE | NHF_BROADCAST | NHF_REJECT)) + return (EHOSTUNREACH); + dst->sin_family = AF_INET; dst->sin_len = sizeof(*dst); - dst->sin_addr.s_addr = dest; - IN_LOOKUP_ROUTE(ro, M_GETFIB(m)); - rt = ro->ro_rt; - if (rt && (rt->rt_flags & RTF_UP) && - (rt->rt_ifp->if_flags & IFF_UP) && - (rt->rt_ifp->if_drv_flags & IFF_DRV_RUNNING)) { - if (rt->rt_flags & RTF_GATEWAY) - dst = (struct sockaddr_in *)rt->rt_gateway; - } else - return (NULL); - if (((rt->rt_flags & RTF_REJECT) && - (rt->rt_expire == 0 || - time_uptime < rt->rt_expire)) || - rt->rt_ifp->if_link_state == LINK_STATE_DOWN) - return (NULL); - return ((struct sockaddr *)dst); + dst->sin_addr = pnh->nh_addr; + dst->sin_port = 0; + return (0); } #define NAT64_ICMP_PLEN 64 @@ -1066,13 +1060,11 @@ nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *s struct in6_addr *daddr, uint16_t lport, nat64_stats_block *stats, void *logdata) { - struct route_in6 ro; + struct nhop6_basic nh; struct ip6_hdr ip6; - struct ifnet *ifp; + struct sockaddr_in6 dst; struct ip *ip; struct mbufq mq; - struct sockaddr *dst; - uint32_t mtu; uint16_t ip_id, ip_off; uint16_t *csum; int plen, hlen; @@ -1110,23 +1102,17 @@ nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *s return (NAT64MFREE); } - dst = nat64_find_route6(&ro, &ip6.ip6_dst, m); - if (dst == NULL) { - FREE_ROUTE(&ro); + dst.sin6_addr = ip6.ip6_dst; + if (nat64_find_route6(&nh, &dst, m) != 0) { NAT64STAT_INC(stats, noroute6); nat64_icmp_reflect(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, stats, logdata); return (NAT64RETURN); } - ifp = ro.ro_rt->rt_ifp; - if (ro.ro_rt->rt_mtu != 0) - mtu = min(ro.ro_rt->rt_mtu, ifp->if_mtu); - else - mtu = ifp->if_mtu; - if (mtu < plen + sizeof(ip6) && (ip->ip_off & htons(IP_DF)) != 0) { - FREE_ROUTE(&ro); + if (nh.nh_mtu < plen + sizeof(ip6) && + (ip->ip_off & htons(IP_DF)) != 0) { nat64_icmp_reflect(m, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, - FRAGSZ(mtu) + sizeof(struct ip), stats, logdata); + FRAGSZ(nh.nh_mtu) + sizeof(struct ip), stats, logdata); return (NAT64RETURN); } @@ -1162,24 +1148,20 @@ nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *s break; case IPPROTO_ICMP: m = nat64_icmp_translate(m, &ip6, lport, hlen, stats); - if (m == NULL) { - FREE_ROUTE(&ro); - /* stats already accounted */ + if (m == NULL) /* stats already accounted */ return (NAT64RETURN); - } } m_adj(m, hlen); mbufq_init(&mq, 255); - nat64_fragment6(stats, &ip6, &mq, m, mtu, ip_id, ip_off); + nat64_fragment6(stats, &ip6, &mq, m, nh.nh_mtu, ip_id, ip_off); while ((m = mbufq_dequeue(&mq)) != NULL) { - if (nat64_output(ifp, m, dst, (struct route *)&ro, stats, - logdata) != 0) + if (nat64_output(nh.nh_ifp, m, (struct sockaddr *)&dst, + NULL, stats, logdata) != 0) break; NAT64STAT_INC(stats, opcnt46); } mbufq_drain(&mq); - FREE_ROUTE(&ro); return (NAT64RETURN); } @@ -1406,15 +1388,13 @@ int nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, uint16_t aport, nat64_stats_block *stats, void *logdata) { - struct route ro; struct ip ip; - struct ifnet *ifp; + struct nhop4_basic nh; + struct sockaddr_in dst; struct ip6_frag *frag; struct ip6_hdr *ip6; struct icmp6_hdr *icmp6; - struct sockaddr *dst; uint16_t *csum; - uint32_t mtu; int plen, hlen, proto; /* @@ -1501,24 +1481,16 @@ nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, ui return (nat64_handle_icmp6(m, hlen, aaddr, aport, stats, logdata)); } - dst = nat64_find_route4(&ro, ip.ip_dst.s_addr, m); - if (dst == NULL) { - FREE_ROUTE(&ro); + dst.sin_addr.s_addr = ip.ip_dst.s_addr; + if (nat64_find_route4(&nh, &dst, m) != 0) { NAT64STAT_INC(stats, noroute4); nat64_icmp6_reflect(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOROUTE, 0, stats, logdata); return (NAT64RETURN); } - - ifp = ro.ro_rt->rt_ifp; - if (ro.ro_rt->rt_mtu != 0) - mtu = min(ro.ro_rt->rt_mtu, ifp->if_mtu); - else - mtu = ifp->if_mtu; - if (mtu < plen + sizeof(ip)) { - FREE_ROUTE(&ro); - nat64_icmp6_reflect(m, ICMP6_PACKET_TOO_BIG, 0, mtu, stats, - logdata); + if (nh.nh_mtu < plen + sizeof(ip)) { + nat64_icmp6_reflect(m, ICMP6_PACKET_TOO_BIG, 0, nh.nh_mtu, + stats, logdata); return (NAT64RETURN); } nat64_init_ip4hdr(ip6, frag, plen, proto, &ip); @@ -1548,12 +1520,13 @@ nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, ui *csum = cksum_add(*csum, in6_cksum_pseudo(ip6, plen, IPPROTO_ICMPV6, 0)); /* Convert ICMPv6 types to ICMP */ - mtu = *(uint16_t *)icmp6; /* save old word for cksum_adjust */ + proto = *(uint16_t *)icmp6; /* save old word for cksum_adjust */ if (icmp6->icmp6_type == ICMP6_ECHO_REQUEST) icmp6->icmp6_type = ICMP_ECHO; else /* ICMP6_ECHO_REPLY */ icmp6->icmp6_type = ICMP_ECHOREPLY; - *csum = cksum_adjust(*csum, (uint16_t)mtu, *(uint16_t *)icmp6); + *csum = cksum_adjust(*csum, (uint16_t)proto, + *(uint16_t *)icmp6); if (aport != 0) { uint16_t old_id = icmp6->icmp6_id; icmp6->icmp6_id = aport; @@ -1564,9 +1537,9 @@ 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(ifp, m, dst, &ro, stats, logdata) == 0) + if (nat64_output(nh.nh_ifp, m, (struct sockaddr *)&dst, NULL, + stats, logdata) == 0) NAT64STAT_INC(stats, opcnt64); - FREE_ROUTE(&ro); return (NAT64RETURN); } Modified: stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Thu Apr 19 10:11:39 2018 (r332765) +++ stable/11/sys/netpfil/ipfw/nat64/nat64_translate.h Thu Apr 19 10:13:28 2018 (r332766) @@ -30,16 +30,6 @@ #ifndef _IP_FW_NAT64_TRANSLATE_H_ #define _IP_FW_NAT64_TRANSLATE_H_ -#ifdef RTALLOC_NOLOCK -#define IN_LOOKUP_ROUTE(ro, fib) rtalloc_fib_nolock((ro), 0, (fib)) -#define IN6_LOOKUP_ROUTE(ro, fib) in6_rtalloc_nolock((ro), (fib)) -#define FREE_ROUTE(ro) -#else -#define IN_LOOKUP_ROUTE(ro, fib) rtalloc_ign_fib((ro), 0, (fib)) -#define IN6_LOOKUP_ROUTE(ro, fib) in6_rtalloc((ro), (fib)) -#define FREE_ROUTE(ro) RO_RTFREE((ro)) -#endif - static inline int nat64_check_ip6(struct in6_addr *addr) { From owner-svn-src-all@freebsd.org Thu Apr 19 10:15:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A893F95577; Thu, 19 Apr 2018 10:15: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0BEA6D709; Thu, 19 Apr 2018 10:15:11 +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 CB976415; Thu, 19 Apr 2018 10:15:11 +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 w3JAFBH4003235; Thu, 19 Apr 2018 10:15:11 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JAFBjW003232; Thu, 19 Apr 2018 10:15:11 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804191015.w3JAFBjW003232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 19 Apr 2018 10:15:11 +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: r332767 - stable/11/sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 332767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 10:15:12 -0000 Author: ae Date: Thu Apr 19 10:15:11 2018 New Revision: 332767 URL: https://svnweb.freebsd.org/changeset/base/332767 Log: MFC r332457: Use cfg->nomatch_verdict as return value from NAT64LSN handler when given mbuf is considered as not matched. If mbuf was consumed or freed during handling, we must return IP_FW_DENY, since ipfw's pfil handler ipfw_check_packet() expects IP_FW_DENY when mbuf pointer is NULL. This fixes KASSERT panics when NAT64 is used with INVARIANTS. Also remove unused nomatch_final field from struct nat64lsn_cfg. Reported by: Justin Holcomb Modified: 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 Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Thu Apr 19 10:13:28 2018 (r332766) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Thu Apr 19 10:15:11 2018 (r332767) @@ -351,10 +351,11 @@ nat64lsn_translate4(struct nat64lsn_cfg *cfg, const st if (nat_proto == NAT_PROTO_ICMP) { ret = inspect_icmp_mbuf(pm, &nat_proto, &addr, &port); if (ret != 0) { - if (ret == ENOMEM) + if (ret == ENOMEM) { NAT64STAT_INC(&cfg->stats, nomem); - else - NAT64STAT_INC(&cfg->stats, noproto); + return (IP_FW_DENY); + } + NAT64STAT_INC(&cfg->stats, noproto); return (cfg->nomatch_verdict); } /* XXX: Check addr for validity */ @@ -416,7 +417,7 @@ nat64lsn_translate4(struct nat64lsn_cfg *cfg, const st &cfg->stats, logdata); if (ret == NAT64SKIP) - return (IP_FW_PASS); + return (cfg->nomatch_verdict); if (ret == NAT64MFREE) m_freem(*pm); *pm = NULL; @@ -1362,7 +1363,7 @@ nat64lsn_request_host(struct nat64lsn_cfg *cfg, NAT64STAT_INC(&cfg->stats, jhostsreq); } - return (IP_FW_PASS); + return (IP_FW_DENY); } static NAT64NOINLINE int @@ -1391,7 +1392,7 @@ nat64lsn_request_portgroup(struct nat64lsn_cfg *cfg, NAT64STAT_INC(&cfg->stats, jportreq); } - return (IP_FW_PASS); + return (IP_FW_DENY); } static NAT64NOINLINE struct nat64lsn_state * @@ -1595,7 +1596,7 @@ nat64lsn_translate6(struct nat64lsn_cfg *cfg, struct i action = nat64_do_handle_ip6(*pm, aaddr, aport, &cfg->stats, logdata); if (action == NAT64SKIP) - return (IP_FW_PASS); + return (cfg->nomatch_verdict); if (action == NAT64MFREE) m_freem(*pm); *pm = NULL; /* mark mbuf as consumed */ @@ -1631,7 +1632,7 @@ ipfw_nat64lsn(struct ip_fw_chain *ch, struct ip_fw_arg ret = nat64lsn_translate6(cfg, &args->f_id, &args->m); break; default: - return (0); + return (cfg->nomatch_verdict); } return (ret); } Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h Thu Apr 19 10:13:28 2018 (r332766) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn.h Thu Apr 19 10:15:11 2018 (r332767) @@ -199,7 +199,6 @@ struct nat64lsn_cfg { uint8_t plen4; uint8_t plen6; uint8_t nomatch_verdict;/* What to return to ipfw on no-match */ - uint8_t nomatch_final; /* Exit outer loop? */ struct in6_addr prefix6; /* IPv6 prefix to embed IPv4 hosts */ uint32_t ihcount; /* Number of items in host hash */ Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c Thu Apr 19 10:13:28 2018 (r332766) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn_control.c Thu Apr 19 10:15:11 2018 (r332767) @@ -190,7 +190,6 @@ nat64lsn_create(struct ip_fw_chain *ch, ip_fw3_opheade cfg->st_icmp_ttl = uc->st_icmp_ttl; cfg->nomatch_verdict = IP_FW_DENY; - cfg->nomatch_final = 1; /* Exit outer loop by default */ IPFW_UH_WLOCK(ch); From owner-svn-src-all@freebsd.org Thu Apr 19 10:16:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13B91F95836; Thu, 19 Apr 2018 10:16:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC30C6E3BC; Thu, 19 Apr 2018 10:16:39 +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 B6F5A418; Thu, 19 Apr 2018 10:16:39 +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 w3JAGd0c003334; Thu, 19 Apr 2018 10:16:39 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JAGdWF003332; Thu, 19 Apr 2018 10:16:39 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804191016.w3JAGdWF003332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 19 Apr 2018 10:16: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: r332768 - stable/11/sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 332768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 10:16:40 -0000 Author: ae Date: Thu Apr 19 10:16:39 2018 New Revision: 332768 URL: https://svnweb.freebsd.org/changeset/base/332768 Log: MFC r332459: Fix integer types mismatch for flags field in nat64stl_cfg structure. Also preserve internal flags on NAT64STL reconfiguration. Modified: 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/sys/netpfil/ipfw/nat64/nat64stl.h ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl.h Thu Apr 19 10:15:11 2018 (r332767) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl.h Thu Apr 19 10:16:39 2018 (r332768) @@ -38,7 +38,7 @@ struct nat64stl_cfg { struct in6_addr prefix6;/* IPv6 prefix */ uint8_t plen6; /* prefix length */ - uint8_t flags; /* flags for internal use */ + uint32_t flags; /* flags for internal use */ #define NAT64STL_KIDX 0x0100 #define NAT64STL_46T 0x0200 #define NAT64STL_64T 0x0400 Modified: stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Thu Apr 19 10:15:11 2018 (r332767) +++ stable/11/sys/netpfil/ipfw/nat64/nat64stl_control.c Thu Apr 19 10:16:39 2018 (r332768) @@ -289,8 +289,8 @@ nat64stl_config(struct ip_fw_chain *ch, ip_fw3_opheade * For now allow to change only following values: * flags. */ - - cfg->flags = uc->flags & NAT64STL_FLAGSMASK; + cfg->flags &= ~NAT64STL_FLAGSMASK; + cfg->flags |= uc->flags & NAT64STL_FLAGSMASK; IPFW_UH_WUNLOCK(ch); return (0); } From owner-svn-src-all@freebsd.org Thu Apr 19 10:48:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32A46F982C5; Thu, 19 Apr 2018 10:48:45 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.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 CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC1CA75587; Thu, 19 Apr 2018 10:48:44 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id D0A922914; Thu, 19 Apr 2018 10:48:44 +0000 (UTC) Date: Thu, 19 Apr 2018 10:48:44 +0000 From: Alexey Dokuchaev To: Andrew Gallatin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, net@FreeBSD.org Subject: Re: svn commit: r332645 - head/sbin/ifconfig Message-ID: <20180419104844.GA8384@FreeBSD.org> References: <201804171254.w3HCsxPx024349@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201804171254.w3HCsxPx024349@repo.freebsd.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 10:48:45 -0000 On Tue, Apr 17, 2018 at 12:54:59PM +0000, Andrew Gallatin wrote: > New Revision: 332645 > URL: https://svnweb.freebsd.org/changeset/base/332645 > > Log: > Make lagg creation more fault tolerant > > - Warn, don't exit, when SIOCSLAGGPORT returns an error. > > When we exit with an error during lagg creation, a single > failed NIC (which no longer attaches) can prevent lagg > creation and other configuration, such as adding an IPv4 > address, and thus leave a machine unreachable. Hey Andrew, Since you're on lagg(4) a bit, could you perhaps have a look at this thread from last year on -net@: https://lists.freebsd.org/pipermail/freebsd-net/2017-June/048284.html I've been asked by several people that were using WiFi-CopperNet failover which worked fine in FreeBSD 10.x but was broken since then. I'm not an src committer nor a network stack expert in this area nor I'm using lagg(4), but perhaps you could expedite on handling this or at least point us to a more appropriate channel (due to lack of interest on -net@). ./danfe From owner-svn-src-all@freebsd.org Thu Apr 19 11:53:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B3C8F9E1AE; Thu, 19 Apr 2018 11:53:16 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 2279D813CC; Thu, 19 Apr 2018 11:53:15 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from Allans-MacBook-Pro.local (unknown [12.206.62.130]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 467DD1998F; Thu, 19 Apr 2018 11:53:09 +0000 (UTC) Subject: Re: svn commit: r332559 - head/usr.sbin/mountd To: Rick Macklem , Julian Elischer , Konstantin Belousov , Andriy Gapon Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: From: Allan Jude Message-ID: <88c5b5a6-86d4-d786-a874-5e21f6204392@freebsd.org> Date: Thu, 19 Apr 2018 07:53:08 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 11:53:16 -0000 On 2018-04-16 8:02 PM, Rick Macklem wrote: > I wrote: >> Julian Elischer wrote: >>> On 16/4/18 6:56 pm, Konstantin Belousov wrote: >> [stuff snipped] >>>>> + ngroups =3D XU_NGROUPS + 1; >>>> Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? >>> valid question.. because that is how many are allocated? >>> it was a "minimally invasive patch".. whoever used XU_NGROUPS before >>> should have fixed it. >>> Having said that, thanks for drawing out attention to it.. will >>> probably fix. >> 16 is the limit specified in the RFCs for Sun RPC, so that is the "on the wire" limit. >> I haven't looked at the code. It might make sense to handle more here and then >> set the limit at 16 after getting rid of duplicates, but I have no idea if = >> it matters? >> >> rick > Correcting my own post. Now that I've looked at the code, this doesn't go on > the wire. It does go in the exports structure, which means that this structure > would have to be revised (along with the syscall and VOP calls and the kernel > code that uses it). These credentials are for the "maproot/mapall" export > option and revising the export structure seems like quite a bit of work for this > case. (Until revised XU_NGROUPS is the correct value to set it to, since there > is a "struct xucred" in the exports structure.) > > Since Julian Elischer has been emailing me about adding a "fsid" export option > which allows /etc/exports to set the FSID of the exported fs (which would also > need to go in the exports structure), it might be about time to rev. the exports > structure? > > rick > I second the request for FSID as an export option. It is important for having smooth failover between NFS servers. -- Allan Jude From owner-svn-src-all@freebsd.org Thu Apr 19 12:50:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43F83FA2FE8; Thu, 19 Apr 2018 12:50:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E59CC6D1D2; Thu, 19 Apr 2018 12:50:49 +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 E09221D05; Thu, 19 Apr 2018 12:50:49 +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 w3JCon2r077219; Thu, 19 Apr 2018 12:50:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JConNX077218; Thu, 19 Apr 2018 12:50:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804191250.w3JConNX077218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 19 Apr 2018 12:50:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332769 - head/usr.bin/chpass X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/chpass X-SVN-Commit-Revision: 332769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 12:50:50 -0000 Author: emaste Date: Thu Apr 19 12:50:49 2018 New Revision: 332769 URL: https://svnweb.freebsd.org/changeset/base/332769 Log: chpass: reject change/expiry dates beyond y2106 The pwd.db and spwd.db files store the change and expire dates as unsigned 32-bit ints, which overflow in 2106. Reject larger values for now, until the introduction of a v5 password database. i386 has 32-bit time_t and so dates beyond y2038 are already rejected by mktime. PR: 227589 Reviewed by: lidl MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/chpass/util.c Modified: head/usr.bin/chpass/util.c ============================================================================== --- head/usr.bin/chpass/util.c Thu Apr 19 10:16:39 2018 (r332768) +++ head/usr.bin/chpass/util.c Thu Apr 19 12:50:49 2018 (r332769) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -136,6 +137,17 @@ bad: return (1); lt->tm_isdst = -1; if ((tval = mktime(lt)) < 0) return (1); +#ifndef __i386__ + /* + * PR227589: The pwd.db and spwd.db files store the change and expire + * dates as unsigned 32-bit ints which overflow in 2106, so larger + * values must be rejected until the introduction of a v5 password + * database. i386 has 32-bit time_t and so dates beyond y2038 are + * already rejected by mktime above. + */ + if (tval > UINT32_MAX) + return (1); +#endif *store = tval; return (0); } From owner-svn-src-all@freebsd.org Thu Apr 19 13:38:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9A0AFA64FB; Thu, 19 Apr 2018 13:38:00 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8612F766E0; Thu, 19 Apr 2018 13:38:00 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 808FB23DB; Thu, 19 Apr 2018 13:38:00 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JDc0mL002112; Thu, 19 Apr 2018 13:38:00 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JDc0to002106; Thu, 19 Apr 2018 13:38:00 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201804191338.w3JDc0to002106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Thu, 19 Apr 2018 13:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332770 - in head/sys: conf netinet netinet/tcp_stacks sys X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: in head/sys: conf netinet netinet/tcp_stacks sys X-SVN-Commit-Revision: 332770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 13:38:01 -0000 Author: rrs Date: Thu Apr 19 13:37:59 2018 New Revision: 332770 URL: https://svnweb.freebsd.org/changeset/base/332770 Log: This commit brings in the TCP high precision timer system (tcp_hpts). It is the forerunner/foundational work of bringing in both Rack and BBR which use hpts for pacing out packets. The feature is optional and requires the TCPHPTS option to be enabled before the feature will be active. TCP modules that use it must assure that the base component is compile in the kernel in which they are loaded. MFC after: Never Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D15020 Added: head/sys/netinet/tcp_hpts.c (contents, props changed) head/sys/netinet/tcp_hpts.h (contents, props changed) head/sys/sys/kern_prefetch.h (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/tcp_stacks/fastpath.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/sys/mbuf.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 19 12:50:49 2018 (r332769) +++ head/sys/conf/files Thu Apr 19 13:37:59 2018 (r332770) @@ -4355,6 +4355,7 @@ netinet/tcp_log_buf.c optional tcp_blackbox inet | tc netinet/tcp_lro.c optional inet | inet6 netinet/tcp_output.c optional inet | inet6 netinet/tcp_offload.c optional tcp_offload inet | tcp_offload inet6 +netinet/tcp_hpts.c optional tcphpts inet | tcphpts inet6 netinet/tcp_pcap.c optional inet tcppcap | inet6 tcppcap netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Apr 19 12:50:49 2018 (r332769) +++ head/sys/conf/options Thu Apr 19 13:37:59 2018 (r332770) @@ -218,6 +218,7 @@ SYSVMSG opt_sysvipc.h SYSVSEM opt_sysvipc.h SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h +TCPHPTS opt_inet.h TURNSTILE_PROFILING UMTX_PROFILING UMTX_CHAINS opt_global.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Thu Apr 19 12:50:49 2018 (r332769) +++ head/sys/netinet/in_pcb.c Thu Apr 19 13:37:59 2018 (r332770) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -87,6 +88,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef TCPHPTS +#include +#endif #include #include #endif @@ -1224,9 +1228,28 @@ in_pcbrele_rlocked(struct inpcb *inp) } return (0); } - + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); - +#ifdef TCPHPTS + if (inp->inp_in_hpts || inp->inp_in_input) { + struct tcp_hpts_entry *hpts; + /* + * We should not be on the hpts at + * this point in any form. we must + * get the lock to be sure. + */ + hpts = tcp_hpts_lock(inp); + if (inp->inp_in_hpts) + panic("Hpts:%p inp:%p at free still on hpts", + hpts, inp); + mtx_unlock(&hpts->p_mtx); + hpts = tcp_input_lock(inp); + if (inp->inp_in_input) + panic("Hpts:%p inp:%p at free still on input hpts", + hpts, inp); + mtx_unlock(&hpts->p_mtx); + } +#endif INP_RUNLOCK(inp); pcbinfo = inp->inp_pcbinfo; uma_zfree(pcbinfo->ipi_zone, inp); @@ -1255,7 +1278,26 @@ in_pcbrele_wlocked(struct inpcb *inp) } KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); - +#ifdef TCPHPTS + if (inp->inp_in_hpts || inp->inp_in_input) { + struct tcp_hpts_entry *hpts; + /* + * We should not be on the hpts at + * this point in any form. we must + * get the lock to be sure. + */ + hpts = tcp_hpts_lock(inp); + if (inp->inp_in_hpts) + panic("Hpts:%p inp:%p at free still on hpts", + hpts, inp); + mtx_unlock(&hpts->p_mtx); + hpts = tcp_input_lock(inp); + if (inp->inp_in_input) + panic("Hpts:%p inp:%p at free still on input hpts", + hpts, inp); + mtx_unlock(&hpts->p_mtx); + } +#endif INP_WUNLOCK(inp); pcbinfo = inp->inp_pcbinfo; uma_zfree(pcbinfo->ipi_zone, inp); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Thu Apr 19 12:50:49 2018 (r332769) +++ head/sys/netinet/in_pcb.h Thu Apr 19 13:37:59 2018 (r332770) @@ -156,6 +156,7 @@ struct in_conninfo { * from the global list. * * Key: + * (b) - Protected by the hpts lock. * (c) - Constant after initialization * (g) - Protected by the pcbgroup lock * (i) - Protected by the inpcb lock @@ -164,7 +165,52 @@ struct in_conninfo { * (h) - Protected by the pcbhash lock for the inpcb * (s) - Protected by another subsystem's locks * (x) - Undefined locking + * + * Notes on the tcp_hpts: + * + * First Hpts lock order is + * 1) INP_WLOCK() + * 2) HPTS_LOCK() i.e. hpts->pmtx * + * To insert a TCB on the hpts you *must* be holding the INP_WLOCK(). + * You may check the inp->inp_in_hpts flag without the hpts lock. + * The hpts is the only one that will clear this flag holding + * only the hpts lock. This means that in your tcp_output() + * routine when you test for the inp_in_hpts flag to be 1 + * it may be transitioning to 0 (by the hpts). + * That's ok since that will just mean an extra call to tcp_output + * that most likely will find the call you executed + * (when the mis-match occured) will have put the TCB back + * on the hpts and it will return. If your + * call did not add the inp back to the hpts then you will either + * over-send or the cwnd will block you from sending more. + * + * Note you should also be holding the INP_WLOCK() when you + * call the remove from the hpts as well. Though usually + * you are either doing this from a timer, where you need and have + * the INP_WLOCK() or from destroying your TCB where again + * you should already have the INP_WLOCK(). + * + * The inp_hpts_cpu, inp_hpts_cpu_set, inp_input_cpu and + * inp_input_cpu_set fields are controlled completely by + * the hpts. Do not ever set these. The inp_hpts_cpu_set + * and inp_input_cpu_set fields indicate if the hpts has + * setup the respective cpu field. It is advised if this + * field is 0, to enqueue the packet with the appropriate + * hpts_immediate() call. If the _set field is 1, then + * you may compare the inp_*_cpu field to the curcpu and + * may want to again insert onto the hpts if these fields + * are not equal (i.e. you are not on the expected CPU). + * + * A note on inp_hpts_calls and inp_input_calls, these + * flags are set when the hpts calls either the output + * or do_segment routines respectively. If the routine + * being called wants to use this, then it needs to + * clear the flag before returning. The hpts will not + * clear the flag. The flags can be used to tell if + * the hpts is the function calling the respective + * routine. + * * A few other notes: * * When a read lock is held, stability of the field is guaranteed; to write @@ -190,14 +236,45 @@ struct inpcb { LIST_ENTRY(inpcb) inp_pcbgrouphash; /* (g/i) hash list */ struct rwlock inp_lock; /* Cache line #2 (amd64) */ -#define inp_start_zero inp_refcount +#define inp_start_zero inp_hpts #define inp_zero_size (sizeof(struct inpcb) - \ offsetof(struct inpcb, inp_start_zero)) + TAILQ_ENTRY(inpcb) inp_hpts; /* pacing out queue next lock(b) */ + + uint32_t inp_hpts_request; /* Current hpts request, zero if + * fits in the pacing window (i&b). */ + /* + * Note the next fields are protected by a + * different lock (hpts-lock). This means that + * they must correspond in size to the smallest + * protectable bit field (uint8_t on x86, and + * other platfomrs potentially uint32_t?). Also + * since CPU switches can occur at different times the two + * fields can *not* be collapsed into a signal bit field. + */ +#if defined(__amd64__) || defined(__i386__) + volatile uint8_t inp_in_hpts; /* on output hpts (lock b) */ + volatile uint8_t inp_in_input; /* on input hpts (lock b) */ +#else + volatile uint32_t inp_in_hpts; /* on output hpts (lock b) */ + volatile uint32_t inp_in_input; /* on input hpts (lock b) */ +#endif + volatile uint16_t inp_hpts_cpu; /* Lock (i) */ u_int inp_refcount; /* (i) refcount */ int inp_flags; /* (i) generic IP/datagram flags */ int inp_flags2; /* (i) generic IP/datagram flags #2*/ + volatile uint16_t inp_input_cpu; /* Lock (i) */ + volatile uint8_t inp_hpts_cpu_set :1, /* on output hpts (i) */ + inp_input_cpu_set : 1, /* on input hpts (i) */ + inp_hpts_calls :1, /* (i) from output hpts */ + inp_input_calls :1, /* (i) from input hpts */ + inp_spare_bits2 : 4; + uint8_t inp_spare_byte; /* Compiler hole */ void *inp_ppcb; /* (i) pointer to per-protocol pcb */ struct socket *inp_socket; /* (i) back pointer to socket */ + uint32_t inp_hptsslot; /* Hpts wheel slot this tcb is Lock(i&b) */ + uint32_t inp_hpts_drop_reas; /* reason we are dropping the PCB (lock i&b) */ + TAILQ_ENTRY(inpcb) inp_input; /* pacing in queue next lock(b) */ struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */ struct inpcbgroup *inp_pcbgroup; /* (g/i) PCB group list */ LIST_ENTRY(inpcb) inp_pcbgroup_wild; /* (g/i/h) group wildcard entry */ @@ -638,6 +715,7 @@ short inp_so_options(const struct inpcb *inp); #define INP_RECVRSSBUCKETID 0x00000200 /* populate recv datagram with bucket id */ #define INP_RATE_LIMIT_CHANGED 0x00000400 /* rate limit needs attention */ #define INP_ORIGDSTADDR 0x00000800 /* receive IP dst address/port */ +#define INP_CANNOT_DO_ECN 0x00001000 /* The stack does not do ECN */ /* * Flags passed to in_pcblookup*() functions. Added: head/sys/netinet/tcp_hpts.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/tcp_hpts.c Thu Apr 19 13:37:59 2018 (r332770) @@ -0,0 +1,1964 @@ +/*- + * Copyright (c) 2016-8 + * Netflix Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ +#include +__FBSDID("$FreeBSD$"); + +#include "opt_inet.h" +#include "opt_inet6.h" +#include "opt_ipsec.h" +#include "opt_tcpdebug.h" +/** + * Some notes about usage. + * + * The tcp_hpts system is designed to provide a high precision timer + * system for tcp. Its main purpose is to provide a mechanism for + * pacing packets out onto the wire. It can be used in two ways + * by a given TCP stack (and those two methods can be used simultaneously). + * + * First, and probably the main thing its used by Rack and BBR for, it can + * be used to call tcp_output() of a transport stack at some time in the future. + * The normal way this is done is that tcp_output() of the stack schedules + * itself to be called again by calling tcp_hpts_insert(tcpcb, slot). The + * slot is the time from now that the stack wants to be called but it + * must be converted to tcp_hpts's notion of slot. This is done with + * one of the macros HPTS_MS_TO_SLOTS or HPTS_USEC_TO_SLOTS. So a typical + * call from the tcp_output() routine might look like: + * + * tcp_hpts_insert(tp, HPTS_USEC_TO_SLOTS(550)); + * + * The above would schedule tcp_ouput() to be called in 550 useconds. + * Note that if using this mechanism the stack will want to add near + * its top a check to prevent unwanted calls (from user land or the + * arrival of incoming ack's). So it would add something like: + * + * if (inp->inp_in_hpts) + * return; + * + * to prevent output processing until the time alotted has gone by. + * Of course this is a bare bones example and the stack will probably + * have more consideration then just the above. + * + * Now the tcp_hpts system will call tcp_output in one of two forms, + * it will first check to see if the stack as defined a + * tfb_tcp_output_wtime() function, if so that is the routine it + * will call, if that function is not defined then it will call the + * tfb_tcp_output() function. The only difference between these + * two calls is that the former passes the time in to the function + * so the function does not have to access the time (which tcp_hpts + * already has). What these functions do is of course totally up + * to the individual tcp stack. + * + * Now the second function (actually two functions I guess :D) + * the tcp_hpts system provides is the ability to either abort + * a connection (later) or process input on a connection. + * Why would you want to do this? To keep processor locality. + * + * So in order to use the input redirection function the + * stack changes its tcp_do_segment() routine to instead + * of process the data call the function: + * + * tcp_queue_pkt_to_input() + * + * You will note that the arguments to this function look + * a lot like tcp_do_segments's arguments. This function + * will assure that the tcp_hpts system will + * call the functions tfb_tcp_hpts_do_segment() from the + * correct CPU. Note that multiple calls can get pushed + * into the tcp_hpts system this will be indicated by + * the next to last argument to tfb_tcp_hpts_do_segment() + * (nxt_pkt). If nxt_pkt is a 1 then another packet is + * coming. If nxt_pkt is a 0 then this is the last call + * that the tcp_hpts system has available for the tcp stack. + * + * The other point of the input system is to be able to safely + * drop a tcp connection without worrying about the recursive + * locking that may be occuring on the INP_WLOCK. So if + * a stack wants to drop a connection it calls: + * + * tcp_set_inp_to_drop(tp, ETIMEDOUT) + * + * To schedule the tcp_hpts system to call + * + * tcp_drop(tp, drop_reason) + * + * at a future point. This is quite handy to prevent locking + * issues when dropping connections. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for proc0 declaration */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#define TCPSTATES /* for logging */ + +#include +#include +#include +#include +#include /* required for icmp_var.h */ +#include /* for ICMP_BANDLIM */ +#include +#include +#include +#include +#define TCPOUTFLAGS +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef tcpdebug +#include +#endif /* tcpdebug */ +#ifdef tcp_offload +#include +#endif + +#ifdef ipsec +#include +#include +#endif /* ipsec */ +#include "opt_rss.h" + +MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts"); +#ifdef RSS +static int tcp_bind_threads = 1; +#else +static int tcp_bind_threads = 0; +#endif +TUNABLE_INT("net.inet.tcp.bind_hptss", &tcp_bind_threads); + +static uint32_t tcp_hpts_logging_size = DEFAULT_HPTS_LOG; + +TUNABLE_INT("net.inet.tcp.hpts_logging_sz", &tcp_hpts_logging_size); + +static struct tcp_hptsi tcp_pace; + +static int +tcp_hptsi_lock_inpinfo(struct inpcb *inp, + struct tcpcb **tp); +static void tcp_wakehpts(struct tcp_hpts_entry *p); +static void tcp_wakeinput(struct tcp_hpts_entry *p); +static void tcp_input_data(struct tcp_hpts_entry *hpts, struct timeval *tv); +static void tcp_hptsi(struct tcp_hpts_entry *hpts, struct timeval *ctick); +static void tcp_hpts_thread(void *ctx); +static void tcp_init_hptsi(void *st); + +int32_t tcp_min_hptsi_time = DEFAULT_MIN_SLEEP; +static int32_t tcp_hpts_callout_skip_swi = 0; + +SYSCTL_DECL(_net_inet_tcp); +SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hpts, CTLFLAG_RW, 0, "TCP Hpts controls"); + +#define timersub(tvp, uvp, vvp) \ + do { \ + (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ + (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ + if ((vvp)->tv_usec < 0) { \ + (vvp)->tv_sec--; \ + (vvp)->tv_usec += 1000000; \ + } \ + } while (0) + +static int32_t logging_on = 0; +static int32_t hpts_sleep_max = (NUM_OF_HPTSI_SLOTS - 2); +static int32_t tcp_hpts_precision = 120; + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, precision, CTLFLAG_RW, + &tcp_hpts_precision, 120, + "Value for PRE() precision of callout"); + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, logging, CTLFLAG_RW, + &logging_on, 0, + "Turn on logging if compiled in"); + +counter_u64_t hpts_loops; + +SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, loops, CTLFLAG_RD, + &hpts_loops, "Number of times hpts had to loop to catch up"); + +counter_u64_t back_tosleep; + +SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, no_tcbsfound, CTLFLAG_RD, + &back_tosleep, "Number of times hpts found no tcbs"); + +static int32_t in_newts_every_tcb = 0; + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, in_tsperpcb, CTLFLAG_RW, + &in_newts_every_tcb, 0, + "Do we have a new cts every tcb we process for input"); +static int32_t in_ts_percision = 0; + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, in_tspercision, CTLFLAG_RW, + &in_ts_percision, 0, + "Do we use percise timestamp for clients on input"); +static int32_t out_newts_every_tcb = 0; + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, out_tsperpcb, CTLFLAG_RW, + &out_newts_every_tcb, 0, + "Do we have a new cts every tcb we process for output"); +static int32_t out_ts_percision = 0; + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, out_tspercision, CTLFLAG_RW, + &out_ts_percision, 0, + "Do we use a percise timestamp for every output cts"); + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, maxsleep, CTLFLAG_RW, + &hpts_sleep_max, 0, + "The maximum time the hpts will sleep <1 - 254>"); + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, minsleep, CTLFLAG_RW, + &tcp_min_hptsi_time, 0, + "The minimum time the hpts must sleep before processing more slots"); + +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, skip_swi, CTLFLAG_RW, + &tcp_hpts_callout_skip_swi, 0, + "Do we have the callout call directly to the hpts?"); + +static void +__tcp_hpts_log_it(struct tcp_hpts_entry *hpts, struct inpcb *inp, int event, uint32_t slot, + uint32_t ticknow, int32_t line) +{ + struct hpts_log *pl; + + HPTS_MTX_ASSERT(hpts); + if (hpts->p_log == NULL) + return; + pl = &hpts->p_log[hpts->p_log_at]; + hpts->p_log_at++; + if (hpts->p_log_at >= hpts->p_logsize) { + hpts->p_log_at = 0; + hpts->p_log_wrapped = 1; + } + pl->inp = inp; + if (inp) { + pl->t_paceslot = inp->inp_hptsslot; + pl->t_hptsreq = inp->inp_hpts_request; + pl->p_onhpts = inp->inp_in_hpts; + pl->p_oninput = inp->inp_in_input; + } else { + pl->t_paceslot = 0; + pl->t_hptsreq = 0; + pl->p_onhpts = 0; + pl->p_oninput = 0; + } + pl->is_notempty = 1; + pl->event = event; + pl->line = line; + pl->cts = tcp_get_usecs(NULL); + pl->p_curtick = hpts->p_curtick; + pl->p_prevtick = hpts->p_prevtick; + pl->p_on_queue_cnt = hpts->p_on_queue_cnt; + pl->ticknow = ticknow; + pl->slot_req = slot; + pl->p_nxt_slot = hpts->p_nxt_slot; + pl->p_cur_slot = hpts->p_cur_slot; + pl->p_hpts_sleep_time = hpts->p_hpts_sleep_time; + pl->p_flags = (hpts->p_cpu & 0x7f); + pl->p_flags <<= 7; + pl->p_flags |= (hpts->p_num & 0x7f); + pl->p_flags <<= 2; + if (hpts->p_hpts_active) { + pl->p_flags |= HPTS_HPTS_ACTIVE; + } +} + +#define tcp_hpts_log_it(a, b, c, d, e) __tcp_hpts_log_it(a, b, c, d, e, __LINE__) + +static void +hpts_timeout_swi(void *arg) +{ + struct tcp_hpts_entry *hpts; + + hpts = (struct tcp_hpts_entry *)arg; + swi_sched(hpts->ie_cookie, 0); +} + +static void +hpts_timeout_dir(void *arg) +{ + tcp_hpts_thread(arg); +} + +static inline void +hpts_sane_pace_remove(struct tcp_hpts_entry *hpts, struct inpcb *inp, struct hptsh *head, int clear) +{ +#ifdef INVARIANTS + if (mtx_owned(&hpts->p_mtx) == 0) { + /* We don't own the mutex? */ + panic("%s: hpts:%p inp:%p no hpts mutex", __FUNCTION__, hpts, inp); + } + if (hpts->p_cpu != inp->inp_hpts_cpu) { + /* It is not the right cpu/mutex? */ + panic("%s: hpts:%p inp:%p incorrect CPU", __FUNCTION__, hpts, inp); + } + if (inp->inp_in_hpts == 0) { + /* We are not on the hpts? */ + panic("%s: hpts:%p inp:%p not on the hpts?", __FUNCTION__, hpts, inp); + } + if (TAILQ_EMPTY(head) && + (hpts->p_on_queue_cnt != 0)) { + /* We should not be empty with a queue count */ + panic("%s hpts:%p hpts bucket empty but cnt:%d", + __FUNCTION__, hpts, hpts->p_on_queue_cnt); + } +#endif + TAILQ_REMOVE(head, inp, inp_hpts); + hpts->p_on_queue_cnt--; + if (hpts->p_on_queue_cnt < 0) { + /* Count should not go negative .. */ +#ifdef INVARIANTS + panic("Hpts goes negative inp:%p hpts:%p", + inp, hpts); +#endif + hpts->p_on_queue_cnt = 0; + } + if (clear) { + inp->inp_hpts_request = 0; + inp->inp_in_hpts = 0; + } +} + +static inline void +hpts_sane_pace_insert(struct tcp_hpts_entry *hpts, struct inpcb *inp, struct hptsh *head, int line, int noref) +{ +#ifdef INVARIANTS + if (mtx_owned(&hpts->p_mtx) == 0) { + /* We don't own the mutex? */ + panic("%s: hpts:%p inp:%p no hpts mutex", __FUNCTION__, hpts, inp); + } + if (hpts->p_cpu != inp->inp_hpts_cpu) { + /* It is not the right cpu/mutex? */ + panic("%s: hpts:%p inp:%p incorrect CPU", __FUNCTION__, hpts, inp); + } + if ((noref == 0) && (inp->inp_in_hpts == 1)) { + /* We are already on the hpts? */ + panic("%s: hpts:%p inp:%p already on the hpts?", __FUNCTION__, hpts, inp); + } +#endif + TAILQ_INSERT_TAIL(head, inp, inp_hpts); + inp->inp_in_hpts = 1; + hpts->p_on_queue_cnt++; + if (noref == 0) { + in_pcbref(inp); + } +} + +static inline void +hpts_sane_input_remove(struct tcp_hpts_entry *hpts, struct inpcb *inp, int clear) +{ +#ifdef INVARIANTS + if (mtx_owned(&hpts->p_mtx) == 0) { + /* We don't own the mutex? */ + panic("%s: hpts:%p inp:%p no hpts mutex", __FUNCTION__, hpts, inp); + } + if (hpts->p_cpu != inp->inp_input_cpu) { + /* It is not the right cpu/mutex? */ + panic("%s: hpts:%p inp:%p incorrect CPU", __FUNCTION__, hpts, inp); + } + if (inp->inp_in_input == 0) { + /* We are not on the input hpts? */ + panic("%s: hpts:%p inp:%p not on the input hpts?", __FUNCTION__, hpts, inp); + } +#endif + TAILQ_REMOVE(&hpts->p_input, inp, inp_input); + hpts->p_on_inqueue_cnt--; + if (hpts->p_on_inqueue_cnt < 0) { +#ifdef INVARIANTS + panic("Hpts in goes negative inp:%p hpts:%p", + inp, hpts); +#endif + hpts->p_on_inqueue_cnt = 0; + } +#ifdef INVARIANTS + if (TAILQ_EMPTY(&hpts->p_input) && + (hpts->p_on_inqueue_cnt != 0)) { + /* We should not be empty with a queue count */ + panic("%s hpts:%p in_hpts input empty but cnt:%d", + __FUNCTION__, hpts, hpts->p_on_inqueue_cnt); + } +#endif + if (clear) + inp->inp_in_input = 0; +} + +static inline void +hpts_sane_input_insert(struct tcp_hpts_entry *hpts, struct inpcb *inp, int line) +{ +#ifdef INVARIANTS + if (mtx_owned(&hpts->p_mtx) == 0) { + /* We don't own the mutex? */ + panic("%s: hpts:%p inp:%p no hpts mutex", __FUNCTION__, hpts, inp); + } + if (hpts->p_cpu != inp->inp_input_cpu) { + /* It is not the right cpu/mutex? */ + panic("%s: hpts:%p inp:%p incorrect CPU", __FUNCTION__, hpts, inp); + } + if (inp->inp_in_input == 1) { + /* We are already on the input hpts? */ + panic("%s: hpts:%p inp:%p already on the input hpts?", __FUNCTION__, hpts, inp); + } +#endif + TAILQ_INSERT_TAIL(&hpts->p_input, inp, inp_input); + inp->inp_in_input = 1; + hpts->p_on_inqueue_cnt++; + in_pcbref(inp); +} + +static int +sysctl_tcp_hpts_log(SYSCTL_HANDLER_ARGS) +{ + struct tcp_hpts_entry *hpts; + size_t sz; + int32_t logging_was, i; + int32_t error = 0; + + /* + * HACK: Turn off logging so no locks are required this really needs + * a memory barrier :) + */ + logging_was = logging_on; + logging_on = 0; + if (!req->oldptr) { + /* How much? */ + sz = 0; + for (i = 0; i < tcp_pace.rp_num_hptss; i++) { + hpts = tcp_pace.rp_ent[i]; + if (hpts->p_log == NULL) + continue; + sz += (sizeof(struct hpts_log) * hpts->p_logsize); + } + error = SYSCTL_OUT(req, 0, sz); + } else { + for (i = 0; i < tcp_pace.rp_num_hptss; i++) { + hpts = tcp_pace.rp_ent[i]; + if (hpts->p_log == NULL) + continue; + if (hpts->p_log_wrapped) + sz = (sizeof(struct hpts_log) * hpts->p_logsize); + else + sz = (sizeof(struct hpts_log) * hpts->p_log_at); + error = SYSCTL_OUT(req, hpts->p_log, sz); + } + } + logging_on = logging_was; + return error; +} + +SYSCTL_PROC(_net_inet_tcp_hpts, OID_AUTO, log, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + 0, 0, sysctl_tcp_hpts_log, "A", "tcp hptsi log"); + + +/* + * Try to get the INP_INFO lock. + * + * This function always succeeds in getting the lock. It will clear + * *tpp and return (1) if something critical changed while the inpcb + * was unlocked. Otherwise, it will leave *tpp unchanged and return (0). + * + * This function relies on the fact that the hpts always holds a + * reference on the inpcb while the segment is on the hptsi wheel and + * in the input queue. + * + */ +static int +tcp_hptsi_lock_inpinfo(struct inpcb *inp, struct tcpcb **tpp) +{ + struct tcp_function_block *tfb; + struct tcpcb *tp; + void *ptr; + + /* Try the easy way. */ + if (INP_INFO_TRY_RLOCK(&V_tcbinfo)) + return (0); + + /* + * OK, let's try the hard way. We'll save the function pointer block + * to make sure that doesn't change while we aren't holding the + * lock. + */ + tp = *tpp; + tfb = tp->t_fb; + ptr = tp->t_fb_ptr; + INP_WUNLOCK(inp); + INP_INFO_RLOCK(&V_tcbinfo); + INP_WLOCK(inp); + /* If the session went away, return an error. */ + if ((inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) || + (inp->inp_flags2 & INP_FREED)) { + *tpp = NULL; + return (1); + } + /* + * If the function block or stack-specific data block changed, + * report an error. + */ + tp = intotcpcb(inp); + if ((tp->t_fb != tfb) && (tp->t_fb_ptr != ptr)) { + *tpp = NULL; + return (1); + } + return (0); +} + + +static void +tcp_wakehpts(struct tcp_hpts_entry *hpts) +{ + HPTS_MTX_ASSERT(hpts); + swi_sched(hpts->ie_cookie, 0); + if (hpts->p_hpts_active == 2) { + /* Rare sleeping on a ENOBUF */ + wakeup_one(hpts); + } +} + +static void +tcp_wakeinput(struct tcp_hpts_entry *hpts) +{ + HPTS_MTX_ASSERT(hpts); + swi_sched(hpts->ie_cookie, 0); + if (hpts->p_hpts_active == 2) { + /* Rare sleeping on a ENOBUF */ + wakeup_one(hpts); + } +} + +struct tcp_hpts_entry * +tcp_cur_hpts(struct inpcb *inp) +{ + int32_t hpts_num; + struct tcp_hpts_entry *hpts; + + hpts_num = inp->inp_hpts_cpu; + hpts = tcp_pace.rp_ent[hpts_num]; + return (hpts); +} + +struct tcp_hpts_entry * +tcp_hpts_lock(struct inpcb *inp) +{ + struct tcp_hpts_entry *hpts; + int32_t hpts_num; + +again: + hpts_num = inp->inp_hpts_cpu; + hpts = tcp_pace.rp_ent[hpts_num]; +#ifdef INVARIANTS + if (mtx_owned(&hpts->p_mtx)) { + panic("Hpts:%p owns mtx prior-to lock line:%d", + hpts, __LINE__); + } +#endif + mtx_lock(&hpts->p_mtx); + if (hpts_num != inp->inp_hpts_cpu) { + mtx_unlock(&hpts->p_mtx); + goto again; + } + return (hpts); +} + +struct tcp_hpts_entry * +tcp_input_lock(struct inpcb *inp) +{ + struct tcp_hpts_entry *hpts; + int32_t hpts_num; + +again: + hpts_num = inp->inp_input_cpu; + hpts = tcp_pace.rp_ent[hpts_num]; +#ifdef INVARIANTS + if (mtx_owned(&hpts->p_mtx)) { + panic("Hpts:%p owns mtx prior-to lock line:%d", + hpts, __LINE__); + } +#endif + mtx_lock(&hpts->p_mtx); + if (hpts_num != inp->inp_input_cpu) { + mtx_unlock(&hpts->p_mtx); + goto again; + } + return (hpts); +} + +static void +tcp_remove_hpts_ref(struct inpcb *inp, struct tcp_hpts_entry *hpts, int line) +{ + int32_t add_freed; + + if (inp->inp_flags2 & INP_FREED) { + /* + * Need to play a special trick so that in_pcbrele_wlocked + * does not return 1 when it really should have returned 0. + */ + add_freed = 1; + inp->inp_flags2 &= ~INP_FREED; + } else { + add_freed = 0; + } +#ifndef INP_REF_DEBUG + if (in_pcbrele_wlocked(inp)) { + /* + * This should not happen. We have the inpcb referred to by + * the main socket (why we are called) and the hpts. It + * should always return 0. + */ + panic("inpcb:%p release ret 1", + inp); + } +#else + if (__in_pcbrele_wlocked(inp, line)) { + /* + * This should not happen. We have the inpcb referred to by + * the main socket (why we are called) and the hpts. It + * should always return 0. + */ + panic("inpcb:%p release ret 1", + inp); + } +#endif + if (add_freed) { + inp->inp_flags2 |= INP_FREED; + } +} + +static void +tcp_hpts_remove_locked_output(struct tcp_hpts_entry *hpts, struct inpcb *inp, int32_t flags, int32_t line) +{ + if (inp->inp_in_hpts) { + hpts_sane_pace_remove(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], 1); + tcp_remove_hpts_ref(inp, hpts, line); + } +} + +static void +tcp_hpts_remove_locked_input(struct tcp_hpts_entry *hpts, struct inpcb *inp, int32_t flags, int32_t line) +{ + HPTS_MTX_ASSERT(hpts); + if (inp->inp_in_input) { + hpts_sane_input_remove(hpts, inp, 1); + tcp_remove_hpts_ref(inp, hpts, line); + } +} + +/* + * Called normally with the INP_LOCKED but it + * does not matter, the hpts lock is the key + * but the lock order allows us to hold the + * INP lock and then get the hpts lock. + * + * Valid values in the flags are + * HPTS_REMOVE_OUTPUT - remove from the output of the hpts. + * HPTS_REMOVE_INPUT - remove from the input of the hpts. + * Note that you can or both values together and get two + * actions. + */ +void +__tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line) +{ + struct tcp_hpts_entry *hpts; + + INP_WLOCK_ASSERT(inp); + if (flags & HPTS_REMOVE_OUTPUT) { + hpts = tcp_hpts_lock(inp); + tcp_hpts_remove_locked_output(hpts, inp, flags, line); + mtx_unlock(&hpts->p_mtx); + } + if (flags & HPTS_REMOVE_INPUT) { + hpts = tcp_input_lock(inp); + tcp_hpts_remove_locked_input(hpts, inp, flags, line); + mtx_unlock(&hpts->p_mtx); + } +} + +static inline int +hpts_tick(struct tcp_hpts_entry *hpts, int32_t plus) +{ + return ((hpts->p_prevtick + plus) % NUM_OF_HPTSI_SLOTS); +} + +static int +tcp_queue_to_hpts_immediate_locked(struct inpcb *inp, struct tcp_hpts_entry *hpts, int32_t line, int32_t noref) +{ + int32_t need_wake = 0; + uint32_t ticknow = 0; + + HPTS_MTX_ASSERT(hpts); + if (inp->inp_in_hpts == 0) { + /* Ok we need to set it on the hpts in the current slot */ + if (hpts->p_hpts_active == 0) { + /* A sleeping hpts we want in next slot to run */ + if (logging_on) { + tcp_hpts_log_it(hpts, inp, HPTSLOG_INSERT_SLEEPER, 0, + hpts_tick(hpts, 1)); + } + inp->inp_hptsslot = hpts_tick(hpts, 1); + inp->inp_hpts_request = 0; + if (logging_on) { + tcp_hpts_log_it(hpts, inp, HPTSLOG_SLEEP_BEFORE, 1, ticknow); + } + need_wake = 1; + } else if ((void *)inp == hpts->p_inp) { + /* + * We can't allow you to go into the same slot we + * are in. We must put you out. + */ + inp->inp_hptsslot = hpts->p_nxt_slot; + } else + inp->inp_hptsslot = hpts->p_cur_slot; + hpts_sane_pace_insert(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], line, noref); + inp->inp_hpts_request = 0; + if (logging_on) { + tcp_hpts_log_it(hpts, inp, HPTSLOG_IMMEDIATE, 0, 0); + } + if (need_wake) { + /* + * Activate the hpts if it is sleeping and its + * timeout is not 1. + */ + if (logging_on) { + tcp_hpts_log_it(hpts, inp, HPTSLOG_WAKEUP_HPTS, 0, ticknow); + } + hpts->p_direct_wake = 1; + tcp_wakehpts(hpts); + } + } + return (need_wake); +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Apr 19 14:09:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CED32FA838C; Thu, 19 Apr 2018 14:09:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80B467C6C8; Thu, 19 Apr 2018 14:09:45 +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 7B86728C2; Thu, 19 Apr 2018 14:09:45 +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 w3JE9jr9017030; Thu, 19 Apr 2018 14:09:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JE9jvW017026; Thu, 19 Apr 2018 14:09:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201804191409.w3JE9jvW017026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 19 Apr 2018 14:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332771 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 332771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 14:09:46 -0000 Author: markj Date: Thu Apr 19 14:09:44 2018 New Revision: 332771 URL: https://svnweb.freebsd.org/changeset/base/332771 Log: Initialize marker pages in vm_page_domain_init(). They were previously initialized by the corresponding page daemon threads, but for vmd_inacthead this may be too late if vm_page_deactivate_noreuse() is called during boot. Reported and tested by: cperciva Reviewed by: alc, kib MFC after: 1 week Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c head/sys/vm/vm_pagequeue.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Apr 19 13:37:59 2018 (r332770) +++ head/sys/vm/vm_page.c Thu Apr 19 14:09:44 2018 (r332771) @@ -437,6 +437,23 @@ sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) return (error); } +/* + * Initialize a dummy page for use in scans of the specified paging queue. + * In principle, this function only needs to set the flag PG_MARKER. + * Nonetheless, it write busies and initializes the hold count to one as + * safety precautions. + */ +void +vm_page_init_marker(vm_page_t marker, int queue) +{ + + bzero(marker, sizeof(*marker)); + marker->flags = PG_MARKER; + marker->busy_lock = VPB_SINGLE_EXCLUSIVER; + marker->queue = queue; + marker->hold_count = 1; +} + static void vm_page_domain_init(int domain) { @@ -464,9 +481,13 @@ vm_page_domain_init(int domain) TAILQ_INIT(&pq->pq_pl); mtx_init(&pq->pq_mutex, pq->pq_name, "vm pagequeue", MTX_DEF | MTX_DUPOK); + vm_page_init_marker(&vmd->vmd_markers[i], i); } mtx_init(&vmd->vmd_free_mtx, "vm page free queue", NULL, MTX_DEF); mtx_init(&vmd->vmd_pageout_mtx, "vm pageout lock", NULL, MTX_DEF); + vm_page_init_marker(&vmd->vmd_inacthead, PQ_INACTIVE); + TAILQ_INSERT_HEAD(&vmd->vmd_pagequeues[PQ_INACTIVE].pq_pl, + &vmd->vmd_inacthead, plinks.q); snprintf(vmd->vmd_name, sizeof(vmd->vmd_name), "%d", domain); } Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Thu Apr 19 13:37:59 2018 (r332770) +++ head/sys/vm/vm_page.h Thu Apr 19 14:09:44 2018 (r332771) @@ -490,6 +490,7 @@ void vm_page_free_phys_pglist(struct pglist *tq); bool vm_page_free_prep(vm_page_t m, bool pagequeue_locked); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); +void vm_page_init_marker(vm_page_t m, int queue); int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_launder(vm_page_t m); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Apr 19 13:37:59 2018 (r332770) +++ head/sys/vm/vm_pageout.c Thu Apr 19 14:09:44 2018 (r332771) @@ -208,23 +208,6 @@ static void vm_pageout_laundry_worker(void *arg); static boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); /* - * Initialize a dummy page for marking the caller's place in the specified - * paging queue. In principle, this function only needs to set the flag - * PG_MARKER. Nonetheless, it write busies and initializes the hold count - * to one as safety precautions. - */ -static void -vm_pageout_init_marker(vm_page_t marker, u_short queue) -{ - - bzero(marker, sizeof(*marker)); - marker->flags = PG_MARKER; - marker->busy_lock = VPB_SINGLE_EXCLUSIVER; - marker->queue = queue; - marker->hold_count = 1; -} - -/* * vm_pageout_fallback_object_lock: * * Lock vm object currently associated with `m'. VM_OBJECT_TRYWLOCK is @@ -244,11 +227,11 @@ vm_pageout_fallback_object_lock(vm_page_t m, vm_page_t struct vm_page marker; struct vm_pagequeue *pq; boolean_t unchanged; - u_short queue; vm_object_t object; + int queue; queue = m->queue; - vm_pageout_init_marker(&marker, queue); + vm_page_init_marker(&marker, queue); pq = vm_page_pagequeue(m); object = m->object; @@ -293,14 +276,14 @@ vm_pageout_page_lock(vm_page_t m, vm_page_t *next) struct vm_page marker; struct vm_pagequeue *pq; boolean_t unchanged; - u_short queue; + int queue; vm_page_lock_assert(m, MA_NOTOWNED); if (vm_page_trylock(m)) return (TRUE); queue = m->queue; - vm_pageout_init_marker(&marker, queue); + vm_page_init_marker(&marker, queue); pq = vm_page_pagequeue(m); TAILQ_INSERT_AFTER(&pq->pq_pl, m, &marker, plinks.q); @@ -694,8 +677,8 @@ vm_pageout_launder(struct vm_domain *vmd, int launder, { struct vm_pagequeue *pq; vm_object_t object; - vm_page_t m, next; - int act_delta, error, maxscan, numpagedout, starting_target; + vm_page_t m, marker, next; + int act_delta, error, maxscan, numpagedout, queue, starting_target; int vnodes_skipped; bool pageout_ok, queue_locked; @@ -716,11 +699,14 @@ vm_pageout_launder(struct vm_domain *vmd, int launder, * swap devices are configured. */ if (atomic_load_acq_int(&swapdev_enabled)) - pq = &vmd->vmd_pagequeues[PQ_UNSWAPPABLE]; + queue = PQ_UNSWAPPABLE; else - pq = &vmd->vmd_pagequeues[PQ_LAUNDRY]; + queue = PQ_LAUNDRY; scan: + pq = &vmd->vmd_pagequeues[queue]; + marker = &vmd->vmd_markers[queue]; + vm_pagequeue_lock(pq); maxscan = pq->pq_cnt; queue_locked = true; @@ -762,8 +748,7 @@ scan: * Unlock the laundry queue, invalidating the 'next' pointer. * Use a marker to remember our place in the laundry queue. */ - TAILQ_INSERT_AFTER(&pq->pq_pl, m, &vmd->vmd_laundry_marker, - plinks.q); + TAILQ_INSERT_AFTER(&pq->pq_pl, m, marker, plinks.q); vm_pagequeue_unlock(pq); queue_locked = false; @@ -889,13 +874,13 @@ relock_queue: vm_pagequeue_lock(pq); queue_locked = true; } - next = TAILQ_NEXT(&vmd->vmd_laundry_marker, plinks.q); - TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_laundry_marker, plinks.q); + next = TAILQ_NEXT(marker, plinks.q); + TAILQ_REMOVE(&pq->pq_pl, marker, plinks.q); } vm_pagequeue_unlock(pq); - if (launder > 0 && pq == &vmd->vmd_pagequeues[PQ_UNSWAPPABLE]) { - pq = &vmd->vmd_pagequeues[PQ_LAUNDRY]; + if (launder > 0 && queue == PQ_UNSWAPPABLE) { + queue = PQ_LAUNDRY; goto scan; } @@ -951,7 +936,6 @@ vm_pageout_laundry_worker(void *arg) vmd = VM_DOMAIN(domain); pq = &vmd->vmd_pagequeues[PQ_LAUNDRY]; KASSERT(vmd->vmd_segs != 0, ("domain without segments")); - vm_pageout_init_marker(&vmd->vmd_laundry_marker, PQ_LAUNDRY); shortfall = 0; in_shortfall = false; @@ -1105,7 +1089,7 @@ dolaundry: static bool vm_pageout_scan(struct vm_domain *vmd, int pass, int shortage) { - vm_page_t m, next; + vm_page_t m, marker, next; struct vm_pagequeue *pq; vm_object_t object; long min_scan; @@ -1159,6 +1143,7 @@ vm_pageout_scan(struct vm_domain *vmd, int pass, int s * decisions for the inactive queue, only for the active queue.) */ pq = &vmd->vmd_pagequeues[PQ_INACTIVE]; + marker = &vmd->vmd_markers[PQ_INACTIVE]; maxscan = pq->pq_cnt; vm_pagequeue_lock(pq); queue_locked = TRUE; @@ -1250,7 +1235,7 @@ unlock_page: * vm_page_free(), or vm_page_launder() is called. Use a * marker to remember our place in the inactive queue. */ - TAILQ_INSERT_AFTER(&pq->pq_pl, m, &vmd->vmd_marker, plinks.q); + TAILQ_INSERT_AFTER(&pq->pq_pl, m, marker, plinks.q); vm_page_dequeue_locked(m); vm_pagequeue_unlock(pq); queue_locked = FALSE; @@ -1336,8 +1321,8 @@ drop_page: vm_pagequeue_lock(pq); queue_locked = TRUE; } - next = TAILQ_NEXT(&vmd->vmd_marker, plinks.q); - TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_marker, plinks.q); + next = TAILQ_NEXT(marker, plinks.q); + TAILQ_REMOVE(&pq->pq_pl, marker, plinks.q); } vm_pagequeue_unlock(pq); @@ -1781,10 +1766,6 @@ vm_pageout_worker(void *arg) KASSERT(vmd->vmd_segs != 0, ("domain without segments")); vmd->vmd_last_active_scan = ticks; - vm_pageout_init_marker(&vmd->vmd_marker, PQ_INACTIVE); - vm_pageout_init_marker(&vmd->vmd_inacthead, PQ_INACTIVE); - TAILQ_INSERT_HEAD(&vmd->vmd_pagequeues[PQ_INACTIVE].pq_pl, - &vmd->vmd_inacthead, plinks.q); /* * The pageout daemon worker is never done, so loop forever. Modified: head/sys/vm/vm_pagequeue.h ============================================================================== --- head/sys/vm/vm_pagequeue.h Thu Apr 19 13:37:59 2018 (r332770) +++ head/sys/vm/vm_pagequeue.h Thu Apr 19 14:09:44 2018 (r332771) @@ -107,8 +107,7 @@ struct vm_domain { boolean_t vmd_oom; int vmd_oom_seq; int vmd_last_active_scan; - struct vm_page vmd_laundry_marker; - struct vm_page vmd_marker; /* marker for pagedaemon private use */ + struct vm_page vmd_markers[PQ_COUNT]; /* markers for queue scans */ struct vm_page vmd_inacthead; /* marker for LRU-defeating insertions */ int vmd_pageout_wanted; /* (a, p) pageout daemon wait channel */ From owner-svn-src-all@freebsd.org Thu Apr 19 15:02:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE0F3F8184E; Thu, 19 Apr 2018 15:02:42 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A37AC85946; Thu, 19 Apr 2018 15:02:42 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8605D3227; Thu, 19 Apr 2018 15:02:42 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JF2gBw051422; Thu, 19 Apr 2018 15:02:42 GMT (envelope-from oleg@FreeBSD.org) Received: (from oleg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JF2gNA051421; Thu, 19 Apr 2018 15:02:42 GMT (envelope-from oleg@FreeBSD.org) Message-Id: <201804191502.w3JF2gNA051421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oleg set sender to oleg@FreeBSD.org using -f From: Oleg Bulyzhin Date: Thu, 19 Apr 2018 15: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: r332772 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: oleg X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 332772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:02:43 -0000 Author: oleg Date: Thu Apr 19 15:02:42 2018 New Revision: 332772 URL: https://svnweb.freebsd.org/changeset/base/332772 Log: Fix ipfw table creation when net.inet.ip.fw.tables_sets = 0 and non zero set specified on table creation. This fixes following: # sysctl net.inet.ip.fw.tables_sets net.inet.ip.fw.tables_sets: 0 # ipfw table all info # ipfw set 1 table 1 create type addr # ipfw set 1 table 1 create type addr # ipfw add 10 set 1 count ip from table\(1\) to any 00010 count ip from table(1) to any # ipfw add 10 set 1 count ip from table\(1\) to any 00010 count ip from table(1) to any # ipfw table all info --- table(1), set(1) --- kindex: 4, type: addr references: 1, valtype: legacy algorithm: addr:radix items: 0, size: 296 --- table(1), set(1) --- kindex: 3, type: addr references: 1, valtype: legacy algorithm: addr:radix items: 0, size: 296 --- table(1), set(1) --- kindex: 2, type: addr references: 0, valtype: legacy algorithm: addr:radix items: 0, size: 296 --- table(1), set(1) --- kindex: 1, type: addr references: 0, valtype: legacy algorithm: addr:radix items: 0, size: 296 # Modified: stable/11/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_table.c Thu Apr 19 14:09:44 2018 (r332771) +++ stable/11/sys/netpfil/ipfw/ip_fw_table.c Thu Apr 19 15:02:42 2018 (r332772) @@ -3169,7 +3169,7 @@ alloc_table_config(struct ip_fw_chain *ch, struct tid_ if (ntlv == NULL) return (NULL); name = ntlv->name; - set = ntlv->set; + set = (V_fw_tables_sets == 0) ? 0 : ntlv->set; } else { /* Compat part: convert number to string representation */ snprintf(bname, sizeof(bname), "%d", ti->uidx); From owner-svn-src-all@freebsd.org Thu Apr 19 15:02:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4F78F818C5; Thu, 19 Apr 2018 15:02:54 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52C3E85AE1; Thu, 19 Apr 2018 15:02:54 +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 4826E3228; Thu, 19 Apr 2018 15:02:54 +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 w3JF2sux051473; Thu, 19 Apr 2018 15:02:54 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JF2sgQ051472; Thu, 19 Apr 2018 15:02:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804191502.w3JF2sgQ051472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Apr 2018 15:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332773 - head/etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/etc/rc.d X-SVN-Commit-Revision: 332773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:02:54 -0000 Author: kevans Date: Thu Apr 19 15:02:53 2018 New Revision: 332773 URL: https://svnweb.freebsd.org/changeset/base/332773 Log: Fix ddb rc script r288291 added a call to limits(1), which isn't available before partitions are mounted. This broke the ddb rc script, which does not provide its own start_cmd. Alleviate the situation here by providing a start_cmd. We still have other problems with diskless setups that need to be considered, but this is a start. PR: 206291 Submitted by: cy Discussed with: rgrimes MFC after: 3 days Modified: head/etc/rc.d/ddb Modified: head/etc/rc.d/ddb ============================================================================== --- head/etc/rc.d/ddb Thu Apr 19 15:02:42 2018 (r332772) +++ head/etc/rc.d/ddb Thu Apr 19 15:02:53 2018 (r332773) @@ -15,6 +15,7 @@ desc="DDB kernel debugger" rcvar="ddb_enable" command="/sbin/${name}" start_precmd="ddb_prestart" +start_cmd="ddb_start" stop_cmd=":" ddb_prestart() @@ -23,6 +24,11 @@ ddb_prestart() if [ -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then return 1 fi +} + +ddb_start() +{ + ${command} ${command_args} } load_rc_config $name From owner-svn-src-all@freebsd.org Thu Apr 19 15:03:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C962F81A3F; Thu, 19 Apr 2018 15:03:54 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81CBA86509; Thu, 19 Apr 2018 15:03:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED5D3322B; Thu, 19 Apr 2018 15:03:48 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JF3mGU051561; Thu, 19 Apr 2018 15:03:48 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JF3mlk051559; Thu, 19 Apr 2018 15:03:48 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201804191503.w3JF3mlk051559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Thu, 19 Apr 2018 15:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332774 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 332774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:03:54 -0000 Author: rrs Date: Thu Apr 19 15:03:48 2018 New Revision: 332774 URL: https://svnweb.freebsd.org/changeset/base/332774 Log: These two modules need the tcp_hpts.h file for when the option is enabled (not sure how LINT/build-universe missed this) opps. Sponsored by: Netflix Inc Modified: head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Apr 19 15:02:53 2018 (r332773) +++ head/sys/netinet/tcp_subr.c Thu Apr 19 15:03:48 2018 (r332774) @@ -99,6 +99,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef INET6 #include Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Thu Apr 19 15:02:53 2018 (r332773) +++ head/sys/netinet/tcp_usrreq.c Thu Apr 19 15:03:48 2018 (r332774) @@ -94,6 +94,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef TCPPCAP #include #endif From owner-svn-src-all@freebsd.org Thu Apr 19 15:07:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DA75F8208D; Thu, 19 Apr 2018 15:07:54 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CA29873F5; Thu, 19 Apr 2018 15:07:54 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41DBE322C; Thu, 19 Apr 2018 15:07:54 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JF7sBI051753; Thu, 19 Apr 2018 15:07:54 GMT (envelope-from oleg@FreeBSD.org) Received: (from oleg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JF7sSa051752; Thu, 19 Apr 2018 15:07:54 GMT (envelope-from oleg@FreeBSD.org) Message-Id: <201804191507.w3JF7sSa051752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oleg set sender to oleg@FreeBSD.org using -f From: Oleg Bulyzhin Date: Thu, 19 Apr 2018 15:07: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: r332775 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: oleg X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 332775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:07:54 -0000 Author: oleg Date: Thu Apr 19 15:07:53 2018 New Revision: 332775 URL: https://svnweb.freebsd.org/changeset/base/332775 Log: MFC r332403: Fix a typo. 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 Thu Apr 19 15:03:48 2018 (r332774) +++ stable/11/sbin/ipfw/ipfw.8 Thu Apr 19 15:07:53 2018 (r332775) @@ -2233,7 +2233,7 @@ of the firewall and quickly (and atomically) switch be By default, tables from set 0 are referenced when adding rule with table opcodes regardless of rule set. This behavior can be changed by setting -.Va net.inet.ip.fw.tables_set +.Va net.inet.ip.fw.tables_sets variable to 1. Rule's set will then be used for table references. .Pp From owner-svn-src-all@freebsd.org Thu Apr 19 15:10:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 479ADF8249A; Thu, 19 Apr 2018 15:10:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E828787A91; Thu, 19 Apr 2018 15:10:42 +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 DD7D23240; Thu, 19 Apr 2018 15:10:42 +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 w3JFAgJN052761; Thu, 19 Apr 2018 15:10:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JFAgfG052760; Thu, 19 Apr 2018 15:10:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201804191510.w3JFAgfG052760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 19 Apr 2018 15:10: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: r332776 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 332776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:10:43 -0000 Author: markj Date: Thu Apr 19 15:10:42 2018 New Revision: 332776 URL: https://svnweb.freebsd.org/changeset/base/332776 Log: MFC r332043: Typo. Modified: stable/11/share/man/man9/timeout.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/timeout.9 ============================================================================== --- stable/11/share/man/man9/timeout.9 Thu Apr 19 15:07:53 2018 (r332775) +++ stable/11/share/man/man9/timeout.9 Thu Apr 19 15:10:42 2018 (r332776) @@ -327,7 +327,6 @@ The .Fa drain function itself is called from the context of the completing callout i.e. softclock or hardclock, just like a callout itself. -p .Pp The function .Fn callout_drain From owner-svn-src-all@freebsd.org Thu Apr 19 15:11:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2173DF82561; Thu, 19 Apr 2018 15:11:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFE26680D7; Thu, 19 Apr 2018 15:11:18 +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 BA4CA336B; Thu, 19 Apr 2018 15:11:18 +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 w3JFBIk2054334; Thu, 19 Apr 2018 15:11:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JFBI3e054333; Thu, 19 Apr 2018 15:11:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201804191511.w3JFBI3e054333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 19 Apr 2018 15:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332777 - stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 332777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:11:19 -0000 Author: markj Date: Thu Apr 19 15:11:18 2018 New Revision: 332777 URL: https://svnweb.freebsd.org/changeset/base/332777 Log: MFC r332079: Fix the definitions of get_cpu() and put_cpu(). Modified: stable/11/sys/compat/linuxkpi/common/include/asm/smp.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/asm/smp.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/smp.h Thu Apr 19 15:10:42 2018 (r332776) +++ stable/11/sys/compat/linuxkpi/common/include/asm/smp.h Thu Apr 19 15:11:18 2018 (r332777) @@ -38,11 +38,11 @@ int linux_wbinvd_on_all_cpus(void); #endif #define get_cpu() ({ \ - sched_pin(); \ + critical_enter(); \ PCPU_GET(cpuid); \ }) #define put_cpu() \ - sched_unpin() + critical_exit() #endif /* _ASM_SMP_H_ */ From owner-svn-src-all@freebsd.org Thu Apr 19 15:16:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03A25F82DA2; Thu, 19 Apr 2018 15:16:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 6D70B6A593; Thu, 19 Apr 2018 15:16:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3JFG92M066372; Thu, 19 Apr 2018 08:16:09 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3JFG99V066371; Thu, 19 Apr 2018 08:16:09 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804191516.w3JFG99V066371@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r332773 - head/etc/rc.d In-Reply-To: <201804191502.w3JF2sgQ051472@repo.freebsd.org> To: Kyle Evans Date: Thu, 19 Apr 2018 08:16:09 -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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:16:12 -0000 > Author: kevans > Date: Thu Apr 19 15:02:53 2018 > New Revision: 332773 > URL: https://svnweb.freebsd.org/changeset/base/332773 > > Log: > Fix ddb rc script > > r288291 added a call to limits(1), which isn't available before partitions > are mounted. This broke the ddb rc script, which does not provide its own > start_cmd. > > Alleviate the situation here by providing a start_cmd. We still have other > problems with diskless setups that need to be considered, but this is a > start. Thanks, Also didn't cy identify a second one of these? Or am I confusing yet another issue? > PR: 206291 > Submitted by: cy > Discussed with: rgrimes > MFC after: 3 days > > Modified: > head/etc/rc.d/ddb > > Modified: head/etc/rc.d/ddb > ============================================================================== > --- head/etc/rc.d/ddb Thu Apr 19 15:02:42 2018 (r332772) > +++ head/etc/rc.d/ddb Thu Apr 19 15:02:53 2018 (r332773) > @@ -15,6 +15,7 @@ desc="DDB kernel debugger" > rcvar="ddb_enable" > command="/sbin/${name}" > start_precmd="ddb_prestart" > +start_cmd="ddb_start" > stop_cmd=":" > > ddb_prestart() > @@ -23,6 +24,11 @@ ddb_prestart() > if [ -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then > return 1 > fi > +} > + > +ddb_start() > +{ > + ${command} ${command_args} > } > > load_rc_config $name > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Apr 19 15:17:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BD71F83039; Thu, 19 Apr 2018 15:17:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 076296A753; Thu, 19 Apr 2018 15:17:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-vk0-f52.google.com (mail-vk0-f52.google.com [209.85.213.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id DF3FD20643; Thu, 19 Apr 2018 15:17:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-vk0-f52.google.com with SMTP id d9so3404655vka.4; Thu, 19 Apr 2018 08:17:34 -0700 (PDT) X-Gm-Message-State: ALQs6tD/vIq0qA4vAf/Dfm2Af0GniakSEY9hUUDVWQVZIC4CiLXG+FEP 0zWJHil3OIkeQsnpoZZ6+++v8O78t113JX05ZR0= X-Google-Smtp-Source: AIpwx4/IHt4xgu2PAErBJcdTMd4PNprXhwMfPaIDIlqX4fncWW+sG6SGNk6c2EmPVQkdO/SvH8zMTzlaU4eJsVZ7o90= X-Received: by 10.31.124.131 with SMTP id x125mr4680484vkc.28.1524151054544; Thu, 19 Apr 2018 08:17:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.54.12 with HTTP; Thu, 19 Apr 2018 08:17:14 -0700 (PDT) In-Reply-To: <201804191516.w3JFG99V066371@pdx.rh.CN85.dnsmgr.net> References: <201804191502.w3JF2sgQ051472@repo.freebsd.org> <201804191516.w3JFG99V066371@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Thu, 19 Apr 2018 10:17:14 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332773 - head/etc/rc.d To: "Rodney W. Grimes" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:17:35 -0000 On Thu, Apr 19, 2018 at 10:16 AM, Rodney W. Grimes wrote: >> Author: kevans >> Date: Thu Apr 19 15:02:53 2018 >> New Revision: 332773 >> URL: https://svnweb.freebsd.org/changeset/base/332773 >> >> Log: >> Fix ddb rc script >> >> r288291 added a call to limits(1), which isn't available before partitions >> are mounted. This broke the ddb rc script, which does not provide its own >> start_cmd. >> >> Alleviate the situation here by providing a start_cmd. We still have other >> problems with diskless setups that need to be considered, but this is a >> start. > > Thanks, > Also didn't cy identify a second one of these? > Or am I confusing yet another issue? > He identified a second early script that didn't specify start_cmd, but it was a non-issue because it's invoked independently of rc.subr. From owner-svn-src-all@freebsd.org Thu Apr 19 15:19:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21ED5F83261 for ; Thu, 19 Apr 2018 15:19:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A80136A942 for ; Thu, 19 Apr 2018 15:19:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x233.google.com with SMTP id f22-v6so4926803ioc.11 for ; Thu, 19 Apr 2018 08:19:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=QydIaSkqj9SSw6im7p+JHRTBSBHiDnkrTSnkvAkHlCE=; b=G2lOK+cawLbXviSSw72+5yKhrKn9V7rv8X+nrTHPHBZuDGqjBMl5CvYlCcxaznOU+R R92QZffCyaX8FEvDkASFsL6m/kvp0JB85kqBCcer+pp+UBoWEF0/dE3vTuTP8DDdMik3 BmZbbdfXGhbi0JJWRPRVGlOsEB4aG/Kb8xjYrLgLYq5Eeo3xQPd0sGWg8XbFS66hUR4w Mhq7VUsqicplxMfua+GgTYnFUsLX84xNLYT+fYimj7xzVsN46/mIhfgViiMbBpcOGenX 7lOwp6pDPOy9wFIeuZblt5d1JTQSpwGvcNFnwpvuIK30r5LZqJ4oFfdDbnjmJPmj/Goy tpdw== 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:in-reply-to:references:from :date:message-id:subject:to:cc; bh=QydIaSkqj9SSw6im7p+JHRTBSBHiDnkrTSnkvAkHlCE=; b=gYAcs0R7zvDWYXVjztGtuRNC2uWi9ettGdBdwOESDAiNW/sqBpjnghj1TZLKJ2k5A6 B2WBDpaKBepMnXE2A2jTt4qmcGBweFwilOsMdZQbnIW3xU7MWZEHh68Rln/r7tucm0Gk YSshZS8aUsxWkLZXlZCML6dr5PKCHPn417Bo/W+buFFc7FJIK2Qi9ZRHD8RolaZDR2/O Om12tcRWWzu+OlzSFmkTHOkVI9HsALGT9etJasQPsKYpibc0YmNUNeOe5xKUY7/Iel5f 2Lz7zr63L3vd6nCsoClqTyZlHJqYJk9KxQ3XNHZKVB54ebsCEAjwS430CsLXVLnt8pr+ kR7Q== X-Gm-Message-State: ALQs6tA7I8bxQ0+VcagJ7LlS2g84BbiY605jPMhL4dsyOT1fSqHigbA4 n7j/gLtDVYNrHsMWvxzgxvJe9N0qcawnvf/FTeK/Cg== X-Google-Smtp-Source: AIpwx499v69YGtGAiq9RTvIBolVMK53KBFiweHWDknO1jg6CIZ41JaBukVIJprT6iHicM9/A85DkFSiAZiI3dw/7g54= X-Received: by 2002:a6b:12a3:: with SMTP id 35-v6mr6723962ios.168.1524151147850; Thu, 19 Apr 2018 08:19:07 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:a604:0:0:0:0:0 with HTTP; Thu, 19 Apr 2018 08:19:07 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201804191502.w3JF2sgQ051472@repo.freebsd.org> <201804191516.w3JFG99V066371@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Thu, 19 Apr 2018 09:19:07 -0600 X-Google-Sender-Auth: At72CJ3unfTlalMv0LY77J8q6m8 Message-ID: Subject: Re: svn commit: r332773 - head/etc/rc.d To: Kyle Evans Cc: "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:19:09 -0000 On Thu, Apr 19, 2018 at 9:17 AM, Kyle Evans wrote: > On Thu, Apr 19, 2018 at 10:16 AM, Rodney W. Grimes > wrote: > >> Author: kevans > >> Date: Thu Apr 19 15:02:53 2018 > >> New Revision: 332773 > >> URL: https://svnweb.freebsd.org/changeset/base/332773 > >> > >> Log: > >> Fix ddb rc script > >> > >> r288291 added a call to limits(1), which isn't available before > partitions > >> are mounted. This broke the ddb rc script, which does not provide its > own > >> start_cmd. > >> > >> Alleviate the situation here by providing a start_cmd. We still have > other > >> problems with diskless setups that need to be considered, but this is > a > >> start. > > > > Thanks, > > Also didn't cy identify a second one of these? > > Or am I confusing yet another issue? > > > > He identified a second early script that didn't specify start_cmd, but > it was a non-issue because it's invoked independently of rc.subr. > One would think that it shouldn't invoke limits at all if foo_limits= wasn't specified... Would make the feature much less invasive. Warner From owner-svn-src-all@freebsd.org Thu Apr 19 15:21:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42604F83617; Thu, 19 Apr 2018 15:21:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1E446BA68; Thu, 19 Apr 2018 15:21:51 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-ua0-f181.google.com (mail-ua0-f181.google.com [209.85.217.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id B657F2075E; Thu, 19 Apr 2018 15:21:51 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-ua0-f181.google.com with SMTP id c3so3693545uae.2; Thu, 19 Apr 2018 08:21:51 -0700 (PDT) X-Gm-Message-State: ALQs6tAHaEFfN6a40KwE951S880BTYs45loFn/M18Hf5F6c1Gu7XvU6u G3O+ojE292DQBR+AehCufUm5re7PZiDNNavV+w4= X-Google-Smtp-Source: AIpwx4/fDkjCh+6XRaiGoYfwAG33eY7CLEz0JZDHHuV7wFShapMf/6OMSl5dsFcEH4GCAxd3/LZg98uuk9uuTrtDQPQ= X-Received: by 10.176.66.165 with SMTP id j34mr4941697uaj.65.1524151311344; Thu, 19 Apr 2018 08:21:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.54.12 with HTTP; Thu, 19 Apr 2018 08:21:30 -0700 (PDT) In-Reply-To: References: <201804191502.w3JF2sgQ051472@repo.freebsd.org> <201804191516.w3JFG99V066371@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Thu, 19 Apr 2018 10:21:30 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332773 - head/etc/rc.d To: Warner Losh Cc: "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:21:52 -0000 On Thu, Apr 19, 2018 at 10:19 AM, Warner Losh wrote: > > > On Thu, Apr 19, 2018 at 9:17 AM, Kyle Evans wrote: >> >> On Thu, Apr 19, 2018 at 10:16 AM, Rodney W. Grimes >> wrote: >> >> Author: kevans >> >> Date: Thu Apr 19 15:02:53 2018 >> >> New Revision: 332773 >> >> URL: https://svnweb.freebsd.org/changeset/base/332773 >> >> >> >> Log: >> >> Fix ddb rc script >> >> >> >> r288291 added a call to limits(1), which isn't available before >> >> partitions >> >> are mounted. This broke the ddb rc script, which does not provide its >> >> own >> >> start_cmd. >> >> >> >> Alleviate the situation here by providing a start_cmd. We still have >> >> other >> >> problems with diskless setups that need to be considered, but this is >> >> a >> >> start. >> > >> > Thanks, >> > Also didn't cy identify a second one of these? >> > Or am I confusing yet another issue? >> > >> >> He identified a second early script that didn't specify start_cmd, but >> it was a non-issue because it's invoked independently of rc.subr. > > > One would think that it shouldn't invoke limits at all if foo_limits= wasn't > specified... Would make the feature much less invasive. > foo_limits was introduced long after the initial invocation, which was introduced to enforce consistent limits of daemons run from rc.subr. Not doing this due to the lack of foo_flags would certainly kill the original intent, I'm afraid. From owner-svn-src-all@freebsd.org Thu Apr 19 15:24:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D917F83B4E; Thu, 19 Apr 2018 15:24:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F4056D337; Thu, 19 Apr 2018 15:24: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 3884B38E3; Thu, 19 Apr 2018 15:24: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 w3JFOMpD061824; Thu, 19 Apr 2018 15:24:22 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JFOMoC061823; Thu, 19 Apr 2018 15:24:22 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201804191524.w3JFOMoC061823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 19 Apr 2018 15:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332778 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 332778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:24:22 -0000 Author: cem Date: Thu Apr 19 15:24:21 2018 New Revision: 332778 URL: https://svnweb.freebsd.org/changeset/base/332778 Log: cryptosoft: Do not exceed crd_len around *crypt_multi When a caller passes in a uio or mbuf chain that is longer than crd_len, in tandem with a transform that supports the multi-block interface, swcr_encdec() would process the entire mbuf or uio instead of just the portion indicated by crd_len (+ crd_skip). De/encryption are performed in-place, so this would trash subsequent uio or mbuf contents. This was introduced in r331639 (mea culpa). It only affects the {de,en}crypt_multi() family of interfaces. That interface only has one consumer transform in-tree (for now): Chacha20. PR: 227605 Submitted by: Valentin Vergez Modified: head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Thu Apr 19 15:11:18 2018 (r332777) +++ head/sys/opencrypto/cryptosoft.c Thu Apr 19 15:24:21 2018 (r332778) @@ -253,7 +253,8 @@ swcr_encdec(struct cryptodesc *crd, struct swcr_data * size_t nb, rem; nb = blks; - rem = uio->uio_iov[ind].iov_len - k; + rem = MIN((size_t)i, + uio->uio_iov[ind].iov_len - (size_t)k); idat = (uint8_t *)uio->uio_iov[ind].iov_base + k; if (exf->reinit) { From owner-svn-src-all@freebsd.org Thu Apr 19 15:27:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 550DCF84112 for ; Thu, 19 Apr 2018 15:27:14 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0687B6DCB1 for ; Thu, 19 Apr 2018 15:27:14 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-ua0-f174.google.com (mail-ua0-f174.google.com [209.85.217.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id DC73E20762 for ; Thu, 19 Apr 2018 15:27:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-ua0-f174.google.com with SMTP id g10so3696759ual.6 for ; Thu, 19 Apr 2018 08:27:13 -0700 (PDT) X-Gm-Message-State: ALQs6tDjMBssziV4AHThu+9EnFZ+oke7fFtmaGbVaD9dkXVYy17rX4rU muG+1XLTtKNVQteLuwFMzBYAXD+4L/uw0ip7n+0= X-Received: by 10.176.73.176 with SMTP id e45mt5308934uad.167.1524151633519; Thu, 19 Apr 2018 08:27:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.54.12 with HTTP; Thu, 19 Apr 2018 08:26:53 -0700 (PDT) In-Reply-To: References: <201804191502.w3JF2sgQ051472@repo.freebsd.org> <201804191516.w3JFG99V066371@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Thu, 19 Apr 2018 10:26:53 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332773 - head/etc/rc.d Cc: Warner Losh , "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:27:14 -0000 On Thu, Apr 19, 2018 at 10:21 AM, Kyle Evans wrote: > On Thu, Apr 19, 2018 at 10:19 AM, Warner Losh wrote: >> >> >> On Thu, Apr 19, 2018 at 9:17 AM, Kyle Evans wrote: >>> >>> On Thu, Apr 19, 2018 at 10:16 AM, Rodney W. Grimes >>> wrote: >>> >> Author: kevans >>> >> Date: Thu Apr 19 15:02:53 2018 >>> >> New Revision: 332773 >>> >> URL: https://svnweb.freebsd.org/changeset/base/332773 >>> >> >>> >> Log: >>> >> Fix ddb rc script >>> >> >>> >> r288291 added a call to limits(1), which isn't available before >>> >> partitions >>> >> are mounted. This broke the ddb rc script, which does not provide its >>> >> own >>> >> start_cmd. >>> >> >>> >> Alleviate the situation here by providing a start_cmd. We still have >>> >> other >>> >> problems with diskless setups that need to be considered, but this is >>> >> a >>> >> start. >>> > >>> > Thanks, >>> > Also didn't cy identify a second one of these? >>> > Or am I confusing yet another issue? >>> > >>> >>> He identified a second early script that didn't specify start_cmd, but >>> it was a non-issue because it's invoked independently of rc.subr. >> >> >> One would think that it shouldn't invoke limits at all if foo_limits= wasn't >> specified... Would make the feature much less invasive. >> > > foo_limits was introduced long after the initial invocation, which was > introduced to enforce consistent limits of daemons run from rc.subr. > Not doing this due to the lack of foo_flags would certainly kill the > original intent, I'm afraid. I do wonder if some kind of kenv var or something would be appropriate to disable this whole mess for some setups that it just clearly won't work in, but maybe that's a terrible thought. From owner-svn-src-all@freebsd.org Thu Apr 19 15:29:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A31EF843F7; Thu, 19 Apr 2018 15:29:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D9846DEDB; Thu, 19 Apr 2018 15:29:11 +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 389DE38F2; Thu, 19 Apr 2018 15:29:11 +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 w3JFTBmv062048; Thu, 19 Apr 2018 15:29:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JFTBAx062047; Thu, 19 Apr 2018 15:29:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804191529.w3JFTBAx062047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 19 Apr 2018 15:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332779 - head/sys/powerpc/powermac X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/powerpc/powermac X-SVN-Commit-Revision: 332779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:29:11 -0000 Author: mav Date: Thu Apr 19 15:29:10 2018 New Revision: 332779 URL: https://svnweb.freebsd.org/changeset/base/332779 Log: Release memory resource on cuda driver attach failure. Submitted by: Dmitry Luhtionov Modified: head/sys/powerpc/powermac/cuda.c Modified: head/sys/powerpc/powermac/cuda.c ============================================================================== --- head/sys/powerpc/powermac/cuda.c Thu Apr 19 15:24:21 2018 (r332778) +++ head/sys/powerpc/powermac/cuda.c Thu Apr 19 15:29:10 2018 (r332779) @@ -165,12 +165,16 @@ cuda_attach(device_t dev) RF_ACTIVE); if (sc->sc_irq == NULL) { device_printf(dev, "could not allocate interrupt\n"); + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_memrid, + sc->sc_memr); return (ENXIO); } if (bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC | INTR_MPSAFE | INTR_ENTROPY, NULL, cuda_intr, dev, &sc->sc_ih) != 0) { device_printf(dev, "could not setup interrupt\n"); + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_memrid, + sc->sc_memr); bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irqrid, sc->sc_irq); return (ENXIO); From owner-svn-src-all@freebsd.org Thu Apr 19 15:39:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 081EDF85562; Thu, 19 Apr 2018 15:39: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFDA46F0BC; Thu, 19 Apr 2018 15:39:20 +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 AAB6E3B2C; Thu, 19 Apr 2018 15:39: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 w3JFdK8a067885; Thu, 19 Apr 2018 15:39:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JFdKVQ067884; Thu, 19 Apr 2018 15:39:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804191539.w3JFdKVQ067884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 19 Apr 2018 15:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332780 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 332780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:39:21 -0000 Author: imp Date: Thu Apr 19 15:39:20 2018 New Revision: 332780 URL: https://svnweb.freebsd.org/changeset/base/332780 Log: Intel drives have an optimal alignment for I/O. While they honor I/Os that cross this boundary, they perform better when this isn't the case. Intel uses the 3rd byte in the vendor specific area for this. The DC P3500 was previously listed without any explanation. Add the DC P3520 and DC P4500 to the list. There won't be any others drives needing this quirk. Intel has standardized a field in the namespace data in 1.3 (noiob). A future patch will use that if it exists, with fallback to this method. Submitted by: Keith Busch Reviewed by: jimharris@ Modified: head/sys/dev/nvme/nvme_ns.c Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Thu Apr 19 15:29:10 2018 (r332779) +++ head/sys/dev/nvme/nvme_ns.c Thu Apr 19 15:39:20 2018 (r332780) @@ -505,9 +505,23 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t ns->id = id; ns->stripesize = 0; - if (pci_get_devid(ctrlr->dev) == 0x09538086 && ctrlr->cdata.vs[3] != 0) - ns->stripesize = - (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; + /* + * Some Intel devices advertise an alignment that improves performance, + * but is in it's vendor specific space in the cdata. Use it for these + * drives, if present, to suggest a stripe size. Future versions of + * Intel hardware will use fields standardized in NVMe 1.3 for this. + */ + switch (pci_get_devid(ctrlr->dev)) { + case 0x09538086: /* Intel DC PC3500 */ + case 0x0a538086: /* Intel DC PC3520 */ + case 0x0a548086: /* Intel DC PC4500 */ + if (ctrlr->cdata.vs[3] != 0) + ns->stripesize = + (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; + break; + default: + break; + } /* * Namespaces are reconstructed after a controller reset, so check From owner-svn-src-all@freebsd.org Thu Apr 19 15:40:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F6CAF8590C; Thu, 19 Apr 2018 15:40:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 6D9756F89F; Thu, 19 Apr 2018 15:40:58 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3JFesws066489; Thu, 19 Apr 2018 08:40:54 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3JFesdQ066488; Thu, 19 Apr 2018 08:40:54 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804191540.w3JFesdQ066488@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r332773 - head/etc/rc.d In-Reply-To: To: Kyle Evans Date: Thu, 19 Apr 2018 08:40:54 -0700 (PDT) CC: Warner Losh , "Rodney W. Grimes" , 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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:40:59 -0000 > On Thu, Apr 19, 2018 at 10:21 AM, Kyle Evans wrote: > > On Thu, Apr 19, 2018 at 10:19 AM, Warner Losh wrote: > >> > >> > >> On Thu, Apr 19, 2018 at 9:17 AM, Kyle Evans wrote: > >>> > >>> On Thu, Apr 19, 2018 at 10:16 AM, Rodney W. Grimes > >>> wrote: > >>> >> Author: kevans > >>> >> Date: Thu Apr 19 15:02:53 2018 > >>> >> New Revision: 332773 > >>> >> URL: https://svnweb.freebsd.org/changeset/base/332773 > >>> >> > >>> >> Log: > >>> >> Fix ddb rc script > >>> >> > >>> >> r288291 added a call to limits(1), which isn't available before > >>> >> partitions > >>> >> are mounted. This broke the ddb rc script, which does not provide its > >>> >> own > >>> >> start_cmd. > >>> >> > >>> >> Alleviate the situation here by providing a start_cmd. We still have > >>> >> other > >>> >> problems with diskless setups that need to be considered, but this is > >>> >> a > >>> >> start. > >>> > > >>> > Thanks, > >>> > Also didn't cy identify a second one of these? > >>> > Or am I confusing yet another issue? > >>> > > >>> > >>> He identified a second early script that didn't specify start_cmd, but > >>> it was a non-issue because it's invoked independently of rc.subr. > >> > >> > >> One would think that it shouldn't invoke limits at all if foo_limits= wasn't > >> specified... Would make the feature much less invasive. I agree. This should be implemented, if it isn't already working that way. > >> > > > > foo_limits was introduced long after the initial invocation, which was > > introduced to enforce consistent limits of daemons run from rc.subr. > > Not doing this due to the lack of foo_flags would certainly kill the > > original intent, I'm afraid. > > I do wonder if some kind of kenv var or something would be appropriate > to disable this whole mess for some setups that it just clearly won't > work in, but maybe that's a terrible thought. I think you miss understood Warner. He is saying that if there is no rc var *_limits there should be no invocation of limits(1) at all, making much of this whole mess for many of us a NOP. I actually believe that is how the code already works, but not sure. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Apr 19 15:52:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA9A2F86B10; Thu, 19 Apr 2018 15:52:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3757C72DDB; Thu, 19 Apr 2018 15:52:46 +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 324813E8A; Thu, 19 Apr 2018 15:52:46 +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 w3JFqja6077620; Thu, 19 Apr 2018 15:52:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JFqjaw077619; Thu, 19 Apr 2018 15:52:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804191552.w3JFqjaw077619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 19 Apr 2018 15:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332781 - 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: 332781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:52:47 -0000 Author: gjb Date: Thu Apr 19 15:52:45 2018 New Revision: 332781 URL: https://svnweb.freebsd.org/changeset/base/332781 Log: Fix a misspelled word. Submitted by: dim 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 Thu Apr 19 15:39:20 2018 (r332780) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Apr 19 15:52:45 2018 (r332781) @@ -374,7 +374,7 @@ llvm, lld, lldb, and - complier-rt utilities as well as + compiler-rt utilities as well as libc++ have been updated to upstream version 6.0.0. From owner-svn-src-all@freebsd.org Thu Apr 19 15:55:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4698F86E66; Thu, 19 Apr 2018 15:55:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CEE773C50; Thu, 19 Apr 2018 15:55:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 1291E20A3D; Thu, 19 Apr 2018 15:55:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f45.google.com with SMTP id d79-v6so919127lfd.0; Thu, 19 Apr 2018 08:55:34 -0700 (PDT) X-Gm-Message-State: ALQs6tAdX42tIGnje9ygiEq7fC4vAp0eIA8POD1J9N5RBqgSia+mfTME 86ke82Yvi+aMnUTr85B3giFvn4U7yqy2UGmRyFE= X-Google-Smtp-Source: AB8JxZpTw+8FRbsYWmdqtRsDmiYhZaDbUjdZM3VlUb1BHEiEULdb/MeELWqPDSZzQG75IRIGG7FnSJ7q8a6wPRgoAps= X-Received: by 2002:a19:7904:: with SMTP id u4-v6mr388588lfc.129.1524153332640; Thu, 19 Apr 2018 08:55:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.129.90 with HTTP; Thu, 19 Apr 2018 08:55:12 -0700 (PDT) In-Reply-To: <201804191540.w3JFesdQ066488@pdx.rh.CN85.dnsmgr.net> References: <201804191540.w3JFesdQ066488@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Thu, 19 Apr 2018 10:55:12 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332773 - head/etc/rc.d To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:55:35 -0000 On Thu, Apr 19, 2018 at 10:40 AM, Rodney W. Grimes wrote: >> On Thu, Apr 19, 2018 at 10:21 AM, Kyle Evans wrote: >> > On Thu, Apr 19, 2018 at 10:19 AM, Warner Losh wrote: >> >> >> >> >> >> On Thu, Apr 19, 2018 at 9:17 AM, Kyle Evans wrote: >> >>> >> >>> On Thu, Apr 19, 2018 at 10:16 AM, Rodney W. Grimes >> >>> wrote: >> >>> >> Author: kevans >> >>> >> Date: Thu Apr 19 15:02:53 2018 >> >>> >> New Revision: 332773 >> >>> >> URL: https://svnweb.freebsd.org/changeset/base/332773 >> >>> >> >> >>> >> Log: >> >>> >> Fix ddb rc script >> >>> >> >> >>> >> r288291 added a call to limits(1), which isn't available before >> >>> >> partitions >> >>> >> are mounted. This broke the ddb rc script, which does not provide its >> >>> >> own >> >>> >> start_cmd. >> >>> >> >> >>> >> Alleviate the situation here by providing a start_cmd. We still have >> >>> >> other >> >>> >> problems with diskless setups that need to be considered, but this is >> >>> >> a >> >>> >> start. >> >>> > >> >>> > Thanks, >> >>> > Also didn't cy identify a second one of these? >> >>> > Or am I confusing yet another issue? >> >>> > >> >>> >> >>> He identified a second early script that didn't specify start_cmd, but >> >>> it was a non-issue because it's invoked independently of rc.subr. >> >> >> >> >> >> One would think that it shouldn't invoke limits at all if foo_limits= wasn't >> >> specified... Would make the feature much less invasive. > > I agree. This should be implemented, > if it isn't already working that way. > >> >> >> > >> > foo_limits was introduced long after the initial invocation, which was >> > introduced to enforce consistent limits of daemons run from rc.subr. >> > Not doing this due to the lack of foo_flags would certainly kill the >> > original intent, I'm afraid. >> >> I do wonder if some kind of kenv var or something would be appropriate >> to disable this whole mess for some setups that it just clearly won't >> work in, but maybe that's a terrible thought. > > I think you miss understood Warner. He is saying that if there is no > rc var *_limits there should be no invocation of limits(1) at all, > making much of this whole mess for many of us a NOP. No, I understood that perfectly... the *_limits rc var was introduced much later just so one can add extra flags to this limits(1) invocation. This would be counter-productive to the original intention of the limits(1) invocation, which had no concept of foo_limits until lately and was intended to just generally apply to all rc scripts without a bunch of redundant crud in every rc script that it can apply to. > I actually believe that is how the code already works, but not sure. Negative, as I've already mentioned a couple of times... limits(1) is applied basically unconditionally. From owner-svn-src-all@freebsd.org Thu Apr 19 15:59:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9F45F88475 for ; Thu, 19 Apr 2018 15:59:33 +0000 (UTC) (envelope-from erj@erj.cc) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6136D750D5 for ; Thu, 19 Apr 2018 15:59:33 +0000 (UTC) (envelope-from erj@erj.cc) Received: by mail-io0-x230.google.com with SMTP id f22-v6so5078860ioc.11 for ; Thu, 19 Apr 2018 08:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=erj.cc; s=ericroxx; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Nh5svpCAyWQDLvkL7pTrP/KQ3+iUeRxam0pCOv61b4E=; b=MYi2H4Uu1ukQScIQ7Xhvf0BgRhAKOQL+JltjtWlQXRk9jQv+FXiYUNIjADvjF3kV48 L5WnFgfmWqXi1cV6dqH0JqQj/i72/ikMmm6Q8UgfwK/YD84vJ7Z1zmaU9STqZBdv3SLt 4kbYnRy0J24pkilQsoulonhaAk9exfDAWzvNU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Nh5svpCAyWQDLvkL7pTrP/KQ3+iUeRxam0pCOv61b4E=; b=nu0HeE6VQiZAr+e1NgscGvwOphD2WpX1s4PshfgeLAneFxbtqbTgDPjqz4iAGtWn5H k/u2/cuxzUxHseHzoziEYoKDuuj4Onky0HjMGkoXQDScrzVok40IgeYG7nr/RJ5lWCFM voBaRSOGe0evY75YFzkjaLxH656oFHfkeELXYZXcecWCbiJiHdMDyso+E9w1TE1K9RAE XNPqZZE8WvhLhbUl6n5MNrI0N6vStg3UGxXK1Nf2VX1luNVPpkAyJv1i7wCpnPkZcNuD 68adMdQyw/rEcqbHUlj6rKqHhPEe84+CMXDedqD7V6F0quElWJ5lJkt1SLflD55Wap3A 4a5Q== X-Gm-Message-State: ALQs6tDTU5kVVwSUoWaRz3eWGX1wDCHWpPM2wwXhb9pWIjIQSQ+5a9oO hZJV3WP34KIGoK4puHLEdnxvJL2xKwr75h9cRPgc0g== X-Google-Smtp-Source: AB8JxZrdHB4vQ/0hm5neqLiko1suvJQtaHBcCVUvYJ06AplFg76SDGGV6m4xPwYL+t8uwoE2tkcewlDXfv5FUqjkbE0= X-Received: by 2002:a6b:8d55:: with SMTP id p82-v6mr6811427iod.57.1524153572686; Thu, 19 Apr 2018 08:59:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:8386:0:0:0:0:0 with HTTP; Thu, 19 Apr 2018 08:59:32 -0700 (PDT) In-Reply-To: <201804181845.w3IIjYdt037258@repo.freebsd.org> References: <201804181845.w3IIjYdt037258@repo.freebsd.org> From: Eric Joyner Date: Thu, 19 Apr 2018 08:59:32 -0700 Message-ID: Subject: Re: svn commit: r332735 - head/sys/x86/x86 To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 15:59:34 -0000 Is the limit going to be increased at some point? Is there a true limit somewhere? On Wed, Apr 18, 2018 at 11:45 AM, John Baldwin wrote: > Author: jhb > Date: Wed Apr 18 18:45:34 2018 > New Revision: 332735 > URL: https://svnweb.freebsd.org/changeset/base/332735 > > Log: > Fix two off-by-one errors when allocating MSI and MSI-X interrupts. > > x86 enforces an (arbitray) limit on the number of available MSI and > MSI-X interrupts to simplify code (in particular, interrupt_source[] > is statically sized). This means that an attempt to allocate an MSI > vector needs to fail if it would go beyond the limit, but the checks > for exceeding the limit had an off-by-one error. In the case of MSI-X > which allocates interrupts one at a time this meant that IRQ 768 kept > getting handed out multiple times for msix_alloc() instead of failing > because all MSI IRQs were in use. > > Tested by: lidl > MFC after: 1 week > > Modified: > head/sys/x86/x86/msi.c > > Modified: head/sys/x86/x86/msi.c > ============================================================ > ================== > --- head/sys/x86/x86/msi.c Wed Apr 18 18:45:04 2018 (r332734) > +++ head/sys/x86/x86/msi.c Wed Apr 18 18:45:34 2018 (r332735) > @@ -404,7 +404,7 @@ again: > /* Do we need to create some new sources? */ > if (cnt < count) { > /* If we would exceed the max, give up. */ > - if (i + (count - cnt) > FIRST_MSI_INT + NUM_MSI_INTS) { > + if (i + (count - cnt) >= FIRST_MSI_INT + NUM_MSI_INTS) { > mtx_unlock(&msi_lock); > free(mirqs, M_MSI); > return (ENXIO); > @@ -645,7 +645,7 @@ again: > /* Do we need to create a new source? */ > if (msi == NULL) { > /* If we would exceed the max, give up. */ > - if (i + 1 > FIRST_MSI_INT + NUM_MSI_INTS) { > + if (i + 1 >= FIRST_MSI_INT + NUM_MSI_INTS) { > mtx_unlock(&msi_lock); > return (ENXIO); > } > > From owner-svn-src-all@freebsd.org Thu Apr 19 16:00:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3C8AF885E4; Thu, 19 Apr 2018 16:00:35 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9524575281; Thu, 19 Apr 2018 16:00:35 +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 8C75F3E9A; Thu, 19 Apr 2018 16:00:35 +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 w3JG0ZHl077997; Thu, 19 Apr 2018 16:00:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JG0Y0w077991; Thu, 19 Apr 2018 16:00:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201804191600.w3JG0Y0w077991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 19 Apr 2018 16:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332782 - in head/sys: amd64/linux amd64/linux32 compat/freebsd32 i386/linux kern sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 compat/freebsd32 i386/linux kern sys X-SVN-Commit-Revision: 332782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 16:00:36 -0000 Author: jhb Date: Thu Apr 19 16:00:34 2018 New Revision: 332782 URL: https://svnweb.freebsd.org/changeset/base/332782 Log: Simplify the code to allocate stack for auxv, argv[], and environment vectors. Remove auxarg_size as it was only used once right after a confusing assignment in each of the variants of exec_copyout_strings(). Reviewed by: emaste MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D15123 Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/i386/linux/linux_sysvec.c head/sys/kern/kern_exec.c head/sys/sys/imgact.h Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Thu Apr 19 15:52:45 2018 (r332781) +++ head/sys/amd64/linux/linux_sysvec.c Thu Apr 19 16:00:34 2018 (r332782) @@ -331,31 +331,21 @@ linux_copyout_strings(struct image_params *imgp) roundup(sizeof(canary), sizeof(char *)); copyout(canary, (void *)imgp->canary, sizeof(canary)); - /* If we have a valid auxargs ptr, prepare some room on the stack. */ + vectp = (char **)destp; if (imgp->auxargs) { /* - * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for - * lower compatibility. + * Allocate room on the stack for the ELF auxargs + * array. It has LINUX_AT_COUNT entries. */ - imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size : - (LINUX_AT_COUNT * 2); - - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets,and imgp->auxarg_size is room - * for argument of Runtime loader. - */ - vectp = (char **)(destp - (imgp->args->argc + - imgp->args->envc + 2 + imgp->auxarg_size) * sizeof(char *)); - - } else { - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets - */ - vectp = (char **)(destp - (imgp->args->argc + - imgp->args->envc + 2) * sizeof(char *)); + vectp -= howmany(LINUX_AT_COUNT * sizeof(Elf64_Auxinfo), + sizeof(*vectp)); } + + /* + * Allocate room for the argv[] and env vectors including the + * terminating NULL pointers. + */ + vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; /* vectp also becomes our initial stack base. */ stack_base = (register_t *)vectp; Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Thu Apr 19 15:52:45 2018 (r332781) +++ head/sys/amd64/linux32/linux32_sysvec.c Thu Apr 19 16:00:34 2018 (r332782) @@ -793,31 +793,21 @@ linux_copyout_strings(struct image_params *imgp) roundup(sizeof(canary), sizeof(char *)); copyout(canary, (void *)imgp->canary, sizeof(canary)); - /* If we have a valid auxargs ptr, prepare some room on the stack. */ + vectp = (uint32_t *)destp; if (imgp->auxargs) { /* - * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for - * lower compatibility. + * Allocate room on the stack for the ELF auxargs + * array. It has LINUX_AT_COUNT entries. */ - imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size : - (LINUX_AT_COUNT * 2); - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets,and imgp->auxarg_size is room - * for argument of Runtime loader. - */ - vectp = (u_int32_t *) (destp - (imgp->args->argc + - imgp->args->envc + 2 + imgp->auxarg_size) * - sizeof(u_int32_t)); - - } else { - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets - */ - vectp = (u_int32_t *)(destp - (imgp->args->argc + - imgp->args->envc + 2) * sizeof(u_int32_t)); + vectp -= howmany(LINUX_AT_COUNT * sizeof(Elf32_Auxinfo), + sizeof(*vectp)); } + + /* + * Allocate room for the argv[] and env vectors including the + * terminating NULL pointers. + */ + vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; /* vectp also becomes our initial stack base. */ stack_base = vectp; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Apr 19 15:52:45 2018 (r332781) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Apr 19 16:00:34 2018 (r332782) @@ -3180,33 +3180,21 @@ freebsd32_copyout_strings(struct image_params *imgp) destp -= ARG_MAX - imgp->args->stringspace; destp = rounddown2(destp, sizeof(uint32_t)); - /* - * If we have a valid auxargs ptr, prepare some room - * on the stack. - */ + vectp = (uint32_t *)destp; if (imgp->auxargs) { /* - * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for - * lower compatibility. + * Allocate room on the stack for the ELF auxargs + * array. It has up to AT_COUNT entries. */ - imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size - : (AT_COUNT * 2); - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets,and imgp->auxarg_size is room - * for argument of Runtime loader. - */ - vectp = (u_int32_t *) (destp - (imgp->args->argc + - imgp->args->envc + 2 + imgp->auxarg_size + execpath_len) * - sizeof(u_int32_t)); - } else { - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets - */ - vectp = (u_int32_t *)(destp - (imgp->args->argc + - imgp->args->envc + 2) * sizeof(u_int32_t)); + vectp -= howmany(AT_COUNT * sizeof(Elf32_Auxinfo), + sizeof(*vectp)); } + + /* + * Allocate room for the argv[] and env vectors including the + * terminating NULL pointers. + */ + vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; /* * vectp also becomes our initial stack base Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Thu Apr 19 15:52:45 2018 (r332781) +++ head/sys/i386/linux/linux_sysvec.c Thu Apr 19 16:00:34 2018 (r332782) @@ -309,29 +309,21 @@ linux_copyout_strings(struct image_params *imgp) roundup(sizeof(canary), sizeof(char *)); copyout(canary, (void *)imgp->canary, sizeof(canary)); - /* If we have a valid auxargs ptr, prepare some room on the stack. */ + vectp = (char **)destp; if (imgp->auxargs) { /* - * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for - * lower compatibility. + * Allocate room on the stack for the ELF auxargs + * array. It has LINUX_AT_COUNT entries. */ - imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size : - (LINUX_AT_COUNT * 2); - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets,and imgp->auxarg_size is room - * for argument of Runtime loader. - */ - vectp = (char **)(destp - (imgp->args->argc + - imgp->args->envc + 2 + imgp->auxarg_size) * sizeof(char *)); - } else { - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets - */ - vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc + 2) * - sizeof(char *)); + vectp -= howmany(LINUX_AT_COUNT * sizeof(Elf32_Auxinfo), + sizeof(*vectp)); } + + /* + * Allocate room for the argv[] and env vectors including the + * terminating NULL pointers. + */ + vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; /* vectp also becomes our initial stack base. */ stack_base = (register_t *)vectp; Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu Apr 19 15:52:45 2018 (r332781) +++ head/sys/kern/kern_exec.c Thu Apr 19 16:00:34 2018 (r332782) @@ -1537,33 +1537,21 @@ exec_copyout_strings(struct image_params *imgp) destp -= ARG_MAX - imgp->args->stringspace; destp = rounddown2(destp, sizeof(void *)); - /* - * If we have a valid auxargs ptr, prepare some room - * on the stack. - */ + vectp = (char **)destp; if (imgp->auxargs) { /* - * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for - * lower compatibility. + * Allocate room on the stack for the ELF auxargs + * array. It has up to AT_COUNT entries. */ - imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size : - (AT_COUNT * 2); - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets,and imgp->auxarg_size is room - * for argument of Runtime loader. - */ - vectp = (char **)(destp - (imgp->args->argc + - imgp->args->envc + 2 + imgp->auxarg_size) - * sizeof(char *)); - } else { - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets - */ - vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc - + 2) * sizeof(char *)); + vectp -= howmany(AT_COUNT * sizeof(Elf_Auxinfo), + sizeof(*vectp)); } + + /* + * Allocate room for the argv[] and env vectors including the + * terminating NULL pointers. + */ + vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; /* * vectp also becomes our initial stack base Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Thu Apr 19 15:52:45 2018 (r332781) +++ head/sys/sys/imgact.h Thu Apr 19 16:00:34 2018 (r332782) @@ -75,7 +75,6 @@ struct image_params { void *auxargs; /* ELF Auxinfo structure pointer */ struct sf_buf *firstpage; /* first page that we mapped */ unsigned long ps_strings; /* PS_STRINGS for BSD/OS binaries */ - size_t auxarg_size; struct image_args *args; /* system call arguments */ struct sysentvec *sysent; /* system entry vector */ char *execpath; From owner-svn-src-all@freebsd.org Thu Apr 19 16:05:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BDA5F88E7E; Thu, 19 Apr 2018 16:05:49 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE17375B33; Thu, 19 Apr 2018 16:05:48 +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 E3EDF405D; Thu, 19 Apr 2018 16:05:48 +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 w3JG5m2Q082635; Thu, 19 Apr 2018 16:05:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JG5mIY082634; Thu, 19 Apr 2018 16:05:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804191605.w3JG5mIY082634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 19 Apr 2018 16:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332783 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 332783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 16:05:49 -0000 Author: imp Date: Thu Apr 19 16:05:48 2018 New Revision: 332783 URL: https://svnweb.freebsd.org/changeset/base/332783 Log: Reword comment to remove awkward constructs, including an "it's" that shouldn't have been there at all (it wasn't a typo for its, rather a left-over from an older revision of the comment). Noticed by: many Modified: head/sys/dev/nvme/nvme_ns.c Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Thu Apr 19 16:00:34 2018 (r332782) +++ head/sys/dev/nvme/nvme_ns.c Thu Apr 19 16:05:48 2018 (r332783) @@ -506,10 +506,9 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t ns->stripesize = 0; /* - * Some Intel devices advertise an alignment that improves performance, - * but is in it's vendor specific space in the cdata. Use it for these - * drives, if present, to suggest a stripe size. Future versions of - * Intel hardware will use fields standardized in NVMe 1.3 for this. + * Older Intel devices advertise in vendor specific space an alignment + * that improves performance. If present use for the stripe size. NVMe + * 1.3 standardized this as NOIOB, and newer Intel drives use that. */ switch (pci_get_devid(ctrlr->dev)) { case 0x09538086: /* Intel DC PC3500 */ From owner-svn-src-all@freebsd.org Thu Apr 19 16:49:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33617F8C140; Thu, 19 Apr 2018 16:49:51 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 C87E282AD6; Thu, 19 Apr 2018 16:49:50 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id C7D555A9F12; Thu, 19 Apr 2018 16:49:43 +0000 (UTC) Date: Thu, 19 Apr 2018 16:49:43 +0000 From: Brooks Davis To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332782 - in head/sys: amd64/linux amd64/linux32 compat/freebsd32 i386/linux kern sys Message-ID: <20180419164943.GA84360@spindle.one-eyed-alien.net> References: <201804191600.w3JG0Y0w077991@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <201804191600.w3JG0Y0w077991@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 16:49:51 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 19, 2018 at 04:00:34PM +0000, John Baldwin wrote: > Author: jhb > Date: Thu Apr 19 16:00:34 2018 > New Revision: 332782 > URL: https://svnweb.freebsd.org/changeset/base/332782 >=20 > Log: > Simplify the code to allocate stack for auxv, argv[], and environment v= ectors. > =20 > Remove auxarg_size as it was only used once right after a confusing > assignment in each of the variants of exec_copyout_strings(). Thanks! I just tripped over auxarg_size's confusing nature in CheriBSD. I do wonder if allocating AT_COUNT entries is quite right since some are emitted only optionally. That said, it's not as though the waste is significant. -- Brooks --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJa2MinAAoJEKzQXbSebgfAqncH/1QJGadgYQpo58lkuhbLSgJS LWlPZVVr7vn5+rAOhsODmYaXpJib1Ylukn5ik0yse4YSx8mLoEAIK9ewf7E2Wr67 hnRFeK6SwXFNi2TqqS+mdv/YQ92LrOx57TDywD5dKqTma2sHSwe28NAAICVm4WZG oUuS7NgDYzckQtnJxWqp7tuZsTbzofwMwH5CkzhNmBMj3QAmT60oEqvBFLe55rLE VPqPb1rW8xCiMJIeXLCeynb50YRjAMlZcvKtnFHDVAP+eV0x8fzQqQUPGM3Kp1hX zmsDdeGsPtFN9hNT/yq6Ea1HnpAldoNmfdRyvBSRh0qa7ny92tdIuQlkoIn05N4= =JyDk -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU-- From owner-svn-src-all@freebsd.org Thu Apr 19 17:19:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42392F8E328; Thu, 19 Apr 2018 17:19: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E701368B04; Thu, 19 Apr 2018 17:19: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 E1F1F4BA2; Thu, 19 Apr 2018 17:19: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 w3JHJCnQ018682; Thu, 19 Apr 2018 17:19:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JHJC7b018681; Thu, 19 Apr 2018 17:19:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804191719.w3JHJC7b018681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 19 Apr 2018 17:19: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: r332784 - 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: 332784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 17:19:13 -0000 Author: gjb Date: Thu Apr 19 17:19:12 2018 New Revision: 332784 URL: https://svnweb.freebsd.org/changeset/base/332784 Log: Use 'literal' tags around compiler-rt, as it is a library, not an application. Submitted by: dim 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 Thu Apr 19 16:05:48 2018 (r332783) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Apr 19 17:19:12 2018 (r332784) @@ -374,7 +374,7 @@ llvm, lld, lldb, and - compiler-rt utilities as well as + compiler-rt utilities as well as libc++ have been updated to upstream version 6.0.0. From owner-svn-src-all@freebsd.org Thu Apr 19 17:55:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFE25F911F7; Thu, 19 Apr 2018 17:55: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93B576FC28; Thu, 19 Apr 2018 17:55: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 8EA8A51FE; Thu, 19 Apr 2018 17:55:49 +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 w3JHtnwP038974; Thu, 19 Apr 2018 17:55:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JHtnAg038971; Thu, 19 Apr 2018 17:55:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201804191755.w3JHtnAg038971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 19 Apr 2018 17:55: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: r332785 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 332785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 17:55:50 -0000 Author: mav Date: Thu Apr 19 17:55:48 2018 New Revision: 332785 URL: https://svnweb.freebsd.org/changeset/base/332785 Log: MFC r332523: 9433 Fix ARC hit rate When the compressed ARC feature was added in commit d3c2ae1 the method of reference counting in the ARC was modified. As part of this accounting change the arc_buf_add_ref() function was removed entirely. This would have be fine but the arc_buf_add_ref() function served a second undocumented purpose of updating the ARC access information when taking a hold on a dbuf. Without this logic in place a cached dbuf would not migrate its associated arc_buf_hdr_t to the MFU list. This would negatively impact the ARC hit rate, particularly on systems with a small ARC. This change reinstates the missing call to arc_access() from dbuf_hold() by implementing a new arc_buf_access() function. Reviewed-by: Giuseppe Di Natale Reviewed-by: Tony Hutter Reviewed-by: Tim Chase Reviewed by: George Wilson Reviewed-by: George Melikov Signed-off-by: Brian Behlendorf Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Apr 19 17:19:12 2018 (r332784) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Apr 19 17:55:48 2018 (r332785) @@ -540,8 +540,13 @@ typedef struct arc_stats { */ kstat_named_t arcstat_mutex_miss; /* + * Number of buffers skipped when updating the access state due to the + * header having already been released after acquiring the hash lock. + */ + kstat_named_t arcstat_access_skip; + /* * Number of buffers skipped because they have I/O in progress, are - * indrect prefetch buffers that have not lived long enough, or are + * indirect prefetch buffers that have not lived long enough, or are * not from the spa we're trying to evict from. */ kstat_named_t arcstat_evict_skip; @@ -796,6 +801,7 @@ static arc_stats_t arc_stats = { { "allocated", KSTAT_DATA_UINT64 }, { "deleted", KSTAT_DATA_UINT64 }, { "mutex_miss", KSTAT_DATA_UINT64 }, + { "access_skip", KSTAT_DATA_UINT64 }, { "evict_skip", KSTAT_DATA_UINT64 }, { "evict_not_enough", KSTAT_DATA_UINT64 }, { "evict_l2_cached", KSTAT_DATA_UINT64 }, @@ -5082,6 +5088,51 @@ arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) } else { ASSERT(!"invalid arc state"); } +} + +/* + * This routine is called by dbuf_hold() to update the arc_access() state + * which otherwise would be skipped for entries in the dbuf cache. + */ +void +arc_buf_access(arc_buf_t *buf) +{ + mutex_enter(&buf->b_evict_lock); + arc_buf_hdr_t *hdr = buf->b_hdr; + + /* + * Avoid taking the hash_lock when possible as an optimization. + * The header must be checked again under the hash_lock in order + * to handle the case where it is concurrently being released. + */ + if (hdr->b_l1hdr.b_state == arc_anon || HDR_EMPTY(hdr)) { + mutex_exit(&buf->b_evict_lock); + ARCSTAT_BUMP(arcstat_access_skip); + return; + } + + kmutex_t *hash_lock = HDR_LOCK(hdr); + mutex_enter(hash_lock); + + if (hdr->b_l1hdr.b_state == arc_anon || HDR_EMPTY(hdr)) { + mutex_exit(hash_lock); + mutex_exit(&buf->b_evict_lock); + ARCSTAT_BUMP(arcstat_access_skip); + return; + } + + mutex_exit(&buf->b_evict_lock); + + ASSERT(hdr->b_l1hdr.b_state == arc_mru || + hdr->b_l1hdr.b_state == arc_mfu); + + DTRACE_PROBE1(arc__hit, arc_buf_hdr_t *, hdr); + arc_access(hdr, hash_lock); + mutex_exit(hash_lock); + + ARCSTAT_BUMP(arcstat_hits); + ARCSTAT_CONDSTAT(!HDR_PREFETCH(hdr), + demand, prefetch, !HDR_ISTYPE_METADATA(hdr), data, metadata, hits); } /* a generic arc_done_func_t which you can use */ Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Apr 19 17:19:12 2018 (r332784) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Apr 19 17:55:48 2018 (r332785) @@ -2579,8 +2579,10 @@ top: return (SET_ERROR(ENOENT)); } - if (db->db_buf != NULL) + if (db->db_buf != NULL) { + arc_buf_access(db->db_buf); ASSERT3P(db->db.db_data, ==, db->db_buf->b_data); + } ASSERT(db->db_buf == NULL || arc_referenced(db->db_buf)); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Thu Apr 19 17:19:12 2018 (r332784) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Thu Apr 19 17:55:48 2018 (r332785) @@ -169,6 +169,7 @@ void arc_loan_inuse_buf(arc_buf_t *buf, void *tag); void arc_buf_destroy(arc_buf_t *buf, void *tag); int arc_buf_size(arc_buf_t *buf); int arc_buf_lsize(arc_buf_t *buf); +void arc_buf_access(arc_buf_t *buf); void arc_release(arc_buf_t *buf, void *tag); int arc_released(arc_buf_t *buf); void arc_buf_freeze(arc_buf_t *buf); From owner-svn-src-all@freebsd.org Thu Apr 19 18:08:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1D83F92115; Thu, 19 Apr 2018 18:08:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95A98744AA; Thu, 19 Apr 2018 18:08: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 8BC0253AE; Thu, 19 Apr 2018 18:08: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 w3JI8kla043864; Thu, 19 Apr 2018 18:08:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JI8k1M043863; Thu, 19 Apr 2018 18:08:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201804191808.w3JI8k1M043863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Apr 2018 18:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332786 - head/sys/i386/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/include X-SVN-Commit-Revision: 332786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 18:08:47 -0000 Author: kib Date: Thu Apr 19 18:08:46 2018 New Revision: 332786 URL: https://svnweb.freebsd.org/changeset/base/332786 Log: Use symbolic constant, explaining the operation. Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/include/asmacros.h Modified: head/sys/i386/include/asmacros.h ============================================================================== --- head/sys/i386/include/asmacros.h Thu Apr 19 17:55:48 2018 (r332785) +++ head/sys/i386/include/asmacros.h Thu Apr 19 18:08:46 2018 (r332786) @@ -190,7 +190,7 @@ movl $TF_SZ, %ecx testl $PSL_VM, TF_EFLAGS(%esp) jz 1001f - addl $(4*4), %ecx + addl $VM86_STACK_SPACE, %ecx 1001: subl %ecx, %edx movl %edx, %edi movl %esp, %esi From owner-svn-src-all@freebsd.org Thu Apr 19 18:10:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5F40F92545; Thu, 19 Apr 2018 18:10:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59EDA751A1; Thu, 19 Apr 2018 18:10:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54DCE53C1; Thu, 19 Apr 2018 18:10:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JIAjUQ044076; Thu, 19 Apr 2018 18:10:45 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JIAjub044074; Thu, 19 Apr 2018 18:10:45 GMT (envelope-from np@FreeBSD.org) Message-Id: <201804191810.w3JIAjub044074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 19 Apr 2018 18:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332787 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 332787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 18:10:45 -0000 Author: np Date: Thu Apr 19 18:10:44 2018 New Revision: 332787 URL: https://svnweb.freebsd.org/changeset/base/332787 Log: cxgbe(4): Fix bugs in the handling of COP rules that match on VLAN tag. Retrieve the tag from the correct ifnet and use the provided tag (instead of hardcoded 0xffff, implying no tag) in the routines that process offload policy. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Thu Apr 19 18:08:46 2018 (r332786) +++ head/sys/dev/cxgbe/tom/t4_connect.c Thu Apr 19 18:10:44 2018 (r332787) @@ -405,7 +405,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru struct ifnet *ifp = VLAN_COOKIE(rt_ifp); vi = ifp->if_softc; - VLAN_TAG(ifp, &vid); + VLAN_TAG(rt_ifp, &vid); } else if (rt_ifp->if_type == IFT_IEEE8023ADLAG) DONT_OFFLOAD_ACTIVE_OPEN(ENOSYS); /* XXX: implement lagg+TOE */ else Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Thu Apr 19 18:08:46 2018 (r332786) +++ head/sys/dev/cxgbe/tom/t4_tom.c Thu Apr 19 18:10:44 2018 (r332787) @@ -1234,7 +1234,7 @@ lookup_offload_policy(struct adapter *sc, int open_typ switch (open_type) { case OPEN_TYPE_ACTIVE: case OPEN_TYPE_LISTEN: - pkt = prepare_pkt(open_type, 0xffff, inp, &pktlen, &buflen); + pkt = prepare_pkt(open_type, vtag, inp, &pktlen, &buflen); break; case OPEN_TYPE_PASSIVE: MPASS(m != NULL); From owner-svn-src-all@freebsd.org Thu Apr 19 18:34:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E955DF94598; Thu, 19 Apr 2018 18:34:38 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96AF878CD4; Thu, 19 Apr 2018 18:34:38 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77A0E5887; Thu, 19 Apr 2018 18:34:38 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JIYcdc059560; Thu, 19 Apr 2018 18:34:38 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JIYcLx059559; Thu, 19 Apr 2018 18:34:38 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201804191834.w3JIYcLx059559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 19 Apr 2018 18:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332788 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 332788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 18:34:39 -0000 Author: nwhitehorn Date: Thu Apr 19 18:34:38 2018 New Revision: 332788 URL: https://svnweb.freebsd.org/changeset/base/332788 Log: Fix detection of memory overlap with the kernel in the case where a memory region marked "available" by firmware is contained entirely in the kernel. This had a tendency to happen with FDTs passed by loader, though could for other reasons as well, and would result in the kernel slowly cannibalizing itself for other purposes, eventually resulting in a crash. A similar fix is needed for mmu_oea.c and should probably just be rolled at that point into some generic code in platform.c for taking a mem_region list and removing chunks. PR: 226974 Submitted by: leandro.lupori@gmail.com Reviewed by: jhibbits Differential Revision: D15121 Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Apr 19 18:10:44 2018 (r332787) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Apr 19 18:34:38 2018 (r332788) @@ -695,12 +695,27 @@ moea64_setup_direct_map(mmu_t mmup, vm_offset_t kernel unmapped_buf_allowed = hw_direct_map; } +/* Quick sort callout for comparing physical addresses. */ +static int +pa_cmp(const void *a, const void *b) +{ + const vm_paddr_t *pa = a, *pb = b; + + if (*pa < *pb) + return (-1); + else if (*pa > *pb) + return (1); + else + return (0); +} + void moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) { int i, j; vm_size_t physsz, hwphyssz; vm_paddr_t kernelphysstart, kernelphysend; + int rm_pavail; #ifndef __powerpc64__ /* We don't have a direct map since there is no BAT */ @@ -763,10 +778,18 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernels } /* Check for overlap with the kernel and exception vectors */ + rm_pavail = 0; for (j = 0; j < 2*phys_avail_count; j+=2) { if (phys_avail[j] < EXC_LAST) phys_avail[j] += EXC_LAST; + if (phys_avail[j] >= kernelphysstart && + phys_avail[j+1] <= kernelphysend) { + phys_avail[j] = phys_avail[j+1] = ~0; + rm_pavail++; + continue; + } + if (kernelphysstart >= phys_avail[j] && kernelphysstart < phys_avail[j+1]) { if (kernelphysend < phys_avail[j+1]) { @@ -792,6 +815,16 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernels phys_avail[j] = (kernelphysend & ~PAGE_MASK) + PAGE_SIZE; } + } + + /* Remove physical available regions marked for removal (~0) */ + if (rm_pavail) { + qsort(phys_avail, 2*phys_avail_count, sizeof(phys_avail[0]), + pa_cmp); + phys_avail_count -= rm_pavail; + for (i = 2*phys_avail_count; + i < 2*(phys_avail_count + rm_pavail); i+=2) + phys_avail[i] = phys_avail[i+1] = 0; } physmem = btoc(physsz); From owner-svn-src-all@freebsd.org Thu Apr 19 20:25:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 755BCF9F149; Thu, 19 Apr 2018 20:25: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 291E875603; Thu, 19 Apr 2018 20:25: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 242BC6A42; Thu, 19 Apr 2018 20:25: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 w3JKPK9t014425; Thu, 19 Apr 2018 20:25:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JKPKPx014424; Thu, 19 Apr 2018 20:25:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804192025.w3JKPKPx014424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 19 Apr 2018 20:25:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332789 - head/usr.sbin/pwd_mkdb X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/pwd_mkdb X-SVN-Commit-Revision: 332789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 20:25:20 -0000 Author: emaste Date: Thu Apr 19 20:25:19 2018 New Revision: 332789 URL: https://svnweb.freebsd.org/changeset/base/332789 Log: pwd_mkdb: warn that legacy support is deprecated (if specified) r283981 switched pwd_mkdb to emit only v4 database entries by default, and introduced a -l (legacy) option emit v3 entries in addition. The commit message claims that legacy support will be removed in 12.0, so emit a warning now if it is used. Modified: head/usr.sbin/pwd_mkdb/pwd_mkdb.c Modified: head/usr.sbin/pwd_mkdb/pwd_mkdb.c ============================================================================== --- head/usr.sbin/pwd_mkdb/pwd_mkdb.c Thu Apr 19 18:34:38 2018 (r332788) +++ head/usr.sbin/pwd_mkdb/pwd_mkdb.c Thu Apr 19 20:25:19 2018 (r332789) @@ -166,6 +166,8 @@ main(int argc, char *argv[]) if (argc != 1 || (username && (*username == '+' || *username == '-'))) usage(); + if (lflag) + warnx("legacy (v3) database format support is deprecated"); /* * This could be changed to allow the user to interrupt. From owner-svn-src-all@freebsd.org Thu Apr 19 20:30:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60975F9F85C; Thu, 19 Apr 2018 20:30:34 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1642F75A7F; Thu, 19 Apr 2018 20:30:34 +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 113E86B20; Thu, 19 Apr 2018 20:30:34 +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 w3JKUXLI014808; Thu, 19 Apr 2018 20:30:33 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JKUXGD014807; Thu, 19 Apr 2018 20:30:33 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201804192030.w3JKUXGD014807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 19 Apr 2018 20:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332790 - 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: 332790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 20:30:34 -0000 Author: rmacklem Date: Thu Apr 19 20:30:33 2018 New Revision: 332790 URL: https://svnweb.freebsd.org/changeset/base/332790 Log: Fix OpenDowngrade for NFSv4.1 if a client sets the OPEN_SHARE_ACCESS_WANT* bits. The NFSv4.1 RFC specifies that the OPEN_SHARE_ACCESS_WANT bits can be set in the OpenDowngrade share_access argument and are basically ignored. I do not know of a extant NFSv4.1 client that does this, but this little patch fixes it just in case. It also changes the error from NFSERR_BADXDR to NFSERR_INVAL since the NFSv4.1 RFC specifies this as the error to be returned if bogus bits are set. (The NFSv4.0 RFC didn't specify any error for this, so the error reply can be changed for NFSv4.0 as well.) Found by inspection while looking at a problem with OpenDowngrade reported for the ESXi 6.5 NFSv4.1 client. Reported by: andreas.nagy@frequentis.com PR: 227214 MFC after: 1 week Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Thu Apr 19 20:25:19 2018 (r332789) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Thu Apr 19 20:30:33 2018 (r332790) @@ -3237,6 +3237,8 @@ nfsrvd_opendowngrade(struct nfsrv_descript *nd, __unus tl += (NFSX_STATEIDOTHER / NFSX_UNSIGNED); stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++); i = fxdr_unsigned(int, *tl++); + if ((nd->nd_flag & ND_NFSV41) != 0) + i &= ~NFSV4OPEN_WANTDELEGMASK; switch (i) { case NFSV4OPEN_ACCESSREAD: stp->ls_flags = (NFSLCK_READACCESS | NFSLCK_DOWNGRADE); @@ -3249,7 +3251,7 @@ nfsrvd_opendowngrade(struct nfsrv_descript *nd, __unus NFSLCK_DOWNGRADE); break; default: - nd->nd_repstat = NFSERR_BADXDR; + nd->nd_repstat = NFSERR_INVAL; } i = fxdr_unsigned(int, *tl); switch (i) { @@ -3265,7 +3267,7 @@ nfsrvd_opendowngrade(struct nfsrv_descript *nd, __unus stp->ls_flags |= (NFSLCK_READDENY | NFSLCK_WRITEDENY); break; default: - nd->nd_repstat = NFSERR_BADXDR; + nd->nd_repstat = NFSERR_INVAL; } clientid.lval[0] = stp->ls_stateid.other[0]; From owner-svn-src-all@freebsd.org Thu Apr 19 20:31:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBFA0F9FC39; Thu, 19 Apr 2018 20:31:53 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54FF576726; Thu, 19 Apr 2018 20:31:53 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 373716B9B; Thu, 19 Apr 2018 20:31:53 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JKVrZl019042; Thu, 19 Apr 2018 20:31:53 GMT (envelope-from markm@FreeBSD.org) Received: (from markm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JKVrXl019041; Thu, 19 Apr 2018 20:31:53 GMT (envelope-from markm@FreeBSD.org) Message-Id: <201804192031.w3JKVrXl019041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markm set sender to markm@FreeBSD.org using -f From: Mark Murray Date: Thu, 19 Apr 2018 20:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332791 - head/sys/modules/random X-SVN-Group: head X-SVN-Commit-Author: markm X-SVN-Commit-Paths: head/sys/modules/random X-SVN-Commit-Revision: 332791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 20:31:54 -0000 Author: markm Date: Thu Apr 19 20:31:52 2018 New Revision: 332791 URL: https://svnweb.freebsd.org/changeset/base/332791 Log: Remove empty dir no longer required. Reported by: Jung-uk Kim Deleted: head/sys/modules/random/ From owner-svn-src-all@freebsd.org Thu Apr 19 20:36:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C54A1FA0208; Thu, 19 Apr 2018 20:36:16 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70D9B78773; Thu, 19 Apr 2018 20:36:16 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BC646BE2; Thu, 19 Apr 2018 20:36:16 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JKaGm7019968; Thu, 19 Apr 2018 20:36:16 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JKaFEp019960; Thu, 19 Apr 2018 20:36:15 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804192036.w3JKaFEp019960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 19 Apr 2018 20:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332792 - in head/lib: libc/riscv libc/riscv/gen msun/riscv X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/lib: libc/riscv libc/riscv/gen msun/riscv X-SVN-Commit-Revision: 332792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 20:36:17 -0000 Author: brooks Date: Thu Apr 19 20:36:15 2018 New Revision: 332792 URL: https://svnweb.freebsd.org/changeset/base/332792 Log: Replace SOFTFLOAT with __riscv_float_abi_*. With SOFTFLOAT, libc and libm were built correctly, but any program including fenv.h itself assumed it was on a hardfloat systen and emitted inline fpu instructions for fedisableexcept() and friends. Unlike r315424 which did this for MIPS, I've used riscv_float_abi_soft and riscv_float_abi_double macros as appropriate rather than using __riscv_float_abi_soft exclusively. This ensures that attempts to use an unsupported hardfloat ABI will fail. Reviewed by: br Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10039 Modified: head/lib/libc/riscv/Makefile.inc head/lib/libc/riscv/gen/_setjmp.S head/lib/libc/riscv/gen/fabs.S head/lib/libc/riscv/gen/flt_rounds.c head/lib/libc/riscv/gen/setjmp.S head/lib/msun/riscv/Makefile.inc head/lib/msun/riscv/fenv.c head/lib/msun/riscv/fenv.h Modified: head/lib/libc/riscv/Makefile.inc ============================================================================== --- head/lib/libc/riscv/Makefile.inc Thu Apr 19 20:31:52 2018 (r332791) +++ head/lib/libc/riscv/Makefile.inc Thu Apr 19 20:36:15 2018 (r332792) @@ -3,10 +3,6 @@ # Machine dependent definitions for the RISC-V architecture. # -.if ${MACHINE_ARCH:Mriscv*sf} != "" -CFLAGS+=-DSOFTFLOAT -.endif - # Long double is quad precision GDTOASRCS+=strtorQ.c SRCS+=machdep_ldisQ.c Modified: head/lib/libc/riscv/gen/_setjmp.S ============================================================================== --- head/lib/libc/riscv/gen/_setjmp.S Thu Apr 19 20:31:52 2018 (r332791) +++ head/lib/libc/riscv/gen/_setjmp.S Thu Apr 19 20:36:15 2018 (r332792) @@ -61,7 +61,7 @@ ENTRY(_setjmp) sd ra, (12 * 8)(a0) addi a0, a0, (13 * 8) -#if !defined(_STANDALONE) && !defined(SOFTFLOAT) +#if !defined(_STANDALONE) && defined(__riscv_float_abi_double) /* Store the fpe registers */ fsd fs0, (0 * 16)(a0) fsd fs1, (1 * 16)(a0) @@ -114,7 +114,7 @@ ENTRY(_longjmp) ld ra, (12 * 8)(a0) addi a0, a0, (13 * 8) -#if !defined(_STANDALONE) && !defined(SOFTFLOAT) +#if !defined(_STANDALONE) && defined(__riscv_float_abi_double) /* Restore the fpe registers */ fld fs0, (0 * 16)(a0) fld fs1, (1 * 16)(a0) Modified: head/lib/libc/riscv/gen/fabs.S ============================================================================== --- head/lib/libc/riscv/gen/fabs.S Thu Apr 19 20:31:52 2018 (r332791) +++ head/lib/libc/riscv/gen/fabs.S Thu Apr 19 20:36:15 2018 (r332792) @@ -35,7 +35,7 @@ #include __FBSDID("$FreeBSD$"); -#ifndef SOFTFLOAT +#ifdef __riscv_float_abi_double ENTRY(fabs) fabs.d fa0, fa0 ret Modified: head/lib/libc/riscv/gen/flt_rounds.c ============================================================================== --- head/lib/libc/riscv/gen/flt_rounds.c Thu Apr 19 20:31:52 2018 (r332791) +++ head/lib/libc/riscv/gen/flt_rounds.c Thu Apr 19 20:36:15 2018 (r332792) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef SOFTFLOAT +#ifdef __riscv_float_abi_soft #include "softfloat-for-gcc.h" #include "milieu.h" #include "softfloat.h" @@ -51,7 +51,7 @@ __flt_rounds(void) { uint64_t mode; -#ifdef SOFTFLOAT +#ifdef __riscv_float_abi_soft mode = __softfloat_float_rounding_mode; #else __asm __volatile("csrr %0, fcsr" : "=r" (mode)); Modified: head/lib/libc/riscv/gen/setjmp.S ============================================================================== --- head/lib/libc/riscv/gen/setjmp.S Thu Apr 19 20:31:52 2018 (r332791) +++ head/lib/libc/riscv/gen/setjmp.S Thu Apr 19 20:36:15 2018 (r332792) @@ -75,7 +75,7 @@ ENTRY(setjmp) sd ra, (12 * 8)(a0) addi a0, a0, (13 * 8) -#ifndef SOFTFLOAT +#ifdef __riscv_float_abi_double /* Store the fpe registers */ fsd fs0, (0 * 16)(a0) fsd fs1, (1 * 16)(a0) @@ -144,7 +144,7 @@ ENTRY(longjmp) ld ra, (12 * 8)(a0) addi a0, a0, (13 * 8) -#ifndef SOFTFLOAT +#ifdef __riscv_float_abi_double /* Restore the fpe registers */ fld fs0, (0 * 16)(a0) fld fs1, (1 * 16)(a0) Modified: head/lib/msun/riscv/Makefile.inc ============================================================================== --- head/lib/msun/riscv/Makefile.inc Thu Apr 19 20:31:52 2018 (r332791) +++ head/lib/msun/riscv/Makefile.inc Thu Apr 19 20:36:15 2018 (r332792) @@ -1,8 +1,4 @@ # $FreeBSD$ -.if ${MACHINE_ARCH:Mriscv*sf} != "" -CFLAGS+=-DSOFTFLOAT -.endif - LDBL_PREC = 113 SYM_MAPS += ${.CURDIR}/riscv/Symbol.map Modified: head/lib/msun/riscv/fenv.c ============================================================================== --- head/lib/msun/riscv/fenv.c Thu Apr 19 20:31:52 2018 (r332791) +++ head/lib/msun/riscv/fenv.c Thu Apr 19 20:36:15 2018 (r332792) @@ -39,7 +39,7 @@ */ const fenv_t __fe_dfl_env = 0; -#ifdef SOFTFLOAT +#ifdef __riscv_float_abi_soft #define __set_env(env, flags, mask, rnd) env = ((flags) | (rnd) << 5) #define __env_flags(env) ((env) & FE_ALL_EXCEPT) #define __env_mask(env) (0) /* No exception traps. */ Modified: head/lib/msun/riscv/fenv.h ============================================================================== --- head/lib/msun/riscv/fenv.h Thu Apr 19 20:31:52 2018 (r332791) +++ head/lib/msun/riscv/fenv.h Thu Apr 19 20:36:15 2018 (r332792) @@ -73,12 +73,20 @@ __BEGIN_DECLS extern const fenv_t __fe_dfl_env; #define FE_DFL_ENV (&__fe_dfl_env) -#ifndef SOFTFLOAT +#if !defined(__riscv_float_abi_soft) && !defined(__riscv_float_abi_double) +#if defined(__riscv_float_abi_single) +#error single precision floating point ABI not supported +#else +#error compiler did not set soft/hard float macros +#endif +#endif + +#ifndef __riscv_float_abi_soft #define __rfs(__fcsr) __asm __volatile("csrr %0, fcsr" : "=r" (__fcsr)) #define __wfs(__fcsr) __asm __volatile("csrw fcsr, %0" :: "r" (__fcsr)) #endif -#ifdef SOFTFLOAT +#ifdef __riscv_float_abi_soft int feclearexcept(int __excepts); int fegetexceptflag(fexcept_t *__flagp, int __excepts); int fesetexceptflag(const fexcept_t *__flagp, int __excepts); @@ -206,13 +214,13 @@ feupdateenv(const fenv_t *__envp) return (0); } -#endif /* !SOFTFLOAT */ +#endif /* !__riscv_float_abi_soft */ #if __BSD_VISIBLE /* We currently provide no external definitions of the functions below. */ -#ifdef SOFTFLOAT +#ifdef __riscv_float_abi_soft int feenableexcept(int __mask); int fedisableexcept(int __mask); int fegetexcept(void); @@ -243,7 +251,7 @@ fegetexcept(void) return (0); } -#endif /* !SOFTFLOAT */ +#endif /* !__riscv_float_abi_soft */ #endif /* __BSD_VISIBLE */ From owner-svn-src-all@freebsd.org Thu Apr 19 20:50:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5263DFA1370; Thu, 19 Apr 2018 20:50:09 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA1C07BB30; Thu, 19 Apr 2018 20:50:08 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x232.google.com with SMTP id c26-v6so8183011iob.3; Thu, 19 Apr 2018 13:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Od2Dxp8OW9CEIDSgPs+z/Je+zESh5m2wSN7fUklZtwM=; b=ds14S+pPlm7SDf00WwXp6O3WvdVlvCpb5bv36g47F8T1NNb32xaJHGwrf6OLjusRxe fyERWygQ+KI2BHfqSUPAph4c7mIZef4fhzUSVqsJ5KAARrMNiAlnnEb/FbeY8wP7JmU8 D5oda0mdkuhxabci4pCS3WcC4E7CNy5bsFXCuqv+fUu7mVTr7wtlzgW3vdJcK9ps4oFT t4HecIemov23zrzPk3eMDdVTQB4t0E3jkBy5fNBeHY+YxzLs5gI0+b/yxpnOjDdzmfLv RgYiDkPF8HJMIwllCQsVNrwOM0/IU7OcviKKR0EHfKCWogGrGkDoeylIjP+X3g9IvLxP +59Q== 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:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Od2Dxp8OW9CEIDSgPs+z/Je+zESh5m2wSN7fUklZtwM=; b=TNhbFjpiBp3/ZI1RSvpKuPnxYFGDAOwxWw0AlWvcWYKIqOJdDvQ3IVZG32EH2wqCB9 52pUF+d/VsGXJorH3zyZZXdkZVfAq0uhhcp/MgOiz6XIh2FbOaPtVDF3UxXw6s/hQnOi Ys5aq2fnzjhJbDjTRSxNDcpzdX16egTcDdu97LJjhHtnB6cGIcoTKC06zGoCPpulygSL DHJUgMnByfS7N8/Kyli/i6jo9zpf2HN692eOxAVV33QJvDUzRgeZf2VxjcWdngCyJqhv JkCnqyfXfjbUjLKqryiDGiy4DPWW8Ky6EncwVo4usyqvx0S6CM4b2BfiIF8hpE8nE0oP xMmg== X-Gm-Message-State: ALQs6tBaR3GH6msIXRfrmeTtLhqOcs+0H2ta76+gjzM4v/PUidpr1jAI gMuDn1Z/0bbIMkyFuqpBu1RHKX/4d5ugGVpw8lSNOA== X-Google-Smtp-Source: AB8JxZo5aAPYS3DHnPLqdqV8yp/syJa2I4v5/FVLFPO10qTCKDbiNSgi2yWD65t6R93h+DN7QtdbZSCqUqSBxpU4M/M= X-Received: by 2002:a6b:2c9:: with SMTP id 192-v6mr7647889ioc.294.1524171007799; Thu, 19 Apr 2018 13:50:07 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.130.167 with HTTP; Thu, 19 Apr 2018 13:49:47 -0700 (PDT) In-Reply-To: <20180419164943.GA84360@spindle.one-eyed-alien.net> References: <201804191600.w3JG0Y0w077991@repo.freebsd.org> <20180419164943.GA84360@spindle.one-eyed-alien.net> From: Ed Maste Date: Thu, 19 Apr 2018 16:49:47 -0400 X-Google-Sender-Auth: gLcD3adlFpL5Hm2xA_ErBh4mdPE Message-ID: Subject: Re: svn commit: r332782 - in head/sys: amd64/linux amd64/linux32 compat/freebsd32 i386/linux kern sys To: Brooks Davis Cc: John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 20:50:09 -0000 On 19 April 2018 at 12:49, Brooks Davis wrote: > > I do wonder if allocating AT_COUNT entries is quite right since some are > emitted only optionally. That said, it's not as though the waste is > significant. I think it's only a minor concern and not worth worrying about too much, but John and I recently discussed the relationship between sv_copyout_strings and sv_fixup and some more rework in this area could address this too. From owner-svn-src-all@freebsd.org Thu Apr 19 20:58:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8A3BFA1DFE; Thu, 19 Apr 2018 20:58:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 683BE7DA0C; Thu, 19 Apr 2018 20:58:10 +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 633CA6F10; Thu, 19 Apr 2018 20:58:10 +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 w3JKwAHU030359; Thu, 19 Apr 2018 20:58:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JKwAMS030357; Thu, 19 Apr 2018 20:58:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804192058.w3JKwAMS030357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 19 Apr 2018 20:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332794 - in head: share/mk stand/i386 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: share/mk stand/i386 X-SVN-Commit-Revision: 332794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 20:58:10 -0000 Author: emaste Date: Thu Apr 19 20:58:09 2018 New Revision: 332794 URL: https://svnweb.freebsd.org/changeset/base/332794 Log: Add support for linker-type-specific flags r332090 added a LINKER_TYPE test to add the --no-rosegment flag when linking the i386 loader components with lld. Instead, introduce a general mechanism for setting LDFLAGS for a specific linker type, and use it for --no-rosegment. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14998 Modified: head/share/mk/bsd.sys.mk head/stand/i386/Makefile.inc Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Thu Apr 19 20:47:53 2018 (r332793) +++ head/share/mk/bsd.sys.mk Thu Apr 19 20:58:09 2018 (r332794) @@ -226,6 +226,8 @@ ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}} CFLAGS+= ${CFLAGS.${.IMPSRC:T}} CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} +LDFLAGS+= ${LDFLAGS.${LINKER_TYPE}} + .if defined(SRCTOP) # Prevent rebuilding during install to support read-only objdirs. .if ${.TARGETS:M*install*} == ${.TARGETS} && empty(.MAKE.MODE:Mmeta) Modified: head/stand/i386/Makefile.inc ============================================================================== --- head/stand/i386/Makefile.inc Thu Apr 19 20:47:53 2018 (r332793) +++ head/stand/i386/Makefile.inc Thu Apr 19 20:58:09 2018 (r332794) @@ -2,13 +2,9 @@ # # $FreeBSD$ -.sinclude - LOADER_ADDRESS?=0x200000 LDFLAGS+= -nostdlib -.if defined(LINKER_TYPE) && ${LINKER_TYPE} == "lld" -LDFLAGS+= -Wl,--no-rosegment -.endif +LDFLAGS.lld+= -Wl,--no-rosegment # BTX components BTXDIR= ${BOOTOBJ}/i386/btx From owner-svn-src-all@freebsd.org Thu Apr 19 21:53:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86EDEFA5FEC; Thu, 19 Apr 2018 21:53:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 390268A24E; Thu, 19 Apr 2018 21:53:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33EFD78EC; Thu, 19 Apr 2018 21:53:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3JLrwpH060202; Thu, 19 Apr 2018 21:53:58 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JLrvU7060198; Thu, 19 Apr 2018 21:53:57 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201804192153.w3JLrvU7060198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 19 Apr 2018 21:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332796 - head/tools/tools/sortbench X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/tools/tools/sortbench X-SVN-Commit-Revision: 332796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 21:53:58 -0000 Author: brooks Date: Thu Apr 19 21:53:57 2018 New Revision: 332796 URL: https://svnweb.freebsd.org/changeset/base/332796 Log: Add sortbench. This is a set of benchmarks of qsort, mergesort, heapsort, and optionally wikisort and a script to run them. Submitted by: Miles Fertel Sponsored by: Google Summer of Code 2017 Differential Revision: https://reviews.freebsd.org/D12677 Added: head/tools/tools/sortbench/ head/tools/tools/sortbench/Makefile (contents, props changed) head/tools/tools/sortbench/README (contents, props changed) head/tools/tools/sortbench/bench.py (contents, props changed) head/tools/tools/sortbench/sort_bench.c (contents, props changed) Added: head/tools/tools/sortbench/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/sortbench/Makefile Thu Apr 19 21:53:57 2018 (r332796) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +PROG= sort_bench +MAN= + +LIBADD= m + +.ifdef WITH_WIKISORT +CFLAGS= -I${SRCTOP}/lib/libc -DWIKI +.endif + +CLEANDIRS= stats +ELEMENT_BITS= 20 +bench: .PHONY + ${.CURDIR}/bench.py ${ELEMENT_BITS} + @echo "See results in ${.OBJDIR}/stats" + +.include Added: head/tools/tools/sortbench/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/sortbench/README Thu Apr 19 21:53:57 2018 (r332796) @@ -0,0 +1,17 @@ +$FreeBSD$ + +Running: +1. Compile mergesort_bench.c into mergesort_bench +2. Run bench.py with python bench.py [elts] +2a. Bench will optionally run 2 ^ elts elements as the dataset size when provided. Otherwise it will run 2 ^ 20 elements. + +Output: +Files will be output in a new folder called stats with separate files for each statistical comparison and the raw results in a subfolder called data. +This files will contain the results of the running of ministat with time required to sort as the dataset. + +Modifications: +Change bench.py's WIKI variable to be true if you have wiki.c implemented and want to test it. + +As the script runs, it is running each of the stdlib sorting algorithms (and wikisort if provided) with 2 ^ elts elements, +5 trials of the sort time as it's output. That output is saved in the data folder and then passed into the command line +utility ministat which then provides the confidence interval of difference between the data in stats folder. Added: head/tools/tools/sortbench/bench.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/sortbench/bench.py Thu Apr 19 21:53:57 2018 (r332796) @@ -0,0 +1,72 @@ +#!/usr/bin/env python +""" +Copyright (c) 2017 Miles Fertel +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + $FreeBSD$ +""" + +from time import time +import os +import sys + +WIKI = False +sorts=["heap", "merge", "quick"] +if (WIKI): + sorts.append("wiki") +tests=["rand", "sort", "rev", "part"] +runs = 5 +trials = 5 +outdir = "stats" +datadir = '{}/data'.format(outdir) +progname = "sort_bench" +try: + elts = sys.argv[1] +except: + elts = 20 + +if (not os.path.isdir(datadir)): + os.makedirs(datadir) + +for test in tests: + files = [] + for sort in sorts: + filename = '{}/{}{}'.format(datadir, test, sort) + files.append(filename) + with open(filename, 'w+') as f: + for _ in range(trials): + start = time() + ret = os.system('./{} {} {} {} {}'.format(progname, sort, test, runs, elts)) + total = time() - start + if (ret): + sys.exit("Bench program failed. Did you remember to compile it?") + f.write('{}\n'.format(str(total))) + f.close() + with open('{}/{}'.format(outdir, test), 'w+') as f: + command = 'ministat -s -w 60 ' + for filename in files: + command += '{} '.format(filename) + command += '> {}/{}stats'.format(outdir, test) + os.system(command) + Added: head/tools/tools/sortbench/sort_bench.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/sortbench/sort_bench.c Thu Apr 19 21:53:57 2018 (r332796) @@ -0,0 +1,259 @@ +/*- + * Copyright (c) 2017 Miles Fertel + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +#ifdef WIKI +#include "stdlib/wiki.c" +#endif + +/* + * Integer comparison function for stdlib sorting algorithms + */ +static int +sorthelp(const void *a, const void *b) +{ + if (*(int *)a > *(int *)b) + return 1; + if (*(int *)a < *(int *)b) + return -1; + return 0; +} + +#define NARGS 5 + +/* + * Enumerated types for the different types of tests and sorting algorithms + */ +enum test { RAND, SORT, PART, REV, INVALID_TEST }; + +#ifdef WIKI +enum sort { MERGE, WIKI, QUICK, HEAP, INVALID_ALG }; +#else +enum sort { MERGE, QUICK, HEAP, INVALID_ALG }; +#endif + +/* + * Sort an array with the given algorithm + */ +static void +sort(int *testarray, int elts, enum sort s) +{ + switch (s) { + case MERGE: + mergesort(testarray, (size_t)elts, sizeof(int), sorthelp); + break; +#ifdef WIKI + case WIKI: + WikiSort(testarray, (size_t)elts, sizeof(int), sorthelp); + break; +#endif + case QUICK: + qsort(testarray, (size_t)elts, sizeof(int), sorthelp); + break; + case HEAP: + heapsort(testarray, (size_t)elts, sizeof(int), sorthelp); + break; + // Should never be reached + case INVALID_ALG: + exit(EX_DATAERR); + } +} + +/* + * Sort an array of randomly generated integers + */ +static void +rand_bench(int elts, enum sort s) +{ + size_t size = sizeof(int) * elts; + int *array = malloc(size); + arc4random_buf(array, size); + sort(array, elts, s); + free(array); +} + +/* + * Sort an array of increasing integers + */ +static void +sort_bench(int elts, enum sort s) +{ + size_t size = sizeof(int) * elts; + int *array = malloc(size); + for (int i = 0; i < elts; i++) { + array[i] = i; + } + sort(array, elts, s); + free(array); +} + +/* + * Sort an array of partially increasing, partially random integers + */ +static void +partial_bench(int elts, enum sort s) +{ + size_t size = sizeof(int) * elts; + int *array = malloc(size); + for (int i = 0; i < elts; i++) { + if (i <= elts / 2) + array[i] = i; + else + array[i] = arc4random(); + } + sort(array, elts, s); + free(array); +} + +/* + * Sort an array of decreasing integers + */ +static void +reverse_bench(int elts, enum sort s) +{ + size_t size = sizeof(int) * elts; + int *array = malloc(size); + for (int i = 0; i < elts; i++) { + array[i] = elts - i; + } + sort(array, elts, s); + free(array); +} + +static void +run_bench(enum sort s, enum test t, int runs, int elts) +{ + for (int i = 0; i < runs; i++) { + switch (t) { + case RAND: + rand_bench(elts, s); + break; + case SORT: + sort_bench(elts, s); + break; + case PART: + partial_bench(elts, s); + break; + case REV: + reverse_bench(elts, s); + break; + // Should never be reached + case INVALID_TEST: + exit(EX_DATAERR); + } + } +} + +static enum sort +parse_alg(char *alg) +{ + if (strcmp(alg, "merge") == 0) + return MERGE; +#ifdef WIKI + else if (strcmp(alg, "wiki") == 0) + return WIKI; +#endif + else if (strcmp(alg, "quick") == 0) + return QUICK; + else if (strcmp(alg, "heap") == 0) + return HEAP; + else + return INVALID_ALG; +} + +static enum test +parse_test(char *test) +{ + if (strcmp(test, "rand") == 0) + return RAND; + else if (strcmp(test, "sort") == 0) + return SORT; + else if (strcmp(test, "part") == 0) + return PART; + else if (strcmp(test, "rev") == 0) + return REV; + else + return INVALID_TEST; +} + +static void +usage(const char *progname) +{ + printf("Usage:\n"); + printf("\t%s: [alg] [test] [runs] [elt_power]\n", progname); + printf("\n"); + printf("Valid algs:\n"); +#ifdef WIKI + printf("\theap merge quick wiki\n"); +#else + printf("\theap merge quick\n"); +#endif + printf("Valid tests:\n"); + printf("\trand sort part rev\n"); + printf("\trand: Random element array \n"); + printf("\tsort: Increasing order array \n"); + printf("\tpart: Partially ordered array\n"); + printf("\trev: Decreasing order array\n"); + printf("Run the algorithm [runs] times with 2^[elt_power] elements\n"); + exit(EX_USAGE); +} + +/* + * Runs a sorting algorithm with a provided data configuration according to + * command line arguments + */ +int +main(int argc, char *argv[]) +{ + const char *progname = argv[0]; + int runs, elts; + if (argc != NARGS) + usage(progname); + + enum sort s = parse_alg(argv[1]); + if (s == INVALID_ALG) + usage(progname); + + enum test t = parse_test(argv[2]); + if (t == INVALID_TEST) + usage(progname); + + runs = atoi(argv[3]); + elts = pow(2, atoi(argv[4])); + + run_bench(s, t, runs, elts); +} From owner-svn-src-all@freebsd.org Thu Apr 19 22:43:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A211FA8E97; Thu, 19 Apr 2018 22:43:56 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46D776DA47; Thu, 19 Apr 2018 22:43:56 +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 41A98100E2; Thu, 19 Apr 2018 22:43:56 +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 w3JMhuSB084667; Thu, 19 Apr 2018 22:43:56 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3JMht2S084664; Thu, 19 Apr 2018 22:43:55 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201804192243.w3JMht2S084664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 19 Apr 2018 22:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332798 - head/tools/diag/prtblknos X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/tools/diag/prtblknos X-SVN-Commit-Revision: 332798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 22:43:57 -0000 Author: mckusick Date: Thu Apr 19 22:43:55 2018 New Revision: 332798 URL: https://svnweb.freebsd.org/changeset/base/332798 Log: Fix incorrect output for a file consisting of a single full-size block followed by a discontiguous fragment. Add checks for unallocated inodes and inodes with unknown mode types. Cleanup variable declarations by changing from type `int' to types like ufs_lbn_t, ufs2_daddr_t, etc. Reported by: bde Modified: head/tools/diag/prtblknos/Makefile head/tools/diag/prtblknos/main.c head/tools/diag/prtblknos/prtblknos.c Modified: head/tools/diag/prtblknos/Makefile ============================================================================== --- head/tools/diag/prtblknos/Makefile Thu Apr 19 22:28:41 2018 (r332797) +++ head/tools/diag/prtblknos/Makefile Thu Apr 19 22:43:55 2018 (r332798) @@ -9,6 +9,8 @@ SRCS= main.c prtblknos.c LIBADD+=ufs +WARNS?= 3 + test: ${PROG} ./${PROG} > a Modified: head/tools/diag/prtblknos/main.c ============================================================================== --- head/tools/diag/prtblknos/main.c Thu Apr 19 22:28:41 2018 (r332797) +++ head/tools/diag/prtblknos/main.c Thu Apr 19 22:43:55 2018 (r332798) @@ -53,14 +53,17 @@ main(argc, argv) struct statfs sfb; char *xargv[4]; char ibuf[64]; - char *fsname; - int inonum, error; + char *fsname, *filename; + ino_t inonum; + int error; + filename = NULL; if (argc == 2) { - if (stat(argv[1], &sb) != 0) - err(1, "stat(%s)", argv[1]); - if (statfs(argv[1], &sfb) != 0) - err(1, "statfs(%s)", argv[1]); + filename = argv[1]; + if (lstat(filename, &sb) != 0) + err(1, "stat(%s)", filename); + if (statfs(filename, &sfb) != 0) + err(1, "statfs(%s)", filename); xargv[0] = argv[0]; xargv[1] = sfb.f_mntfromname; sprintf(ibuf, "%jd", (intmax_t)sb.st_ino); @@ -87,12 +90,17 @@ main(argc, argv) while (*++argv) { /* get the inode number. */ if ((inonum = atoi(*argv)) <= 0 || - inonum >= fs->fs_ipg * fs->fs_ncg) + inonum >= (ino_t)fs->fs_ipg * fs->fs_ncg) warnx("%s is not a valid inode number", *argv); - (void)printf("%d: ", inonum); + if (filename == NULL) + (void)printf("inode #%jd: ", (intmax_t)inonum); + else + (void)printf("%s (inode #%jd): ", filename, + (intmax_t)inonum); if ((error = getino(&disk, (void **)&dp, inonum, NULL)) < 0) - warn("Read of inode %d on %s failed", inonum, fsname); + warn("Read of inode %jd on %s failed", + (intmax_t)inonum, fsname); prtblknos(&disk, dp); } Modified: head/tools/diag/prtblknos/prtblknos.c ============================================================================== --- head/tools/diag/prtblknos/prtblknos.c Thu Apr 19 22:28:41 2018 (r332797) +++ head/tools/diag/prtblknos/prtblknos.c Thu Apr 19 22:43:55 2018 (r332798) @@ -40,16 +40,18 @@ union dinode { void prtblknos(struct uufsd *disk, union dinode *dp); -static void indirprt(struct uufsd *, int, int, int, ufs2_daddr_t, int); -static char *distance(struct fs *, daddr_t, daddr_t); -static void printblk(struct fs *, int, ufs2_daddr_t, int, int); +static const char *distance(struct fs *, ufs2_daddr_t, ufs2_daddr_t); +static void printblk(struct fs *, ufs_lbn_t, ufs2_daddr_t, int, ufs_lbn_t); +static void indirprt(struct uufsd *, int, ufs_lbn_t, ufs_lbn_t, ufs2_daddr_t, + ufs_lbn_t); void prtblknos(disk, dp) struct uufsd *disk; union dinode *dp; { - int i, len, lbn, mode, frags, numblks, blksperindir; + int i, mode, frags; + ufs_lbn_t lbn, lastlbn, len, blksperindir; ufs2_daddr_t blkno; struct fs *fs; off_t size; @@ -63,6 +65,12 @@ prtblknos(disk, dp) mode = dp->dp2.di_mode; } switch (mode & IFMT) { + default: + printf("unknown inode type 0%d\n", (mode & IFMT)); + return; + case 0: + printf("unallocated inode\n"); + return; case IFIFO: printf("fifo\n"); return; @@ -97,20 +105,20 @@ prtblknos(disk, dp) printf("empty file\n"); return; } - printf("regular file, size %ld\n", size); + printf("regular file, size %jd\n", (intmax_t)size); break; case IFDIR: if (size == 0) { printf("empty directory\n"); return; } - printf("directory, size %ld\n", size); + printf("directory, size %jd\n", (intmax_t)size); break; } - numblks = howmany(size, fs->fs_bsize); - len = numblks < UFS_NDADDR ? numblks : UFS_NDADDR; + lastlbn = howmany(size, fs->fs_bsize); + len = lastlbn < UFS_NDADDR ? lastlbn : UFS_NDADDR; for (i = 0; i < len; i++) { - if (i < numblks - 1) + if (i < lastlbn - 1) frags = fs->fs_frag; else frags = howmany(size % fs->fs_bsize, @@ -119,39 +127,39 @@ prtblknos(disk, dp) blkno = dp->dp1.di_db[i]; else blkno = dp->dp2.di_db[i]; - printblk(fs, i, blkno, frags, numblks); + printblk(fs, i, blkno, frags, lastlbn); } blksperindir = 1; - len = numblks - UFS_NDADDR; + len = lastlbn - UFS_NDADDR; lbn = UFS_NDADDR; for (i = 0; len > 0 && i < UFS_NIADDR; i++) { if (fs->fs_magic == FS_UFS1_MAGIC) blkno = dp->dp1.di_ib[i]; else blkno = dp->dp2.di_ib[i]; - indirprt(disk, i, blksperindir, lbn, blkno, numblks); + indirprt(disk, i, blksperindir, lbn, blkno, lastlbn); blksperindir *= NINDIR(fs); lbn += blksperindir; len -= blksperindir; } /* dummy print to flush out last extent */ - printblk(fs, numblks, 0, frags, 0); + printblk(fs, lastlbn, 0, frags, 0); } static void indirprt(disk, level, blksperindir, lbn, blkno, lastlbn) struct uufsd *disk; int level; - int blksperindir; - int lbn; + ufs_lbn_t blksperindir; + ufs_lbn_t lbn; ufs2_daddr_t blkno; - int lastlbn; + ufs_lbn_t lastlbn; { char indir[MAXBSIZE]; struct fs *fs; - int i, last; + ufs_lbn_t i, last; fs = (struct fs *)&disk->d_sb; if (blkno == 0) { @@ -190,13 +198,13 @@ indirprt(disk, level, blksperindir, lbn, blkno, lastlb } } -static char * +static const char * distance(fs, lastblk, firstblk) struct fs *fs; - daddr_t lastblk; - daddr_t firstblk; + ufs2_daddr_t lastblk; + ufs2_daddr_t firstblk; { - daddr_t delta; + ufs2_daddr_t delta; int firstcg, lastcg; static char buf[100]; @@ -216,28 +224,30 @@ distance(fs, lastblk, firstblk) } -static char *indirname[UFS_NIADDR] = { "First", "Second", "Third" }; +static const char *indirname[UFS_NIADDR] = { "First", "Second", "Third" }; static void -printblk(fs, lbn, blkno, numblks, lastlbn) +printblk(fs, lbn, blkno, numfrags, lastlbn) struct fs *fs; - int lbn; + ufs_lbn_t lbn; ufs2_daddr_t blkno; - int numblks; - int lastlbn; + int numfrags; + ufs_lbn_t lastlbn; { static int seq; - static daddr_t lastindirblk, lastblk, firstblk; + static ufs2_daddr_t totfrags, lastindirblk, lastblk, firstblk; if (lastlbn <= 0) goto flush; if (seq == 0) { - seq = howmany(numblks, fs->fs_frag); + seq = howmany(numfrags, fs->fs_frag); + totfrags = numfrags; firstblk = blkno; return; } if (lbn == 0) { - seq = howmany(numblks, fs->fs_frag); + seq = howmany(numfrags, fs->fs_frag); + totfrags = numfrags; lastblk = 0; firstblk = blkno; lastindirblk = 0; @@ -247,7 +257,8 @@ printblk(fs, lbn, blkno, numblks, lastlbn) (firstblk == BLK_NOCOPY && blkno == BLK_NOCOPY) || (firstblk == BLK_SNAP && blkno == BLK_SNAP) || blkno == firstblk + seq * fs->fs_frag)) { - seq += howmany(numblks, fs->fs_frag); + seq += howmany(numfrags, fs->fs_frag); + totfrags += numfrags; return; } flush: @@ -255,35 +266,36 @@ flush: goto prtindir; if (firstblk <= BLK_SNAP) { if (seq == 1) - printf("\tlbn %d %s\n", lbn - seq, + printf("\tlbn %jd %s\n", (intmax_t)(lbn - seq), firstblk == 0 ? "hole" : firstblk == BLK_NOCOPY ? "nocopy" : "snapblk"); else - printf("\tlbn %d-%d %s\n", - lbn - seq, lbn - 1, + printf("\tlbn %jd-%jd %s\n", + (intmax_t)lbn - seq, (intmax_t)lbn - 1, firstblk == 0 ? "hole" : firstblk == BLK_NOCOPY ? "nocopy" : "snapblk"); } else if (seq == 1) { - if (numblks == 1) - printf("\tlbn %d blkno %jd%s\n", lbn - seq, + if (totfrags == 1) + printf("\tlbn %jd blkno %jd%s\n", (intmax_t)(lbn - seq), (intmax_t)firstblk, distance(fs, lastblk, firstblk)); else - printf("\tlbn %d blkno %jd-%jd%s\n", lbn - seq, - (intmax_t)firstblk, - (intmax_t)(firstblk + numblks - 1), + printf("\tlbn %jd blkno %jd-%jd%s\n", + (intmax_t)(lbn - seq), (intmax_t)firstblk, + (intmax_t)(firstblk + totfrags - 1), distance(fs, lastblk, firstblk)); - lastblk = firstblk + numblks - 1; + lastblk = firstblk + totfrags - 1; } else { - printf("\tlbn %d-%d blkno %jd-%jd%s\n", lbn - seq, lbn - 1, - (intmax_t)firstblk, (intmax_t)(firstblk + - (seq - 1) * fs->fs_frag + numblks - 1), + printf("\tlbn %jd-%jd blkno %jd-%jd%s\n", (intmax_t)(lbn - seq), + (intmax_t)(lbn - 1), (intmax_t)firstblk, + (intmax_t)(firstblk + totfrags - 1), distance(fs, lastblk, firstblk)); - lastblk = firstblk + (seq - 1) * fs->fs_frag + numblks - 1; + lastblk = firstblk + totfrags - 1; } if (lastlbn > 0 || blkno == 0) { seq = 1; + totfrags = numfrags; firstblk = blkno; return; } @@ -291,9 +303,9 @@ prtindir: if (seq != 0 && (fs->fs_metaspace == 0 || lastindirblk == 0)) lastindirblk = lastblk; printf("%s-level indirect, blkno %jd-%jd%s\n", indirname[-lastlbn], - (intmax_t)blkno, (intmax_t)(blkno + numblks - 1), + (intmax_t)blkno, (intmax_t)(blkno + numfrags - 1), distance(fs, lastindirblk, blkno)); - lastindirblk = blkno + numblks - 1; + lastindirblk = blkno + numfrags - 1; if (fs->fs_metaspace == 0) lastblk = lastindirblk; seq = 0; From owner-svn-src-all@freebsd.org Thu Apr 19 23:35:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7381F844FD; Thu, 19 Apr 2018 23:35:43 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F81479A61; Thu, 19 Apr 2018 23:35:43 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f46.google.com with SMTP id u62-v6so436139ita.5; Thu, 19 Apr 2018 16:35:43 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Uw+kyuTp/5RJjuLCIossdRMIVYx/I/gu2rcMIbsw4T8=; b=aGfN4hjh/TBAp6WV2fcYN0pk9+l9jg00KzMUcSHshKYnGa6787pa/mxhBw8xM6z0bj 4OwdAwnqc1Yr1wgiMNR4OWxdVErTxm4vRHiuDs+fmmd/c0t1CCM2fHta6vMIPrME2kdt LSQniFbxiqpSNhEy0UenkV4LRxGugp7/Hden1SXkcPXVbTvdupP4S4tgtKjHkUDjy3qM 3EQDzxrZJsTbWHRacbudNxwvmlHqcrOXfOB5KAjA3r1sd6OZWXWVKihzkSYZ//HzZ8hj 0N/BBjwsduxMldn+w4LvwDT9rnIJ3gQ9okzSbq4LtLbcGmQ6AKG2e2YxqjFgqp53PGp/ V9NA== X-Gm-Message-State: ALQs6tDOBhicqO8XYoDdEv4cr09WWT5cBd7qu/LpsxBxiuCqCLyCmGLd ijrOW0za2kyQD0cFg7jbATWGlAjO X-Google-Smtp-Source: AIpwx4/VkOufrQRAMrlLVC/pc/2Nzum5VzQcw5Kx6S1/bX3ineSw7CC9P3pEqthQgR0r2RPa9usjQw== X-Received: by 2002:a24:b210:: with SMTP id u16-v6mr814663ite.15.1524180528656; Thu, 19 Apr 2018 16:28:48 -0700 (PDT) Received: from mail-it0-f49.google.com (mail-it0-f49.google.com. [209.85.214.49]) by smtp.gmail.com with ESMTPSA id 194-v6sm148917itm.15.2018.04.19.16.28.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 16:28:48 -0700 (PDT) Received: by mail-it0-f49.google.com with SMTP id h143-v6so454740ita.4; Thu, 19 Apr 2018 16:28:48 -0700 (PDT) X-Received: by 2002:a24:2f8d:: with SMTP id j135-v6mr807654itj.53.1524180528240; Thu, 19 Apr 2018 16:28:48 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:224d:0:0:0:0:0 with HTTP; Thu, 19 Apr 2018 16:28:47 -0700 (PDT) In-Reply-To: <201804192153.w3JLrvU7060198@repo.freebsd.org> References: <201804192153.w3JLrvU7060198@repo.freebsd.org> From: Conrad Meyer Date: Thu, 19 Apr 2018 16:28:47 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332796 - head/tools/tools/sortbench To: Brooks Davis Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 23:35:44 -0000 The commit log describes what the commit does, but not why it was made. What's the eventual goal / direction that this change leads to? (The Phabricator revision doesn't elaborate further either.) Thanks, Conrad On Thu, Apr 19, 2018 at 2:53 PM, Brooks Davis wrote: > Author: brooks > Date: Thu Apr 19 21:53:57 2018 > New Revision: 332796 > URL: https://svnweb.freebsd.org/changeset/base/332796 > > Log: > Add sortbench. > > This is a set of benchmarks of qsort, mergesort, heapsort, and > optionally wikisort and a script to run them. From owner-svn-src-all@freebsd.org Thu Apr 19 23:47:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADE3AF8531B; Thu, 19 Apr 2018 23:47:36 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 58BBB7CF59; Thu, 19 Apr 2018 23:47:36 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 2F4075A9F12; Thu, 19 Apr 2018 23:47:35 +0000 (UTC) Date: Thu, 19 Apr 2018 23:47:35 +0000 From: Brooks Davis To: Conrad Meyer Cc: Brooks Davis , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332796 - head/tools/tools/sortbench Message-ID: <20180419234735.GA1188@spindle.one-eyed-alien.net> References: <201804192153.w3JLrvU7060198@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 23:47:36 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The goal is to replace our merge sort with its weird limitations (you can't sort things smaller than int on amd64 and it doesn't work with pointer integrity schemes) with wikisort. This and improvements to the tests are the first steps in the process. -- Brooks On Thu, Apr 19, 2018 at 04:28:47PM -0700, Conrad Meyer wrote: > The commit log describes what the commit does, but not why it was > made. What's the eventual goal / direction that this change leads to? >=20 > (The Phabricator revision doesn't elaborate further either.) >=20 > Thanks, > Conrad >=20 > On Thu, Apr 19, 2018 at 2:53 PM, Brooks Davis wrote: > > Author: brooks > > Date: Thu Apr 19 21:53:57 2018 > > New Revision: 332796 > > URL: https://svnweb.freebsd.org/changeset/base/332796 > > > > Log: > > Add sortbench. > > > > This is a set of benchmarks of qsort, mergesort, heapsort, and > > optionally wikisort and a script to run them. >=20 --wac7ysb48OaltWcw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJa2SqWAAoJEKzQXbSebgfAdr4H/RSBBYjObi2DZ5YD8Dp17mTx +r/QRDVVjD8hzaoSo7oJmKcPI0qvpnfXKz878GXrpRdAs/ZuSr01XVFTdawVgF+h Py9CPZqgADxQxjeAOxjOc+2vV5iyk9cpRXOqxDffIQjRZ3aH9iLj6qaKIeE+iapO hW4j08AZ1sEvbQxDGAHy/d4BVX+QnuLUJiWy7mdpSuzGTxA4Fk22H4+NVjgscIq9 UeNT7OcVNzRC4O4fgO00qN7aI2nDrXc4QGzQrnepo8xOqLE9+i4F0VrmMmtLKzz0 fArU7f8+pkoR9VlcX66r58O5aSBwLQILF83XlANu8ZvFnUphlTpUJpMMq6oVs3I= =t5pZ -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- From owner-svn-src-all@freebsd.org Thu Apr 19 23:53:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFDB0F85B99; Thu, 19 Apr 2018 23:53:05 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 5821C7D527; Thu, 19 Apr 2018 23:53:05 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3JNr3ZF068073; Thu, 19 Apr 2018 16:53:03 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3JNr3Ug068072; Thu, 19 Apr 2018 16:53:03 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201804192353.w3JNr3Ug068072@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r332796 - head/tools/tools/sortbench In-Reply-To: <20180419234735.GA1188@spindle.one-eyed-alien.net> To: Brooks Davis Date: Thu, 19 Apr 2018 16:53:03 -0700 (PDT) CC: Conrad Meyer , 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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2018 23:53:06 -0000 -- Start of PGP signed section. > The goal is to replace our merge sort with its weird limitations (you > can't sort things smaller than int on amd64 and it doesn't work with > pointer integrity schemes) with wikisort. This and improvements to the > tests are the first steps in the process. > > -- Brooks Couldnt this be a port, as most other benchmarks? Especially since it requires python to run. > > On Thu, Apr 19, 2018 at 04:28:47PM -0700, Conrad Meyer wrote: > > The commit log describes what the commit does, but not why it was > > made. What's the eventual goal / direction that this change leads to? > > > > (The Phabricator revision doesn't elaborate further either.) > > > > Thanks, > > Conrad > > > > On Thu, Apr 19, 2018 at 2:53 PM, Brooks Davis wrote: > > > Author: brooks > > > Date: Thu Apr 19 21:53:57 2018 > > > New Revision: 332796 > > > URL: https://svnweb.freebsd.org/changeset/base/332796 > > > > > > Log: > > > Add sortbench. > > > > > > This is a set of benchmarks of qsort, mergesort, heapsort, and > > > optionally wikisort and a script to run them. > > -- End of PGP section, PGP failed! -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Apr 20 00:01:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FF3FF86A45; Fri, 20 Apr 2018 00:01:46 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 EC99D8037F; Fri, 20 Apr 2018 00:01:45 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 4BD2E5A9F12; Fri, 20 Apr 2018 00:01:45 +0000 (UTC) Date: Fri, 20 Apr 2018 00:01:45 +0000 From: Brooks Davis To: rgrimes@freebsd.org Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332796 - head/tools/tools/sortbench Message-ID: <20180420000145.GB1188@spindle.one-eyed-alien.net> References: <20180419234735.GA1188@spindle.one-eyed-alien.net> <201804192353.w3JNr3Ug068072@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Fba/0zbH8Xs+Fj9o" Content-Disposition: inline In-Reply-To: <201804192353.w3JNr3Ug068072@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 00:01:46 -0000 --Fba/0zbH8Xs+Fj9o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 19, 2018 at 04:53:03PM -0700, Rodney W. Grimes wrote: > -- Start of PGP signed section. > > The goal is to replace our merge sort with its weird limitations (you > > can't sort things smaller than int on amd64 and it doesn't work with > > pointer integrity schemes) with wikisort. This and improvements to the > > tests are the first steps in the process. >=20 > Couldnt this be a port, as most other benchmarks? > Especially since it requires python to run. I suppose it could, but it's intended to support and measure our base system. It's tiny, and the python orchestration is optional. If people really dislike the idea, we'll just put it on github. -- Brooks --Fba/0zbH8Xs+Fj9o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJa2S3oAAoJEKzQXbSebgfAs9sH/180z/OMq1BG3zK+Y8hZzDjD /a8f0GUPAVpjHzLQd4mJnNgk09Ddp4WFFoZGZSxEndpyh8/iPMy8FueoeyH3sGj6 nJNNXK1jQWq0BovpiK4Y5uN8fsfqyZ4QlcxsLKFp8ZiT//Y0UA1qy56jbWf67MCA tJuqIeR7Hc01F96RuXDiNn9ITUJkX2ycnnuy2Bcf8Gd8LR/qTq6DUlbXOnkdVq8C 0ViGC0P+Z/ekMkCB6BCVEzkKnNQLRtaWe8vKqEG05u89aylbiGimFZNcx2DpoQYh bGJ5u2m5EgWpZjOKhUVZb7rNl772/5OtJ3L7DARibhaoARvazJHhe9po3E8TS5I= =AvHk -----END PGP SIGNATURE----- --Fba/0zbH8Xs+Fj9o-- From owner-svn-src-all@freebsd.org Fri Apr 20 00:02:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 558EDF86D58; Fri, 20 Apr 2018 00:02:48 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0400A8057D; Fri, 20 Apr 2018 00:02:48 +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 F30A710DEF; Fri, 20 Apr 2018 00:02:47 +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 w3K02l55024140; Fri, 20 Apr 2018 00:02:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K02l8i024136; Fri, 20 Apr 2018 00:02:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804200002.w3K02l8i024136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 20 Apr 2018 00:02:47 +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: r332802 - in stable/11: . gnu/usr.bin/groff/tmac lib/clang sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11: . gnu/usr.bin/groff/tmac lib/clang sys/conf X-SVN-Commit-Revision: 332802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 00:02:48 -0000 Author: gjb Date: Fri Apr 20 00:02:47 2018 New Revision: 332802 URL: https://svnweb.freebsd.org/changeset/base/332802 Log: Update stable/11 from 11.1-STABLE to 11.2-PRERELEASE, marking the official start of the code slush. Set the default mdoc(7) version to 11.2, and update the clang(1) TARGET_TRIPLE to reflect 11.2. While here, add missing FreeBSD major versions to mdoc(7). Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/Makefile.inc1 stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in stable/11/lib/clang/llvm.build.mk stable/11/sys/conf/newvers.sh Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Thu Apr 19 23:53:55 2018 (r332801) +++ stable/11/Makefile.inc1 Fri Apr 20 00:02:47 2018 (r332802) @@ -603,7 +603,7 @@ XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -s .endif .else TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.1 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.2 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} Modified: stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in ============================================================================== --- stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in Thu Apr 19 23:53:55 2018 (r332801) +++ stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in Fri Apr 20 00:02:47 2018 (r332802) @@ -50,7 +50,7 @@ .ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~11.1 +.ds doc-default-operating-system FreeBSD\~11.2 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-2.2.9 2.2.9 @@ -64,8 +64,10 @@ .ds doc-operating-system-FreeBSD-10.1 10.1 .ds doc-operating-system-FreeBSD-10.2 10.2 .ds doc-operating-system-FreeBSD-10.3 10.3 +.ds doc-operating-system-FreeBSD-10.4 10.4 .ds doc-operating-system-FreeBSD-11.0 11.0 .ds doc-operating-system-FreeBSD-11.1 11.1 +.ds doc-operating-system-FreeBSD-11.2 11.2 . .\" Definitions for other *BSDs not (yet) in doc-common .ds doc-operating-system-NetBSD-7.0 7.0 Modified: stable/11/lib/clang/llvm.build.mk ============================================================================== --- stable/11/lib/clang/llvm.build.mk Thu Apr 19 23:53:55 2018 (r332801) +++ stable/11/lib/clang/llvm.build.mk Fri Apr 20 00:02:47 2018 (r332802) @@ -31,7 +31,7 @@ TARGET_ABI= -gnueabi TARGET_ABI= .endif VENDOR= unknown -OS_VERSION= freebsd11.1 +OS_VERSION= freebsd11.2 TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION} Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Apr 19 23:53:55 2018 (r332801) +++ stable/11/sys/conf/newvers.sh Fri Apr 20 00:02:47 2018 (r332802) @@ -43,8 +43,8 @@ # included if the tree is modified. TYPE="FreeBSD" -REVISION="11.1" -BRANCH="STABLE" +REVISION="11.2" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Apr 20 00:59:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AB74F8D43E; Fri, 20 Apr 2018 00:59:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29DF86C3AF; Fri, 20 Apr 2018 00:59:54 +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 24D6011621; Fri, 20 Apr 2018 00:59: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 w3K0xsPl049446; Fri, 20 Apr 2018 00:59:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K0xsLA049445; Fri, 20 Apr 2018 00:59:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804200059.w3K0xsLA049445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 20 Apr 2018 00:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332803 - head/lib/clang/include/lld/Common X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/clang/include/lld/Common X-SVN-Commit-Revision: 332803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 00:59:54 -0000 Author: emaste Date: Fri Apr 20 00:59:53 2018 New Revision: 332803 URL: https://svnweb.freebsd.org/changeset/base/332803 Log: lld: use correct number of digits in __FreeBSD_version-style ID __FreeBSD_version-style IDs should have 5 digits following the major. Modified: head/lib/clang/include/lld/Common/Version.inc Modified: head/lib/clang/include/lld/Common/Version.inc ============================================================================== --- head/lib/clang/include/lld/Common/Version.inc Fri Apr 20 00:02:47 2018 (r332802) +++ head/lib/clang/include/lld/Common/Version.inc Fri Apr 20 00:59:53 2018 (r332803) @@ -7,4 +7,4 @@ #define LLD_REPOSITORY_STRING "FreeBSD" // - -#define LLD_REVISION_STRING "326565-120001" +#define LLD_REVISION_STRING "326565-1200001" From owner-svn-src-all@freebsd.org Fri Apr 20 03:08:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04711F9825A; Fri, 20 Apr 2018 03:08:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABF23856D8; Fri, 20 Apr 2018 03:08:46 +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 8CA5B12B54; Fri, 20 Apr 2018 03:08:46 +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 w3K38khe014774; Fri, 20 Apr 2018 03:08:46 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K38kih014773; Fri, 20 Apr 2018 03:08:46 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804200308.w3K38kih014773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 20 Apr 2018 03:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332805 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 03:08:47 -0000 Author: kevans Date: Fri Apr 20 03:08:46 2018 New Revision: 332805 URL: https://svnweb.freebsd.org/changeset/base/332805 Log: bsdgrep: Split match processing out of procfile procfile is getting kind of hairy, and it's not going to get better as we correct some more bits that assume we process one line at a time. Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Fri Apr 20 01:25:48 2018 (r332804) +++ head/usr.bin/grep/util.c Fri Apr 20 03:08:46 2018 (r332805) @@ -72,6 +72,18 @@ struct parsec { bool binary; /* Binary file? */ }; +/* + * Match printing context + */ +struct mprintc { + long long tail; /* Number of trailing lines to record */ + int last_outed; /* Number of lines since last output */ + bool doctx; /* Printing context? */ + bool printmatch; /* Printing matches? */ + bool same_file; /* Same file as previously printed? */ +}; + +static bool procmatches(struct mprintc *mc, struct parsec *pc, bool matched); #ifdef WITH_INTERNAL_NOSPEC static int litexec(const struct pat *pat, const char *string, size_t nmatch, regmatch_t pmatch[]); @@ -197,6 +209,71 @@ grep_tree(char **argv) } /* + * Process any matches in the current parsing context, return a boolean + * indicating whether we should halt any further processing or not. 'true' to + * continue processing, 'false' to halt. + */ +static bool +procmatches(struct mprintc *mc, struct parsec *pc, bool matched) +{ + + /* Deal with any -B context or context separators */ + if (matched && mc->doctx) { + if (!first_match && (!mc->same_file || mc->last_outed > 0)) + printf("--\n"); + if (Bflag > 0) + printqueue(); + mc->tail = Aflag; + } + + /* Print the matching line, but only if not quiet/binary */ + if (matched && mc->printmatch) { + printline(pc, ':'); + while (pc->matchidx >= MAX_MATCHES) { + /* Reset matchidx and try again */ + pc->matchidx = 0; + if (procline(pc) == 0) + printline(pc, ':'); + else + break; + } + first_match = false; + mc->same_file = true; + mc->last_outed = 0; + } + + if (!matched && mc->doctx) { + /* Deal with any -A context */ + if (mc->tail > 0) { + grep_printline(&pc->ln, '-'); + mc->tail--; + if (Bflag > 0) + clearqueue(); + } else { + /* + * Enqueue non-matching lines for -B context. + * If we're not actually doing -B context or if + * the enqueue resulted in a line being rotated + * out, then go ahead and increment last_outed + * to signify a gap between context/match. + */ + if (Bflag == 0 || (Bflag > 0 && enqueue(&pc->ln))) + ++mc->last_outed; + } + } + + /* Count the matches if we have a match limit */ + if (matched && mflag) { + /* XXX TODO: Decrement by number of matched lines */ + mcount -= 1; + if (mflag && mcount <= 0) + return (false); + } + + return (true); +} + +/* * Opens a file and processes it. Each file is processed line-by-line * passing the lines to procline(). */ @@ -204,13 +281,11 @@ int procfile(const char *fn) { struct parsec pc; - long long tail; + struct mprintc mc; struct file *f; struct stat sb; - struct str *ln; mode_t s; - int c, last_outed, t; - bool doctx, printmatch, same_file; + int c, t; if (strcmp(fn, "-") == 0) { fn = label != NULL ? label : getstr(1); @@ -234,8 +309,6 @@ procfile(const char *fn) return (0); } - /* Convenience */ - ln = &pc.ln; pc.ln.file = grep_malloc(strlen(fn) + 1); strcpy(pc.ln.file, fn); pc.ln.line_no = 0; @@ -243,17 +316,13 @@ procfile(const char *fn) pc.ln.boff = 0; pc.ln.off = -1; pc.binary = f->binary; - pc.printed = 0; - tail = 0; - last_outed = 0; - same_file = false; - doctx = false; - printmatch = true; + memset(&mc, 0, sizeof(mc)); + mc.printmatch = true; if ((pc.binary && binbehave == BINFILE_BIN) || cflag || qflag || lflag || Lflag) - printmatch = false; - if (printmatch && (Aflag != 0 || Bflag != 0)) - doctx = true; + mc.printmatch = false; + if (mc.printmatch && (Aflag != 0 || Bflag != 0)) + mc.doctx = true; mcount = mlimit; for (c = 0; c == 0 || !(lflag || qflag); ) { @@ -282,56 +351,9 @@ procfile(const char *fn) if ((t = procline(&pc)) == 0) ++c; - /* Deal with any -B context or context separators */ - if (t == 0 && doctx) { - if (!first_match && (!same_file || last_outed > 0)) - printf("--\n"); - if (Bflag > 0) - printqueue(); - tail = Aflag; - } - /* Print the matching line, but only if not quiet/binary */ - if (t == 0 && printmatch) { - printline(&pc, ':'); - while (pc.matchidx >= MAX_MATCHES) { - /* Reset matchidx and try again */ - pc.matchidx = 0; - if (procline(&pc) == 0) - printline(&pc, ':'); - else - break; - } - first_match = false; - same_file = true; - last_outed = 0; - } - if (t != 0 && doctx) { - /* Deal with any -A context */ - if (tail > 0) { - grep_printline(&pc.ln, '-'); - tail--; - if (Bflag > 0) - clearqueue(); - } else { - /* - * Enqueue non-matching lines for -B context. - * If we're not actually doing -B context or if - * the enqueue resulted in a line being rotated - * out, then go ahead and increment last_outed - * to signify a gap between context/match. - */ - if (Bflag == 0 || (Bflag > 0 && enqueue(ln))) - ++last_outed; - } - } - - /* Count the matches if we have a match limit */ - if (t == 0 && mflag) { - --mcount; - if (mflag && mcount <= 0) - break; - } - + /* Halt processing if we hit our match limit */ + if (!procmatches(&mc, &pc, t == 0)) + break; } if (Bflag > 0) clearqueue(); From owner-svn-src-all@freebsd.org Fri Apr 20 03:11:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A51DF9870B; Fri, 20 Apr 2018 03:11: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCE728629F; Fri, 20 Apr 2018 03:11:51 +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 C7D2C12CB3; Fri, 20 Apr 2018 03:11: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 w3K3Bpe3019299; Fri, 20 Apr 2018 03:11:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K3BpXm019298; Fri, 20 Apr 2018 03:11:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804200311.w3K3BpXm019298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 20 Apr 2018 03:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332806 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 03:11:52 -0000 Author: kevans Date: Fri Apr 20 03:11:51 2018 New Revision: 332806 URL: https://svnweb.freebsd.org/changeset/base/332806 Log: bsdgrep: Clean up procmatches a little bit Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Fri Apr 20 03:08:46 2018 (r332805) +++ head/usr.bin/grep/util.c Fri Apr 20 03:11:51 2018 (r332806) @@ -218,32 +218,41 @@ procmatches(struct mprintc *mc, struct parsec *pc, boo { /* Deal with any -B context or context separators */ - if (matched && mc->doctx) { - if (!first_match && (!mc->same_file || mc->last_outed > 0)) - printf("--\n"); - if (Bflag > 0) - printqueue(); - mc->tail = Aflag; - } + if (matched) { + if (mc->doctx) { + if (!first_match && + (!mc->same_file || mc->last_outed > 0)) + printf("--\n"); + if (Bflag > 0) + printqueue(); + mc->tail = Aflag; + } - /* Print the matching line, but only if not quiet/binary */ - if (matched && mc->printmatch) { - printline(pc, ':'); - while (pc->matchidx >= MAX_MATCHES) { - /* Reset matchidx and try again */ - pc->matchidx = 0; - if (procline(pc) == 0) - printline(pc, ':'); - else - break; + /* Print the matching line, but only if not quiet/binary */ + if (mc->printmatch) { + printline(pc, ':'); + while (pc->matchidx >= MAX_MATCHES) { + /* Reset matchidx and try again */ + pc->matchidx = 0; + if (procline(pc) == 0) + printline(pc, ':'); + else + break; + } + first_match = false; + mc->same_file = true; + mc->last_outed = 0; } - first_match = false; - mc->same_file = true; - mc->last_outed = 0; - } - if (!matched && mc->doctx) { - /* Deal with any -A context */ + /* Count the matches if we have a match limit */ + if (mflag) { + /* XXX TODO: Decrement by number of matched lines */ + mcount -= 1; + if (mflag && mcount <= 0) + return (false); + } + } else if (mc->doctx) { + /* Not matching, deal with any -A context as needed */ if (mc->tail > 0) { grep_printline(&pc->ln, '-'); mc->tail--; @@ -260,14 +269,6 @@ procmatches(struct mprintc *mc, struct parsec *pc, boo if (Bflag == 0 || (Bflag > 0 && enqueue(&pc->ln))) ++mc->last_outed; } - } - - /* Count the matches if we have a match limit */ - if (matched && mflag) { - /* XXX TODO: Decrement by number of matched lines */ - mcount -= 1; - if (mflag && mcount <= 0) - return (false); } return (true); From owner-svn-src-all@freebsd.org Fri Apr 20 03:19:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1822BF99184; Fri, 20 Apr 2018 03:19:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF9C5685ED; Fri, 20 Apr 2018 03:19:45 +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 BA86912CF3; Fri, 20 Apr 2018 03:19:45 +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 w3K3JjMl019601; Fri, 20 Apr 2018 03:19:45 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K3JjQp019596; Fri, 20 Apr 2018 03:19:45 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201804200319.w3K3JjQp019596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 20 Apr 2018 03:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332807 - in head/sys/powerpc: include powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: include powerpc X-SVN-Commit-Revision: 332807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 03:19:46 -0000 Author: jhibbits Date: Fri Apr 20 03:19:44 2018 New Revision: 332807 URL: https://svnweb.freebsd.org/changeset/base/332807 Log: powerpc64: Add DSCR support Summary: Powerpc64 has support for a register called Data Stream Control Register (DSCR), which basically controls how the hardware controls the caching and prefetch for stream operations. Since mfdscr and mtdscr are privileged instructions, we need to emulate them, and keep the custom DSCR configuration per thread. The purpose of this feature is to change DSCR depending on the operation, set to DSCR Default Prefetch Depth to deepest on string operations, as memcpy. Submitted by: Breno Leitao Differential Revision: https://reviews.freebsd.org/D15081 Modified: head/sys/powerpc/include/pcb.h head/sys/powerpc/include/spr.h head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/genassym.c head/sys/powerpc/powerpc/swtch64.S Modified: head/sys/powerpc/include/pcb.h ============================================================================== --- head/sys/powerpc/include/pcb.h Fri Apr 20 03:11:51 2018 (r332806) +++ head/sys/powerpc/include/pcb.h Fri Apr 20 03:19:44 2018 (r332807) @@ -46,14 +46,16 @@ struct pcb { register_t pcb_sp; /* stack pointer */ register_t pcb_toc; /* toc pointer */ register_t pcb_lr; /* link register */ + register_t pcb_dscr; /* dscr value */ struct pmap *pcb_pm; /* pmap of our vmspace */ jmp_buf *pcb_onfault; /* For use during copyin/copyout */ int pcb_flags; -#define PCB_FPU 1 /* Process uses FPU */ -#define PCB_FPREGS 2 /* Process had FPU registers initialized */ -#define PCB_VEC 4 /* Process had Altivec initialized */ -#define PCB_VSX 8 /* Process had VSX initialized */ +#define PCB_FPU 0x1 /* Process uses FPU */ +#define PCB_FPREGS 0x2 /* Process had FPU registers initialized */ +#define PCB_VEC 0x4 /* Process had Altivec initialized */ +#define PCB_VSX 0x8 /* Process had VSX initialized */ +#define PCB_CDSCR 0x10 /* Process had Custom DSCR initialized */ struct fpu { union { double fpr; Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Fri Apr 20 03:11:51 2018 (r332806) +++ head/sys/powerpc/include/spr.h Fri Apr 20 03:19:44 2018 (r332807) @@ -97,6 +97,7 @@ #define SPR_RTCL_R 0x005 /* .6. 601 RTC Lower - Read */ #define SPR_LR 0x008 /* 468 Link Register */ #define SPR_CTR 0x009 /* 468 Count Register */ +#define SPR_DSCR 0x011 /* Data Stream Control Register */ #define SPR_DSISR 0x012 /* .68 DSI exception source */ #define DSISR_DIRECT 0x80000000 /* Direct-store error exception */ #define DSISR_NOTFOUND 0x40000000 /* Translation not found */ Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Fri Apr 20 03:11:51 2018 (r332806) +++ head/sys/powerpc/powerpc/exec_machdep.c Fri Apr 20 03:19:44 2018 (r332807) @@ -1021,11 +1021,46 @@ cpu_set_upcall(struct thread *td, void (*entry)(void * td->td_retval[1] = 0; } +static int +emulate_mfspr(int spr, int reg, struct trapframe *frame){ + struct thread *td; + + td = curthread; + + if (spr == SPR_DSCR) { + // If DSCR was never set, get the default DSCR + if ((td->td_pcb->pcb_flags & PCB_CDSCR) == 0) + td->td_pcb->pcb_dscr = mfspr(SPR_DSCR); + + frame->fixreg[reg] = td->td_pcb->pcb_dscr; + frame->srr0 += 4; + return 0; + } else + return SIGILL; +} + +static int +emulate_mtspr(int spr, int reg, struct trapframe *frame){ + struct thread *td; + + td = curthread; + + if (spr == SPR_DSCR) { + td->td_pcb->pcb_flags |= PCB_CDSCR; + td->td_pcb->pcb_dscr = frame->fixreg[reg]; + frame->srr0 += 4; + return 0; + } else + return SIGILL; +} + +#define XFX 0xFC0007FF int ppc_instr_emulate(struct trapframe *frame, struct pcb *pcb) { uint32_t instr; int reg, sig; + int rs, spr; instr = fuword32((void *)frame->srr0); sig = SIGILL; @@ -1035,9 +1070,15 @@ ppc_instr_emulate(struct trapframe *frame, struct pcb frame->fixreg[reg] = mfpvr(); frame->srr0 += 4; return (0); - } - - if ((instr & 0xfc000ffe) == 0x7c0004ac) { /* various sync */ + } else if ((instr & XFX) == 0x7c0002a6) { /* mfspr */ + rs = (instr & 0x3e00000) >> 21; + spr = (instr & 0x1ff800) >> 16; + return emulate_mfspr(spr, rs, frame); + } else if ((instr & XFX) == 0x7c0003a6) { /* mtspr */ + rs = (instr & 0x3e00000) >> 21; + spr = (instr & 0x1ff800) >> 16; + return emulate_mtspr(spr, rs, frame); + } else if ((instr & 0xfc000ffe) == 0x7c0004ac) { /* various sync */ powerpc_sync(); /* Do a heavy-weight sync */ frame->srr0 += 4; return (0); Modified: head/sys/powerpc/powerpc/genassym.c ============================================================================== --- head/sys/powerpc/powerpc/genassym.c Fri Apr 20 03:11:51 2018 (r332806) +++ head/sys/powerpc/powerpc/genassym.c Fri Apr 20 03:19:44 2018 (r332807) @@ -195,6 +195,7 @@ ASSYM(CF_SIZE, sizeof(struct callframe)); ASSYM(PCB_CONTEXT, offsetof(struct pcb, pcb_context)); ASSYM(PCB_CR, offsetof(struct pcb, pcb_cr)); +ASSYM(PCB_DSCR, offsetof(struct pcb, pcb_dscr)); ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp)); ASSYM(PCB_TOC, offsetof(struct pcb, pcb_toc)); ASSYM(PCB_LR, offsetof(struct pcb, pcb_lr)); @@ -202,6 +203,7 @@ ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FPU, PCB_FPU); ASSYM(PCB_VEC, PCB_VEC); +ASSYM(PCB_CDSCR, PCB_CDSCR); ASSYM(PCB_AIM_USR_VSID, offsetof(struct pcb, pcb_cpu.aim.usr_vsid)); ASSYM(PCB_BOOKE_DBCR0, offsetof(struct pcb, pcb_cpu.booke.dbcr0)); Modified: head/sys/powerpc/powerpc/swtch64.S ============================================================================== --- head/sys/powerpc/powerpc/swtch64.S Fri Apr 20 03:11:51 2018 (r332806) +++ head/sys/powerpc/powerpc/swtch64.S Fri Apr 20 03:19:44 2018 (r332807) @@ -62,6 +62,7 @@ #include #include +#include #include #include @@ -124,6 +125,14 @@ ENTRY(cpu_switch) stdu %r1,-48(%r1) + lwz %r7, PCB_FLAGS(%r17) + andi. %r7, %r7, PCB_CDSCR + beq .L0 + /* Custom DSCR was set. Reseting it to enter kernel */ + li %r7, 0x0 + mtspr SPR_DSCR, %r7 + +.L0: lwz %r7,PCB_FLAGS(%r17) /* Save FPU context if needed */ andi. %r7, %r7, PCB_FPU @@ -188,10 +197,18 @@ blocked_loop: lwz %r6, PCB_FLAGS(%r17) /* Restore Altivec context if needed */ andi. %r6, %r6, PCB_VEC - beq .L4 + beq .L31 mr %r3,%r13 /* Pass curthread to enable_vec */ bl enable_vec nop + +.L31: + lwz %r6, PCB_FLAGS(%r17) + /* Restore Custom DSCR if needed */ + andi. %r6, %r6, PCB_CDSCR + beq .L4 + ld %r6, PCB_DSCR(%r17) /* Load the DSCR register*/ + mtspr SPR_DSCR, %r6 /* thread to restore is in r3 */ .L4: From owner-svn-src-all@freebsd.org Fri Apr 20 03:23:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E695F99785; Fri, 20 Apr 2018 03:23:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEDE168AF9; Fri, 20 Apr 2018 03:23:19 +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 C853112E9B; Fri, 20 Apr 2018 03:23:19 +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 w3K3NJ5G024600; Fri, 20 Apr 2018 03:23:19 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K3NJXh024599; Fri, 20 Apr 2018 03:23:19 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201804200323.w3K3NJXh024599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 20 Apr 2018 03:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332808 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 332808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 03:23:20 -0000 Author: jhibbits Date: Fri Apr 20 03:23:19 2018 New Revision: 332808 URL: https://svnweb.freebsd.org/changeset/base/332808 Log: powerpc64: Set n_slbs = 32 for POWER9 Summary: POWER9 also contains 32 slbs entries as explained by the POWER9 User Manual: "For HPT translation, the POWER9 core contains a unified (combined for both instruction and data), 32-entry, fully-associative SLB per thread" Submitted by: Breno Leitao Differential Revision: https://reviews.freebsd.org/D15128 Modified: head/sys/powerpc/aim/aim_machdep.c Modified: head/sys/powerpc/aim/aim_machdep.c ============================================================================== --- head/sys/powerpc/aim/aim_machdep.c Fri Apr 20 03:19:44 2018 (r332807) +++ head/sys/powerpc/aim/aim_machdep.c Fri Apr 20 03:23:19 2018 (r332808) @@ -212,6 +212,7 @@ aim_early_init(vm_offset_t fdt, vm_offset_t toc, vm_of case IBMPOWER7PLUS: case IBMPOWER8: case IBMPOWER8E: + case IBMPOWER9: /* XXX: get from ibm,slb-size in device tree */ n_slbs = 32; break; From owner-svn-src-all@freebsd.org Fri Apr 20 03:29:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C15E0F99E1C; Fri, 20 Apr 2018 03:29:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 736086AF0A; Fri, 20 Apr 2018 03:29: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 6DC5F12EA8; Fri, 20 Apr 2018 03:29: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 w3K3T6TT024834; Fri, 20 Apr 2018 03:29:06 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K3T66M024833; Fri, 20 Apr 2018 03:29:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804200329.w3K3T66M024833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 20 Apr 2018 03:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332809 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 03:29:06 -0000 Author: kevans Date: Fri Apr 20 03:29:06 2018 New Revision: 332809 URL: https://svnweb.freebsd.org/changeset/base/332809 Log: bsdgrep: Add some TODOs for future work on operating on chunks Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Fri Apr 20 03:23:19 2018 (r332808) +++ head/usr.bin/grep/util.c Fri Apr 20 03:29:06 2018 (r332809) @@ -65,6 +65,7 @@ static bool first_match = true; */ struct parsec { regmatch_t matches[MAX_MATCHES]; /* Matches made */ + /* XXX TODO: This should be a chunk, not a line */ struct str ln; /* Current line */ size_t lnstart; /* Position in line */ size_t matchidx; /* Latest match index */ @@ -217,6 +218,10 @@ static bool procmatches(struct mprintc *mc, struct parsec *pc, bool matched) { + /* + * XXX TODO: This should loop over pc->matches and handle things on a + * line-by-line basis, setting up a `struct str` as needed. + */ /* Deal with any -B context or context separators */ if (matched) { if (mc->doctx) { @@ -327,12 +332,18 @@ procfile(const char *fn) mcount = mlimit; for (c = 0; c == 0 || !(lflag || qflag); ) { + /* + * XXX TODO: We need to revisit this in a chunking world. We're + * not going to be doing per-line statistics because of the + * overhead involved. procmatches can figure that stuff out as + * needed. */ /* Reset per-line statistics */ pc.printed = 0; pc.matchidx = 0; pc.lnstart = 0; pc.ln.boff = 0; pc.ln.off += pc.ln.len + 1; + /* XXX TODO: Grab a chunk */ if ((pc.ln.dat = grep_fgetln(f, &pc.ln.len)) == NULL || pc.ln.len == 0) break; @@ -587,6 +598,7 @@ procline(struct parsec *pc) continue; } + /* XXX TODO: We will need to keep going, since we're chunky */ /* One pass if we are not recording matches */ if (!wflag && ((color == NULL && !oflag) || qflag || lflag || Lflag)) break; From owner-svn-src-all@freebsd.org Fri Apr 20 09:48:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97BA9F8C5A6; Fri, 20 Apr 2018 09:48: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43DF87E588; Fri, 20 Apr 2018 09:48: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 3DE2616B39; Fri, 20 Apr 2018 09:48: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 w3K9mhDf015840; Fri, 20 Apr 2018 09:48:43 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K9mhqK015839; Fri, 20 Apr 2018 09:48:43 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804200948.w3K9mhqK015839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 20 Apr 2018 09:48: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: r332810 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 332810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 09:48:43 -0000 Author: ae Date: Fri Apr 20 09:48:42 2018 New Revision: 332810 URL: https://svnweb.freebsd.org/changeset/base/332810 Log: MFC r332475: Add check that mbuf had not multicast layer2 address. Such packets should be handled by ip6_mforward(). Modified: stable/11/sys/netinet6/ip6_fastfwd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_fastfwd.c ============================================================================== --- stable/11/sys/netinet6/ip6_fastfwd.c Fri Apr 20 03:29:06 2018 (r332809) +++ stable/11/sys/netinet6/ip6_fastfwd.c Fri Apr 20 09:48:42 2018 (r332810) @@ -97,7 +97,8 @@ ip6_tryforward(struct mbuf *m) * Fallback conditions to ip6_input for slow path processing. */ ip6 = mtod(m, struct ip6_hdr *); - if (ip6->ip6_nxt == IPPROTO_HOPOPTS || + if ((m->m_flags & (M_BCAST | M_MCAST)) != 0 || + ip6->ip6_nxt == IPPROTO_HOPOPTS || IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst) || IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src) || From owner-svn-src-all@freebsd.org Fri Apr 20 09:54:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B60B9F8CD19; Fri, 20 Apr 2018 09:54:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6ADD37F504; Fri, 20 Apr 2018 09:54:06 +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 65BD016CC6; Fri, 20 Apr 2018 09:54:06 +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 w3K9s63j020761; Fri, 20 Apr 2018 09:54:06 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K9s6iF020760; Fri, 20 Apr 2018 09:54:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804200954.w3K9s6iF020760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 20 Apr 2018 09:54: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: r332811 - stable/11/sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 332811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 09:54:06 -0000 Author: ae Date: Fri Apr 20 09:54:06 2018 New Revision: 332811 URL: https://svnweb.freebsd.org/changeset/base/332811 Log: MFC r332467: To avoid possible deadlock do not acquire JQUEUE_LOCK before callout_drain. Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Fri Apr 20 09:48:42 2018 (r332810) +++ stable/11/sys/netpfil/ipfw/nat64/nat64lsn.c Fri Apr 20 09:54:06 2018 (r332811) @@ -1755,10 +1755,7 @@ nat64lsn_destroy_instance(struct nat64lsn_cfg *cfg) { struct nat64lsn_host *nh, *tmp; - JQUEUE_LOCK(); callout_drain(&cfg->jcallout); - JQUEUE_UNLOCK(); - callout_drain(&cfg->periodic); I6HASH_FOREACH_SAFE(cfg, nh, tmp, nat64lsn_destroy_host, cfg); DPRINTF(DP_OBJ, "instance %s: hosts %d", cfg->name, cfg->ihcount); From owner-svn-src-all@freebsd.org Fri Apr 20 09:57:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D795F8D257; Fri, 20 Apr 2018 09:57:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E01A080A70; Fri, 20 Apr 2018 09:57:31 +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 DAF3316CCA; Fri, 20 Apr 2018 09:57:31 +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 w3K9vVaU020973; Fri, 20 Apr 2018 09:57:31 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3K9vVed020972; Fri, 20 Apr 2018 09:57:31 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201804200957.w3K9vVed020972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 20 Apr 2018 09:57:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332812 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 332812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 09:57:32 -0000 Author: ae Date: Fri Apr 20 09:57:31 2018 New Revision: 332812 URL: https://svnweb.freebsd.org/changeset/base/332812 Log: Add dead_bpf_if structure, that should be used as fake bpf_if during ifnet detach. Since destroying interface is not atomic operation and due to the lack of synhronization during destroy, it is possible, that in the time between bpfdetach() and if_free() some queued on destroying interface mbuf will be used by ether_input_internal() and bpf_peers_present() can dereference NULL bpf_if pointer. To protect from this, assign pointer to empty bpf_if_ext structure instead of NULL pointer after bpfdetach(). Reviewed by: melifaro, eugen Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D15083 Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Fri Apr 20 09:54:06 2018 (r332811) +++ head/sys/net/bpf.c Fri Apr 20 09:57:31 2018 (r332812) @@ -98,6 +98,10 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); +static struct bpf_if_ext dead_bpf_if = { + .bif_dlist = LIST_HEAD_INITIALIZER() +}; + struct bpf_if { #define bif_next bif_ext.bif_next #define bif_dlist bif_ext.bif_dlist @@ -2659,7 +2663,7 @@ bpfdetach(struct ifnet *ifp) */ BPFIF_WLOCK(bp); bp->bif_flags |= BPFIF_FLAG_DYING; - *bp->bif_bpf = NULL; + *bp->bif_bpf = (struct bpf_if *)&dead_bpf_if;; BPFIF_WUNLOCK(bp); CTR4(KTR_NET, "%s: sheduling free for encap %d (%p) for if %p", From owner-svn-src-all@freebsd.org Fri Apr 20 11:38:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66A0CF95A07; Fri, 20 Apr 2018 11:38:30 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1926B780CC; Fri, 20 Apr 2018 11:38:30 +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 0F59117D01; Fri, 20 Apr 2018 11:38:30 +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 w3KBcT9r070612; Fri, 20 Apr 2018 11:38:29 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KBcTou070611; Fri, 20 Apr 2018 11:38:29 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201804201138.w3KBcTou070611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 20 Apr 2018 11:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332813 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 332813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 11:38:30 -0000 Author: rmacklem Date: Fri Apr 20 11:38:29 2018 New Revision: 332813 URL: https://svnweb.freebsd.org/changeset/base/332813 Log: Fix use of pointer after being set NULL. Using a pointer after setting it NULL is probably not a good plan. Spotted by inspection during changes for Flexible File Layout Ioerr handling. This code path obviously isn't normally executed. MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Fri Apr 20 09:57:31 2018 (r332812) +++ head/sys/fs/nfsclient/nfs_clport.c Fri Apr 20 11:38:29 2018 (r332813) @@ -1391,8 +1391,8 @@ nfssvc_nfscl(struct thread *td, struct nfssvc_args *ua NFSMNTP_CANCELRPCS); mtx_unlock(&nmp->nm_mtx); } else { - nmp = NULL; mtx_unlock(&nmp->nm_mtx); + nmp = NULL; } break; } From owner-svn-src-all@freebsd.org Fri Apr 20 12:37:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51317F9EB97; Fri, 20 Apr 2018 12:37:09 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F313786D5D; Fri, 20 Apr 2018 12:37:08 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED7EC1866C; Fri, 20 Apr 2018 12:37:08 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KCb8f0001042; Fri, 20 Apr 2018 12:37:08 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KCb8BQ001040; Fri, 20 Apr 2018 12:37:08 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201804201237.w3KCb8BQ001040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Fri, 20 Apr 2018 12:37: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: r332814 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: nyan X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 332814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 12:37:09 -0000 Author: nyan Date: Fri Apr 20 12:37:08 2018 New Revision: 332814 URL: https://svnweb.freebsd.org/changeset/base/332814 Log: MFi386: r329199 Move signal trampolines out of locore.s into separate source file. This fixes pc98 build. Modified: stable/11/sys/conf/files.pc98 Modified: stable/11/sys/conf/files.pc98 ============================================================================== --- stable/11/sys/conf/files.pc98 Fri Apr 20 11:38:29 2018 (r332813) +++ stable/11/sys/conf/files.pc98 Fri Apr 20 12:37:08 2018 (r332814) @@ -171,6 +171,7 @@ i386/i386/mpboot.s optional smp i386/i386/perfmon.c optional perfmon i386/i386/pmap.c standard i386/i386/ptrace_machdep.c standard +i386/i386/sigtramp.s standard i386/i386/support.s standard i386/i386/swtch.s standard i386/i386/sys_machdep.c standard From owner-svn-src-all@freebsd.org Fri Apr 20 12:40:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89C1CF9EEFD; Fri, 20 Apr 2018 12:40:06 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 382FC87127; Fri, 20 Apr 2018 12:40:06 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3326318675; Fri, 20 Apr 2018 12:40:06 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KCe6i2001450; Fri, 20 Apr 2018 12:40:06 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KCe66V001449; Fri, 20 Apr 2018 12:40:06 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201804201240.w3KCe66V001449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Fri, 20 Apr 2018 12:40: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: r332815 - stable/11/sys/pc98/cbus X-SVN-Group: stable-11 X-SVN-Commit-Author: nyan X-SVN-Commit-Paths: stable/11/sys/pc98/cbus X-SVN-Commit-Revision: 332815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 12:40:06 -0000 Author: nyan Date: Fri Apr 20 12:40:05 2018 New Revision: 332815 URL: https://svnweb.freebsd.org/changeset/base/332815 Log: - Use __FBSDID(). - Fix pc98 build. Merge from sys/dev/syscons/scterm-teken.c r330918. Modified: stable/11/sys/pc98/cbus/scterm-sck.c Modified: stable/11/sys/pc98/cbus/scterm-sck.c ============================================================================== --- stable/11/sys/pc98/cbus/scterm-sck.c Fri Apr 20 12:37:08 2018 (r332814) +++ stable/11/sys/pc98/cbus/scterm-sck.c Fri Apr 20 12:40:05 2018 (r332815) @@ -22,10 +22,11 @@ * 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_syscons.h" #include @@ -909,24 +910,18 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char } static void -scterm_puts(scr_stat *scp, u_char *buf, int len, int kernel) +scterm_puts(scr_stat *scp, u_char *buf, int len) { term_stat *tcp; u_char *ptr; #ifdef KANJI u_short kanji_code; #endif - color_t backup; tcp = scp->ts; ptr = buf; outloop: scp->sc->write_in_progress++; - backup = tcp->cur_color; - if (kernel) { - tcp->cur_color.fg = SC_KERNEL_CONS_ATTR & 0x0f; - tcp->cur_color.bg = (SC_KERNEL_CONS_ATTR >> 4) & 0x0f; - } if (tcp->esc) { scterm_scan_esc(scp, tcp, *ptr++); @@ -1109,8 +1104,6 @@ ascii_end: sc_term_gen_scroll(scp, scp->sc->scr_map[0x20], tcp->cur_attr); - if (kernel) - tcp->cur_color = backup; scp->sc->write_in_progress--; if (len) goto outloop; From owner-svn-src-all@freebsd.org Fri Apr 20 13:08:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B99D4FA1D66; Fri, 20 Apr 2018 13:08:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B5EB6D230; Fri, 20 Apr 2018 13:08:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E71A18B27; Fri, 20 Apr 2018 13:08:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KD852X015966; Fri, 20 Apr 2018 13:08:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KD849v015961; Fri, 20 Apr 2018 13:08:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804201308.w3KD849v015961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 20 Apr 2018 13:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332816 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 332816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 13:08:06 -0000 Author: avg Date: Fri Apr 20 13:08:04 2018 New Revision: 332816 URL: https://svnweb.freebsd.org/changeset/base/332816 Log: call racct_proc_ucred_changed() under the proc lock The lock is required to ensure that the switch to the new credentials and the transfer of the process's accounting data from the old credentials to the new ones is done atomically. Otherwise, some updates may be applied to the new credentials and then additionally transferred from the old credentials if the updates happen after proc_set_cred() and before racct_proc_ucred_changed(). The problem is especially pronounced for RACCT_RSS because - there is a strict accounting for this resource (it's reclaimable) - it's updated asynchronously by the vm daemon - it's updated by setting an absolute value instead of applying a delta I had to remove a call to rctl_proc_ucred_changed() from racct_proc_ucred_changed() and make all callers of latter call the former as well. The reason is that rctl_proc_ucred_changed, as it is implemented now, cannot be called while holding the proc lock, so the lock is dropped after calling racct_proc_ucred_changed. Additionally, I've added calls to crhold / crfree around the rctl call, because without the proc lock there is no gurantee that the new credentials, owned by the process, will stay stable. That does not eliminate a possibility that the credentials passed to the rctl will get stale. Ideally, rctl_proc_ucred_changed should be able to work under the proc lock. Many thanks to kib for pointing out the above problems. PR: 222027 Discussed with: kib No comment: trasz MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D15048 Modified: head/sys/kern/kern_jail.c head/sys/kern/kern_loginclass.c head/sys/kern/kern_prot.c head/sys/kern/kern_racct.c head/sys/kern/kern_rctl.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Fri Apr 20 12:40:05 2018 (r332815) +++ head/sys/kern/kern_jail.c Fri Apr 20 13:08:04 2018 (r332816) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2401,10 +2402,15 @@ do_jail_attach(struct thread *td, struct prison *pr) newcred->cr_prison = pr; proc_set_cred(p, newcred); setsugid(p); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); #endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); +#endif prison_deref(oldcred->cr_prison, PD_DEREF | PD_DEUREF); crfree(oldcred); return (0); @@ -3960,6 +3966,7 @@ prison_racct_modify(struct prison *pr) */ racct_move(pr->pr_prison_racct->prr_racct, oldprr->prr_racct); +#ifdef RCTL /* * Force rctl to reattach rules to processes. */ @@ -3967,9 +3974,10 @@ prison_racct_modify(struct prison *pr) PROC_LOCK(p); cred = crhold(p->p_ucred); PROC_UNLOCK(p); - racct_proc_ucred_changed(p, cred, cred); + rctl_proc_ucred_changed(p, cred); crfree(cred); } +#endif sx_sunlock(&allproc_lock); prison_racct_free_locked(oldprr); Modified: head/sys/kern/kern_loginclass.c ============================================================================== --- head/sys/kern/kern_loginclass.c Fri Apr 20 12:40:05 2018 (r332815) +++ head/sys/kern/kern_loginclass.c Fri Apr 20 13:08:04 2018 (r332816) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -230,9 +231,14 @@ sys_setloginclass(struct thread *td, struct setlogincl oldcred = crcopysafe(p, newcred); newcred->cr_loginclass = newlc; proc_set_cred(p, newcred); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); +#endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); #endif loginclass_free(oldcred->cr_loginclass); crfree(oldcred); Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Fri Apr 20 12:40:05 2018 (r332815) +++ head/sys/kern/kern_prot.c Fri Apr 20 13:08:04 2018 (r332816) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -575,10 +576,15 @@ sys_setuid(struct thread *td, struct setuid_args *uap) setsugid(p); } proc_set_cred(p, newcred); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); #endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); +#endif uifree(uip); crfree(oldcred); return (0); @@ -923,10 +929,15 @@ sys_setreuid(struct thread *td, struct setreuid_args * setsugid(p); } proc_set_cred(p, newcred); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); #endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); +#endif uifree(ruip); uifree(euip); crfree(oldcred); @@ -1064,9 +1075,14 @@ sys_setresuid(struct thread *td, struct setresuid_args setsugid(p); } proc_set_cred(p, newcred); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); +#endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); #endif uifree(ruip); uifree(euip); Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Fri Apr 20 12:40:05 2018 (r332815) +++ head/sys/kern/kern_racct.c Fri Apr 20 13:08:04 2018 (r332816) @@ -1046,7 +1046,7 @@ racct_proc_ucred_changed(struct proc *p, struct ucred if (!racct_enable) return; - PROC_LOCK_ASSERT(p, MA_NOTOWNED); + PROC_LOCK_ASSERT(p, MA_OWNED); newuip = newcred->cr_ruidinfo; olduip = oldcred->cr_ruidinfo; @@ -1073,10 +1073,6 @@ racct_proc_ucred_changed(struct proc *p, struct ucred p->p_racct); } RACCT_UNLOCK(); - -#ifdef RCTL - rctl_proc_ucred_changed(p, newcred); -#endif } void Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Fri Apr 20 12:40:05 2018 (r332815) +++ head/sys/kern/kern_rctl.c Fri Apr 20 13:08:04 2018 (r332816) @@ -1956,12 +1956,15 @@ rctl_proc_ucred_changed(struct proc *p, struct ucred * struct prison_racct *newprr; int rulecnt, i; - ASSERT_RACCT_ENABLED(); + if (!racct_enable) + return; + PROC_LOCK_ASSERT(p, MA_NOTOWNED); + newuip = newcred->cr_ruidinfo; newlc = newcred->cr_loginclass; newprr = newcred->cr_prison->pr_prison_racct; - + LIST_INIT(&newrules); again: From owner-svn-src-all@freebsd.org Fri Apr 20 13:58:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F331CFA61F8; Fri, 20 Apr 2018 13:58:48 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92C6979165; Fri, 20 Apr 2018 13:58:48 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DBE01932A; Fri, 20 Apr 2018 13:58:48 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KDwm4K040475; Fri, 20 Apr 2018 13:58:48 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KDwm0R040474; Fri, 20 Apr 2018 13:58:48 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201358.w3KDwm0R040474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 13:58: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: r332817 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 332817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 13:58:49 -0000 Author: jtl Date: Fri Apr 20 13:58:48 2018 New Revision: 332817 URL: https://svnweb.freebsd.org/changeset/base/332817 Log: MFC r332120: If a user closes the socket before we call tcp_usr_abort(), then tcp_drop() may unlock the INP. Currently, tcp_usr_abort() does not check for this case, which results in a panic while trying to unlock the already-unlocked INP (not to mention, a use-after-free violation). Make tcp_usr_abort() check the return value of tcp_drop(). In the case where tcp_drop() returns NULL, tcp_usr_abort() can skip further steps to abort the connection and simply unlock the INP_INFO lock prior to returning. Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet/tcp_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/11/sys/netinet/tcp_usrreq.c Fri Apr 20 13:08:04 2018 (r332816) +++ stable/11/sys/netinet/tcp_usrreq.c Fri Apr 20 13:58:48 2018 (r332817) @@ -1080,7 +1080,9 @@ tcp_usr_abort(struct socket *so) !(inp->inp_flags & INP_DROPPED)) { tp = intotcpcb(inp); TCPDEBUG1(); - tcp_drop(tp, ECONNABORTED); + tp = tcp_drop(tp, ECONNABORTED); + if (tp == NULL) + goto dropped; TCPDEBUG2(PRU_ABORT); TCP_PROBE2(debug__user, tp, PRU_ABORT); } @@ -1091,6 +1093,7 @@ tcp_usr_abort(struct socket *so) inp->inp_flags |= INP_SOCKREF; } INP_WUNLOCK(inp); +dropped: INP_INFO_RUNLOCK(&V_tcbinfo); } From owner-svn-src-all@freebsd.org Fri Apr 20 14:01:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE3FBFA64CE; Fri, 20 Apr 2018 14:01:09 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12559793E2; Fri, 20 Apr 2018 14:01:09 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D3ED19461; Fri, 20 Apr 2018 14:01:09 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KE180c044205; Fri, 20 Apr 2018 14:01:08 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KE18d5044204; Fri, 20 Apr 2018 14:01:08 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201401.w3KE18d5044204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 14:01: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: r332818 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 332818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 14:01:10 -0000 Author: jtl Date: Fri Apr 20 14:01:08 2018 New Revision: 332818 URL: https://svnweb.freebsd.org/changeset/base/332818 Log: MFC r331926: r330675 introduced an extra window check in the LRO code to ensure it captured and reported the highest window advertisement with the same SEQ/ACK. However, the window comparison uses modulo 2**16 math, rather than directly comparing the absolute values. Because windows use absolute values and not modulo 2**16 math (i.e. they don't wrap), we need to compare the absolute values. Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet/tcp_seq.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_seq.h ============================================================================== --- stable/11/sys/netinet/tcp_seq.h Fri Apr 20 13:58:48 2018 (r332817) +++ stable/11/sys/netinet/tcp_seq.h Fri Apr 20 14:01:08 2018 (r332818) @@ -45,10 +45,10 @@ #define SEQ_MIN(a, b) ((SEQ_LT(a, b)) ? (a) : (b)) #define SEQ_MAX(a, b) ((SEQ_GT(a, b)) ? (a) : (b)) -#define WIN_LT(a,b) ((short)(ntohs(a)-ntohs(b)) < 0) -#define WIN_LEQ(a,b) ((short)(ntohs(a)-ntohs(b)) <= 0) -#define WIN_GT(a,b) ((short)(ntohs(a)-ntohs(b)) > 0) -#define WIN_GEQ(a,b) ((short)(ntohs(a)-ntohs(b)) >= 0) +#define WIN_LT(a,b) (ntohs(a) < ntohs(b)) +#define WIN_LEQ(a,b) (ntohs(a) <= ntohs(b)) +#define WIN_GT(a,b) (ntohs(a) > ntohs(b)) +#define WIN_GEQ(a,b) (ntohs(a) >= ntohs(b)) #define WIN_MIN(a, b) ((WIN_LT(a, b)) ? (a) : (b)) #define WIN_MAX(a, b) ((WIN_GT(a, b)) ? (a) : (b)) From owner-svn-src-all@freebsd.org Fri Apr 20 14:21:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DAFEFA7B68; Fri, 20 Apr 2018 14:21:38 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFC697EE9E; Fri, 20 Apr 2018 14:21:37 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA8401979F; Fri, 20 Apr 2018 14:21:37 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KELbPA053824; Fri, 20 Apr 2018 14:21:37 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KELbAl053823; Fri, 20 Apr 2018 14:21:37 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201421.w3KELbAl053823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 14:21: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: r332819 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 332819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 14:21:38 -0000 Author: jtl Date: Fri Apr 20 14:21:37 2018 New Revision: 332819 URL: https://svnweb.freebsd.org/changeset/base/332819 Log: MFC r331488: This change adds a flag to the DAD entry to indicate whether it is currently on the queue. This prevents accidentally doubly-removing a DAD entry from the queue, while also simplifying some of the logic in nd6_dad_stop(). Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet6/nd6_nbr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/11/sys/netinet6/nd6_nbr.c Fri Apr 20 14:01:08 2018 (r332818) +++ stable/11/sys/netinet6/nd6_nbr.c Fri Apr 20 14:21:37 2018 (r332819) @@ -1119,6 +1119,7 @@ struct dadq { #define ND_OPT_NONCE_LEN32 \ ((ND_OPT_NONCE_LEN + sizeof(uint32_t) - 1)/sizeof(uint32_t)) uint32_t dad_nonce[ND_OPT_NONCE_LEN32]; + bool dad_ondadq; /* on dadq? Protected by DADQ_WLOCK. */ }; static VNET_DEFINE(TAILQ_HEAD(, dadq), dadq); @@ -1137,6 +1138,7 @@ nd6_dad_add(struct dadq *dp) DADQ_WLOCK(); TAILQ_INSERT_TAIL(&V_dadq, dp, dad_list); + dp->dad_ondadq = true; DADQ_WUNLOCK(); } @@ -1145,9 +1147,17 @@ nd6_dad_del(struct dadq *dp) { DADQ_WLOCK(); - TAILQ_REMOVE(&V_dadq, dp, dad_list); - DADQ_WUNLOCK(); - nd6_dad_rele(dp); + if (dp->dad_ondadq) { + /* + * Remove dp from the dadq and release the dadq's + * reference. + */ + TAILQ_REMOVE(&V_dadq, dp, dad_list); + dp->dad_ondadq = false; + DADQ_WUNLOCK(); + nd6_dad_rele(dp); + } else + DADQ_WUNLOCK(); } static struct dadq * @@ -1294,6 +1304,8 @@ nd6_dad_start(struct ifaddr *ifa, int delay) dp->dad_ns_icount = dp->dad_na_icount = 0; dp->dad_ns_ocount = dp->dad_ns_tcount = 0; dp->dad_ns_lcount = dp->dad_loopbackprobe = 0; + + /* Add this to the dadq and add a reference for the dadq. */ refcount_init(&dp->dad_refcnt, 1); nd6_dad_add(dp); nd6_dad_starttimer(dp, delay, 0); @@ -1314,16 +1326,9 @@ nd6_dad_stop(struct ifaddr *ifa) } nd6_dad_stoptimer(dp); - - /* - * The DAD queue entry may have been removed by nd6_dad_timer() while - * we were waiting for it to stop, so re-do the lookup. - */ - nd6_dad_rele(dp); - if (nd6_dad_find(ifa, NULL) == NULL) - return; - nd6_dad_del(dp); + + /* Release this function's reference, acquired by nd6_dad_find(). */ nd6_dad_rele(dp); } From owner-svn-src-all@freebsd.org Fri Apr 20 14:34:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0F46FA8954; Fri, 20 Apr 2018 14:34:05 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 203DE81F6B; Fri, 20 Apr 2018 14:34:05 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0109219988; Fri, 20 Apr 2018 14:34:05 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KEY4WR060539; Fri, 20 Apr 2018 14:34:04 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KEY4pe060535; Fri, 20 Apr 2018 14:34:04 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201434.w3KEY4pe060535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 14:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332820 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 332820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 14:34:06 -0000 Author: jtl Date: Fri Apr 20 14:34:04 2018 New Revision: 332820 URL: https://svnweb.freebsd.org/changeset/base/332820 Log: MFC r331484: Remove some unneccessary variable sets in IPv6 code, as detected by clang's static analyzer. Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet6/dest6.c stable/11/sys/netinet6/icmp6.c stable/11/sys/netinet6/ip6_output.c stable/11/sys/netinet6/udp6_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/dest6.c ============================================================================== --- stable/11/sys/netinet6/dest6.c Fri Apr 20 14:21:37 2018 (r332819) +++ stable/11/sys/netinet6/dest6.c Fri Apr 20 14:34:04 2018 (r332820) @@ -91,7 +91,7 @@ dest6_input(struct mbuf **mp, int *offp, int proto) opt = (u_int8_t *)dstopts + sizeof(struct ip6_dest); /* search header for all options. */ - for (optlen = 0; dstoptlen > 0; dstoptlen -= optlen, opt += optlen) { + for (; dstoptlen > 0; dstoptlen -= optlen, opt += optlen) { if (*opt != IP6OPT_PAD1 && (dstoptlen < IP6OPT_MINLEN || *(opt + 1) + 2 > dstoptlen)) { IP6STAT_INC(ip6s_toosmall); Modified: stable/11/sys/netinet6/icmp6.c ============================================================================== --- stable/11/sys/netinet6/icmp6.c Fri Apr 20 14:21:37 2018 (r332819) +++ stable/11/sys/netinet6/icmp6.c Fri Apr 20 14:34:04 2018 (r332820) @@ -592,7 +592,6 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) n->m_pkthdr.len = n0len + (noff - off); n->m_next = n0; } else { - nip6 = mtod(n, struct ip6_hdr *); IP6_EXTHDR_GET(nicmp6, struct icmp6_hdr *, n, off, sizeof(*nicmp6)); noff = off; Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Fri Apr 20 14:21:37 2018 (r332819) +++ stable/11/sys/netinet6/ip6_output.c Fri Apr 20 14:34:04 2018 (r332820) @@ -1038,7 +1038,7 @@ sendorfree: m = m0->m_nextpkt; m0->m_nextpkt = 0; m_freem(m0); - for (m0 = m; m; m = m0) { + for (; m; m = m0) { m0 = m->m_nextpkt; m->m_nextpkt = 0; if (error == 0) { Modified: stable/11/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/11/sys/netinet6/udp6_usrreq.c Fri Apr 20 14:21:37 2018 (r332819) +++ stable/11/sys/netinet6/udp6_usrreq.c Fri Apr 20 14:34:04 2018 (r332820) @@ -208,7 +208,6 @@ udp6_input(struct mbuf **mp, int *offp, int proto) uint8_t nxt; ifp = m->m_pkthdr.rcvif; - ip6 = mtod(m, struct ip6_hdr *); #ifndef PULLDOWN_TEST IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), IPPROTO_DONE); @@ -218,6 +217,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto) IP6_EXTHDR_GET(uh, struct udphdr *, m, off, sizeof(*uh)); if (!uh) return (IPPROTO_DONE); + ip6 = mtod(m, struct ip6_hdr *); #endif UDPSTAT_INC(udps_ipackets); From owner-svn-src-all@freebsd.org Fri Apr 20 14:47:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72664FA9A7C; Fri, 20 Apr 2018 14:47:03 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 278A285760; Fri, 20 Apr 2018 14:47:03 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E1CA19B41; Fri, 20 Apr 2018 14:47:03 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KEl2Om066263; Fri, 20 Apr 2018 14:47:02 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KEl2Vr066261; Fri, 20 Apr 2018 14:47:02 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201447.w3KEl2Vr066261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 14:47:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332821 - in stable/11/sys: netinet netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: in stable/11/sys: netinet netinet6 X-SVN-Commit-Revision: 332821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 14:47:03 -0000 Author: jtl Date: Fri Apr 20 14:47:02 2018 New Revision: 332821 URL: https://svnweb.freebsd.org/changeset/base/332821 Log: MFC r331309: If the INP lock is uncontested, avoid taking a reference and jumping through the lock-switching hoops. A few of the INP lookup operations that lock INPs after the lookup do so using this mechanism (to maintain lock ordering): 1. Lock lookup structure. 2. Find INP. 3. Acquire reference on INP. 4. Drop lock on lookup structure. 5. Acquire INP lock. 6. Drop reference on INP. This change provides a slightly shorter path for cases where the INP lock is uncontested: 1. Lock lookup structure. 2. Find INP. 3. Try to acquire the INP lock. 4. If successful, drop lock on lookup structure. Of course, if the INP lock is contested, the functions will need to revert to the previous way of switching locks safely. This saves a few atomic operations when the INP lock is uncontested. Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet/in_pcb.c stable/11/sys/netinet6/in6_pcb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/in_pcb.c ============================================================================== --- stable/11/sys/netinet/in_pcb.c Fri Apr 20 14:34:04 2018 (r332820) +++ stable/11/sys/netinet/in_pcb.c Fri Apr 20 14:47:02 2018 (r332821) @@ -1619,6 +1619,7 @@ in_pcblookup_group(struct inpcbinfo *pcbinfo, struct i struct inpcbhead *head; struct inpcb *inp, *tmpinp; u_short fport = fport_arg, lport = lport_arg; + bool locked; /* * First look for an exact match. @@ -1805,18 +1806,32 @@ in_pcblookup_group(struct inpcbinfo *pcbinfo, struct i return (NULL); found: - in_pcbref(inp); - INP_GROUP_UNLOCK(pcbgroup); - if (lookupflags & INPLOOKUP_WLOCKPCB) { - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) - return (NULL); - } else if (lookupflags & INPLOOKUP_RLOCKPCB) { - INP_RLOCK(inp); - if (in_pcbrele_rlocked(inp)) - return (NULL); - } else + if (lookupflags & INPLOOKUP_WLOCKPCB) + locked = TRY_INP_WLOCK(inp); + else if (lookupflags & INPLOOKUP_RLOCKPCB) + locked = TRY_INP_RLOCK(inp); + else panic("%s: locking bug", __func__); + if (!locked) + in_pcbref(inp); + INP_GROUP_UNLOCK(pcbgroup); + if (!locked) { + if (lookupflags & INPLOOKUP_WLOCKPCB) { + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) + return (NULL); + } else { + INP_RLOCK(inp); + if (in_pcbrele_rlocked(inp)) + return (NULL); + } + } +#ifdef INVARIANTS + if (lookupflags & INPLOOKUP_WLOCKPCB) + INP_WLOCK_ASSERT(inp); + else + INP_RLOCK_ASSERT(inp); +#endif return (inp); } #endif /* PCBGROUP */ @@ -1955,23 +1970,38 @@ in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in struct ifnet *ifp) { struct inpcb *inp; + bool locked; INP_HASH_RLOCK(pcbinfo); inp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, (lookupflags & ~(INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)), ifp); if (inp != NULL) { - in_pcbref(inp); - INP_HASH_RUNLOCK(pcbinfo); - if (lookupflags & INPLOOKUP_WLOCKPCB) { - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) - return (NULL); - } else if (lookupflags & INPLOOKUP_RLOCKPCB) { - INP_RLOCK(inp); - if (in_pcbrele_rlocked(inp)) - return (NULL); - } else + if (lookupflags & INPLOOKUP_WLOCKPCB) + locked = INP_TRY_WLOCK(inp); + else if (lookupflags & INPLOOKUP_RLOCKPCB) + locked = INP_TRY_RLOCK(inp); + else panic("%s: locking bug", __func__); + if (!locked) + in_pcbref(inp); + INP_HASH_RUNLOCK(pcbinfo); + if (!locked) { + if (lookupflags & INPLOOKUP_WLOCKPCB) { + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) + return (NULL); + } else { + INP_RLOCK(inp); + if (in_pcbrele_rlocked(inp)) + return (NULL); + } + } +#ifdef INVARIANTS + if (lookupflags & INPLOOKUP_WLOCKPCB) + INP_WLOCK_ASSERT(inp); + else + INP_RLOCK_ASSERT(inp); +#endif } else INP_HASH_RUNLOCK(pcbinfo); return (inp); Modified: stable/11/sys/netinet6/in6_pcb.c ============================================================================== --- stable/11/sys/netinet6/in6_pcb.c Fri Apr 20 14:34:04 2018 (r332820) +++ stable/11/sys/netinet6/in6_pcb.c Fri Apr 20 14:47:02 2018 (r332821) @@ -866,6 +866,7 @@ in6_pcblookup_group(struct inpcbinfo *pcbinfo, struct struct inpcbhead *head; struct inpcb *inp, *tmpinp; u_short fport = fport_arg, lport = lport_arg; + bool locked; /* * First look for an exact match. @@ -1024,18 +1025,32 @@ in6_pcblookup_group(struct inpcbinfo *pcbinfo, struct return (NULL); found: - in_pcbref(inp); - INP_GROUP_UNLOCK(pcbgroup); - if (lookupflags & INPLOOKUP_WLOCKPCB) { - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) - return (NULL); - } else if (lookupflags & INPLOOKUP_RLOCKPCB) { - INP_RLOCK(inp); - if (in_pcbrele_rlocked(inp)) - return (NULL); - } else + if (lookupflags & INPLOOKUP_WLOCKPCB) + locked = INP_TRY_WLOCK(inp); + else if (lookupflags & INPLOOKUP_RLOCKPCB) + locked = INP_TRY_RLOCK(inp); + else panic("%s: locking buf", __func__); + if (!locked) + in_pcbref(inp); + INP_GROUP_UNLOCK(pcbgroup); + if (!locked) { + if (lookupflags & INPLOOKUP_WLOCKPCB) { + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) + return (NULL); + } else { + INP_RLOCK(inp); + if (in_pcbrele_rlocked(inp)) + return (NULL); + } + } +#ifdef INVARIANTS + if (lookupflags & INPLOOKUP_WLOCKPCB) + INP_WLOCK_ASSERT(inp); + else + INP_RLOCK_ASSERT(inp); +#endif return (inp); } #endif /* PCBGROUP */ @@ -1161,23 +1176,38 @@ in6_pcblookup_hash(struct inpcbinfo *pcbinfo, struct i struct ifnet *ifp) { struct inpcb *inp; + bool locked; INP_HASH_RLOCK(pcbinfo); inp = in6_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, (lookupflags & ~(INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)), ifp); if (inp != NULL) { - in_pcbref(inp); - INP_HASH_RUNLOCK(pcbinfo); - if (lookupflags & INPLOOKUP_WLOCKPCB) { - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) - return (NULL); - } else if (lookupflags & INPLOOKUP_RLOCKPCB) { - INP_RLOCK(inp); - if (in_pcbrele_rlocked(inp)) - return (NULL); - } else + if (lookupflags & INPLOOKUP_WLOCKPCB) + locked = INP_TRY_WLOCK(inp); + else if (lookupflags & INPLOOKUP_RLOCKPCB) + locked = INP_TRY_RLOCK(inp); + else panic("%s: locking bug", __func__); + if (!locked) + in_pcbref(inp); + INP_HASH_RUNLOCK(pcbinfo); + if (!locked) { + if (lookupflags & INPLOOKUP_WLOCKPCB) { + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) + return (NULL); + } else { + INP_RLOCK(inp); + if (in_pcbrele_rlocked(inp)) + return (NULL); + } + } +#ifdef INVARIANTS + if (lookupflags & INPLOOKUP_WLOCKPCB) + INP_WLOCK_ASSERT(inp); + else + INP_RLOCK_ASSERT(inp); +#endif } else INP_HASH_RUNLOCK(pcbinfo); return (inp); From owner-svn-src-all@freebsd.org Fri Apr 20 14:55:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74684FAA215; Fri, 20 Apr 2018 14:55:14 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E0E46842D; Fri, 20 Apr 2018 14:55:14 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F091719CCB; Fri, 20 Apr 2018 14:55:13 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KEtDie071207; Fri, 20 Apr 2018 14:55:13 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KEtDcC071206; Fri, 20 Apr 2018 14:55:13 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201455.w3KEtDcC071206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 14:55: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: r332822 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 332822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 14:55:14 -0000 Author: jtl Date: Fri Apr 20 14:55:13 2018 New Revision: 332822 URL: https://svnweb.freebsd.org/changeset/base/332822 Log: MFC r329071: On bootup, the amd64 pmap initialization code creates page-table mappings for the pages used for the kernel and some initial allocations used for the page table. It maps the kernel and the blocks used for these initial allocations using 2MB pages. However, if the kernel does not end on a 2MB boundary, it still maps the last portion using a 2MB page, but reports that the unused 4K blocks within this 2MB allocation are free physical blocks. This means that these same physical blocks could also be mapped elsewhere - for example, into a user process. Given the proximity to the kernel text and data area, it seems wise to avoid allowing someone to write data to physical blocks also mapped into these virtual addresses. (Note that this isn't a security vulnerability: the direct map makes most/all memory on the system mapped into kernel space. And, nothing in the kernel should be trying to access these pages, as the virtual addresses are unused. It simply seems wise to avoid reusing these physical blocks while they are mapped to virtual addresses so close to the kernel text and data area.) Consequently, let's reserve the physical blocks covered by the page-table mappings for these initial allocations. Sponsored by: Netflix, Inc. Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 14:47:02 2018 (r332821) +++ stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 14:55:13 2018 (r332822) @@ -957,6 +957,13 @@ create_pagetables(vm_paddr_t *firstaddr) pd_p[i] = (i << PDRSHIFT) | X86_PG_RW | X86_PG_V | PG_PS | pg_g; + /* + * Because we map the physical blocks in 2M pages, adjust firstaddr + * to record the physical blocks we've actually mapped into kernel + * virtual address space. + */ + *firstaddr = round_2mpage(*firstaddr); + /* And connect up the PD to the PDP (leaving room for L4 pages) */ pdp_p = (pdp_entry_t *)(KPDPphys + ptoa(KPML4I - KPML4BASE)); for (i = 0; i < nkpdpe; i++) From owner-svn-src-all@freebsd.org Fri Apr 20 15:05:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67CAAFAAD46; Fri, 20 Apr 2018 15:05:49 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F0BD6B3AD; Fri, 20 Apr 2018 15:05:49 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09C4919E78; Fri, 20 Apr 2018 15:05:49 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KF5m3A076609; Fri, 20 Apr 2018 15:05:48 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KF5mNM076608; Fri, 20 Apr 2018 15:05:48 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201505.w3KF5mNM076608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 15:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332823 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 332823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:05:49 -0000 Author: jtl Date: Fri Apr 20 15:05:48 2018 New Revision: 332823 URL: https://svnweb.freebsd.org/changeset/base/332823 Log: MFC r329171: Mark the pages used for the initial page-table entries as wired. This makes them consistent with the way other page-table pages are allocated. It also provides the rest of the VM system a good clue that these pages are used. Sponsored by: Netflix, Inc. Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 14:55:13 2018 (r332822) +++ stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 15:05:48 2018 (r332823) @@ -1272,7 +1272,9 @@ pmap_init(void) ("pmap_init: page table page is out of range")); mpte->pindex = pmap_pde_pindex(KERNBASE) + i; mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); + mpte->wire_count = 1; } + atomic_add_int(&vm_cnt.v_wire_count, nkpt); /* * If the kernel is running on a virtual machine, then it must assume From owner-svn-src-all@freebsd.org Fri Apr 20 15:06:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FAA8FAAE45; Fri, 20 Apr 2018 15:06:48 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 425806B4F7; Fri, 20 Apr 2018 15:06:48 +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 3D09319E79; Fri, 20 Apr 2018 15:06:48 +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 w3KF6m6a076721; Fri, 20 Apr 2018 15:06:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KF6mHm076720; Fri, 20 Apr 2018 15:06:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804201506.w3KF6mHm076720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 20 Apr 2018 15:06: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: r332824 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 332824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:06:48 -0000 Author: imp Date: Fri Apr 20 15:06:47 2018 New Revision: 332824 URL: https://svnweb.freebsd.org/changeset/base/332824 Log: MFC r332780,r332783: Intel drives have an optimal alignment for I/O. While they honor I/Os that cross this boundary, they perform better when this isn't the case. Intel uses the 3rd byte in the vendor specific area for this. The DC P3500 was previously listed without any explanation. Add the DC P3520 and DC P4500 to the list. There won't be any others drives needing this quirk. Intel has standardized a field in the namespace data in 1.3 (noiob). A future patch will use that if it exists, with fallback to this method. Submitted by: Keith Busch Reviewed by: jimharris@ [[ plus tweak comments from 332783 ]] Sponsored by: Netflix 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 Fri Apr 20 15:05:48 2018 (r332823) +++ stable/11/sys/dev/nvme/nvme_ns.c Fri Apr 20 15:06:47 2018 (r332824) @@ -486,9 +486,22 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t ns->id = id; ns->stripesize = 0; - if (pci_get_devid(ctrlr->dev) == 0x09538086 && ctrlr->cdata.vs[3] != 0) - ns->stripesize = - (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; + /* + * Older Intel devices advertise in vendor specific space an alignment + * that improves performance. If present use for the stripe size. NVMe + * 1.3 standardized this as NOIOB, and newer Intel drives use that. + */ + switch (pci_get_devid(ctrlr->dev)) { + case 0x09538086: /* Intel DC PC3500 */ + case 0x0a538086: /* Intel DC PC3520 */ + case 0x0a548086: /* Intel DC PC4500 */ + if (ctrlr->cdata.vs[3] != 0) + ns->stripesize = + (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; + break; + default: + break; + } /* * Namespaces are reconstructed after a controller reset, so check From owner-svn-src-all@freebsd.org Fri Apr 20 15:19:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B353FABB05; Fri, 20 Apr 2018 15:19:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE976DF19; Fri, 20 Apr 2018 15:19:28 +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 303441A004; Fri, 20 Apr 2018 15:19:28 +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 w3KFJSuL081847; Fri, 20 Apr 2018 15:19:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KFJRUx081840; Fri, 20 Apr 2018 15:19:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201804201519.w3KFJRUx081840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 20 Apr 2018 15:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332825 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/kern X-SVN-Commit-Revision: 332825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:19:28 -0000 Author: kib Date: Fri Apr 20 15:19:27 2018 New Revision: 332825 URL: https://svnweb.freebsd.org/changeset/base/332825 Log: Rename PROC_PDEATHSIG_SET -> PROC_PDEATHSIG_CTL and PROC_PDEATHSIG_GET -> PROC_PDEATHSIG_STATUS for consistency with other procctl(2) operations names. Requested by: emaste Sponsored by: The FreeBSD Foundation MFC after: 13 days Modified: head/lib/libc/sys/procctl.2 head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_exec.c head/sys/kern/kern_procctl.c head/sys/sys/procctl.h head/tests/sys/kern/pdeathsig.c head/tests/sys/kern/pdeathsig_helper.c Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Fri Apr 20 15:06:47 2018 (r332824) +++ head/lib/libc/sys/procctl.2 Fri Apr 20 15:19:27 2018 (r332825) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 18, 2018 +.Dd April 20, 2018 .Dt PROCCTL 2 .Os .Sh NAME @@ -391,7 +391,7 @@ otherwise. See the note about sysctl .Dv kern.trap_enotcap above, which gives independent global control of signal delivery. -.It Dv PROC_PDEATHSIG_SET +.It Dv PROC_PDEATHSIG_CTL Request the delivery of a signal when the parent of the calling process exits. .Fa idtype @@ -408,7 +408,7 @@ must point to a value of type indicating the signal that should be delivered to the caller. Use zero to cancel a previously requested signal delivery. -.It Dv PROC_PDEATHSIG_GET +.It Dv PROC_PDEATHSIG_STATUS Query the current signal number that will be delivered when the parent of the calling process exits. .Fa idtype @@ -520,9 +520,9 @@ or request is invalid. .It Bq Er EINVAL The -.Dv PROC_PDEATHSIG_SET +.Dv PROC_PDEATHSIG_CTL or -.Dv PROC_PDEATHSIG_GET +.Dv PROC_PDEATHSIG_STATUS request referenced an unsupported .Fa id , .Fa idtype @@ -547,7 +547,7 @@ The reaper facility is based on a similar feature of L DragonflyBSD, and first appeared in .Fx 10.2 . The -.Dv PROC_PDEATHSIG_SET +.Dv PROC_PDEATHSIG_CTL facility is based on the prctl(PR_SET_PDEATHSIG, ...) feature of Linux, and first appeared in .Fx 12.0 . Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Apr 20 15:06:47 2018 (r332824) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Apr 20 15:19:27 2018 (r332825) @@ -3378,13 +3378,13 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ case PROC_TRAPCAP_STATUS: data = &flags; break; - case PROC_PDEATHSIG_SET: + case PROC_PDEATHSIG_CTL: error = copyin(uap->data, &signum, sizeof(signum)); if (error != 0) return (error); data = &signum; break; - case PROC_PDEATHSIG_GET: + case PROC_PDEATHSIG_STATUS: data = &signum; break; default: @@ -3407,7 +3407,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; - case PROC_PDEATHSIG_GET: + case PROC_PDEATHSIG_STATUS: if (error == 0) error = copyout(&signum, uap->data, sizeof(signum)); break; Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Apr 20 15:06:47 2018 (r332824) +++ head/sys/kern/kern_exec.c Fri Apr 20 15:19:27 2018 (r332825) @@ -522,7 +522,7 @@ interpret: credential_changing |= will_transition; #endif - /* Don't inherit PROC_PDEATHSIG_SET value if setuid/setgid. */ + /* Don't inherit PROC_PDEATHSIG_CTL value if setuid/setgid. */ if (credential_changing) imgp->proc->p_pdeathsig = 0; Modified: head/sys/kern/kern_procctl.c ============================================================================== --- head/sys/kern/kern_procctl.c Fri Apr 20 15:06:47 2018 (r332824) +++ head/sys/kern/kern_procctl.c Fri Apr 20 15:19:27 2018 (r332825) @@ -467,13 +467,13 @@ sys_procctl(struct thread *td, struct procctl_args *ua case PROC_TRAPCAP_STATUS: data = &flags; break; - case PROC_PDEATHSIG_SET: + case PROC_PDEATHSIG_CTL: error = copyin(uap->data, &signum, sizeof(signum)); if (error != 0) return (error); data = &signum; break; - case PROC_PDEATHSIG_GET: + case PROC_PDEATHSIG_STATUS: data = &signum; break; default: @@ -495,7 +495,7 @@ sys_procctl(struct thread *td, struct procctl_args *ua if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; - case PROC_PDEATHSIG_GET: + case PROC_PDEATHSIG_STATUS: if (error == 0) error = copyout(&signum, uap->data, sizeof(signum)); break; @@ -551,14 +551,14 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t case PROC_REAP_KILL: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: - case PROC_PDEATHSIG_SET: - case PROC_PDEATHSIG_GET: + case PROC_PDEATHSIG_CTL: + case PROC_PDEATHSIG_STATUS: if (idtype != P_PID) return (EINVAL); } switch (com) { - case PROC_PDEATHSIG_SET: + case PROC_PDEATHSIG_CTL: signum = *(int *)data; p = td->td_proc; if ((id != 0 && id != p->p_pid) || @@ -568,7 +568,7 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t p->p_pdeathsig = signum; PROC_UNLOCK(p); return (0); - case PROC_PDEATHSIG_GET: + case PROC_PDEATHSIG_STATUS: p = td->td_proc; if (id != 0 && id != p->p_pid) return (EINVAL); Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Fri Apr 20 15:06:47 2018 (r332824) +++ head/sys/sys/procctl.h Fri Apr 20 15:19:27 2018 (r332825) @@ -51,8 +51,8 @@ #define PROC_TRACE_STATUS 8 /* query tracing status */ #define PROC_TRAPCAP_CTL 9 /* trap capability errors */ #define PROC_TRAPCAP_STATUS 10 /* query trap capability status */ -#define PROC_PDEATHSIG_SET 11 /* set parent death signal */ -#define PROC_PDEATHSIG_GET 12 /* get parent death signal */ +#define PROC_PDEATHSIG_CTL 11 /* set parent death signal */ +#define PROC_PDEATHSIG_STATUS 12 /* get parent death signal */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) Modified: head/tests/sys/kern/pdeathsig.c ============================================================================== --- head/tests/sys/kern/pdeathsig.c Fri Apr 20 15:06:47 2018 (r332824) +++ head/tests/sys/kern/pdeathsig.c Fri Apr 20 15:19:27 2018 (r332825) @@ -53,42 +53,42 @@ ATF_TC_BODY(arg_validation, tc) /* bad signal */ signum = 8888; - rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); ATF_CHECK_EQ(-1, rc); ATF_CHECK_EQ(EINVAL, errno); /* bad id type */ signum = SIGINFO; - rc = procctl(8888, 0, PROC_PDEATHSIG_SET, &signum); + rc = procctl(8888, 0, PROC_PDEATHSIG_CTL, &signum); ATF_CHECK_EQ(-1, rc); ATF_CHECK_EQ(EINVAL, errno); /* bad id (pid that doesn't match mine or zero) */ signum = SIGINFO; rc = procctl(P_PID, (((getpid() + 1) % 10) + 100), - PROC_PDEATHSIG_SET, &signum); + PROC_PDEATHSIG_CTL, &signum); ATF_CHECK_EQ(-1, rc); ATF_CHECK_EQ(EINVAL, errno); /* null pointer */ signum = SIGINFO; - rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, NULL); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, NULL); ATF_CHECK_EQ(-1, rc); ATF_CHECK_EQ(EFAULT, errno); /* good (pid == 0) */ signum = SIGINFO; - rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); ATF_CHECK_EQ(0, rc); /* good (pid == my pid) */ signum = SIGINFO; - rc = procctl(P_PID, getpid(), PROC_PDEATHSIG_SET, &signum); + rc = procctl(P_PID, getpid(), PROC_PDEATHSIG_CTL, &signum); ATF_CHECK_EQ(0, rc); /* check that we can read the signal number back */ signum = 0xdeadbeef; - rc = procctl(P_PID, 0, PROC_PDEATHSIG_GET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_STATUS, &signum); ATF_CHECK_EQ(0, rc); ATF_CHECK_EQ(SIGINFO, signum); } @@ -102,14 +102,14 @@ ATF_TC_BODY(fork_no_inherit, tc) /* request a signal on parent death in the parent */ signum = SIGINFO; - rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); rc = fork(); ATF_REQUIRE(rc != -1); if (rc == 0) { /* check that we didn't inherit the setting */ signum = 0xdeadbeef; - rc = procctl(P_PID, 0, PROC_PDEATHSIG_GET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_STATUS, &signum); assert(rc == 0); assert(signum == 0); _exit(0); @@ -138,7 +138,7 @@ ATF_TC_BODY(exec_inherit, tc) /* request a signal on parent death and register a handler */ signum = SIGINFO; - rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); assert(rc == 0); /* execute helper program: it asserts that it has the setting */ @@ -186,7 +186,7 @@ ATF_TC_BODY(signal_delivered, tc) signal(signum, dummy_signal_handler); /* request a signal on death of our parent B */ - rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); assert(rc == 0); /* tell B that we're ready for it to exit now */ @@ -263,7 +263,7 @@ ATF_TC_BODY(signal_delivered_ptrace, tc) signal(signum, dummy_signal_handler); /* request a signal on parent death and register a handler */ - rc = procctl(P_PID, 0, PROC_PDEATHSIG_SET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); assert(rc == 0); /* tell D we are ready for it to attach */ Modified: head/tests/sys/kern/pdeathsig_helper.c ============================================================================== --- head/tests/sys/kern/pdeathsig_helper.c Fri Apr 20 15:06:47 2018 (r332824) +++ head/tests/sys/kern/pdeathsig_helper.c Fri Apr 20 15:19:27 2018 (r332825) @@ -38,11 +38,11 @@ int main(int argc, char **argv) /* * This program is executed by the pdeathsig test - * to check if the PROC_PDEATHSIG_SET setting was + * to check if the PROC_PDEATHSIG_CTL setting was * inherited. */ signum = 0xdeadbeef; - rc = procctl(P_PID, 0, PROC_PDEATHSIG_GET, &signum); + rc = procctl(P_PID, 0, PROC_PDEATHSIG_STATUS, &signum); assert(rc == 0); assert(signum == SIGINFO); From owner-svn-src-all@freebsd.org Fri Apr 20 15:28:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90CA2FAC542; Fri, 20 Apr 2018 15:28:59 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42CCF6FE65; Fri, 20 Apr 2018 15:28:59 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D8831A195; Fri, 20 Apr 2018 15:28:59 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KFSxS8087201; Fri, 20 Apr 2018 15:28:59 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KFSxOT087200; Fri, 20 Apr 2018 15:28:59 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201528.w3KFSxOT087200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 15:28: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: r332826 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 332826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:28:59 -0000 Author: jtl Date: Fri Apr 20 15:28:58 2018 New Revision: 332826 URL: https://svnweb.freebsd.org/changeset/base/332826 Log: MFC r330510: Prior to r329071, pmap_bootstrap() used pmap_kmem_choose() to round the first available virtual address to a 2MB boundary. After r329071, create_pagetables() rounds firstaddr up to a 2MB boundary. This ensures the kernel is mapped in super-pages, which is the point of the logic in pmap_kmem_choose(). Therefore, it is no longer necessary for pmap_bootstrap() to round up to the 2MB boundary again. As pmap_bootstrap() was the only user of pmap_kmem_choose(), we can delete pmap_kmem_choose(). Sponsored by: Netflix, Inc. Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 15:19:27 2018 (r332825) +++ stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 15:28:58 2018 (r332826) @@ -688,23 +688,7 @@ static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_ static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, struct spglist *); -static vm_offset_t pmap_kmem_choose(vm_offset_t addr); -/* - * Move the kernel virtual free pointer to the next - * 2MB. This is used to help improve performance - * by using a large (2MB) page for much of the kernel - * (.text, .data, .bss) - */ -static vm_offset_t -pmap_kmem_choose(vm_offset_t addr) -{ - vm_offset_t newaddr = addr; - - newaddr = roundup2(addr, NBPDR); - return (newaddr); -} - /********************/ /* Inline functions */ /********************/ @@ -1050,7 +1034,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) vm_phys_add_seg(KPTphys, KPTphys + ptoa(nkpt)); virtual_avail = (vm_offset_t) KERNBASE + *firstaddr; - virtual_avail = pmap_kmem_choose(virtual_avail); virtual_end = VM_MAX_KERNEL_ADDRESS; From owner-svn-src-all@freebsd.org Fri Apr 20 15:35:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8137EFACDC5; Fri, 20 Apr 2018 15:35:59 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30ED270818; Fri, 20 Apr 2018 15:35:59 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B5B01A33B; Fri, 20 Apr 2018 15:35:59 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KFZwA8091917; Fri, 20 Apr 2018 15:35:58 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KFZwiK091916; Fri, 20 Apr 2018 15:35:58 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201535.w3KFZwiK091916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 15: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: r332827 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 332827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:35:59 -0000 Author: jtl Date: Fri Apr 20 15:35:58 2018 New Revision: 332827 URL: https://svnweb.freebsd.org/changeset/base/332827 Log: MFC r330511: We shouldn't need to execute code in the recursive page table mappings; therefore, it should be safe to set the NX bit on the PML4E for the recursive page table mappings. According to the Intel docs, the effect of the NX bit should propogate to any page reached through a PML4E which has the NX bit set. Sponsored by: Netflix, Inc. Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 15:28:58 2018 (r332826) +++ stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 15:35:58 2018 (r332827) @@ -984,7 +984,7 @@ create_pagetables(vm_paddr_t *firstaddr) /* And recursively map PML4 to itself in order to get PTmap */ p4_p = (pml4_entry_t *)KPML4phys; p4_p[PML4PML4I] = KPML4phys; - p4_p[PML4PML4I] |= X86_PG_RW | X86_PG_V | PG_U; + p4_p[PML4PML4I] |= X86_PG_RW | X86_PG_V | PG_U | pg_nx; /* Connect the Direct Map slot(s) up to the PML4. */ for (i = 0; i < ndmpdpphys; i++) { From owner-svn-src-all@freebsd.org Fri Apr 20 15:41:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AFC4FAD57F; Fri, 20 Apr 2018 15:41:34 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEAEE730F8; Fri, 20 Apr 2018 15:41:33 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D983E1A390; Fri, 20 Apr 2018 15:41:33 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KFfXZI096732; Fri, 20 Apr 2018 15:41:33 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KFfXTK096731; Fri, 20 Apr 2018 15:41:33 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201541.w3KFfXTK096731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 15:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332828 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 332828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:41:34 -0000 Author: jtl Date: Fri Apr 20 15:41:33 2018 New Revision: 332828 URL: https://svnweb.freebsd.org/changeset/base/332828 Log: MFC r306768: If the new window size is less than the old window size, skip the calculations to check if we should advertise a larger window. Modified: stable/11/sys/netinet/tcp_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_output.c ============================================================================== --- stable/11/sys/netinet/tcp_output.c Fri Apr 20 15:35:58 2018 (r332827) +++ stable/11/sys/netinet/tcp_output.c Fri Apr 20 15:41:33 2018 (r332828) @@ -677,10 +677,11 @@ after_sack_rexmit: oldwin = 0; /* - * If the new window size ends up being the same as the old - * size when it is scaled, then don't force a window update. + * If the new window size ends up being the same as or less + * than the old size when it is scaled, then don't force + * a window update. */ - if (oldwin >> tp->rcv_scale == (adv + oldwin) >> tp->rcv_scale) + if (oldwin >> tp->rcv_scale >= (adv + oldwin) >> tp->rcv_scale) goto dontupdate; if (adv >= (long)(2 * tp->t_maxseg) && From owner-svn-src-all@freebsd.org Fri Apr 20 15:44:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8523FAD8CE; Fri, 20 Apr 2018 15:44:30 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62E1273540; Fri, 20 Apr 2018 15:44:30 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DDB81A4D2; Fri, 20 Apr 2018 15:44:30 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KFiUlZ097846; Fri, 20 Apr 2018 15:44:30 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KFiUcn097845; Fri, 20 Apr 2018 15:44:30 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201544.w3KFiUcn097845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 15:44: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: r332829 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 332829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:44:30 -0000 Author: jtl Date: Fri Apr 20 15:44:29 2018 New Revision: 332829 URL: https://svnweb.freebsd.org/changeset/base/332829 Log: MFC r307083: Currently, when tcp_input() receives a packet on a session that matches a TCPCB, it checks (so->so_options & SO_ACCEPTCONN) to determine whether or not the socket is a listening socket. However, this causes the code to access a different cacheline. If we first check if the socket is in the LISTEN state, we can avoid accessing so->so_options when processing packets received for ESTABLISHED sessions. If INVARIANTS is defined, the code still needs to access both variables to check that so->so_options is consistent with the state. Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet/tcp_input.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_input.c ============================================================================== --- stable/11/sys/netinet/tcp_input.c Fri Apr 20 15:41:33 2018 (r332828) +++ stable/11/sys/netinet/tcp_input.c Fri Apr 20 15:44:29 2018 (r332829) @@ -1071,11 +1071,11 @@ relocked: * state) we look into the SYN cache if this is a new connection * attempt or the completion of a previous one. */ - if (so->so_options & SO_ACCEPTCONN) { + KASSERT(tp->t_state == TCPS_LISTEN || !(so->so_options & SO_ACCEPTCONN), + ("%s: so accepting but tp %p not listening", __func__, tp)); + if (tp->t_state == TCPS_LISTEN && (so->so_options & SO_ACCEPTCONN)) { struct in_conninfo inc; - KASSERT(tp->t_state == TCPS_LISTEN, ("%s: so accepting but " - "tp not listening", __func__)); bzero(&inc, sizeof(inc)); #ifdef INET6 if (isipv6) { From owner-svn-src-all@freebsd.org Fri Apr 20 15:48:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82A8AFADD19; Fri, 20 Apr 2018 15:48:51 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27720746CE; Fri, 20 Apr 2018 15:48:51 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09AEB1A4D4; Fri, 20 Apr 2018 15:48:51 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KFmo0j098071; Fri, 20 Apr 2018 15:48:50 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KFmofE098069; Fri, 20 Apr 2018 15:48:50 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201548.w3KFmofE098069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 15:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332830 - in stable/11/sys: dev/acpica x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: in stable/11/sys: dev/acpica x86/x86 X-SVN-Commit-Revision: 332830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:48:51 -0000 Author: jtl Date: Fri Apr 20 15:48:50 2018 New Revision: 332830 URL: https://svnweb.freebsd.org/changeset/base/332830 Log: MFC r313447: Ensure the idle thread's loop services interrupts in a timely way when using the ACPI C1/mwait sleep method. Previously, the mwait instruction would return when an interrupt was pending; however, the idle loop did not actually enable interrupts when this occurred. This led to a situation where the idle loop could quickly spin through the C1/mwait sleep method a number of times when an interrupt was pending. (Eventually, the situation corrected itself when something other than an interrupt triggered the idle loop to either enable interrupts or schedule another thread.) Sponsored by: Netflix, Inc. Modified: stable/11/sys/dev/acpica/acpi_cpu.c stable/11/sys/x86/x86/cpu_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/11/sys/dev/acpica/acpi_cpu.c Fri Apr 20 15:44:29 2018 (r332829) +++ stable/11/sys/dev/acpica/acpi_cpu.c Fri Apr 20 15:48:50 2018 (r332830) @@ -1151,6 +1151,9 @@ acpi_cpu_idle(sbintime_t sbt) end_time = ((cpu_ticks() - cputicks) << 20) / cpu_tickrate(); if (curthread->td_critnest == 0) end_time = min(end_time, 500000 / hz); + /* acpi_cpu_c1() returns with interrupts enabled. */ + if (cx_next->do_mwait) + ACPI_ENABLE_IRQS(); sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + end_time) / 4; return; } Modified: stable/11/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/11/sys/x86/x86/cpu_machdep.c Fri Apr 20 15:44:29 2018 (r332829) +++ stable/11/sys/x86/x86/cpu_machdep.c Fri Apr 20 15:48:50 2018 (r332830) @@ -146,6 +146,14 @@ acpi_cpu_c1(void) __asm __volatile("sti; hlt"); } +/* + * Use mwait to pause execution while waiting for an interrupt or + * another thread to signal that there is more work. + * + * NOTE: Interrupts will cause a wakeup; however, this function does + * not enable interrupt handling. The caller is responsible to enable + * interrupts. + */ void acpi_cpu_idle_mwait(uint32_t mwait_hint) { From owner-svn-src-all@freebsd.org Fri Apr 20 15:55:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65408FAE449; Fri, 20 Apr 2018 15:55:10 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1087974D92; Fri, 20 Apr 2018 15:55:10 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B7001A65E; Fri, 20 Apr 2018 15:55:10 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KFt95k003154; Fri, 20 Apr 2018 15:55:09 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KFt9VF003153; Fri, 20 Apr 2018 15:55:09 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201555.w3KFt9VF003153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 15:55: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: r332831 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 332831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 15:55:10 -0000 Author: jtl Date: Fri Apr 20 15:55:09 2018 New Revision: 332831 URL: https://svnweb.freebsd.org/changeset/base/332831 Log: MFC r314116: Fix a panic during boot caused by inadequate locking of some vt(4) driver data structures. vt_change_font() calls vtbuf_grow() to change some vt driver data structures. It uses TF_MUTE to prevent the console from trying to use those data structures while it changes them. During the early stage of the boot process, the vt driver's tc_done routine uses those data structures; however, it is currently called outside the TF_MUTE check. Move the tc_done routine inside the locked TF_MUTE check. PR: 217282 Sponsored by: Netflix, Inc. Modified: stable/11/sys/kern/subr_terminal.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_terminal.c ============================================================================== --- stable/11/sys/kern/subr_terminal.c Fri Apr 20 15:48:50 2018 (r332830) +++ stable/11/sys/kern/subr_terminal.c Fri Apr 20 15:55:09 2018 (r332831) @@ -400,7 +400,10 @@ termtty_outwakeup(struct tty *tp) TERMINAL_UNLOCK_TTY(tm); } - tm->tm_class->tc_done(tm); + TERMINAL_LOCK_TTY(tm); + if (!(tm->tm_flags & TF_MUTE)) + tm->tm_class->tc_done(tm); + TERMINAL_UNLOCK_TTY(tm); if (flags & TF_BELL) tm->tm_class->tc_bell(tm); } @@ -570,10 +573,9 @@ termcn_cnputc(struct consdev *cp, int c) teken_set_curattr(&tm->tm_emulator, &kernel_message); teken_input(&tm->tm_emulator, &cv, 1); teken_set_curattr(&tm->tm_emulator, &backup); + tm->tm_class->tc_done(tm); } TERMINAL_UNLOCK_CONS(tm); - - tm->tm_class->tc_done(tm); } /* From owner-svn-src-all@freebsd.org Fri Apr 20 17:30:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EBBCF862AC; Fri, 20 Apr 2018 17:30:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 344A16BFD2; Fri, 20 Apr 2018 17:30:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 77D4A10AFD2; Fri, 20 Apr 2018 13:30:00 -0400 (EDT) From: John Baldwin To: Eric Joyner Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332735 - head/sys/x86/x86 Date: Fri, 20 Apr 2018 09:57:28 -0700 Message-ID: <1781933.c5USM7Fcyk@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <201804181845.w3IIjYdt037258@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 20 Apr 2018 13:30:00 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 17:30:08 -0000 I need to rework the layout of IRQ values to be more dynamic (per a thread on current@) as I've seen at least a few systems now that have more than 256 I/O APIC pins. Currently we kind of depend on interrupt_sources[] being statically sized, but I could rework this to support dynamic sizing as a result and probably provide a tunable to control the limit on MSI interrupts (and possibly derive the default limit from the number of CPUs). On Thursday, April 19, 2018 08:59:32 AM Eric Joyner wrote: > Is the limit going to be increased at some point? Is there a true limit > somewhere? > > On Wed, Apr 18, 2018 at 11:45 AM, John Baldwin wrote: > > > Author: jhb > > Date: Wed Apr 18 18:45:34 2018 > > New Revision: 332735 > > URL: https://svnweb.freebsd.org/changeset/base/332735 > > > > Log: > > Fix two off-by-one errors when allocating MSI and MSI-X interrupts. > > > > x86 enforces an (arbitray) limit on the number of available MSI and > > MSI-X interrupts to simplify code (in particular, interrupt_source[] > > is statically sized). This means that an attempt to allocate an MSI > > vector needs to fail if it would go beyond the limit, but the checks > > for exceeding the limit had an off-by-one error. In the case of MSI-X > > which allocates interrupts one at a time this meant that IRQ 768 kept > > getting handed out multiple times for msix_alloc() instead of failing > > because all MSI IRQs were in use. > > > > Tested by: lidl > > MFC after: 1 week > > > > Modified: > > head/sys/x86/x86/msi.c > > > > Modified: head/sys/x86/x86/msi.c > > ============================================================ > > ================== > > --- head/sys/x86/x86/msi.c Wed Apr 18 18:45:04 2018 (r332734) > > +++ head/sys/x86/x86/msi.c Wed Apr 18 18:45:34 2018 (r332735) > > @@ -404,7 +404,7 @@ again: > > /* Do we need to create some new sources? */ > > if (cnt < count) { > > /* If we would exceed the max, give up. */ > > - if (i + (count - cnt) > FIRST_MSI_INT + NUM_MSI_INTS) { > > + if (i + (count - cnt) >= FIRST_MSI_INT + NUM_MSI_INTS) { > > mtx_unlock(&msi_lock); > > free(mirqs, M_MSI); > > return (ENXIO); > > @@ -645,7 +645,7 @@ again: > > /* Do we need to create a new source? */ > > if (msi == NULL) { > > /* If we would exceed the max, give up. */ > > - if (i + 1 > FIRST_MSI_INT + NUM_MSI_INTS) { > > + if (i + 1 >= FIRST_MSI_INT + NUM_MSI_INTS) { > > mtx_unlock(&msi_lock); > > return (ENXIO); > > } > > > > -- John Baldwin From owner-svn-src-all@freebsd.org Fri Apr 20 18:06:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5298EF8AEBA; Fri, 20 Apr 2018 18:06:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 018C574A00; Fri, 20 Apr 2018 18:06:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB9CA1BAF1; Fri, 20 Apr 2018 18:06:03 +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 w3KI630g066819; Fri, 20 Apr 2018 18:06:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KI63Cv066818; Fri, 20 Apr 2018 18:06:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804201806.w3KI63Cv066818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 20 Apr 2018 18:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332832 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 18:06:04 -0000 Author: kevans Date: Fri Apr 20 18:06:03 2018 New Revision: 332832 URL: https://svnweb.freebsd.org/changeset/base/332832 Log: bsdgrep: Break procmatches down a little bit more Split the matching and non-matching cases out into their own functions to reduce future complexity. As the name implies, procmatches will eventually process more than one match itself in the future. Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Fri Apr 20 15:55:09 2018 (r332831) +++ head/usr.bin/grep/util.c Fri Apr 20 18:06:03 2018 (r332832) @@ -84,6 +84,8 @@ struct mprintc { bool same_file; /* Same file as previously printed? */ }; +static void procmatch_match(struct mprintc *mc, struct parsec *pc); +static void procmatch_nomatch(struct mprintc *mc, struct parsec *pc); static bool procmatches(struct mprintc *mc, struct parsec *pc, bool matched); #ifdef WITH_INTERNAL_NOSPEC static int litexec(const struct pat *pat, const char *string, @@ -209,6 +211,55 @@ grep_tree(char **argv) return (c); } +static void +procmatch_match(struct mprintc *mc, struct parsec *pc) +{ + + if (mc->doctx) { + if (!first_match && (!mc->same_file || mc->last_outed > 0)) + printf("--\n"); + if (Bflag > 0) + printqueue(); + mc->tail = Aflag; + } + + /* Print the matching line, but only if not quiet/binary */ + if (mc->printmatch) { + printline(pc, ':'); + while (pc->matchidx >= MAX_MATCHES) { + /* Reset matchidx and try again */ + pc->matchidx = 0; + if (procline(pc) == 0) + printline(pc, ':'); + else + break; + } + first_match = false; + mc->same_file = true; + mc->last_outed = 0; + } +} + +static void +procmatch_nomatch(struct mprintc *mc, struct parsec *pc) +{ + + /* Deal with any -A context as needed */ + if (mc->tail > 0) { + grep_printline(&pc->ln, '-'); + mc->tail--; + if (Bflag > 0) + clearqueue(); + } else if (Bflag == 0 || (Bflag > 0 && enqueue(&pc->ln))) + /* + * Enqueue non-matching lines for -B context. If we're not + * actually doing -B context or if the enqueue resulted in a + * line being rotated out, then go ahead and increment + * last_outed to signify a gap between context/match. + */ + ++mc->last_outed; +} + /* * Process any matches in the current parsing context, return a boolean * indicating whether we should halt any further processing or not. 'true' to @@ -224,31 +275,8 @@ procmatches(struct mprintc *mc, struct parsec *pc, boo */ /* Deal with any -B context or context separators */ if (matched) { - if (mc->doctx) { - if (!first_match && - (!mc->same_file || mc->last_outed > 0)) - printf("--\n"); - if (Bflag > 0) - printqueue(); - mc->tail = Aflag; - } + procmatch_match(mc, pc); - /* Print the matching line, but only if not quiet/binary */ - if (mc->printmatch) { - printline(pc, ':'); - while (pc->matchidx >= MAX_MATCHES) { - /* Reset matchidx and try again */ - pc->matchidx = 0; - if (procline(pc) == 0) - printline(pc, ':'); - else - break; - } - first_match = false; - mc->same_file = true; - mc->last_outed = 0; - } - /* Count the matches if we have a match limit */ if (mflag) { /* XXX TODO: Decrement by number of matched lines */ @@ -256,25 +284,8 @@ procmatches(struct mprintc *mc, struct parsec *pc, boo if (mflag && mcount <= 0) return (false); } - } else if (mc->doctx) { - /* Not matching, deal with any -A context as needed */ - if (mc->tail > 0) { - grep_printline(&pc->ln, '-'); - mc->tail--; - if (Bflag > 0) - clearqueue(); - } else { - /* - * Enqueue non-matching lines for -B context. - * If we're not actually doing -B context or if - * the enqueue resulted in a line being rotated - * out, then go ahead and increment last_outed - * to signify a gap between context/match. - */ - if (Bflag == 0 || (Bflag > 0 && enqueue(&pc->ln))) - ++mc->last_outed; - } - } + } else if (mc->doctx) + procmatch_nomatch(mc, pc); return (true); } From owner-svn-src-all@freebsd.org Fri Apr 20 18:20:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9FFEF8C13E; Fri, 20 Apr 2018 18:20:56 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A7B4779CE; Fri, 20 Apr 2018 18:20:56 +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 64D201BD89; Fri, 20 Apr 2018 18:20:56 +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 w3KIKuKf073537; Fri, 20 Apr 2018 18:20:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KIKthB073527; Fri, 20 Apr 2018 18:20:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201804201820.w3KIKthB073527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 20 Apr 2018 18:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332833 - in head: contrib/llvm/include/llvm/CodeGen contrib/llvm/lib/CodeGen contrib/llvm/lib/Target/X86 contrib/llvm/lib/Target/X86/Disassembler contrib/llvm/tools/clang/include/clang... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm/include/llvm/CodeGen contrib/llvm/lib/CodeGen contrib/llvm/lib/Target/X86 contrib/llvm/lib/Target/X86/Disassembler contrib/llvm/tools/clang/include/clang/Driver contrib/llvm/tool... X-SVN-Commit-Revision: 332833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 18:20:57 -0000 Author: dim Date: Fri Apr 20 18:20:55 2018 New Revision: 332833 URL: https://svnweb.freebsd.org/changeset/base/332833 Log: Recommit r332501, with an additional upstream fix for "Cannot lower EFLAGS copy that lives out of a basic block!" errors on i386. Pull in r325446 from upstream clang trunk (by me): [X86] Add 'sahf' CPU feature to frontend Summary: Make clang accept `-msahf` (and `-mno-sahf`) flags to activate the `+sahf` feature for the backend, for bug 36028 (Incorrect use of pushf/popf enables/disables interrupts on amd64 kernels). This was originally submitted in bug 36037 by Jonathan Looney . As described there, GCC also uses `-msahf` for this feature, and the backend already recognizes the `+sahf` feature. All that is needed is to teach clang to pass this on to the backend. The mapping of feature support onto CPUs may not be complete; rather, it was chosen to match LLVM's idea of which CPUs support this feature (see lib/Target/X86/X86.td). I also updated the affected test case (CodeGen/attr-target-x86.c) to match the emitted output. Reviewers: craig.topper, coby, efriedma, rsmith Reviewed By: craig.topper Subscribers: emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D43394 Pull in r328944 from upstream llvm trunk (by Chandler Carruth): [x86] Expose more of the condition conversion routines in the public API for X86's instruction information. I've now got a second patch under review that needs these same APIs. This bit is nicely orthogonal and obvious, so landing it. NFC. Pull in r329414 from upstream llvm trunk (by Craig Topper): [X86] Merge itineraries for CLC, CMC, and STC. These are very simple flag setting instructions that appear to only be a single uop. They're unlikely to need this separation. Pull in r329657 from upstream llvm trunk (by Chandler Carruth): [x86] Introduce a pass to begin more systematically fixing PR36028 and similar issues. The key idea is to lower COPY nodes populating EFLAGS by scanning the uses of EFLAGS and introducing dedicated code to preserve the necessary state in a GPR. In the vast majority of cases, these uses are cmovCC and jCC instructions. For such cases, we can very easily save and restore the necessary information by simply inserting a setCC into a GPR where the original flags are live, and then testing that GPR directly to feed the cmov or conditional branch. However, things are a bit more tricky if arithmetic is using the flags. This patch handles the vast majority of cases that seem to come up in practice: adc, adcx, adox, rcl, and rcr; all without taking advantage of partially preserved EFLAGS as LLVM doesn't currently model that at all. There are a large number of operations that techinaclly observe EFLAGS currently but shouldn't in this case -- they typically are using DF. Currently, they will not be handled by this approach. However, I have never seen this issue come up in practice. It is already pretty rare to have these patterns come up in practical code with LLVM. I had to resort to writing MIR tests to cover most of the logic in this pass already. I suspect even with its current amount of coverage of arithmetic users of EFLAGS it will be a significant improvement over the current use of pushf/popf. It will also produce substantially faster code in most of the common patterns. This patch also removes all of the old lowering for EFLAGS copies, and the hack that forced us to use a frame pointer when EFLAGS copies were found anywhere in a function so that the dynamic stack adjustment wasn't a problem. None of this is needed as we now lower all of these copies directly in MI and without require stack adjustments. Lots of thanks to Reid who came up with several aspects of this approach, and Craig who helped me work out a couple of things tripping me up while working on this. Differential Revision: https://reviews.llvm.org/D45146 Pull in r329673 from upstream llvm trunk (by Chandler Carruth): [x86] Model the direction flag (DF) separately from the rest of EFLAGS. This cleans up a number of operations that only claimed te use EFLAGS due to using DF. But no instructions which we think of us setting EFLAGS actually modify DF (other than things like popf) and so this needlessly creates uses of EFLAGS that aren't really there. In fact, DF is so restrictive it is pretty easy to model. Only STD, CLD, and the whole-flags writes (WRFLAGS and POPF) need to model this. I've also somewhat cleaned up some of the flag management instruction definitions to be in the correct .td file. Adding this extra register also uncovered a failure to use the correct datatype to hold X86 registers, and I've corrected that as necessary here. Differential Revision: https://reviews.llvm.org/D45154 Pull in r330264 from upstream llvm trunk (by Chandler Carruth): [x86] Fix PR37100 by teaching the EFLAGS copy lowering to rewrite uses across basic blocks in the limited cases where it is very straight forward to do so. This will also be useful for other places where we do some limited EFLAGS propagation across CFG edges and need to handle copy rewrites afterward. I think this is rapidly approaching the maximum we can and should be doing here. Everything else begins to require either heroic analysis to prove how to do PHI insertion manually, or somehow managing arbitrary PHI-ing of EFLAGS with general PHI insertion. Neither of these seem at all promising so if those cases come up, we'll almost certainly need to rewrite the parts of LLVM that produce those patterns. We do now require dominator trees in order to reliably diagnose patterns that would require PHI nodes. This is a bit unfortunate but it seems better than the completely mysterious crash we would get otherwise. Differential Revision: https://reviews.llvm.org/D45673 Together, these should ensure clang does not use pushf/popf sequences to save and restore flags, avoiding problems with unrelated flags (such as the interrupt flag) being restored unexpectedly. Requested by: jtl PR: 225330 MFC after: 1 week Added: head/contrib/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp (contents, props changed) Modified: head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/X86.h head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.h head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrSystem.td head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/contrib/llvm/lib/Target/X86/X86Schedule.td head/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.h head/lib/clang/freebsd_cc_version.h head/lib/clang/libllvm/Makefile Modified: head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h ============================================================================== --- head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h Fri Apr 20 18:06:03 2018 (r332832) +++ head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h Fri Apr 20 18:20:55 2018 (r332833) @@ -449,6 +449,13 @@ class MachineBasicBlock (public) /// Replace successor OLD with NEW and update probability info. void replaceSuccessor(MachineBasicBlock *Old, MachineBasicBlock *New); + /// Copy a successor (and any probability info) from original block to this + /// block's. Uses an iterator into the original blocks successors. + /// + /// This is useful when doing a partial clone of successors. Afterward, the + /// probabilities may need to be normalized. + void copySuccessor(MachineBasicBlock *Orig, succ_iterator I); + /// Transfers all the successors from MBB to this machine basic block (i.e., /// copies all the successors FromMBB and remove all the successors from /// FromMBB). Modified: head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp Fri Apr 20 18:06:03 2018 (r332832) +++ head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp Fri Apr 20 18:20:55 2018 (r332833) @@ -646,6 +646,14 @@ void MachineBasicBlock::replaceSuccessor(MachineBasicB removeSuccessor(OldI); } +void MachineBasicBlock::copySuccessor(MachineBasicBlock *Orig, + succ_iterator I) { + if (Orig->Probs.empty()) + addSuccessor(*I, Orig->getSuccProbability(I)); + else + addSuccessorWithoutProb(*I); +} + void MachineBasicBlock::addPredecessor(MachineBasicBlock *Pred) { Predecessors.push_back(Pred); } Modified: head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp Fri Apr 20 18:06:03 2018 (r332832) +++ head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp Fri Apr 20 18:20:55 2018 (r332833) @@ -265,13 +265,10 @@ MCDisassembler::DecodeStatus X86GenericDisassembler::g /// @param reg - The Reg to append. static void translateRegister(MCInst &mcInst, Reg reg) { #define ENTRY(x) X86::x, - uint8_t llvmRegnums[] = { - ALL_REGS - 0 - }; + static constexpr MCPhysReg llvmRegnums[] = {ALL_REGS}; #undef ENTRY - uint8_t llvmRegnum = llvmRegnums[reg]; + MCPhysReg llvmRegnum = llvmRegnums[reg]; mcInst.addOperand(MCOperand::createReg(llvmRegnum)); } Modified: head/contrib/llvm/lib/Target/X86/X86.h ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86.h Fri Apr 20 18:06:03 2018 (r332832) +++ head/contrib/llvm/lib/Target/X86/X86.h Fri Apr 20 18:20:55 2018 (r332833) @@ -66,6 +66,9 @@ FunctionPass *createX86OptimizeLEAs(); /// Return a pass that transforms setcc + movzx pairs into xor + setcc. FunctionPass *createX86FixupSetCC(); +/// Return a pass that lowers EFLAGS copy pseudo instructions. +FunctionPass *createX86FlagsCopyLoweringPass(); + /// Return a pass that expands WinAlloca pseudo-instructions. FunctionPass *createX86WinAllocaExpander(); Added: head/contrib/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp Fri Apr 20 18:20:55 2018 (r332833) @@ -0,0 +1,777 @@ +//====- X86FlagsCopyLowering.cpp - Lowers COPY nodes of EFLAGS ------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// \file +/// +/// Lowers COPY nodes of EFLAGS by directly extracting and preserving individual +/// flag bits. +/// +/// We have to do this by carefully analyzing and rewriting the usage of the +/// copied EFLAGS register because there is no general way to rematerialize the +/// entire EFLAGS register safely and efficiently. Using `popf` both forces +/// dynamic stack adjustment and can create correctness issues due to IF, TF, +/// and other non-status flags being overwritten. Using sequences involving +/// SAHF don't work on all x86 processors and are often quite slow compared to +/// directly testing a single status preserved in its own GPR. +/// +//===----------------------------------------------------------------------===// + +#include "X86.h" +#include "X86InstrBuilder.h" +#include "X86InstrInfo.h" +#include "X86Subtarget.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/ScopeExit.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallSet.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/SparseBitVector.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/CodeGen/MachineBasicBlock.h" +#include "llvm/CodeGen/MachineConstantPool.h" +#include "llvm/CodeGen/MachineDominators.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineModuleInfo.h" +#include "llvm/CodeGen/MachineOperand.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/MachineSSAUpdater.h" +#include "llvm/CodeGen/TargetInstrInfo.h" +#include "llvm/CodeGen/TargetRegisterInfo.h" +#include "llvm/CodeGen/TargetSchedule.h" +#include "llvm/CodeGen/TargetSubtargetInfo.h" +#include "llvm/IR/DebugLoc.h" +#include "llvm/MC/MCSchedule.h" +#include "llvm/Pass.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" +#include +#include +#include +#include + +using namespace llvm; + +#define PASS_KEY "x86-flags-copy-lowering" +#define DEBUG_TYPE PASS_KEY + +STATISTIC(NumCopiesEliminated, "Number of copies of EFLAGS eliminated"); +STATISTIC(NumSetCCsInserted, "Number of setCC instructions inserted"); +STATISTIC(NumTestsInserted, "Number of test instructions inserted"); +STATISTIC(NumAddsInserted, "Number of adds instructions inserted"); + +namespace llvm { + +void initializeX86FlagsCopyLoweringPassPass(PassRegistry &); + +} // end namespace llvm + +namespace { + +// Convenient array type for storing registers associated with each condition. +using CondRegArray = std::array; + +class X86FlagsCopyLoweringPass : public MachineFunctionPass { +public: + X86FlagsCopyLoweringPass() : MachineFunctionPass(ID) { + initializeX86FlagsCopyLoweringPassPass(*PassRegistry::getPassRegistry()); + } + + StringRef getPassName() const override { return "X86 EFLAGS copy lowering"; } + bool runOnMachineFunction(MachineFunction &MF) override; + void getAnalysisUsage(AnalysisUsage &AU) const override; + + /// Pass identification, replacement for typeid. + static char ID; + +private: + MachineRegisterInfo *MRI; + const X86InstrInfo *TII; + const TargetRegisterInfo *TRI; + const TargetRegisterClass *PromoteRC; + MachineDominatorTree *MDT; + + CondRegArray collectCondsInRegs(MachineBasicBlock &MBB, + MachineInstr &CopyDefI); + + unsigned promoteCondToReg(MachineBasicBlock &MBB, + MachineBasicBlock::iterator TestPos, + DebugLoc TestLoc, X86::CondCode Cond); + std::pair + getCondOrInverseInReg(MachineBasicBlock &TestMBB, + MachineBasicBlock::iterator TestPos, DebugLoc TestLoc, + X86::CondCode Cond, CondRegArray &CondRegs); + void insertTest(MachineBasicBlock &MBB, MachineBasicBlock::iterator Pos, + DebugLoc Loc, unsigned Reg); + + void rewriteArithmetic(MachineBasicBlock &TestMBB, + MachineBasicBlock::iterator TestPos, DebugLoc TestLoc, + MachineInstr &MI, MachineOperand &FlagUse, + CondRegArray &CondRegs); + void rewriteCMov(MachineBasicBlock &TestMBB, + MachineBasicBlock::iterator TestPos, DebugLoc TestLoc, + MachineInstr &CMovI, MachineOperand &FlagUse, + CondRegArray &CondRegs); + void rewriteCondJmp(MachineBasicBlock &TestMBB, + MachineBasicBlock::iterator TestPos, DebugLoc TestLoc, + MachineInstr &JmpI, CondRegArray &CondRegs); + void rewriteCopy(MachineInstr &MI, MachineOperand &FlagUse, + MachineInstr &CopyDefI); + void rewriteSetCC(MachineBasicBlock &TestMBB, + MachineBasicBlock::iterator TestPos, DebugLoc TestLoc, + MachineInstr &SetCCI, MachineOperand &FlagUse, + CondRegArray &CondRegs); +}; + +} // end anonymous namespace + +INITIALIZE_PASS_BEGIN(X86FlagsCopyLoweringPass, DEBUG_TYPE, + "X86 EFLAGS copy lowering", false, false) +INITIALIZE_PASS_END(X86FlagsCopyLoweringPass, DEBUG_TYPE, + "X86 EFLAGS copy lowering", false, false) + +FunctionPass *llvm::createX86FlagsCopyLoweringPass() { + return new X86FlagsCopyLoweringPass(); +} + +char X86FlagsCopyLoweringPass::ID = 0; + +void X86FlagsCopyLoweringPass::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); +} + +namespace { +/// An enumeration of the arithmetic instruction mnemonics which have +/// interesting flag semantics. +/// +/// We can map instruction opcodes into these mnemonics to make it easy to +/// dispatch with specific functionality. +enum class FlagArithMnemonic { + ADC, + ADCX, + ADOX, + RCL, + RCR, + SBB, +}; +} // namespace + +static FlagArithMnemonic getMnemonicFromOpcode(unsigned Opcode) { + switch (Opcode) { + default: + report_fatal_error("No support for lowering a copy into EFLAGS when used " + "by this instruction!"); + +#define LLVM_EXPAND_INSTR_SIZES(MNEMONIC, SUFFIX) \ + case X86::MNEMONIC##8##SUFFIX: \ + case X86::MNEMONIC##16##SUFFIX: \ + case X86::MNEMONIC##32##SUFFIX: \ + case X86::MNEMONIC##64##SUFFIX: + +#define LLVM_EXPAND_ADC_SBB_INSTR(MNEMONIC) \ + LLVM_EXPAND_INSTR_SIZES(MNEMONIC, rr) \ + LLVM_EXPAND_INSTR_SIZES(MNEMONIC, rr_REV) \ + LLVM_EXPAND_INSTR_SIZES(MNEMONIC, rm) \ + LLVM_EXPAND_INSTR_SIZES(MNEMONIC, mr) \ + case X86::MNEMONIC##8ri: \ + case X86::MNEMONIC##16ri8: \ + case X86::MNEMONIC##32ri8: \ + case X86::MNEMONIC##64ri8: \ + case X86::MNEMONIC##16ri: \ + case X86::MNEMONIC##32ri: \ + case X86::MNEMONIC##64ri32: \ + case X86::MNEMONIC##8mi: \ + case X86::MNEMONIC##16mi8: \ + case X86::MNEMONIC##32mi8: \ + case X86::MNEMONIC##64mi8: \ + case X86::MNEMONIC##16mi: \ + case X86::MNEMONIC##32mi: \ + case X86::MNEMONIC##64mi32: \ + case X86::MNEMONIC##8i8: \ + case X86::MNEMONIC##16i16: \ + case X86::MNEMONIC##32i32: \ + case X86::MNEMONIC##64i32: + + LLVM_EXPAND_ADC_SBB_INSTR(ADC) + return FlagArithMnemonic::ADC; + + LLVM_EXPAND_ADC_SBB_INSTR(SBB) + return FlagArithMnemonic::SBB; + +#undef LLVM_EXPAND_ADC_SBB_INSTR + + LLVM_EXPAND_INSTR_SIZES(RCL, rCL) + LLVM_EXPAND_INSTR_SIZES(RCL, r1) + LLVM_EXPAND_INSTR_SIZES(RCL, ri) + return FlagArithMnemonic::RCL; + + LLVM_EXPAND_INSTR_SIZES(RCR, rCL) + LLVM_EXPAND_INSTR_SIZES(RCR, r1) + LLVM_EXPAND_INSTR_SIZES(RCR, ri) + return FlagArithMnemonic::RCR; + +#undef LLVM_EXPAND_INSTR_SIZES + + case X86::ADCX32rr: + case X86::ADCX64rr: + case X86::ADCX32rm: + case X86::ADCX64rm: + return FlagArithMnemonic::ADCX; + + case X86::ADOX32rr: + case X86::ADOX64rr: + case X86::ADOX32rm: + case X86::ADOX64rm: + return FlagArithMnemonic::ADOX; + } +} + +static MachineBasicBlock &splitBlock(MachineBasicBlock &MBB, + MachineInstr &SplitI, + const X86InstrInfo &TII) { + MachineFunction &MF = *MBB.getParent(); + + assert(SplitI.getParent() == &MBB && + "Split instruction must be in the split block!"); + assert(SplitI.isBranch() && + "Only designed to split a tail of branch instructions!"); + assert(X86::getCondFromBranchOpc(SplitI.getOpcode()) != X86::COND_INVALID && + "Must split on an actual jCC instruction!"); + + // Dig out the previous instruction to the split point. + MachineInstr &PrevI = *std::prev(SplitI.getIterator()); + assert(PrevI.isBranch() && "Must split after a branch!"); + assert(X86::getCondFromBranchOpc(PrevI.getOpcode()) != X86::COND_INVALID && + "Must split after an actual jCC instruction!"); + assert(!std::prev(PrevI.getIterator())->isTerminator() && + "Must only have this one terminator prior to the split!"); + + // Grab the one successor edge that will stay in `MBB`. + MachineBasicBlock &UnsplitSucc = *PrevI.getOperand(0).getMBB(); + + // Analyze the original block to see if we are actually splitting an edge + // into two edges. This can happen when we have multiple conditional jumps to + // the same successor. + bool IsEdgeSplit = + std::any_of(SplitI.getIterator(), MBB.instr_end(), + [&](MachineInstr &MI) { + assert(MI.isTerminator() && + "Should only have spliced terminators!"); + return llvm::any_of( + MI.operands(), [&](MachineOperand &MOp) { + return MOp.isMBB() && MOp.getMBB() == &UnsplitSucc; + }); + }) || + MBB.getFallThrough() == &UnsplitSucc; + + MachineBasicBlock &NewMBB = *MF.CreateMachineBasicBlock(); + + // Insert the new block immediately after the current one. Any existing + // fallthrough will be sunk into this new block anyways. + MF.insert(std::next(MachineFunction::iterator(&MBB)), &NewMBB); + + // Splice the tail of instructions into the new block. + NewMBB.splice(NewMBB.end(), &MBB, SplitI.getIterator(), MBB.end()); + + // Copy the necessary succesors (and their probability info) into the new + // block. + for (auto SI = MBB.succ_begin(), SE = MBB.succ_end(); SI != SE; ++SI) + if (IsEdgeSplit || *SI != &UnsplitSucc) + NewMBB.copySuccessor(&MBB, SI); + // Normalize the probabilities if we didn't end up splitting the edge. + if (!IsEdgeSplit) + NewMBB.normalizeSuccProbs(); + + // Now replace all of the moved successors in the original block with the new + // block. This will merge their probabilities. + for (MachineBasicBlock *Succ : NewMBB.successors()) + if (Succ != &UnsplitSucc) + MBB.replaceSuccessor(Succ, &NewMBB); + + // We should always end up replacing at least one successor. + assert(MBB.isSuccessor(&NewMBB) && + "Failed to make the new block a successor!"); + + // Now update all the PHIs. + for (MachineBasicBlock *Succ : NewMBB.successors()) { + for (MachineInstr &MI : *Succ) { + if (!MI.isPHI()) + break; + + for (int OpIdx = 1, NumOps = MI.getNumOperands(); OpIdx < NumOps; + OpIdx += 2) { + MachineOperand &OpV = MI.getOperand(OpIdx); + MachineOperand &OpMBB = MI.getOperand(OpIdx + 1); + assert(OpMBB.isMBB() && "Block operand to a PHI is not a block!"); + if (OpMBB.getMBB() != &MBB) + continue; + + // Replace the operand for unsplit successors + if (!IsEdgeSplit || Succ != &UnsplitSucc) { + OpMBB.setMBB(&NewMBB); + + // We have to continue scanning as there may be multiple entries in + // the PHI. + continue; + } + + // When we have split the edge append a new successor. + MI.addOperand(MF, OpV); + MI.addOperand(MF, MachineOperand::CreateMBB(&NewMBB)); + break; + } + } + } + + return NewMBB; +} + +bool X86FlagsCopyLoweringPass::runOnMachineFunction(MachineFunction &MF) { + DEBUG(dbgs() << "********** " << getPassName() << " : " << MF.getName() + << " **********\n"); + + auto &Subtarget = MF.getSubtarget(); + MRI = &MF.getRegInfo(); + TII = Subtarget.getInstrInfo(); + TRI = Subtarget.getRegisterInfo(); + MDT = &getAnalysis(); + PromoteRC = &X86::GR8RegClass; + + if (MF.begin() == MF.end()) + // Nothing to do for a degenerate empty function... + return false; + + SmallVector Copies; + for (MachineBasicBlock &MBB : MF) + for (MachineInstr &MI : MBB) + if (MI.getOpcode() == TargetOpcode::COPY && + MI.getOperand(0).getReg() == X86::EFLAGS) + Copies.push_back(&MI); + + for (MachineInstr *CopyI : Copies) { + MachineBasicBlock &MBB = *CopyI->getParent(); + + MachineOperand &VOp = CopyI->getOperand(1); + assert(VOp.isReg() && + "The input to the copy for EFLAGS should always be a register!"); + MachineInstr &CopyDefI = *MRI->getVRegDef(VOp.getReg()); + if (CopyDefI.getOpcode() != TargetOpcode::COPY) { + // FIXME: The big likely candidate here are PHI nodes. We could in theory + // handle PHI nodes, but it gets really, really hard. Insanely hard. Hard + // enough that it is probably better to change every other part of LLVM + // to avoid creating them. The issue is that once we have PHIs we won't + // know which original EFLAGS value we need to capture with our setCCs + // below. The end result will be computing a complete set of setCCs that + // we *might* want, computing them in every place where we copy *out* of + // EFLAGS and then doing SSA formation on all of them to insert necessary + // PHI nodes and consume those here. Then hoping that somehow we DCE the + // unnecessary ones. This DCE seems very unlikely to be successful and so + // we will almost certainly end up with a glut of dead setCC + // instructions. Until we have a motivating test case and fail to avoid + // it by changing other parts of LLVM's lowering, we refuse to handle + // this complex case here. + DEBUG(dbgs() << "ERROR: Encountered unexpected def of an eflags copy: "; + CopyDefI.dump()); + report_fatal_error( + "Cannot lower EFLAGS copy unless it is defined in turn by a copy!"); + } + + auto Cleanup = make_scope_exit([&] { + // All uses of the EFLAGS copy are now rewritten, kill the copy into + // eflags and if dead the copy from. + CopyI->eraseFromParent(); + if (MRI->use_empty(CopyDefI.getOperand(0).getReg())) + CopyDefI.eraseFromParent(); + ++NumCopiesEliminated; + }); + + MachineOperand &DOp = CopyI->getOperand(0); + assert(DOp.isDef() && "Expected register def!"); + assert(DOp.getReg() == X86::EFLAGS && "Unexpected copy def register!"); + if (DOp.isDead()) + continue; + + MachineBasicBlock &TestMBB = *CopyDefI.getParent(); + auto TestPos = CopyDefI.getIterator(); + DebugLoc TestLoc = CopyDefI.getDebugLoc(); + + DEBUG(dbgs() << "Rewriting copy: "; CopyI->dump()); + + // Scan for usage of newly set EFLAGS so we can rewrite them. We just buffer + // jumps because their usage is very constrained. + bool FlagsKilled = false; + SmallVector JmpIs; + + // Gather the condition flags that have already been preserved in + // registers. We do this from scratch each time as we expect there to be + // very few of them and we expect to not revisit the same copy definition + // many times. If either of those change sufficiently we could build a map + // of these up front instead. + CondRegArray CondRegs = collectCondsInRegs(TestMBB, CopyDefI); + + // Collect the basic blocks we need to scan. Typically this will just be + // a single basic block but we may have to scan multiple blocks if the + // EFLAGS copy lives into successors. + SmallVector Blocks; + SmallPtrSet VisitedBlocks; + Blocks.push_back(&MBB); + VisitedBlocks.insert(&MBB); + + do { + MachineBasicBlock &UseMBB = *Blocks.pop_back_val(); + + // We currently don't do any PHI insertion and so we require that the + // test basic block dominates all of the use basic blocks. + // + // We could in theory do PHI insertion here if it becomes useful by just + // taking undef values in along every edge that we don't trace this + // EFLAGS copy along. This isn't as bad as fully general PHI insertion, + // but still seems like a great deal of complexity. + // + // Because it is theoretically possible that some earlier MI pass or + // other lowering transformation could induce this to happen, we do + // a hard check even in non-debug builds here. + if (&TestMBB != &UseMBB && !MDT->dominates(&TestMBB, &UseMBB)) { + DEBUG({ + dbgs() << "ERROR: Encountered use that is not dominated by our test " + "basic block! Rewriting this would require inserting PHI " + "nodes to track the flag state across the CFG.\n\nTest " + "block:\n"; + TestMBB.dump(); + dbgs() << "Use block:\n"; + UseMBB.dump(); + }); + report_fatal_error("Cannot lower EFLAGS copy when original copy def " + "does not dominate all uses."); + } + + for (auto MII = &UseMBB == &MBB ? std::next(CopyI->getIterator()) + : UseMBB.instr_begin(), + MIE = UseMBB.instr_end(); + MII != MIE;) { + MachineInstr &MI = *MII++; + MachineOperand *FlagUse = MI.findRegisterUseOperand(X86::EFLAGS); + if (!FlagUse) { + if (MI.findRegisterDefOperand(X86::EFLAGS)) { + // If EFLAGS are defined, it's as-if they were killed. We can stop + // scanning here. + // + // NB!!! Many instructions only modify some flags. LLVM currently + // models this as clobbering all flags, but if that ever changes + // this will need to be carefully updated to handle that more + // complex logic. + FlagsKilled = true; + break; + } + continue; + } + + DEBUG(dbgs() << " Rewriting use: "; MI.dump()); + + // Check the kill flag before we rewrite as that may change it. + if (FlagUse->isKill()) + FlagsKilled = true; + + // Once we encounter a branch, the rest of the instructions must also be + // branches. We can't rewrite in place here, so we handle them below. + // + // Note that we don't have to handle tail calls here, even conditional + // tail calls, as those are not introduced into the X86 MI until post-RA + // branch folding or black placement. As a consequence, we get to deal + // with the simpler formulation of conditional branches followed by tail + // calls. + if (X86::getCondFromBranchOpc(MI.getOpcode()) != X86::COND_INVALID) { + auto JmpIt = MI.getIterator(); + do { + JmpIs.push_back(&*JmpIt); + ++JmpIt; + } while (JmpIt != UseMBB.instr_end() && + X86::getCondFromBranchOpc(JmpIt->getOpcode()) != + X86::COND_INVALID); + break; + } + + // Otherwise we can just rewrite in-place. + if (X86::getCondFromCMovOpc(MI.getOpcode()) != X86::COND_INVALID) { + rewriteCMov(TestMBB, TestPos, TestLoc, MI, *FlagUse, CondRegs); + } else if (X86::getCondFromSETOpc(MI.getOpcode()) != + X86::COND_INVALID) { + rewriteSetCC(TestMBB, TestPos, TestLoc, MI, *FlagUse, CondRegs); + } else if (MI.getOpcode() == TargetOpcode::COPY) { + rewriteCopy(MI, *FlagUse, CopyDefI); + } else { + // We assume that arithmetic instructions that use flags also def + // them. + assert(MI.findRegisterDefOperand(X86::EFLAGS) && + "Expected a def of EFLAGS for this instruction!"); + + // NB!!! Several arithmetic instructions only *partially* update + // flags. Theoretically, we could generate MI code sequences that + // would rely on this fact and observe different flags independently. + // But currently LLVM models all of these instructions as clobbering + // all the flags in an undef way. We rely on that to simplify the + // logic. + FlagsKilled = true; + + rewriteArithmetic(TestMBB, TestPos, TestLoc, MI, *FlagUse, CondRegs); + break; + } + + // If this was the last use of the flags, we're done. + if (FlagsKilled) + break; + } + + // If the flags were killed, we're done with this block. + if (FlagsKilled) + break; + + // Otherwise we need to scan successors for ones where the flags live-in + // and queue those up for processing. + for (MachineBasicBlock *SuccMBB : UseMBB.successors()) + if (SuccMBB->isLiveIn(X86::EFLAGS) && + VisitedBlocks.insert(SuccMBB).second) + Blocks.push_back(SuccMBB); + } while (!Blocks.empty()); + + // Now rewrite the jumps that use the flags. These we handle specially + // because if there are multiple jumps in a single basic block we'll have + // to do surgery on the CFG. + MachineBasicBlock *LastJmpMBB = nullptr; + for (MachineInstr *JmpI : JmpIs) { + // Past the first jump within a basic block we need to split the blocks + // apart. + if (JmpI->getParent() == LastJmpMBB) + splitBlock(*JmpI->getParent(), *JmpI, *TII); + else + LastJmpMBB = JmpI->getParent(); + + rewriteCondJmp(TestMBB, TestPos, TestLoc, *JmpI, CondRegs); + } + + // FIXME: Mark the last use of EFLAGS before the copy's def as a kill if + // the copy's def operand is itself a kill. + } + +#ifndef NDEBUG + for (MachineBasicBlock &MBB : MF) + for (MachineInstr &MI : MBB) + if (MI.getOpcode() == TargetOpcode::COPY && + (MI.getOperand(0).getReg() == X86::EFLAGS || + MI.getOperand(1).getReg() == X86::EFLAGS)) { + DEBUG(dbgs() << "ERROR: Found a COPY involving EFLAGS: "; MI.dump()); + llvm_unreachable("Unlowered EFLAGS copy!"); + } +#endif + + return true; +} + +/// Collect any conditions that have already been set in registers so that we +/// can re-use them rather than adding duplicates. +CondRegArray +X86FlagsCopyLoweringPass::collectCondsInRegs(MachineBasicBlock &MBB, + MachineInstr &CopyDefI) { + CondRegArray CondRegs = {}; + + // Scan backwards across the range of instructions with live EFLAGS. + for (MachineInstr &MI : llvm::reverse( + llvm::make_range(MBB.instr_begin(), CopyDefI.getIterator()))) { + X86::CondCode Cond = X86::getCondFromSETOpc(MI.getOpcode()); + if (Cond != X86::COND_INVALID && MI.getOperand(0).isReg() && + TRI->isVirtualRegister(MI.getOperand(0).getReg())) + CondRegs[Cond] = MI.getOperand(0).getReg(); + + // Stop scanning when we see the first definition of the EFLAGS as prior to + // this we would potentially capture the wrong flag state. + if (MI.findRegisterDefOperand(X86::EFLAGS)) + break; + } + return CondRegs; +} + +unsigned X86FlagsCopyLoweringPass::promoteCondToReg( + MachineBasicBlock &TestMBB, MachineBasicBlock::iterator TestPos, + DebugLoc TestLoc, X86::CondCode Cond) { + unsigned Reg = MRI->createVirtualRegister(PromoteRC); + auto SetI = BuildMI(TestMBB, TestPos, TestLoc, + TII->get(X86::getSETFromCond(Cond)), Reg); + (void)SetI; + DEBUG(dbgs() << " save cond: "; SetI->dump()); + ++NumSetCCsInserted; + return Reg; +} + +std::pair X86FlagsCopyLoweringPass::getCondOrInverseInReg( + MachineBasicBlock &TestMBB, MachineBasicBlock::iterator TestPos, + DebugLoc TestLoc, X86::CondCode Cond, CondRegArray &CondRegs) { + unsigned &CondReg = CondRegs[Cond]; + unsigned &InvCondReg = CondRegs[X86::GetOppositeBranchCondition(Cond)]; + if (!CondReg && !InvCondReg) + CondReg = promoteCondToReg(TestMBB, TestPos, TestLoc, Cond); + + if (CondReg) + return {CondReg, false}; + else + return {InvCondReg, true}; +} + +void X86FlagsCopyLoweringPass::insertTest(MachineBasicBlock &MBB, + MachineBasicBlock::iterator Pos, + DebugLoc Loc, unsigned Reg) { + // We emit test instructions as register/immediate test against -1. This + // allows register allocation to fold a memory operand if needed (that will + // happen often due to the places this code is emitted). But hopefully will + // also allow us to select a shorter encoding of `testb %reg, %reg` when that + // would be equivalent. + auto TestI = + BuildMI(MBB, Pos, Loc, TII->get(X86::TEST8ri)).addReg(Reg).addImm(-1); + (void)TestI; + DEBUG(dbgs() << " test cond: "; TestI->dump()); + ++NumTestsInserted; +} + +void X86FlagsCopyLoweringPass::rewriteArithmetic( + MachineBasicBlock &TestMBB, MachineBasicBlock::iterator TestPos, + DebugLoc TestLoc, MachineInstr &MI, MachineOperand &FlagUse, + CondRegArray &CondRegs) { + // Arithmetic is either reading CF or OF. Figure out which condition we need + // to preserve in a register. + X86::CondCode Cond; + + // The addend to use to reset CF or OF when added to the flag value. + int Addend; + + switch (getMnemonicFromOpcode(MI.getOpcode())) { + case FlagArithMnemonic::ADC: + case FlagArithMnemonic::ADCX: + case FlagArithMnemonic::RCL: + case FlagArithMnemonic::RCR: + case FlagArithMnemonic::SBB: + Cond = X86::COND_B; // CF == 1 + // Set up an addend that when one is added will need a carry due to not + // having a higher bit available. + Addend = 255; + break; + + case FlagArithMnemonic::ADOX: + Cond = X86::COND_O; // OF == 1 + // Set up an addend that when one is added will turn from positive to + // negative and thus overflow in the signed domain. + Addend = 127; + break; + } + + // Now get a register that contains the value of the flag input to the + // arithmetic. We require exactly this flag to simplify the arithmetic + // required to materialize it back into the flag. + unsigned &CondReg = CondRegs[Cond]; + if (!CondReg) + CondReg = promoteCondToReg(TestMBB, TestPos, TestLoc, Cond); + + MachineBasicBlock &MBB = *MI.getParent(); + + // Insert an instruction that will set the flag back to the desired value. + unsigned TmpReg = MRI->createVirtualRegister(PromoteRC); + auto AddI = + BuildMI(MBB, MI.getIterator(), MI.getDebugLoc(), TII->get(X86::ADD8ri)) + .addDef(TmpReg, RegState::Dead) + .addReg(CondReg) + .addImm(Addend); + (void)AddI; + DEBUG(dbgs() << " add cond: "; AddI->dump()); + ++NumAddsInserted; + FlagUse.setIsKill(true); +} + +void X86FlagsCopyLoweringPass::rewriteCMov(MachineBasicBlock &TestMBB, + MachineBasicBlock::iterator TestPos, + DebugLoc TestLoc, + MachineInstr &CMovI, + MachineOperand &FlagUse, + CondRegArray &CondRegs) { + // First get the register containing this specific condition. + X86::CondCode Cond = X86::getCondFromCMovOpc(CMovI.getOpcode()); + unsigned CondReg; + bool Inverted; + std::tie(CondReg, Inverted) = + getCondOrInverseInReg(TestMBB, TestPos, TestLoc, Cond, CondRegs); + + MachineBasicBlock &MBB = *CMovI.getParent(); + + // Insert a direct test of the saved register. + insertTest(MBB, CMovI.getIterator(), CMovI.getDebugLoc(), CondReg); + + // Rewrite the CMov to use the !ZF flag from the test (but match register + // size and memory operand), and then kill its use of the flags afterward. + auto &CMovRC = *MRI->getRegClass(CMovI.getOperand(0).getReg()); + CMovI.setDesc(TII->get(X86::getCMovFromCond( + Inverted ? X86::COND_E : X86::COND_NE, TRI->getRegSizeInBits(CMovRC) / 8, + !CMovI.memoperands_empty()))); + FlagUse.setIsKill(true); + DEBUG(dbgs() << " fixed cmov: "; CMovI.dump()); +} + +void X86FlagsCopyLoweringPass::rewriteCondJmp( + MachineBasicBlock &TestMBB, MachineBasicBlock::iterator TestPos, + DebugLoc TestLoc, MachineInstr &JmpI, CondRegArray &CondRegs) { + // First get the register containing this specific condition. + X86::CondCode Cond = X86::getCondFromBranchOpc(JmpI.getOpcode()); + unsigned CondReg; + bool Inverted; + std::tie(CondReg, Inverted) = + getCondOrInverseInReg(TestMBB, TestPos, TestLoc, Cond, CondRegs); + + MachineBasicBlock &JmpMBB = *JmpI.getParent(); + + // Insert a direct test of the saved register. + insertTest(JmpMBB, JmpI.getIterator(), JmpI.getDebugLoc(), CondReg); + + // Rewrite the jump to use the !ZF flag from the test, and kill its use of + // flags afterward. + JmpI.setDesc(TII->get( + X86::GetCondBranchFromCond(Inverted ? X86::COND_E : X86::COND_NE))); + const int ImplicitEFLAGSOpIdx = 1; + JmpI.getOperand(ImplicitEFLAGSOpIdx).setIsKill(true); + DEBUG(dbgs() << " fixed jCC: "; JmpI.dump()); +} + +void X86FlagsCopyLoweringPass::rewriteCopy(MachineInstr &MI, + MachineOperand &FlagUse, + MachineInstr &CopyDefI) { + // Just replace this copy with the the original copy def. + MRI->replaceRegWith(MI.getOperand(0).getReg(), + CopyDefI.getOperand(0).getReg()); + MI.eraseFromParent(); +} + +void X86FlagsCopyLoweringPass::rewriteSetCC(MachineBasicBlock &TestMBB, + MachineBasicBlock::iterator TestPos, + DebugLoc TestLoc, + MachineInstr &SetCCI, + MachineOperand &FlagUse, + CondRegArray &CondRegs) { + X86::CondCode Cond = X86::getCondFromSETOpc(SetCCI.getOpcode()); + // Note that we can't usefully rewrite this to the inverse without complex + // analysis of the users of the setCC. Largely we rely on duplicates which + // could have been avoided already being avoided here. + unsigned &CondReg = CondRegs[Cond]; + if (!CondReg) + CondReg = promoteCondToReg(TestMBB, TestPos, TestLoc, Cond); + + // Rewriting this is trivial: we just replace the register and remove the + // setcc. + MRI->replaceRegWith(SetCCI.getOperand(0).getReg(), CondReg); + SetCCI.eraseFromParent(); +} Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Fri Apr 20 18:06:03 2018 (r332832) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Fri Apr 20 18:20:55 2018 (r332833) @@ -27781,11 +27781,16 @@ X86TargetLowering::EmitInstrWithCustomInserter(Machine MI.getOpcode() == X86::RDFLAGS32 ? X86::PUSHF32 : X86::PUSHF64; unsigned Pop = MI.getOpcode() == X86::RDFLAGS32 ? X86::POP32r : X86::POP64r; MachineInstr *Push = BuildMI(*BB, MI, DL, TII->get(PushF)); - // Permit reads of the FLAGS register without it being defined. + // Permit reads of the EFLAGS and DF registers without them being defined. // This intrinsic exists to read external processor state in flags, such as // the trap flag, interrupt flag, and direction flag, none of which are // modeled by the backend. + assert(Push->getOperand(2).getReg() == X86::EFLAGS && + "Unexpected register in operand!"); Push->getOperand(2).setIsUndef(); + assert(Push->getOperand(3).getReg() == X86::DF && + "Unexpected register in operand!"); + Push->getOperand(3).setIsUndef(); BuildMI(*BB, MI, DL, TII->get(Pop), MI.getOperand(0).getReg()); MI.eraseFromParent(); // The pseudo is gone now. @@ -37827,25 +37832,6 @@ bool X86TargetLowering::isTypeDesirableForOp(unsigned case ISD::XOR: return false; } -} - -/// This function checks if any of the users of EFLAGS copies the EFLAGS. We -/// know that the code that lowers COPY of EFLAGS has to use the stack, and if -/// we don't adjust the stack we clobber the first frame index. -/// See X86InstrInfo::copyPhysReg. -static bool hasCopyImplyingStackAdjustment(const MachineFunction &MF) { - const MachineRegisterInfo &MRI = MF.getRegInfo(); - return any_of(MRI.reg_instructions(X86::EFLAGS), - [](const MachineInstr &RI) { return RI.isCopy(); }); -} - -void X86TargetLowering::finalizeLowering(MachineFunction &MF) const { - if (hasCopyImplyingStackAdjustment(MF)) { - MachineFrameInfo &MFI = MF.getFrameInfo(); - MFI.setHasCopyImplyingStackAdjustment(true); - } - - TargetLoweringBase::finalizeLowering(MF); } /// This method query the target whether it is beneficial for dag combiner to Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.h ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.h Fri Apr 20 18:06:03 2018 (r332832) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.h Fri Apr 20 18:20:55 2018 (r332833) @@ -1099,9 +1099,6 @@ namespace llvm { bool lowerInterleavedStore(StoreInst *SI, ShuffleVectorInst *SVI, unsigned Factor) const override; - - void finalizeLowering(MachineFunction &MF) const override; - protected: std::pair findRepresentativeClass(const TargetRegisterInfo *TRI, Modified: head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td Fri Apr 20 18:06:03 2018 (r332832) +++ head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td Fri Apr 20 18:20:55 2018 (r332833) @@ -473,7 +473,7 @@ let Defs = [EAX, ECX, EDX, FP0, FP1, FP2, FP3, FP4, FP ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7, XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, - XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, EFLAGS], + XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, EFLAGS, DF], usesCustomInserter = 1, Uses = [ESP, SSP] in { def TLS_addr32 : I<0, Pseudo, (outs), (ins i32mem:$sym), "# TLS_addr32", @@ -493,7 +493,7 @@ let Defs = [RAX, RCX, RDX, RSI, RDI, R8, R9, R10, R11, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7, XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, - XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, EFLAGS], + XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, EFLAGS, DF], usesCustomInserter = 1, Uses = [RSP, SSP] in { def TLS_addr64 : I<0, Pseudo, (outs), (ins i64mem:$sym), "# TLS_addr64", @@ -509,7 +509,7 @@ def TLS_base_addr64 : I<0, Pseudo, (outs), (ins i64mem // For i386, the address of the thunk is passed on the stack, on return the // address of the variable is in %eax. %ecx is trashed during the function // call. All other registers are preserved. -let Defs = [EAX, ECX, EFLAGS], +let Defs = [EAX, ECX, EFLAGS, DF], Uses = [ESP, SSP], usesCustomInserter = 1 in def TLSCall_32 : I<0, Pseudo, (outs), (ins i32mem:$sym), @@ -522,7 +522,7 @@ def TLSCall_32 : I<0, Pseudo, (outs), (ins i32mem:$sym // %rdi. The lowering will do the right thing with RDI. // On return the address of the variable is in %rax. All other // registers are preserved. -let Defs = [RAX, EFLAGS], +let Defs = [RAX, EFLAGS, DF], Uses = [RSP, SSP], usesCustomInserter = 1 in def TLSCall_64 : I<0, Pseudo, (outs), (ins i64mem:$sym), Modified: head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp Fri Apr 20 18:06:03 2018 (r332832) +++ head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp Fri Apr 20 18:20:55 2018 (r332833) @@ -5782,7 +5782,7 @@ bool X86InstrInfo::findCommutedOpIndices(MachineInstr return false; } -static X86::CondCode getCondFromBranchOpc(unsigned BrOpc) { +X86::CondCode X86::getCondFromBranchOpc(unsigned BrOpc) { switch (BrOpc) { default: return X86::COND_INVALID; case X86::JE_1: return X86::COND_E; @@ -5805,7 +5805,7 @@ static X86::CondCode getCondFromBranchOpc(unsigned BrO } /// Return condition code of a SET opcode. -static X86::CondCode getCondFromSETOpc(unsigned Opc) { +X86::CondCode X86::getCondFromSETOpc(unsigned Opc) { switch (Opc) { default: return X86::COND_INVALID; case X86::SETAr: case X86::SETAm: return X86::COND_A; @@ -6130,7 +6130,7 @@ void X86InstrInfo::replaceBranchWithTailCall( if (!I->isBranch()) assert(0 && "Can't find the branch to replace!"); - X86::CondCode CC = getCondFromBranchOpc(I->getOpcode()); + X86::CondCode CC = X86::getCondFromBranchOpc(I->getOpcode()); assert(BranchCond.size() == 1); if (CC != BranchCond[0].getImm()) continue; @@ -6237,7 +6237,7 @@ bool X86InstrInfo::AnalyzeBranchImpl( } // Handle conditional branches. - X86::CondCode BranchCode = getCondFromBranchOpc(I->getOpcode()); + X86::CondCode BranchCode = X86::getCondFromBranchOpc(I->getOpcode()); if (BranchCode == X86::COND_INVALID) return true; // Can't handle indirect branch. @@ -6433,7 +6433,7 @@ unsigned X86InstrInfo::removeBranch(MachineBasicBlock if (I->isDebugValue()) continue; if (I->getOpcode() != X86::JMP_1 && - getCondFromBranchOpc(I->getOpcode()) == X86::COND_INVALID) + X86::getCondFromBranchOpc(I->getOpcode()) == X86::COND_INVALID) break; // Remove the branch. I->eraseFromParent(); @@ -6710,102 +6710,12 @@ void X86InstrInfo::copyPhysReg(MachineBasicBlock &MBB, return; } - bool FromEFLAGS = SrcReg == X86::EFLAGS; - bool ToEFLAGS = DestReg == X86::EFLAGS; - int Reg = FromEFLAGS ? DestReg : SrcReg; - bool is32 = X86::GR32RegClass.contains(Reg); - bool is64 = X86::GR64RegClass.contains(Reg); - - if ((FromEFLAGS || ToEFLAGS) && (is32 || is64)) { - int Mov = is64 ? X86::MOV64rr : X86::MOV32rr; - int Push = is64 ? X86::PUSH64r : X86::PUSH32r; - int PushF = is64 ? X86::PUSHF64 : X86::PUSHF32; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 20 18:37:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 655CCF8D42A; Fri, 20 Apr 2018 18:37:20 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 100587A81B; Fri, 20 Apr 2018 18:37:20 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04E831BFA4; Fri, 20 Apr 2018 18:37:20 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KIbJ6Y081663; Fri, 20 Apr 2018 18:37:19 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KIbJ1O081662; Fri, 20 Apr 2018 18:37:19 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804201837.w3KIbJ1O081662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 18:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332834 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 332834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 18:37:20 -0000 Author: jtl Date: Fri Apr 20 18:37:19 2018 New Revision: 332834 URL: https://svnweb.freebsd.org/changeset/base/332834 Log: MFC r314286: Do some minimal work to better conform to the 802.3ad (LACP) standard. In particular, don't set the synchronized bit for the peer unless it truly appears to be synchronized to us. Also, don't set our own synchronized bit unless we have actually seen a remote system. Prior to this change, we were seeing some strange behavior, such as: 1. We send an advertisement with the Activity, Aggregation, and Default flags, followed by an advertisement with the Activity, Aggregation, Synchronization, and Default flags. However, we hadn't seen an advertisement from another peer and were still advertising the default (NULL) peer. A closer examination of the in-kernel data structures (using kgdb) showed that the system had added the default (NULL) peer as a valid aggregator for the segment. 2. We were receiving an advertisement from a peer that included the default (NULL) peer instead of including our system information. However, we responded with an advertisement that included the Synchronization flag for both our system and the peer. (Since the peer's advertisement did not include our system information, we shouldn't add the synchronization bit for the peer.) This patch corrects those two items. Sponsored by: Netflix, Inc. Modified: stable/11/sys/net/ieee8023ad_lacp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/11/sys/net/ieee8023ad_lacp.c Fri Apr 20 18:20:55 2018 (r332833) +++ stable/11/sys/net/ieee8023ad_lacp.c Fri Apr 20 18:37:19 2018 (r332834) @@ -1308,6 +1308,10 @@ lacp_select(struct lacp_port *lp) return; } + /* If we haven't heard from our peer, skip this step. */ + if (lp->lp_state & LACP_STATE_DEFAULTED) + return; + KASSERT(!LACP_TIMER_ISARMED(lp, LACP_TIMER_WAIT_WHILE), ("timer_wait_while still active")); @@ -1663,7 +1667,15 @@ lacp_sm_rx_record_pdu(struct lacp_port *lp, const stru LACP_STATE_AGGREGATION) && !lacp_compare_peerinfo(&lp->lp_actor, &du->ldu_partner)) || (du->ldu_partner.lip_state & LACP_STATE_AGGREGATION) == 0)) { - /* XXX nothing? */ + /* + * XXX Maintain legacy behavior of leaving the + * LACP_STATE_SYNC bit unchanged from the partner's + * advertisement if lsc_strict_mode is false. + * TODO: We should re-examine the concept of the "strict mode" + * to ensure it makes sense to maintain a non-strict mode. + */ + if (lp->lp_lsc->lsc_strict_mode) + lp->lp_partner.lip_state |= LACP_STATE_SYNC; } else { lp->lp_partner.lip_state &= ~LACP_STATE_SYNC; } @@ -1677,10 +1689,6 @@ lacp_sm_rx_record_pdu(struct lacp_port *lp, const stru lacp_format_state(lp->lp_partner.lip_state, buf, sizeof(buf)))); } - - /* XXX Hack, still need to implement 5.4.9 para 2,3,4 */ - if (lp->lp_lsc->lsc_strict_mode) - lp->lp_partner.lip_state |= LACP_STATE_SYNC; lacp_sm_ptx_update_timeout(lp, oldpstate); } From owner-svn-src-all@freebsd.org Fri Apr 20 18:38:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6504BF8D591; Fri, 20 Apr 2018 18:38:37 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 184877B441; Fri, 20 Apr 2018 18:38:37 +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 136131BFA5; Fri, 20 Apr 2018 18:38:37 +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 w3KIca09081754; Fri, 20 Apr 2018 18:38:36 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KIcau1081753; Fri, 20 Apr 2018 18:38:36 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201804201838.w3KIcau1081753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 20 Apr 2018 18:38:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r332835 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: manu X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 332835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 18:38:37 -0000 Author: manu Date: Fri Apr 20 18:38:36 2018 New Revision: 332835 URL: https://svnweb.freebsd.org/changeset/base/332835 Log: Raise my limit for dts import Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Fri Apr 20 18:37:19 2018 (r332834) +++ svnadmin/conf/sizelimit.conf Fri Apr 20 18:38:36 2018 (r332835) @@ -21,6 +21,7 @@ dim imp jb jeff +manu mm np obrien From owner-svn-src-all@freebsd.org Fri Apr 20 18:44:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26A5CF8DEB1; Fri, 20 Apr 2018 18:44:58 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6FAE7C5F2; Fri, 20 Apr 2018 18:44:57 +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 C17F21C147; Fri, 20 Apr 2018 18:44:57 +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 w3KIivOe086571; Fri, 20 Apr 2018 18:44:57 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KIir9t086526; Fri, 20 Apr 2018 18:44:53 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201804201844.w3KIir9t086526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 20 Apr 2018 18:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r332836 - in vendor/device-tree/dist: Bindings Bindings/arm Bindings/arm/bcm Bindings/arm/firmware Bindings/arm/marvell Bindings/arm/mediatek Bindings/arm/samsung Bindings/auxdisplay Bi... X-SVN-Group: vendor X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in vendor/device-tree/dist: Bindings Bindings/arm Bindings/arm/bcm Bindings/arm/firmware Bindings/arm/marvell Bindings/arm/mediatek Bindings/arm/samsung Bindings/auxdisplay Bindings/bus Bindings/clock... X-SVN-Commit-Revision: 332836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 18:44:58 -0000 Author: manu Date: Fri Apr 20 18:44:52 2018 New Revision: 332836 URL: https://svnweb.freebsd.org/changeset/base/332836 Log: dts: Update our copy from files from Linux 4.16 Added: vendor/device-tree/dist/Bindings/arm/arm-dsu-pmu.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/firmware/sdei.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/stm32.txt (contents, props changed) vendor/device-tree/dist/Bindings/auxdisplay/arm-charlcd.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/qcom,a53pll.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/qcom,spmi-clkdiv.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/sprd.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/arm-cryptocell.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/st,stm32-cryp.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/ilitek,ili9225.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/ilitek,ili9322.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/mitsubishi,aa070mc01.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/sgd,gktw70sdae4se.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/tianma,tm070rvhg71.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/panel/tpo,td028ttec1.txt (contents, props changed) vendor/device-tree/dist/Bindings/display/sitronix,st7735r.txt (contents, props changed) vendor/device-tree/dist/Bindings/eeprom/at24.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/sigma-delta-modulator.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/st,stm32-dfsdm-adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/light/uvis25.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/google,goldfish-pic.txt (contents, props changed) vendor/device-tree/dist/Bindings/leds/leds-lm3692x.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/i2c/ov7740.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/nvidia,tegra-vde.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/atmel-tcb.txt (contents, props changed) vendor/device-tree/dist/Bindings/misc/nvidia,tegra186-misc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/marvell-nand.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/can/can-transceiver.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/cortina,gemini-ethernet.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/socionext,uniphier-ave4.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/socionext-netsec.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/ti-bluetooth.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/wireless/mediatek,mt76.txt (contents, props changed) vendor/device-tree/dist/Bindings/opp/ti-omap5-opp-supply.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/cdns,cdns-pcie-ep.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/cdns,cdns-pcie-host.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/mscc,ocelot-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/pinctrl-mt7622.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/qcom,msm8998-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/socionext,uniphier-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/mti,mips-cpc.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/sprd,sc2731-regulator.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/rtc-mxc_v2.txt (contents, props changed) vendor/device-tree/dist/Bindings/siox/ vendor/device-tree/dist/Bindings/siox/eckelmann,siox-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/slimbus/ vendor/device-tree/dist/Bindings/slimbus/bus.txt (contents, props changed) vendor/device-tree/dist/Bindings/slimbus/slim-qcom-ctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/soc/xilinx/ vendor/device-tree/dist/Bindings/soc/xilinx/xlnx,vcu.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/max98373.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/pcm186x.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/st,stm32-adfsdm.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/ti,tas6424.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/tscs42xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/uniphier,evea.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/spreadtrum,sprd-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/faraday,ftwdt010.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/realtek,rtd119x.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/sprd-wdt.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/zii,rave-sp-wdt.txt (contents, props changed) vendor/device-tree/dist/include/dt-bindings/bus/ vendor/device-tree/dist/include/dt-bindings/bus/ti-sysc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/am3.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/am4.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/aspeed-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/axg-clkc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/dm814.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/dm816.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/dra7.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/jz4770-cgu.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/omap5.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/sprd,sc9860-clk.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/gpio/aspeed-gpio.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/gpio/meson-axg-gpio.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/memory/tegra186-mc.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/mt2712-power.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/power/owl-s700-powergate.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/amlogic,meson-axg-reset.h (contents, props changed) vendor/device-tree/dist/src/arm/am572x-idk-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/am574x-idk.dts (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-bmc-opp-witherspoon.dts (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-bmc-opp-zaius.dts (contents, props changed) vendor/device-tree/dist/src/arm/aspeed-bmc-quanta-q71l.dts (contents, props changed) vendor/device-tree/dist/src/arm/at91-natte.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/at91-nattis-2-natte-2.dts (contents, props changed) vendor/device-tree/dist/src/arm/at91-sama5d2_ptc_ek.dts (contents, props changed) vendor/device-tree/dist/src/arm/gemini-dlink-dns-313.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx28-ts4600.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-cubox-i-emmc-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-cubox-i-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-hummingboard-emmc-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-hummingboard-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-hummingboard2-emmc-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-hummingboard2-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-hummingboard2.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-ts7970.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-cubox-i-emmc-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-cubox-i-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-hummingboard-emmc-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-hummingboard-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-hummingboard2-emmc-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-hummingboard2-som-v15.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-hummingboard2.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-ts7970.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-var-dt6customboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-hummingboard2-emmc.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-hummingboard2.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-sr-som-brcm.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-sr-som-emmc.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-sr-som-ti.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-sr-som.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-ts7970.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-var-dart.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx7d-colibri-emmc-eval-v3.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx7d-colibri-emmc.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx7d-pico-pi.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx7d-pico.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/logicpd-som-lv-35xx-devkit.dts (contents, props changed) vendor/device-tree/dist/src/arm/logicpd-som-lv-baseboard.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/logicpd-torpedo-35xx-devkit.dts (contents, props changed) vendor/device-tree/dist/src/arm/logicpd-torpedo-baseboard.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/ls1021a-moxa-uc-8410a.dts (contents, props changed) vendor/device-tree/dist/src/arm/openbmc-flash-layout.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/owl-s500-sparky.dts (contents, props changed) vendor/device-tree/dist/src/arm/ox810se-wd-mbwe.dts (contents, props changed) vendor/device-tree/dist/src/arm/ox820-cloudengines-pogoplug-series-3.dts (contents, props changed) vendor/device-tree/dist/src/arm/r8a7745-iwg22d-sodimm-dbhd-ca.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-h2-plus-orangepi-r1.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-h3-libretech-all-h3-cc.dts (contents, props changed) vendor/device-tree/dist/src/arm64/actions/s700-cubieboard7.dts (contents, props changed) vendor/device-tree/dist/src/arm64/actions/s700.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/marvell/armada-cp110.dtsi (contents, props changed) vendor/device-tree/dist/src/arm64/renesas/r8a7796-salvator-xs.dts (contents, props changed) vendor/device-tree/dist/src/arm64/renesas/r8a77970-v3msk.dts (contents, props changed) vendor/device-tree/dist/src/mips/ingenic/gcw0.dts (contents, props changed) vendor/device-tree/dist/src/mips/ingenic/jz4770.dtsi (contents, props changed) Deleted: vendor/device-tree/dist/Bindings/display/panel/toppoly,td028ttec1.txt vendor/device-tree/dist/Bindings/eeprom/eeprom.txt vendor/device-tree/dist/Bindings/misc/arm-charlcd.txt vendor/device-tree/dist/Bindings/net/ti,wilink-st.txt vendor/device-tree/dist/Bindings/power/reset/imx-snvs-poweroff.txt vendor/device-tree/dist/Bindings/rng/brcm,bcm6368.txt vendor/device-tree/dist/Bindings/watchdog/cortina,gemin-watchdog.txt vendor/device-tree/dist/Bindings/watchdog/cortina,gemini-watchdog.txt vendor/device-tree/dist/src/arm/cloudengines-pogoplug-series-3.dts vendor/device-tree/dist/src/arm/imx6qdl-microsom-ar8035.dtsi vendor/device-tree/dist/src/arm/imx6qdl-microsom.dtsi vendor/device-tree/dist/src/arm/imx7d-pico.dts vendor/device-tree/dist/src/arm/wd-mbwe.dts vendor/device-tree/dist/src/arm64/marvell/armada-cp110-master.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-cp110-slave.dtsi Modified: vendor/device-tree/dist/Bindings/arm/actions.txt vendor/device-tree/dist/Bindings/arm/atmel-at91.txt vendor/device-tree/dist/Bindings/arm/axentia.txt vendor/device-tree/dist/Bindings/arm/bcm/brcm,brcmstb.txt vendor/device-tree/dist/Bindings/arm/cpus.txt vendor/device-tree/dist/Bindings/arm/marvell/armada-37xx.txt vendor/device-tree/dist/Bindings/arm/mediatek/mediatek,ethsys.txt vendor/device-tree/dist/Bindings/arm/samsung/exynos-adc.txt vendor/device-tree/dist/Bindings/arm/samsung/samsung-boards.txt vendor/device-tree/dist/Bindings/arm/shmobile.txt vendor/device-tree/dist/Bindings/arm/technologic.txt vendor/device-tree/dist/Bindings/bus/ti-sysc.txt vendor/device-tree/dist/Bindings/chosen.txt vendor/device-tree/dist/Bindings/clock/amlogic,gxbb-clkc.txt vendor/device-tree/dist/Bindings/clock/exynos3250-clock.txt vendor/device-tree/dist/Bindings/clock/exynos5260-clock.txt vendor/device-tree/dist/Bindings/clock/exynos5410-clock.txt vendor/device-tree/dist/Bindings/clock/exynos5433-clock.txt vendor/device-tree/dist/Bindings/clock/hi3660-clock.txt vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt vendor/device-tree/dist/Bindings/clock/silabs,si5351.txt vendor/device-tree/dist/Bindings/clock/sun8i-de2.txt vendor/device-tree/dist/Bindings/crypto/atmel-crypto.txt vendor/device-tree/dist/Bindings/crypto/inside-secure-safexcel.txt vendor/device-tree/dist/Bindings/crypto/samsung,exynos-rng4.txt vendor/device-tree/dist/Bindings/devfreq/event/exynos-nocp.txt vendor/device-tree/dist/Bindings/display/amlogic,meson-dw-hdmi.txt vendor/device-tree/dist/Bindings/display/amlogic,meson-vpu.txt vendor/device-tree/dist/Bindings/display/exynos/exynos_dsim.txt vendor/device-tree/dist/Bindings/display/exynos/exynos_hdmi.txt vendor/device-tree/dist/Bindings/display/panel/panel-common.txt vendor/device-tree/dist/Bindings/display/panel/panel-lvds.txt vendor/device-tree/dist/Bindings/display/panel/simple-panel.txt vendor/device-tree/dist/Bindings/display/panel/toshiba,lt089ac29000.txt vendor/device-tree/dist/Bindings/display/renesas,du.txt vendor/device-tree/dist/Bindings/display/rockchip/rockchip-vop.txt vendor/device-tree/dist/Bindings/display/simple-framebuffer-sunxi.txt vendor/device-tree/dist/Bindings/display/st,stih4xx.txt vendor/device-tree/dist/Bindings/display/st,stm32-ltdc.txt vendor/device-tree/dist/Bindings/display/sunxi/sun4i-drm.txt vendor/device-tree/dist/Bindings/display/tegra/nvidia,tegra20-host1x.txt vendor/device-tree/dist/Bindings/display/ti/ti,dra7-dss.txt vendor/device-tree/dist/Bindings/display/ti/ti,omap2-dss.txt vendor/device-tree/dist/Bindings/display/ti/ti,omap3-dss.txt vendor/device-tree/dist/Bindings/display/ti/ti,omap4-dss.txt vendor/device-tree/dist/Bindings/display/ti/ti,omap5-dss.txt vendor/device-tree/dist/Bindings/dma/mv-xor-v2.txt vendor/device-tree/dist/Bindings/dma/qcom_hidma_mgmt.txt vendor/device-tree/dist/Bindings/dma/snps-dma.txt vendor/device-tree/dist/Bindings/dma/ste-dma40.txt vendor/device-tree/dist/Bindings/eeprom/at25.txt vendor/device-tree/dist/Bindings/gpio/abilis,tb10x-gpio.txt vendor/device-tree/dist/Bindings/gpio/gpio-axp209.txt vendor/device-tree/dist/Bindings/gpio/gpio-stp-xway.txt vendor/device-tree/dist/Bindings/gpio/gpio.txt vendor/device-tree/dist/Bindings/gpio/renesas,gpio-rcar.txt vendor/device-tree/dist/Bindings/gpu/arm,mali-utgard.txt vendor/device-tree/dist/Bindings/hwmon/aspeed-pwm-tacho.txt vendor/device-tree/dist/Bindings/i2c/i2c-arb-gpio-challenge.txt vendor/device-tree/dist/Bindings/i2c/i2c-imx-lpi2c.txt vendor/device-tree/dist/Bindings/i2c/i2c-meson.txt vendor/device-tree/dist/Bindings/i2c/i2c-mtk.txt vendor/device-tree/dist/Bindings/i2c/i2c-mux-pca954x.txt vendor/device-tree/dist/Bindings/i2c/i2c-mv64xxx.txt vendor/device-tree/dist/Bindings/iio/adc/amlogic,meson-saradc.txt vendor/device-tree/dist/Bindings/iio/adc/aspeed_adc.txt vendor/device-tree/dist/Bindings/iio/adc/at91-sama5d2_adc.txt vendor/device-tree/dist/Bindings/iio/adc/st,stm32-adc.txt vendor/device-tree/dist/Bindings/iio/health/max30102.txt vendor/device-tree/dist/Bindings/input/hid-over-i2c.txt vendor/device-tree/dist/Bindings/input/samsung-keypad.txt vendor/device-tree/dist/Bindings/input/touchscreen/brcm,iproc-touchscreen.txt vendor/device-tree/dist/Bindings/input/touchscreen/mms114.txt vendor/device-tree/dist/Bindings/input/touchscreen/silead_gsl1680.txt vendor/device-tree/dist/Bindings/interrupt-controller/brcm,bcm2836-l1-intc.txt vendor/device-tree/dist/Bindings/interrupt-controller/renesas,irqc.txt vendor/device-tree/dist/Bindings/iommu/renesas,ipmmu-vmsa.txt vendor/device-tree/dist/Bindings/iommu/samsung,sysmmu.txt vendor/device-tree/dist/Bindings/leds/leds-lp8860.txt vendor/device-tree/dist/Bindings/mailbox/omap-mailbox.txt vendor/device-tree/dist/Bindings/mailbox/qcom,apcs-kpss-global.txt vendor/device-tree/dist/Bindings/mailbox/ti,message-manager.txt vendor/device-tree/dist/Bindings/media/cec-gpio.txt vendor/device-tree/dist/Bindings/media/i2c/mt9m111.txt vendor/device-tree/dist/Bindings/media/i2c/ov5640.txt vendor/device-tree/dist/Bindings/media/i2c/toshiba,et8ek8.txt vendor/device-tree/dist/Bindings/media/s5p-cec.txt vendor/device-tree/dist/Bindings/media/samsung-s5c73m3.txt vendor/device-tree/dist/Bindings/media/xilinx/xlnx,v-tpg.txt vendor/device-tree/dist/Bindings/memory-controllers/nvidia,tegra30-mc.txt vendor/device-tree/dist/Bindings/memory-controllers/ti-aemif.txt vendor/device-tree/dist/Bindings/memory-controllers/ti/emif.txt vendor/device-tree/dist/Bindings/mfd/cros-ec.txt vendor/device-tree/dist/Bindings/mfd/mc13xxx.txt vendor/device-tree/dist/Bindings/mfd/syscon.txt vendor/device-tree/dist/Bindings/mmc/mmc.txt vendor/device-tree/dist/Bindings/mmc/mtk-sd.txt vendor/device-tree/dist/Bindings/mmc/tmio_mmc.txt vendor/device-tree/dist/Bindings/mtd/fsl-quadspi.txt vendor/device-tree/dist/Bindings/mtd/gpmc-onenand.txt vendor/device-tree/dist/Bindings/mtd/lpc32xx-mlc.txt vendor/device-tree/dist/Bindings/mtd/mtk-nand.txt vendor/device-tree/dist/Bindings/mtd/nand.txt vendor/device-tree/dist/Bindings/net/brcm,bcm7445-switch-v4.0.txt vendor/device-tree/dist/Bindings/net/can/fsl-flexcan.txt vendor/device-tree/dist/Bindings/net/can/m_can.txt vendor/device-tree/dist/Bindings/net/can/rcar_can.txt vendor/device-tree/dist/Bindings/net/cpsw.txt vendor/device-tree/dist/Bindings/net/davinci-mdio.txt vendor/device-tree/dist/Bindings/net/dsa/marvell.txt vendor/device-tree/dist/Bindings/net/fsl-fec.txt vendor/device-tree/dist/Bindings/net/fsl-tsec-phy.txt vendor/device-tree/dist/Bindings/net/ieee802154/adf7242.txt vendor/device-tree/dist/Bindings/net/mediatek-net.txt vendor/device-tree/dist/Bindings/net/phy.txt vendor/device-tree/dist/Bindings/net/renesas,ravb.txt vendor/device-tree/dist/Bindings/net/sff,sfp.txt vendor/device-tree/dist/Bindings/net/wireless/qcom,ath10k.txt vendor/device-tree/dist/Bindings/nvmem/rockchip-efuse.txt vendor/device-tree/dist/Bindings/opp/opp.txt vendor/device-tree/dist/Bindings/pci/axis,artpec6-pcie.txt vendor/device-tree/dist/Bindings/pci/fsl,imx6q-pcie.txt vendor/device-tree/dist/Bindings/pci/samsung,exynos5440-pcie.txt vendor/device-tree/dist/Bindings/phy/ti-phy.txt vendor/device-tree/dist/Bindings/pinctrl/abilis,tb10x-iomux.txt vendor/device-tree/dist/Bindings/pinctrl/cortina,gemini-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/fsl,imx6ul-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/img,pistachio-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/lantiq,pinctrl-xway.txt vendor/device-tree/dist/Bindings/pinctrl/meson,pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/pinctrl-mt65xx.txt vendor/device-tree/dist/Bindings/pinctrl/renesas,pfc-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/st,stm32-pinctrl.txt vendor/device-tree/dist/Bindings/power/actions,owl-sps.txt vendor/device-tree/dist/Bindings/power/fsl,imx-gpc.txt vendor/device-tree/dist/Bindings/power/fsl,imx-gpcv2.txt vendor/device-tree/dist/Bindings/power/power_domain.txt vendor/device-tree/dist/Bindings/power/supply/bq27xxx.txt vendor/device-tree/dist/Bindings/power/ti-smartreflex.txt vendor/device-tree/dist/Bindings/power/wakeup-source.txt vendor/device-tree/dist/Bindings/powerpc/fsl/interlaken-lac.txt vendor/device-tree/dist/Bindings/powerpc/fsl/mpc5200.txt vendor/device-tree/dist/Bindings/pwm/pwm-meson.txt vendor/device-tree/dist/Bindings/regulator/regulator.txt vendor/device-tree/dist/Bindings/regulator/st,stm32-vrefbuf.txt vendor/device-tree/dist/Bindings/reset/amlogic,meson-reset.txt vendor/device-tree/dist/Bindings/rng/brcm,bcm2835.txt vendor/device-tree/dist/Bindings/scsi/hisilicon-sas.txt vendor/device-tree/dist/Bindings/serial/fsl-imx-uart.txt vendor/device-tree/dist/Bindings/serial/fsl-lpuart.txt vendor/device-tree/dist/Bindings/serial/ingenic,uart.txt vendor/device-tree/dist/Bindings/serial/lantiq_asc.txt vendor/device-tree/dist/Bindings/serial/maxim,max310x.txt vendor/device-tree/dist/Bindings/serial/mvebu-uart.txt vendor/device-tree/dist/Bindings/serial/omap_serial.txt vendor/device-tree/dist/Bindings/serial/rs485.txt vendor/device-tree/dist/Bindings/soc/mediatek/scpsys.txt vendor/device-tree/dist/Bindings/soc/qcom/qcom,smp2p.txt vendor/device-tree/dist/Bindings/sound/dmic.txt vendor/device-tree/dist/Bindings/sound/img,i2s-out.txt vendor/device-tree/dist/Bindings/sound/img,parallel-out.txt vendor/device-tree/dist/Bindings/sound/img,spdif-in.txt vendor/device-tree/dist/Bindings/sound/img,spdif-out.txt vendor/device-tree/dist/Bindings/sound/mt2701-afe-pcm.txt vendor/device-tree/dist/Bindings/sound/mxs-audio-sgtl5000.txt vendor/device-tree/dist/Bindings/sound/nau8825.txt vendor/device-tree/dist/Bindings/sound/renesas,rsnd.txt vendor/device-tree/dist/Bindings/sound/simple-card.txt vendor/device-tree/dist/Bindings/sound/st,sti-asoc-card.txt vendor/device-tree/dist/Bindings/sound/st,stm32-sai.txt vendor/device-tree/dist/Bindings/sound/sun4i-i2s.txt vendor/device-tree/dist/Bindings/sound/tas5720.txt vendor/device-tree/dist/Bindings/sound/tfa9879.txt vendor/device-tree/dist/Bindings/sound/tlv320aic31xx.txt vendor/device-tree/dist/Bindings/sound/tlv320aic3x.txt vendor/device-tree/dist/Bindings/spi/sh-msiof.txt vendor/device-tree/dist/Bindings/spi/spi-davinci.txt vendor/device-tree/dist/Bindings/spi/spi-lantiq-ssc.txt vendor/device-tree/dist/Bindings/spi/spi-meson.txt vendor/device-tree/dist/Bindings/spi/spi-orion.txt vendor/device-tree/dist/Bindings/spi/spi-xilinx.txt vendor/device-tree/dist/Bindings/thermal/armada-thermal.txt vendor/device-tree/dist/Bindings/thermal/exynos-thermal.txt vendor/device-tree/dist/Bindings/thermal/imx-thermal.txt vendor/device-tree/dist/Bindings/thermal/rcar-thermal.txt vendor/device-tree/dist/Bindings/thermal/thermal.txt vendor/device-tree/dist/Bindings/timer/actions,owl-timer.txt vendor/device-tree/dist/Bindings/timer/renesas,tpu.txt vendor/device-tree/dist/Bindings/timer/samsung,exynos4210-mct.txt vendor/device-tree/dist/Bindings/trivial-devices.txt vendor/device-tree/dist/Bindings/usb/dwc2.txt vendor/device-tree/dist/Bindings/usb/dwc3.txt vendor/device-tree/dist/Bindings/usb/mediatek,mtk-xhci.txt vendor/device-tree/dist/Bindings/usb/mediatek,mtu3.txt vendor/device-tree/dist/Bindings/usb/renesas_usb3.txt vendor/device-tree/dist/Bindings/usb/renesas_usbhs.txt vendor/device-tree/dist/Bindings/usb/usb-device.txt vendor/device-tree/dist/Bindings/usb/usb-xhci.txt vendor/device-tree/dist/Bindings/vendor-prefixes.txt vendor/device-tree/dist/Bindings/watchdog/ingenic,jz4740-wdt.txt vendor/device-tree/dist/Bindings/watchdog/pnx4008-wdt.txt vendor/device-tree/dist/Bindings/watchdog/renesas-wdt.txt vendor/device-tree/dist/Bindings/watchdog/samsung-wdt.txt vendor/device-tree/dist/include/dt-bindings/clock/hi3660-clock.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq8074.h vendor/device-tree/dist/include/dt-bindings/gpio/gpio.h vendor/device-tree/dist/include/dt-bindings/input/linux-event-codes.h vendor/device-tree/dist/include/dt-bindings/pinctrl/am43xx.h vendor/device-tree/dist/include/dt-bindings/pinctrl/stm32-pinfunc.h vendor/device-tree/dist/src/arc/axs101.dts vendor/device-tree/dist/src/arc/axs10x_mb.dtsi vendor/device-tree/dist/src/arc/haps_hs_idu.dts vendor/device-tree/dist/src/arc/nsim_700.dts vendor/device-tree/dist/src/arc/nsim_hs.dts vendor/device-tree/dist/src/arc/nsim_hs_idu.dts vendor/device-tree/dist/src/arc/nsimosci.dts vendor/device-tree/dist/src/arc/nsimosci_hs.dts vendor/device-tree/dist/src/arc/nsimosci_hs_idu.dts vendor/device-tree/dist/src/arm/am335x-bone-common.dtsi vendor/device-tree/dist/src/arm/am335x-boneblue.dts vendor/device-tree/dist/src/arm/am335x-evm.dts vendor/device-tree/dist/src/arm/am335x-evmsk.dts vendor/device-tree/dist/src/arm/am335x-pepper.dts vendor/device-tree/dist/src/arm/am33xx-clocks.dtsi vendor/device-tree/dist/src/arm/am33xx.dtsi vendor/device-tree/dist/src/arm/am3517.dtsi vendor/device-tree/dist/src/arm/am4372.dtsi vendor/device-tree/dist/src/arm/am437x-gp-evm.dts vendor/device-tree/dist/src/arm/am437x-idk-evm.dts vendor/device-tree/dist/src/arm/am437x-sk-evm.dts vendor/device-tree/dist/src/arm/am43x-epos-evm.dts vendor/device-tree/dist/src/arm/am43xx-clocks.dtsi vendor/device-tree/dist/src/arm/am571x-idk.dts vendor/device-tree/dist/src/arm/am572x-idk.dts vendor/device-tree/dist/src/arm/am57xx-beagle-x15-common.dtsi vendor/device-tree/dist/src/arm/animeo_ip.dts vendor/device-tree/dist/src/arm/arm-realview-eb-mp.dtsi vendor/device-tree/dist/src/arm/armada-38x.dtsi vendor/device-tree/dist/src/arm/aspeed-ast2500-evb.dts vendor/device-tree/dist/src/arm/aspeed-bmc-opp-palmetto.dts vendor/device-tree/dist/src/arm/aspeed-bmc-opp-romulus.dts vendor/device-tree/dist/src/arm/aspeed-g4.dtsi vendor/device-tree/dist/src/arm/aspeed-g5.dtsi vendor/device-tree/dist/src/arm/at91-ariag25.dts vendor/device-tree/dist/src/arm/at91-ariettag25.dts vendor/device-tree/dist/src/arm/at91-cosino.dtsi vendor/device-tree/dist/src/arm/at91-foxg20.dts vendor/device-tree/dist/src/arm/at91-kizbox.dts vendor/device-tree/dist/src/arm/at91-kizbox2.dts vendor/device-tree/dist/src/arm/at91-kizboxmini.dts vendor/device-tree/dist/src/arm/at91-linea.dtsi vendor/device-tree/dist/src/arm/at91-qil_a9260.dts vendor/device-tree/dist/src/arm/at91-sam9_l9260.dts vendor/device-tree/dist/src/arm/at91-sama5d27_som1_ek.dts vendor/device-tree/dist/src/arm/at91-sama5d2_xplained.dts vendor/device-tree/dist/src/arm/at91-sama5d3_xplained.dts vendor/device-tree/dist/src/arm/at91-sama5d4_ma5d4.dtsi vendor/device-tree/dist/src/arm/at91-sama5d4_xplained.dts vendor/device-tree/dist/src/arm/at91-sama5d4ek.dts vendor/device-tree/dist/src/arm/at91-vinco.dts vendor/device-tree/dist/src/arm/at91rm9200.dtsi vendor/device-tree/dist/src/arm/at91rm9200ek.dts vendor/device-tree/dist/src/arm/at91sam9260.dtsi vendor/device-tree/dist/src/arm/at91sam9260ek.dts vendor/device-tree/dist/src/arm/at91sam9261.dtsi vendor/device-tree/dist/src/arm/at91sam9261ek.dts vendor/device-tree/dist/src/arm/at91sam9263.dtsi vendor/device-tree/dist/src/arm/at91sam9263ek.dts vendor/device-tree/dist/src/arm/at91sam9g20ek_common.dtsi vendor/device-tree/dist/src/arm/at91sam9g25ek.dts vendor/device-tree/dist/src/arm/at91sam9g45.dtsi vendor/device-tree/dist/src/arm/at91sam9m10g45ek.dts vendor/device-tree/dist/src/arm/at91sam9n12.dtsi vendor/device-tree/dist/src/arm/at91sam9n12ek.dts vendor/device-tree/dist/src/arm/at91sam9rl.dtsi vendor/device-tree/dist/src/arm/at91sam9rlek.dts vendor/device-tree/dist/src/arm/at91sam9x5.dtsi vendor/device-tree/dist/src/arm/at91sam9x5cm.dtsi vendor/device-tree/dist/src/arm/axp81x.dtsi vendor/device-tree/dist/src/arm/bcm11351.dtsi vendor/device-tree/dist/src/arm/bcm21664.dtsi vendor/device-tree/dist/src/arm/bcm2835-rpi-a-plus.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-a.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b-plus.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b-rev2.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b.dts vendor/device-tree/dist/src/arm/bcm2835.dtsi vendor/device-tree/dist/src/arm/bcm2836-rpi-2-b.dts vendor/device-tree/dist/src/arm/bcm2836.dtsi vendor/device-tree/dist/src/arm/bcm2837-rpi-3-b.dts vendor/device-tree/dist/src/arm/bcm2837.dtsi vendor/device-tree/dist/src/arm/bcm283x.dtsi vendor/device-tree/dist/src/arm/bcm958625hr.dts vendor/device-tree/dist/src/arm/dm814x-clocks.dtsi vendor/device-tree/dist/src/arm/dm814x.dtsi vendor/device-tree/dist/src/arm/dm816x-clocks.dtsi vendor/device-tree/dist/src/arm/dm816x.dtsi vendor/device-tree/dist/src/arm/dra62x-j5eco-evm.dts vendor/device-tree/dist/src/arm/dra7-evm-common.dtsi vendor/device-tree/dist/src/arm/dra7-evm.dts vendor/device-tree/dist/src/arm/dra7.dtsi vendor/device-tree/dist/src/arm/dra72-evm-common.dtsi vendor/device-tree/dist/src/arm/dra72-evm-tps65917.dtsi vendor/device-tree/dist/src/arm/dra72x.dtsi vendor/device-tree/dist/src/arm/dra74x.dtsi vendor/device-tree/dist/src/arm/dra76-evm.dts vendor/device-tree/dist/src/arm/dra7xx-clocks.dtsi vendor/device-tree/dist/src/arm/efm32gg-dk3750.dts vendor/device-tree/dist/src/arm/ethernut5.dts vendor/device-tree/dist/src/arm/exynos3250-artik5-eval.dts vendor/device-tree/dist/src/arm/exynos3250-artik5.dtsi vendor/device-tree/dist/src/arm/exynos3250-monk.dts vendor/device-tree/dist/src/arm/exynos3250-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos3250-rinato.dts vendor/device-tree/dist/src/arm/exynos3250.dtsi vendor/device-tree/dist/src/arm/exynos4-cpu-thermal.dtsi vendor/device-tree/dist/src/arm/exynos4.dtsi vendor/device-tree/dist/src/arm/exynos4210-origen.dts vendor/device-tree/dist/src/arm/exynos4210-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos4210-smdkv310.dts vendor/device-tree/dist/src/arm/exynos4210-trats.dts vendor/device-tree/dist/src/arm/exynos4210-universal_c210.dts vendor/device-tree/dist/src/arm/exynos4210.dtsi vendor/device-tree/dist/src/arm/exynos4412-itop-elite.dts vendor/device-tree/dist/src/arm/exynos4412-itop-scp-core.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroid-common.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroidu3.dts vendor/device-tree/dist/src/arm/exynos4412-odroidx.dts vendor/device-tree/dist/src/arm/exynos4412-odroidx2.dts vendor/device-tree/dist/src/arm/exynos4412-origen.dts vendor/device-tree/dist/src/arm/exynos4412-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos4412-ppmu-common.dtsi vendor/device-tree/dist/src/arm/exynos4412-prime.dtsi vendor/device-tree/dist/src/arm/exynos4412-smdk4412.dts vendor/device-tree/dist/src/arm/exynos4412-trats2.dts vendor/device-tree/dist/src/arm/exynos4412.dtsi vendor/device-tree/dist/src/arm/exynos5.dtsi vendor/device-tree/dist/src/arm/exynos5250-arndale.dts vendor/device-tree/dist/src/arm/exynos5250-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5250-smdk5250.dts vendor/device-tree/dist/src/arm/exynos5250-snow-common.dtsi vendor/device-tree/dist/src/arm/exynos5250-snow-rev5.dts vendor/device-tree/dist/src/arm/exynos5250-snow.dts vendor/device-tree/dist/src/arm/exynos5250-spring.dts vendor/device-tree/dist/src/arm/exynos5250.dtsi vendor/device-tree/dist/src/arm/exynos5260-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5260-xyref5260.dts vendor/device-tree/dist/src/arm/exynos5260.dtsi vendor/device-tree/dist/src/arm/exynos5410-odroidxu.dts vendor/device-tree/dist/src/arm/exynos5410-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5410-smdk5410.dts vendor/device-tree/dist/src/arm/exynos5410.dtsi vendor/device-tree/dist/src/arm/exynos5420-arndale-octa.dts vendor/device-tree/dist/src/arm/exynos5420-cpus.dtsi vendor/device-tree/dist/src/arm/exynos5420-peach-pit.dts vendor/device-tree/dist/src/arm/exynos5420-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5420-smdk5420.dts vendor/device-tree/dist/src/arm/exynos5420-tmu-sensor-conf.dtsi vendor/device-tree/dist/src/arm/exynos5420-trip-points.dtsi vendor/device-tree/dist/src/arm/exynos5420.dtsi vendor/device-tree/dist/src/arm/exynos5422-cpus.dtsi vendor/device-tree/dist/src/arm/exynos5422-odroid-core.dtsi vendor/device-tree/dist/src/arm/exynos5422-odroidhc1.dts vendor/device-tree/dist/src/arm/exynos5422-odroidxu3-audio.dtsi vendor/device-tree/dist/src/arm/exynos5422-odroidxu3-common.dtsi vendor/device-tree/dist/src/arm/exynos5422-odroidxu3-lite.dts vendor/device-tree/dist/src/arm/exynos5422-odroidxu3.dts vendor/device-tree/dist/src/arm/exynos5422-odroidxu4.dts vendor/device-tree/dist/src/arm/exynos5440-sd5v1.dts vendor/device-tree/dist/src/arm/exynos5440-ssdk5440.dts vendor/device-tree/dist/src/arm/exynos5440-tmu-sensor-conf.dtsi vendor/device-tree/dist/src/arm/exynos5440-trip-points.dtsi vendor/device-tree/dist/src/arm/exynos5440.dtsi vendor/device-tree/dist/src/arm/exynos54xx-odroidxu-leds.dtsi vendor/device-tree/dist/src/arm/exynos54xx.dtsi vendor/device-tree/dist/src/arm/ge863-pro3.dtsi vendor/device-tree/dist/src/arm/gemini-dlink-dir-685.dts vendor/device-tree/dist/src/arm/gemini-nas4220b.dts vendor/device-tree/dist/src/arm/gemini-rut1xx.dts vendor/device-tree/dist/src/arm/gemini-wbd111.dts vendor/device-tree/dist/src/arm/gemini-wbd222.dts vendor/device-tree/dist/src/arm/gemini.dtsi vendor/device-tree/dist/src/arm/imx25.dtsi vendor/device-tree/dist/src/arm/imx27-pdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycore-rdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycore-som.dtsi vendor/device-tree/dist/src/arm/imx28.dtsi vendor/device-tree/dist/src/arm/imx35.dtsi vendor/device-tree/dist/src/arm/imx51-babbage.dts vendor/device-tree/dist/src/arm/imx51-eukrea-mbimxsd51-baseboard.dts vendor/device-tree/dist/src/arm/imx51-ts4800.dts vendor/device-tree/dist/src/arm/imx51-zii-rdu1.dts vendor/device-tree/dist/src/arm/imx51.dtsi vendor/device-tree/dist/src/arm/imx53-cx9020.dts vendor/device-tree/dist/src/arm/imx53-m53.dtsi vendor/device-tree/dist/src/arm/imx53-tx53-x03x.dts vendor/device-tree/dist/src/arm/imx53-tx53.dtsi vendor/device-tree/dist/src/arm/imx53.dtsi vendor/device-tree/dist/src/arm/imx6dl-aristainetos_4.dts vendor/device-tree/dist/src/arm/imx6dl-aristainetos_7.dts vendor/device-tree/dist/src/arm/imx6dl-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/imx6dl-cubox-i.dts vendor/device-tree/dist/src/arm/imx6dl-hummingboard.dts vendor/device-tree/dist/src/arm/imx6dl-icore-rqs.dts vendor/device-tree/dist/src/arm/imx6dl-pinfunc.h vendor/device-tree/dist/src/arm/imx6dl.dtsi vendor/device-tree/dist/src/arm/imx6q-apalis-eval.dts vendor/device-tree/dist/src/arm/imx6q-apalis-ixora-v1.1.dts vendor/device-tree/dist/src/arm/imx6q-apalis-ixora.dts vendor/device-tree/dist/src/arm/imx6q-b450v3.dts vendor/device-tree/dist/src/arm/imx6q-b650v3.dts vendor/device-tree/dist/src/arm/imx6q-b850v3.dts vendor/device-tree/dist/src/arm/imx6q-bx50v3.dtsi vendor/device-tree/dist/src/arm/imx6q-cubox-i.dts vendor/device-tree/dist/src/arm/imx6q-display5.dtsi vendor/device-tree/dist/src/arm/imx6q-h100.dts vendor/device-tree/dist/src/arm/imx6q-hummingboard.dts vendor/device-tree/dist/src/arm/imx6q-pinfunc.h vendor/device-tree/dist/src/arm/imx6qdl-apalis.dtsi vendor/device-tree/dist/src/arm/imx6qdl-apf6dev.dtsi vendor/device-tree/dist/src/arm/imx6qdl-aristainetos.dtsi vendor/device-tree/dist/src/arm/imx6qdl-aristainetos2.dtsi vendor/device-tree/dist/src/arm/imx6qdl-colibri.dtsi vendor/device-tree/dist/src/arm/imx6qdl-cubox-i.dtsi vendor/device-tree/dist/src/arm/imx6qdl-hummingboard.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nitrogen6_max.dtsi vendor/device-tree/dist/src/arm/imx6qdl-nitrogen6x.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabreauto.dtsi vendor/device-tree/dist/src/arm/imx6qdl-udoo.dtsi vendor/device-tree/dist/src/arm/imx6qdl-wandboard-revd1.dtsi vendor/device-tree/dist/src/arm/imx6qdl-zii-rdu2.dtsi vendor/device-tree/dist/src/arm/imx6qdl.dtsi vendor/device-tree/dist/src/arm/imx6sl-evk.dts vendor/device-tree/dist/src/arm/imx6sl.dtsi vendor/device-tree/dist/src/arm/imx6sx-sdb.dtsi vendor/device-tree/dist/src/arm/imx6sx.dtsi vendor/device-tree/dist/src/arm/imx6ul-14x14-evk.dts vendor/device-tree/dist/src/arm/imx6ul.dtsi vendor/device-tree/dist/src/arm/imx7-colibri-eval-v3.dtsi vendor/device-tree/dist/src/arm/imx7-colibri.dtsi vendor/device-tree/dist/src/arm/imx7d-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/imx7d-colibri.dtsi vendor/device-tree/dist/src/arm/imx7d-sdb.dts vendor/device-tree/dist/src/arm/imx7d.dtsi vendor/device-tree/dist/src/arm/imx7s.dtsi vendor/device-tree/dist/src/arm/iwg20d-q7-common.dtsi vendor/device-tree/dist/src/arm/iwg20d-q7-dbcm-ca.dtsi vendor/device-tree/dist/src/arm/keystone-clocks.dtsi vendor/device-tree/dist/src/arm/keystone-k2e-clocks.dtsi vendor/device-tree/dist/src/arm/keystone-k2e-evm.dts vendor/device-tree/dist/src/arm/keystone-k2e-netcp.dtsi vendor/device-tree/dist/src/arm/keystone-k2e.dtsi vendor/device-tree/dist/src/arm/keystone-k2g-evm.dts vendor/device-tree/dist/src/arm/keystone-k2g-ice.dts vendor/device-tree/dist/src/arm/keystone-k2g.dtsi vendor/device-tree/dist/src/arm/keystone-k2hk-clocks.dtsi vendor/device-tree/dist/src/arm/keystone-k2hk-evm.dts vendor/device-tree/dist/src/arm/keystone-k2hk-netcp.dtsi vendor/device-tree/dist/src/arm/keystone-k2hk.dtsi vendor/device-tree/dist/src/arm/keystone-k2l-clocks.dtsi vendor/device-tree/dist/src/arm/keystone-k2l-evm.dts vendor/device-tree/dist/src/arm/keystone-k2l-netcp.dtsi vendor/device-tree/dist/src/arm/keystone-k2l.dtsi vendor/device-tree/dist/src/arm/keystone.dtsi vendor/device-tree/dist/src/arm/kirkwood-linksys-viper.dts vendor/device-tree/dist/src/arm/logicpd-som-lv-37xx-devkit.dts vendor/device-tree/dist/src/arm/logicpd-som-lv.dtsi vendor/device-tree/dist/src/arm/logicpd-torpedo-37xx-devkit.dts vendor/device-tree/dist/src/arm/logicpd-torpedo-som.dtsi vendor/device-tree/dist/src/arm/lpc3250-ea3250.dts vendor/device-tree/dist/src/arm/lpc3250-phy3250.dts vendor/device-tree/dist/src/arm/lpc4337-ciaa.dts vendor/device-tree/dist/src/arm/lpc4350-hitex-eval.dts vendor/device-tree/dist/src/arm/lpc4357-ea4357-devkit.dts vendor/device-tree/dist/src/arm/ls1021a-qds.dts vendor/device-tree/dist/src/arm/ls1021a-twr.dts vendor/device-tree/dist/src/arm/ls1021a.dtsi vendor/device-tree/dist/src/arm/meson8.dtsi vendor/device-tree/dist/src/arm/meson8b.dtsi vendor/device-tree/dist/src/arm/mpa1600.dts vendor/device-tree/dist/src/arm/mt2701.dtsi vendor/device-tree/dist/src/arm/mt7623.dtsi vendor/device-tree/dist/src/arm/mt7623n-bananapi-bpi-r2.dts vendor/device-tree/dist/src/arm/mt7623n-rfb-nand.dts vendor/device-tree/dist/src/arm/omap2420-n8x0-common.dtsi vendor/device-tree/dist/src/arm/omap3-cm-t3x.dtsi vendor/device-tree/dist/src/arm/omap3-evm-37xx.dts vendor/device-tree/dist/src/arm/omap3-gta04.dtsi vendor/device-tree/dist/src/arm/omap3-igep.dtsi vendor/device-tree/dist/src/arm/omap3-lilly-a83x.dtsi vendor/device-tree/dist/src/arm/omap3-n9.dts vendor/device-tree/dist/src/arm/omap3-n900.dts vendor/device-tree/dist/src/arm/omap3-n950-n9.dtsi vendor/device-tree/dist/src/arm/omap3-n950.dts vendor/device-tree/dist/src/arm/omap3-pandora-common.dtsi vendor/device-tree/dist/src/arm/omap3.dtsi vendor/device-tree/dist/src/arm/omap3430-sdp.dts vendor/device-tree/dist/src/arm/omap34xx.dtsi vendor/device-tree/dist/src/arm/omap36xx.dtsi vendor/device-tree/dist/src/arm/omap4-droid4-xt894.dts vendor/device-tree/dist/src/arm/omap4.dtsi vendor/device-tree/dist/src/arm/omap44xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap5-uevm.dts vendor/device-tree/dist/src/arm/omap5.dtsi vendor/device-tree/dist/src/arm/omap54xx-clocks.dtsi vendor/device-tree/dist/src/arm/pm9g45.dts vendor/device-tree/dist/src/arm/qcom-msm8974-fairphone-fp2.dts vendor/device-tree/dist/src/arm/r7s72100-genmai.dts vendor/device-tree/dist/src/arm/r8a73a4.dtsi vendor/device-tree/dist/src/arm/r8a7740-armadillo800eva.dts vendor/device-tree/dist/src/arm/r8a7740.dtsi vendor/device-tree/dist/src/arm/r8a7743.dtsi vendor/device-tree/dist/src/arm/r8a7745-iwg22d-sodimm.dts vendor/device-tree/dist/src/arm/r8a7745.dtsi vendor/device-tree/dist/src/arm/r8a7778.dtsi vendor/device-tree/dist/src/arm/r8a7779.dtsi vendor/device-tree/dist/src/arm/r8a7790-lager.dts vendor/device-tree/dist/src/arm/r8a7790.dtsi vendor/device-tree/dist/src/arm/r8a7791-koelsch.dts vendor/device-tree/dist/src/arm/r8a7791.dtsi vendor/device-tree/dist/src/arm/r8a7792.dtsi vendor/device-tree/dist/src/arm/r8a7793.dtsi vendor/device-tree/dist/src/arm/r8a7794-alt.dts vendor/device-tree/dist/src/arm/r8a7794.dtsi vendor/device-tree/dist/src/arm/rk3036.dtsi vendor/device-tree/dist/src/arm/rk3066a-rayeager.dts vendor/device-tree/dist/src/arm/rk322x.dtsi vendor/device-tree/dist/src/arm/rk3288-phycore-som.dtsi vendor/device-tree/dist/src/arm/rk3288.dtsi vendor/device-tree/dist/src/arm/s3c2416-pinctrl.dtsi vendor/device-tree/dist/src/arm/s3c2416-smdk2416.dts vendor/device-tree/dist/src/arm/s3c2416.dtsi vendor/device-tree/dist/src/arm/s3c24xx.dtsi vendor/device-tree/dist/src/arm/s3c6400.dtsi vendor/device-tree/dist/src/arm/s3c6410-mini6410.dts vendor/device-tree/dist/src/arm/s3c6410-smdk6410.dts vendor/device-tree/dist/src/arm/s3c6410.dtsi vendor/device-tree/dist/src/arm/s3c64xx-pinctrl.dtsi vendor/device-tree/dist/src/arm/s3c64xx.dtsi vendor/device-tree/dist/src/arm/s5pv210-aquila.dts vendor/device-tree/dist/src/arm/s5pv210-goni.dts vendor/device-tree/dist/src/arm/s5pv210-pinctrl.dtsi vendor/device-tree/dist/src/arm/s5pv210-smdkc110.dts vendor/device-tree/dist/src/arm/s5pv210-smdkv210.dts vendor/device-tree/dist/src/arm/s5pv210-torbreck.dts vendor/device-tree/dist/src/arm/s5pv210.dtsi vendor/device-tree/dist/src/arm/sama5d2.dtsi vendor/device-tree/dist/src/arm/sama5d3.dtsi vendor/device-tree/dist/src/arm/sama5d3_tcb1.dtsi vendor/device-tree/dist/src/arm/sama5d3xcm.dtsi vendor/device-tree/dist/src/arm/sama5d3xcm_cmp.dtsi vendor/device-tree/dist/src/arm/sama5d3xmb.dtsi vendor/device-tree/dist/src/arm/sama5d3xmb_cmp.dtsi vendor/device-tree/dist/src/arm/sama5d4.dtsi vendor/device-tree/dist/src/arm/sh73a0.dtsi vendor/device-tree/dist/src/arm/socfpga.dtsi vendor/device-tree/dist/src/arm/socfpga_arria10_socdk.dtsi vendor/device-tree/dist/src/arm/socfpga_cyclone5_vining_fpga.dts vendor/device-tree/dist/src/arm/spear1310-evb.dts vendor/device-tree/dist/src/arm/spear1340.dtsi vendor/device-tree/dist/src/arm/spear13xx.dtsi vendor/device-tree/dist/src/arm/spear600.dtsi vendor/device-tree/dist/src/arm/ste-nomadik-stn8815.dtsi vendor/device-tree/dist/src/arm/stih407.dtsi vendor/device-tree/dist/src/arm/stih410.dtsi vendor/device-tree/dist/src/arm/sun5i-a13-olinuxino.dts vendor/device-tree/dist/src/arm/sun6i-a31s-sinovoip-bpi-m2.dts vendor/device-tree/dist/src/arm/sun7i-a20-pcduino3-nano.dts vendor/device-tree/dist/src/arm/sun8i-a83t-bananapi-m3.dts vendor/device-tree/dist/src/arm/sun8i-a83t-cubietruck-plus.dts vendor/device-tree/dist/src/arm/sun8i-a83t-tbs-a711.dts vendor/device-tree/dist/src/arm/sun8i-a83t.dtsi vendor/device-tree/dist/src/arm/sun8i-h3-bananapi-m2-plus.dts vendor/device-tree/dist/src/arm/sun8i-h3-nanopi-m1-plus.dts vendor/device-tree/dist/src/arm/sun8i-h3-nanopi-m1.dts vendor/device-tree/dist/src/arm/sun8i-h3-nanopi-neo.dts vendor/device-tree/dist/src/arm/sun8i-h3-orangepi-plus.dts vendor/device-tree/dist/src/arm/sun8i-h3.dtsi vendor/device-tree/dist/src/arm/sunxi-h3-h5.dtsi vendor/device-tree/dist/src/arm/tegra20.dtsi vendor/device-tree/dist/src/arm/tny_a9260_common.dtsi vendor/device-tree/dist/src/arm/tny_a9263.dts vendor/device-tree/dist/src/arm/uniphier-ld4-ref.dts vendor/device-tree/dist/src/arm/uniphier-ld4.dtsi vendor/device-tree/dist/src/arm/uniphier-ld6b-ref.dts vendor/device-tree/dist/src/arm/uniphier-pro4-ref.dts vendor/device-tree/dist/src/arm/uniphier-pro4.dtsi vendor/device-tree/dist/src/arm/uniphier-pro5.dtsi vendor/device-tree/dist/src/arm/uniphier-pxs2.dtsi vendor/device-tree/dist/src/arm/uniphier-sld8-ref.dts vendor/device-tree/dist/src/arm/uniphier-sld8.dtsi vendor/device-tree/dist/src/arm/usb_a9260_common.dtsi vendor/device-tree/dist/src/arm/usb_a9263.dts vendor/device-tree/dist/src/arm/vf-colibri-eval-v3.dtsi vendor/device-tree/dist/src/arm/vf500.dtsi vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-b.dts vendor/device-tree/dist/src/arm/vf610-zii-dev-rev-c.dts vendor/device-tree/dist/src/arm/vf610-zii-dev.dtsi vendor/device-tree/dist/src/arm/vfxxx.dtsi vendor/device-tree/dist/src/arm/zx296702.dtsi vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-bananapi-m64.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-olinuxino.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-a64-orangepi-win.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5-nanopi-neo-plus2.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5-nanopi-neo2.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5-orangepi-pc2.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5-orangepi-prime.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5-orangepi-zero-plus2.dts vendor/device-tree/dist/src/arm64/allwinner/sun50i-h5.dtsi vendor/device-tree/dist/src/arm64/altera/socfpga_stratix10.dtsi vendor/device-tree/dist/src/arm64/altera/socfpga_stratix10_socdk.dts vendor/device-tree/dist/src/arm64/amlogic/meson-axg-s400.dts vendor/device-tree/dist/src/arm64/amlogic/meson-axg.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gx-p23x-q20x.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gx.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-nanopi-k2.dts vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-odroidc2.dts vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb-p200.dts vendor/device-tree/dist/src/arm64/amlogic/meson-gxbb.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts vendor/device-tree/dist/src/arm64/amlogic/meson-gxl-s905x-p212.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxl.dtsi vendor/device-tree/dist/src/arm64/amlogic/meson-gxm-khadas-vim2.dts vendor/device-tree/dist/src/arm64/amlogic/meson-gxm-q200.dts vendor/device-tree/dist/src/arm64/cavium/thunder2-99xx.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433-bus.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433-pinctrl.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433-tm2-common.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433-tm2.dts vendor/device-tree/dist/src/arm64/exynos/exynos5433-tm2e.dts vendor/device-tree/dist/src/arm64/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433-tmu-sensor-conf.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433-tmu.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos5433.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos7-espresso.dts vendor/device-tree/dist/src/arm64/exynos/exynos7-pinctrl.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos7-tmu-sensor-conf.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos7-trip-points.dtsi vendor/device-tree/dist/src/arm64/exynos/exynos7.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls1088a-rdb.dts vendor/device-tree/dist/src/arm64/freescale/fsl-ls1088a.dtsi vendor/device-tree/dist/src/arm64/freescale/fsl-ls208xa-rdb.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hi3660-hikey960.dts vendor/device-tree/dist/src/arm64/hisilicon/hi3660.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hi3798cv200-poplar.dts vendor/device-tree/dist/src/arm64/hisilicon/hi3798cv200.dtsi vendor/device-tree/dist/src/arm64/hisilicon/hi6220-hikey.dts vendor/device-tree/dist/src/arm64/marvell/armada-372x.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-37xx.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-7040-db.dts vendor/device-tree/dist/src/arm64/marvell/armada-70x0.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-8020.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-8040-db.dts vendor/device-tree/dist/src/arm64/marvell/armada-8040-mcbin.dts vendor/device-tree/dist/src/arm64/marvell/armada-8040.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-80x0.dtsi vendor/device-tree/dist/src/arm64/marvell/armada-ap806.dtsi vendor/device-tree/dist/src/arm64/mediatek/mt2712-evb.dts vendor/device-tree/dist/src/arm64/mediatek/mt2712e.dtsi vendor/device-tree/dist/src/arm64/mediatek/mt8173-evb.dts vendor/device-tree/dist/src/arm64/mediatek/mt8173.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra186-p2771-0000.dts vendor/device-tree/dist/src/arm64/nvidia/tegra186-p3310.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra186.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2180.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210-p2530.dtsi vendor/device-tree/dist/src/arm64/nvidia/tegra210.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8016-sbc.dtsi vendor/device-tree/dist/src/arm64/qcom/apq8096-db820c.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8916-pins.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8916.dtsi vendor/device-tree/dist/src/arm64/qcom/msm8996.dtsi vendor/device-tree/dist/src/arm64/qcom/pm8916.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a7795-es1-salvator-x.dts vendor/device-tree/dist/src/arm64/renesas/r8a7795-es1.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a7795-salvator-x.dts vendor/device-tree/dist/src/arm64/renesas/r8a7795-salvator-xs.dts vendor/device-tree/dist/src/arm64/renesas/r8a7795.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a7796-salvator-x.dts vendor/device-tree/dist/src/arm64/renesas/r8a7796.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a77970-eagle.dts vendor/device-tree/dist/src/arm64/renesas/r8a77970.dtsi vendor/device-tree/dist/src/arm64/renesas/r8a77995.dtsi vendor/device-tree/dist/src/arm64/renesas/salvator-common.dtsi vendor/device-tree/dist/src/arm64/renesas/ulcb-kf.dtsi vendor/device-tree/dist/src/arm64/renesas/ulcb.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3328-rock64.dts vendor/device-tree/dist/src/arm64/rockchip/rk3328.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3368.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3399-gru-kevin.dts vendor/device-tree/dist/src/arm64/rockchip/rk3399-gru.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3399-sapphire.dtsi vendor/device-tree/dist/src/arm64/rockchip/rk3399.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-ld11-ref.dts vendor/device-tree/dist/src/arm64/socionext/uniphier-ld11.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-ld20-ref.dts vendor/device-tree/dist/src/arm64/socionext/uniphier-ld20.dtsi vendor/device-tree/dist/src/arm64/socionext/uniphier-pxs3-ref.dts vendor/device-tree/dist/src/arm64/socionext/uniphier-pxs3.dtsi vendor/device-tree/dist/src/arm64/sprd/sc9860.dtsi vendor/device-tree/dist/src/arm64/sprd/whale2.dtsi vendor/device-tree/dist/src/nios2/3c120_devboard.dts vendor/device-tree/dist/src/powerpc/a3m071.dts vendor/device-tree/dist/src/powerpc/akebono.dts vendor/device-tree/dist/src/powerpc/c2k.dts vendor/device-tree/dist/src/powerpc/currituck.dts vendor/device-tree/dist/src/powerpc/fsl/mpc8568mds.dts vendor/device-tree/dist/src/powerpc/fsl/mpc8569mds.dts vendor/device-tree/dist/src/powerpc/fsl/p1010si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/p1021mds.dts vendor/device-tree/dist/src/powerpc/fsl/p1025rdb.dtsi vendor/device-tree/dist/src/powerpc/fsl/p1025rdb_32b.dts vendor/device-tree/dist/src/powerpc/fsl/p1025twr.dtsi vendor/device-tree/dist/src/powerpc/fsl/t1040rdb.dts vendor/device-tree/dist/src/powerpc/fsl/t1042d4rdb.dts vendor/device-tree/dist/src/powerpc/fsl/t1042rdb.dts vendor/device-tree/dist/src/powerpc/fsl/t104xrdb.dtsi vendor/device-tree/dist/src/powerpc/fsp2.dts vendor/device-tree/dist/src/powerpc/gamecube.dts vendor/device-tree/dist/src/powerpc/haleakala.dts vendor/device-tree/dist/src/powerpc/kilauea.dts vendor/device-tree/dist/src/powerpc/kmeter1.dts vendor/device-tree/dist/src/powerpc/makalu.dts vendor/device-tree/dist/src/powerpc/mpc832x_mds.dts vendor/device-tree/dist/src/powerpc/mpc832x_rdb.dts vendor/device-tree/dist/src/powerpc/mpc836x_mds.dts vendor/device-tree/dist/src/powerpc/sbc8548-altflash.dts vendor/device-tree/dist/src/powerpc/sbc8548.dts vendor/device-tree/dist/src/powerpc/wii.dts Modified: vendor/device-tree/dist/Bindings/arm/actions.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/actions.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/actions.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -21,8 +21,24 @@ Boards: Root node property compatible must contain, depending on board: + - Allo.com Sparky: "allo,sparky" - Cubietech CubieBoard6: "cubietech,cubieboard6" - LeMaker Guitar Base Board rev. B: "lemaker,guitar-bb-rev-b", "lemaker,guitar" + + +S700 SoC +======== + +Required root node properties: + +- compatible : must contain "actions,s700" + + +Boards: + +Root node property compatible must contain, depending on board: + + - Cubietech CubieBoard7: "cubietech,cubieboard7" S900 SoC Added: vendor/device-tree/dist/Bindings/arm/arm-dsu-pmu.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/arm-dsu-pmu.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,27 @@ +* ARM DynamIQ Shared Unit (DSU) Performance Monitor Unit (PMU) + +ARM DyanmIQ Shared Unit (DSU) integrates one or more CPU cores +with a shared L3 memory system, control logic and external interfaces to +form a multicore cluster. The PMU enables to gather various statistics on +the operations of the DSU. The PMU provides independent 32bit counters that +can count any of the supported events, along with a 64bit cycle counter. +The PMU is accessed via CPU system registers and has no MMIO component. + +** DSU PMU required properties: + +- compatible : should be one of : + + "arm,dsu-pmu" + +- interrupts : Exactly 1 SPI must be listed. + +- cpus : List of phandles for the CPUs connected to this DSU instance. + + +** Example: + +dsu-pmu-0 { + compatible = "arm,dsu-pmu"; + interrupts = ; + cpus = <&cpu_0>, <&cpu_1>; +}; Modified: vendor/device-tree/dist/Bindings/arm/atmel-at91.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/atmel-at91.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/atmel-at91.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -90,38 +90,6 @@ System Timer (ST) required properties: Its subnodes can be: - watchdog: compatible should be "atmel,at91rm9200-wdt" -TC/TCLIB Timer required properties: -- compatible: Should be "atmel,-tcb". - can be "at91rm9200" or "at91sam9x5" -- reg: Should contain registers location and length -- interrupts: Should contain all interrupts for the TC block - Note that you can specify several interrupt cells if the TC - block has one interrupt per channel. -- clock-names: tuple listing input clock names. - Required elements: "t0_clk", "slow_clk" - Optional elements: "t1_clk", "t2_clk" -- clocks: phandles to input clocks. - -Examples: - -One interrupt per TC block: - tcb0: timer@fff7c000 { - compatible = "atmel,at91rm9200-tcb"; - reg = <0xfff7c000 0x100>; - interrupts = <18 4>; - clocks = <&tcb0_clk>; - clock-names = "t0_clk"; - }; - -One interrupt per TC channel in a TC block: - tcb1: timer@fffdc000 { - compatible = "atmel,at91rm9200-tcb"; - reg = <0xfffdc000 0x100>; - interrupts = <26 4 27 4 28 4>; - clocks = <&tcb1_clk>; - clock-names = "t0_clk"; - }; - RSTC Reset Controller required properties: - compatible: Should be "atmel,-rstc". can be "at91sam9260" or "at91sam9g45" or "sama5d3" Modified: vendor/device-tree/dist/Bindings/arm/axentia.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/axentia.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/axentia.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -10,6 +10,15 @@ compatible = "axentia,linea", and following the rules from atmel-at91.txt for a sama5d31 SoC. +Nattis v2 board with Natte v2 power board +----------------------------------------- + +Required root node properties: +compatible = "axentia,nattis-2", "axentia,natte-2", "axentia,linea", + "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; +and following the rules from above for the axentia,linea CPU module. + + TSE-850 v3 board ---------------- Modified: vendor/device-tree/dist/Bindings/arm/bcm/brcm,brcmstb.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/bcm/brcm,brcmstb.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/bcm/brcm,brcmstb.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -17,21 +17,23 @@ Further, syscon nodes that map platform-specific regis system control is required: - compatible: "brcm,bcm-sun-top-ctrl", "syscon" - - compatible: "brcm,bcm-hif-cpubiuctrl", "syscon" + - compatible: "brcm,bcm-cpu-biu-ctrl", + "brcm,brcmstb-cpu-biu-ctrl", + "syscon" - compatible: "brcm,bcm-hif-continuation", "syscon" -hif-cpubiuctrl node +cpu-biu-ctrl node ------------------- -SoCs with Broadcom Brahma15 ARM-based CPUs have a specific Bus Interface Unit -(BIU) block which controls and interfaces the CPU complex to the different -Memory Controller Ports (MCP), one per memory controller (MEMC). This BIU block -offers a feature called Write Pairing which consists in collapsing two adjacent -cache lines into a single (bursted) write transaction towards the memory -controller (MEMC) to maximize write bandwidth. +SoCs with Broadcom Brahma15 ARM-based and Brahma53 ARM64-based CPUs have a +specific Bus Interface Unit (BIU) block which controls and interfaces the CPU +complex to the different Memory Controller Ports (MCP), one per memory +controller (MEMC). This BIU block offers a feature called Write Pairing which +consists in collapsing two adjacent cache lines into a single (bursted) write +transaction towards the memory controller (MEMC) to maximize write bandwidth. Required properties: - - compatible: must be "brcm,bcm7445-hif-cpubiuctrl", "syscon" + - compatible: must be "brcm,bcm7445-cpu-biu-ctrl", "brcm,brcmstb-cpu-biu-ctrl", "syscon" Optional properties: @@ -52,7 +54,7 @@ example: }; hif_cpubiuctrl: syscon@3e2400 { - compatible = "brcm,bcm7445-hif-cpubiuctrl", "syscon"; + compatible = "brcm,bcm7445-cpu-biu-ctrl", "brcm,brcmstb-cpu-biu-ctrl", "syscon"; reg = <0x3e2400 0x5b4>; brcm,write-pairing; }; Modified: vendor/device-tree/dist/Bindings/arm/cpus.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/cpus.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/cpus.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -169,6 +169,7 @@ described below. "arm,cortex-r5" "arm,cortex-r7" "brcm,brahma-b15" + "brcm,brahma-b53" "brcm,vulcan" "cavium,thunder" "cavium,thunder2" Added: vendor/device-tree/dist/Bindings/arm/firmware/sdei.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/firmware/sdei.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,42 @@ +* Software Delegated Exception Interface (SDEI) + +Firmware implementing the SDEI functions described in ARM document number +ARM DEN 0054A ("Software Delegated Exception Interface") can be used by +Linux to receive notification of events such as those generated by +firmware-first error handling, or from an IRQ that has been promoted to +a firmware-assisted NMI. + +The interface provides a number of API functions for registering callbacks +and enabling/disabling events. Functions are invoked by trapping to the +privilege level of the SDEI firmware (specified as part of the binding +below) and passing arguments in a manner specified by the "SMC Calling +Convention (ARM DEN 0028B): + + r0 => 32-bit Function ID / return value + {r1 - r3} => Parameters + +Note that the immediate field of the trapping instruction must be set +to #0. + +The SDEI_EVENT_REGISTER function registers a callback in the kernel +text to handle the specified event number. + +The sdei node should be a child node of '/firmware' and have required +properties: + + - compatible : should contain: + * "arm,sdei-1.0" : For implementations complying to SDEI version 1.x. + + - method : The method of calling the SDEI firmware. Permitted + values are: + * "smc" : SMC #0, with the register assignments specified in this + binding. + * "hvc" : HVC #0, with the register assignments specified in this + binding. +Example: + firmware { + sdei { + compatible = "arm,sdei-1.0"; + method = "smc"; + }; + }; Modified: vendor/device-tree/dist/Bindings/arm/marvell/armada-37xx.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/marvell/armada-37xx.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/marvell/armada-37xx.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -14,3 +14,22 @@ following property before the previous one: Example: compatible = "marvell,armada-3720-db", "marvell,armada3720", "marvell,armada3710"; + + +Power management +---------------- + +For power management (particularly DVFS and AVS), the North Bridge +Power Management component is needed: + +Required properties: +- compatible : should contain "marvell,armada-3700-nb-pm", "syscon"; +- reg : the register start and length for the North Bridge + Power Management + +Example: + +nb_pm: syscon@14000 { + compatible = "marvell,armada-3700-nb-pm", "syscon"; + reg = <0x14000 0x60>; +} Modified: vendor/device-tree/dist/Bindings/arm/mediatek/mediatek,ethsys.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/mediatek/mediatek,ethsys.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/mediatek/mediatek,ethsys.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -20,4 +20,5 @@ ethsys: clock-controller@1b000000 { compatible = "mediatek,mt2701-ethsys", "syscon"; reg = <0 0x1b000000 0 0x1000>; #clock-cells = <1>; + #reset-cells = <1>; }; Modified: vendor/device-tree/dist/Bindings/arm/samsung/exynos-adc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/samsung/exynos-adc.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/samsung/exynos-adc.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -55,7 +55,7 @@ Note: child nodes can be added for auto probing from d Example: adding device info in dtsi file -adc: adc@12D10000 { +adc: adc@12d10000 { compatible = "samsung,exynos-adc-v1"; reg = <0x12D10000 0x100>; interrupts = <0 106 0>; @@ -71,7 +71,7 @@ adc: adc@12D10000 { Example: adding device info in dtsi file for Exynos3250 with additional sclk -adc: adc@126C0000 { +adc: adc@126c0000 { compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2; reg = <0x126C0000 0x100>; interrupts = <0 137 0>; @@ -87,7 +87,7 @@ adc: adc@126C0000 { Example: Adding child nodes in dts file -adc@12D10000 { +adc@12d10000 { /* NTC thermistor is a hwmon device */ ncp15wb473@0 { Modified: vendor/device-tree/dist/Bindings/arm/samsung/samsung-boards.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/samsung/samsung-boards.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/samsung/samsung-boards.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -72,7 +72,7 @@ Optional nodes: - compatible: only "samsung,secure-firmware" is currently supported - reg: address of non-secure SYSRAM used for communication with firmware - firmware@203F000 { + firmware@203f000 { compatible = "samsung,secure-firmware"; reg = <0x0203F000 0x1000>; }; Modified: vendor/device-tree/dist/Bindings/arm/shmobile.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/shmobile.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/shmobile.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -104,12 +104,16 @@ Boards: compatible = "renesas,salvator-x", "renesas,r8a7796" - Salvator-XS (Salvator-X 2nd version, RTP0RC7795SIPB0012S) compatible = "renesas,salvator-xs", "renesas,r8a7795" + - Salvator-XS (Salvator-X 2nd version, RTP0RC7796SIPB0012S) + compatible = "renesas,salvator-xs", "renesas,r8a7796" - SILK (RTP0RC7794LCB00011S) compatible = "renesas,silk", "renesas,r8a7794" - SK-RZG1E (YR8A77450S000BE) compatible = "renesas,sk-rzg1e", "renesas,r8a7745" - SK-RZG1M (YR8A77430S000BE) compatible = "renesas,sk-rzg1m", "renesas,r8a7743" + - V3MSK + compatible = "renesas,v3msk", "renesas,r8a77970" - Wheat compatible = "renesas,wheat", "renesas,r8a7792" Added: vendor/device-tree/dist/Bindings/arm/stm32.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/stm32.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,9 @@ +STMicroelectronics STM32 Platforms Device Tree Bindings + +Each device tree must specify which STM32 SoC it uses, +using one of the following compatible strings: + + st,stm32f429 + st,stm32f469 + st,stm32f746 + st,stm32h743 Modified: vendor/device-tree/dist/Bindings/arm/technologic.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/technologic.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/arm/technologic.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -1,6 +1,11 @@ Technologic Systems Platforms Device Tree Bindings -------------------------------------------------- +TS-4600 is a System-on-Module based on the Freescale i.MX28 System-on-Chip. +It can be mounted on a carrier board providing additional peripheral connectors. +Required root node properties: + - compatible = "technologic,imx28-ts4600", "fsl,imx28" + TS-4800 board Required root node properties: - compatible = "technologic,imx51-ts4800", "fsl,imx51"; @@ -10,3 +15,9 @@ It can be mounted on a carrier board providing additio Required root node properties: - compatible = "technologic,imx6dl-ts4900", "fsl,imx6dl" - compatible = "technologic,imx6q-ts4900", "fsl,imx6q" + +TS-7970 is a System-on-Module based on the Freescale i.MX6 System-on-Chip. +It can be mounted on a carrier board providing additional peripheral connectors. +Required root node properties: + - compatible = "technologic,imx6dl-ts7970", "fsl,imx6dl" + - compatible = "technologic,imx6q-ts7970", "fsl,imx6q" Added: vendor/device-tree/dist/Bindings/auxdisplay/arm-charlcd.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/auxdisplay/arm-charlcd.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,18 @@ +ARM Versatile Character LCD +----------------------------------------------------- +This binding defines the character LCD interface found on ARM Versatile AB +and PB reference platforms. + +Required properties: +- compatible : "arm,versatile-clcd" +- reg : Location and size of character LCD registers + +Optional properties: +- interrupts - single interrupt for character LCD. The character LCD can + operate in polled mode without an interrupt. + +Example: + lcd@10008000 { + compatible = "arm,versatile-lcd"; + reg = <0x10008000 0x1000>; + }; Modified: vendor/device-tree/dist/Bindings/bus/ti-sysc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/bus/ti-sysc.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/bus/ti-sysc.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -19,6 +19,7 @@ Required standard properties: - compatible shall be one of the following generic types: + "ti,sysc" "ti,sysc-omap2" "ti,sysc-omap4" "ti,sysc-omap4-simple" @@ -26,6 +27,8 @@ Required standard properties: or one of the following derivative types for hardware needing special workarounds: + "ti,sysc-omap2-timer" + "ti,sysc-omap4-timer" "ti,sysc-omap3430-sr" "ti,sysc-omap3630-sr" "ti,sysc-omap4-sr" @@ -49,6 +52,26 @@ Required standard properties: Optional properties: +- ti,sysc-mask shall contain mask of supported register bits for the + SYSCONFIG register as documented in the Technical Reference + Manual (TRM) for the interconnect target module + +- ti,sysc-midle list of master idle modes supported by the interconnect + target module as documented in the TRM for SYSCONFIG + register MIDLEMODE bits + +- ti,sysc-sidle list of slave idle modes supported by the interconnect + target module as documented in the TRM for SYSCONFIG + register SIDLEMODE bits + +- ti,sysc-delay-us delay needed after OCP softreset before accssing + SYSCONFIG register again + +- ti,syss-mask optional mask of reset done status bits as described in the + TRM for SYSSTATUS registers, typically 1 with some devices + having separate reset done bits for children like OHCI and + EHCI + - clocks clock specifier for each name in the clock-names as specified in the binding documentation for ti-clkctrl, typically available for all interconnect targets on TI SoCs @@ -61,7 +84,10 @@ Optional properties: - ti,hwmods optional TI interconnect module name to use legacy hwmod platform data +- ti,no-reset-on-init interconnect target module should not be reset at init +- ti,no-idle-on-init interconnect target module should not be idled at init + Example: Single instance of MUSB controller on omap4 using interconnect ranges using offsets from l4_cfg second segment (0x4a000000 + 0x80000 = 0x4a0ab000): @@ -74,6 +100,17 @@ using offsets from l4_cfg second segment (0x4a000000 + reg-names = "rev", "sysc", "syss"; clocks = <&l3_init_clkctrl OMAP4_USB_OTG_HS_CLKCTRL 0>; clock-names = "fck"; + ti,sysc-mask = <(SYSC_OMAP2_ENAWAKEUP | + SYSC_OMAP2_SOFTRESET | + SYSC_OMAP2_AUTOIDLE)>; + ti,sysc-midle = , + , + ; + ti,sysc-sidle = , + , + , + ; + ti,syss-mask = <1>; #address-cells = <1>; #size-cells = <1>; ranges = <0 0x2b000 0x1000>; Modified: vendor/device-tree/dist/Bindings/chosen.txt ============================================================================== --- vendor/device-tree/dist/Bindings/chosen.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/chosen.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -120,3 +120,18 @@ e.g. While this property does not represent a real hardware, the address and the size are expressed in #address-cells and #size-cells, respectively, of the root node. + +linux,initrd-start and linux,initrd-end +--------------------------------------- + +These properties hold the physical start and end address of an initrd that's +loaded by the bootloader. Note that linux,initrd-start is inclusive, but +linux,initrd-end is exclusive. +e.g. + +/ { + chosen { + linux,initrd-start = <0x82000000>; + linux,initrd-end = <0x82800000>; + }; +}; Modified: vendor/device-tree/dist/Bindings/clock/amlogic,gxbb-clkc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/amlogic,gxbb-clkc.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/amlogic,gxbb-clkc.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -5,8 +5,11 @@ controllers within the SoC. Required Properties: -- compatible: should be "amlogic,gxbb-clkc" for GXBB SoC, - or "amlogic,gxl-clkc" for GXL and GXM SoC. +- compatible: should be: + "amlogic,gxbb-clkc" for GXBB SoC, + "amlogic,gxl-clkc" for GXL and GXM SoC, + "amlogic,axg-clkc" for AXG SoC. + - reg: physical base address of the clock controller and length of memory mapped region. Modified: vendor/device-tree/dist/Bindings/clock/exynos3250-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/exynos3250-clock.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/exynos3250-clock.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -32,7 +32,7 @@ Example 1: Examples of clock controller nodes are list #clock-cells = <1>; }; - cmu_dmc: clock-controller@105C0000 { + cmu_dmc: clock-controller@105c0000 { compatible = "samsung,exynos3250-cmu-dmc"; reg = <0x105C0000 0x2000>; #clock-cells = <1>; Modified: vendor/device-tree/dist/Bindings/clock/exynos5260-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/exynos5260-clock.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/exynos5260-clock.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -180,7 +180,7 @@ Example 2: UART controller node that consumes the cloc peri clock controller. Refer to the standard clock bindings for information about 'clocks' and 'clock-names' property. - serial@12C00000 { + serial@12c00000 { compatible = "samsung,exynos4210-uart"; reg = <0x12C00000 0x100>; interrupts = <0 146 0>; Modified: vendor/device-tree/dist/Bindings/clock/exynos5410-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/exynos5410-clock.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/exynos5410-clock.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -41,7 +41,7 @@ Example 2: UART controller node that consumes the cloc controller. Refer to the standard clock bindings for information about 'clocks' and 'clock-names' property. - serial@12C20000 { + serial@12c20000 { compatible = "samsung,exynos4210-uart"; reg = <0x12C00000 0x100>; interrupts = <0 51 0>; Modified: vendor/device-tree/dist/Bindings/clock/exynos5433-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/exynos5433-clock.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/exynos5433-clock.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -472,7 +472,7 @@ Example 2: Examples of clock controller nodes are list Example 3: UART controller node that consumes the clock generated by the clock controller. - serial_0: serial@14C10000 { + serial_0: serial@14c10000 { compatible = "samsung,exynos5433-uart"; reg = <0x14C10000 0x100>; interrupts = <0 421 0>; Modified: vendor/device-tree/dist/Bindings/clock/hi3660-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/hi3660-clock.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/hi3660-clock.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -13,11 +13,17 @@ Required Properties: - "hisilicon,hi3660-pmuctrl" - "hisilicon,hi3660-sctrl" - "hisilicon,hi3660-iomcu" + - "hisilicon,hi3660-stub-clk" - reg: physical base address of the controller and length of memory mapped region. - #clock-cells: should be 1. + +Optional Properties: + +- mboxes: Phandle to the mailbox for sending message to MCU. + (See: ../mailbox/hisilicon,hi3660-mailbox.txt for more info) Each clock is assigned an identifier and client nodes use this identifier to specify the clock which they consume. Added: vendor/device-tree/dist/Bindings/clock/qcom,a53pll.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/qcom,a53pll.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,22 @@ +Qualcomm MSM8916 A53 PLL Binding +-------------------------------- +The A53 PLL on MSM8916 platforms is the main CPU PLL used used for frequencies +above 1GHz. + +Required properties : +- compatible : Shall contain only one of the following: + + "qcom,msm8916-a53pll" + +- reg : shall contain base register location and length + +- #clock-cells : must be set to <0> + +Example: + + a53pll: clock@b016000 { + compatible = "qcom,msm8916-a53pll"; + reg = <0xb016000 0x40>; + #clock-cells = <0>; + }; + Added: vendor/device-tree/dist/Bindings/clock/qcom,spmi-clkdiv.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/qcom,spmi-clkdiv.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,59 @@ +Qualcomm Technologies, Inc. SPMI PMIC clock divider (clkdiv) + +clkdiv configures the clock frequency of a set of outputs on the PMIC. +These clocks are typically wired through alternate functions on +gpio pins. + +======================= +Properties +======================= + +- compatible + Usage: required + Value type: + Definition: must be "qcom,spmi-clkdiv". + +- reg + Usage: required + Value type: + Definition: base address of CLKDIV peripherals. + +- qcom,num-clkdivs + Usage: required + Value type: + Definition: number of CLKDIV peripherals. + +- clocks: + Usage: required + Value type: + Definition: reference to the xo clock. + +- clock-names: + Usage: required + Value type: + Definition: must be "xo". + +- #clock-cells: + Usage: required + Value type: + Definition: shall contain 1. + +======= +Example +======= + +pm8998_clk_divs: clock-controller@5b00 { + compatible = "qcom,spmi-clkdiv"; + reg = <0x5b00>; + #clock-cells = <1>; + qcom,num-clkdivs = <3>; + clocks = <&xo_board>; + clock-names = "xo"; + + assigned-clocks = <&pm8998_clk_divs 1>, + <&pm8998_clk_divs 2>, + <&pm8998_clk_divs 3>; + assigned-clock-rates = <9600000>, + <9600000>, + <9600000>; +}; Modified: vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -78,6 +78,7 @@ second cell is the clock index for the specified type. 2 hwaccel index (n in CLKCGnHWACSR) 3 fman 0 for fm1, 1 for fm2 4 platform pll 0=pll, 1=pll/2, 2=pll/3, 3=pll/4 + 4=pll/5, 5=pll/6, 6=pll/7, 7=pll/8 5 coreclk must be 0 3. Example Modified: vendor/device-tree/dist/Bindings/clock/silabs,si5351.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/silabs,si5351.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/silabs,si5351.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -49,6 +49,7 @@ Optional child node properties: - silabs,multisynth-source: source pll A(0) or B(1) of corresponding multisynth divider. - silabs,pll-master: boolean, multisynth can change pll frequency. +- silabs,pll-reset: boolean, clock output can reset its pll. - silabs,disable-state : clock output disable state, shall be 0 = clock output is driven LOW when disabled 1 = clock output is driven HIGH when disabled Added: vendor/device-tree/dist/Bindings/clock/sprd.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/clock/sprd.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,63 @@ +Spreadtrum Clock Binding +------------------------ + +Required properties: +- compatible: should contain the following compatible strings: + - "sprd,sc9860-pmu-gate" + - "sprd,sc9860-pll" + - "sprd,sc9860-ap-clk" + - "sprd,sc9860-aon-prediv" + - "sprd,sc9860-apahb-gate" + - "sprd,sc9860-aon-gate" + - "sprd,sc9860-aonsecure-clk" + - "sprd,sc9860-agcp-gate" + - "sprd,sc9860-gpu-clk" + - "sprd,sc9860-vsp-clk" + - "sprd,sc9860-vsp-gate" + - "sprd,sc9860-cam-clk" + - "sprd,sc9860-cam-gate" + - "sprd,sc9860-disp-clk" + - "sprd,sc9860-disp-gate" + - "sprd,sc9860-apapb-gate" + +- #clock-cells: must be 1 + +- clocks : Should be the input parent clock(s) phandle for the clock, this + property here just simply shows which clock group the clocks' + parents are in, since each clk node would represent many clocks + which are defined in the driver. The detailed dependency + relationship (i.e. how many parents and which are the parents) + are implemented in driver code. + +Optional properties: + +- reg: Contain the registers base address and length. It must be configured + only if no 'sprd,syscon' under the node. + +- sprd,syscon: phandle to the syscon which is in the same address area with + the clock, and so we can get regmap for the clocks from the + syscon device. + +Example: + + pmu_gate: pmu-gate { + compatible = "sprd,sc9860-pmu-gate"; + sprd,syscon = <&pmu_regs>; + clocks = <&ext_26m>; + #clock-cells = <1>; + }; + + pll: pll { + compatible = "sprd,sc9860-pll"; + sprd,syscon = <&ana_regs>; + clocks = <&pmu_gate 0>; + #clock-cells = <1>; + }; + + ap_clk: clock-controller@20000000 { + compatible = "sprd,sc9860-ap-clk"; + reg = <0 0x20000000 0 0x400>; + clocks = <&ext_26m>, <&pll 0>, + <&pmu_gate 0>; + #clock-cells = <1>; + }; Modified: vendor/device-tree/dist/Bindings/clock/sun8i-de2.txt ============================================================================== --- vendor/device-tree/dist/Bindings/clock/sun8i-de2.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/clock/sun8i-de2.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -4,13 +4,14 @@ Allwinner Display Engine 2.0 Clock Control Binding Required properties : - compatible: must contain one of the following compatibles: - "allwinner,sun8i-a83t-de2-clk" + - "allwinner,sun8i-h3-de2-clk" - "allwinner,sun8i-v3s-de2-clk" - "allwinner,sun50i-h5-de2-clk" - reg: Must contain the registers base address and length - clocks: phandle to the clocks feeding the display engine subsystem. Three are needed: - - "mod": the display engine module clock + - "mod": the display engine module clock (on A83T it's the DE PLL) - "bus": the bus clock for the whole display engine subsystem - clock-names: Must contain the clock names described just above - resets: phandle to the reset control for the display engine subsystem. @@ -19,7 +20,7 @@ Required properties : Example: de2_clocks: clock@1000000 { - compatible = "allwinner,sun8i-a83t-de2-clk"; + compatible = "allwinner,sun8i-h3-de2-clk"; reg = <0x01000000 0x100000>; clocks = <&ccu CLK_BUS_DE>, <&ccu CLK_DE>; Added: vendor/device-tree/dist/Bindings/crypto/arm-cryptocell.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/crypto/arm-cryptocell.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,22 @@ +Arm TrustZone CryptoCell cryptographic engine + +Required properties: +- compatible: Should be "arm,cryptocell-712-ree". +- reg: Base physical address of the engine and length of memory mapped region. +- interrupts: Interrupt number for the device. + +Optional properties: +- interrupt-parent: The phandle for the interrupt controller that services + interrupts for this device. +- clocks: Reference to the crypto engine clock. +- dma-coherent: Present if dma operations are coherent. + +Examples: + + arm_cc712: crypto@80000000 { + compatible = "arm,cryptocell-712-ree"; + interrupt-parent = <&intc>; + interrupts = < 0 30 4 >; + reg = < 0x80000000 0x10000 >; + + }; Modified: vendor/device-tree/dist/Bindings/crypto/atmel-crypto.txt ============================================================================== --- vendor/device-tree/dist/Bindings/crypto/atmel-crypto.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/crypto/atmel-crypto.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -75,7 +75,7 @@ Required properties: - clock-frequency: must be present in the i2c controller node. Example: -atecc508a@C0 { +atecc508a@c0 { compatible = "atmel,atecc508a"; reg = <0xC0>; }; Modified: vendor/device-tree/dist/Bindings/crypto/inside-secure-safexcel.txt ============================================================================== --- vendor/device-tree/dist/Bindings/crypto/inside-secure-safexcel.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/crypto/inside-secure-safexcel.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -1,7 +1,8 @@ Inside Secure SafeXcel cryptographic engine Required properties: -- compatible: Should be "inside-secure,safexcel-eip197". +- compatible: Should be "inside-secure,safexcel-eip197" or + "inside-secure,safexcel-eip97". - reg: Base physical address of the engine and length of memory mapped region. - interrupts: Interrupt numbers for the rings and engine. - interrupt-names: Should be "ring0", "ring1", "ring2", "ring3", "eip", "mem". Modified: vendor/device-tree/dist/Bindings/crypto/samsung,exynos-rng4.txt ============================================================================== --- vendor/device-tree/dist/Bindings/crypto/samsung,exynos-rng4.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/crypto/samsung,exynos-rng4.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -2,7 +2,9 @@ Exynos Pseudo Random Number Generator Required properties: -- compatible : Should be "samsung,exynos4-rng". +- compatible : One of: + - "samsung,exynos4-rng" for Exynos4210 and Exynos4412 + - "samsung,exynos5250-prng" for Exynos5250+ - reg : Specifies base physical address and size of the registers map. - clocks : Phandle to clock-controller plus clock-specifier pair. - clock-names : "secss" as a clock name. Added: vendor/device-tree/dist/Bindings/crypto/st,stm32-cryp.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/crypto/st,stm32-cryp.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,19 @@ +* STMicroelectronics STM32 CRYP + +Required properties: +- compatible: Should be "st,stm32f756-cryp". +- reg: The address and length of the peripheral registers space +- clocks: The input clock of the CRYP instance +- interrupts: The CRYP interrupt + +Optional properties: +- resets: The input reset of the CRYP instance + +Example: +crypto@50060000 { + compatible = "st,stm32f756-cryp"; + reg = <0x50060000 0x400>; + interrupts = <79>; + clocks = <&rcc 0 STM32F7_AHB2_CLOCK(CRYP)>; + resets = <&rcc STM32F7_AHB2_RESET(CRYP)>; +}; Modified: vendor/device-tree/dist/Bindings/devfreq/event/exynos-nocp.txt ============================================================================== --- vendor/device-tree/dist/Bindings/devfreq/event/exynos-nocp.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/devfreq/event/exynos-nocp.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -20,7 +20,7 @@ Optional properties: Example : NoC Probe nodes in Device Tree are listed below. - nocp_mem0_0: nocp@10CA1000 { + nocp_mem0_0: nocp@10ca1000 { compatible = "samsung,exynos5420-nocp"; reg = <0x10CA1000 0x200>; }; Modified: vendor/device-tree/dist/Bindings/display/amlogic,meson-dw-hdmi.txt ============================================================================== --- vendor/device-tree/dist/Bindings/display/amlogic,meson-dw-hdmi.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/display/amlogic,meson-dw-hdmi.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -48,6 +48,10 @@ Required properties: Documentation/devicetree/bindings/reset/reset.txt, the reset-names should be "hdmitx_apb", "hdmitx", "hdmitx_phy" +Optional properties: +- hdmi-supply: Optional phandle to an external 5V regulator to power the HDMI + logic, as described in the file ../regulator/regulator.txt + Required nodes: The connections to the HDMI ports are modeled using the OF graph Modified: vendor/device-tree/dist/Bindings/display/amlogic,meson-vpu.txt ============================================================================== --- vendor/device-tree/dist/Bindings/display/amlogic,meson-vpu.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/display/amlogic,meson-vpu.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -64,6 +64,10 @@ Required properties: - reg-names: should contain the names of the previous memory regions - interrupts: should contain the VENC Vsync interrupt number +Optional properties: +- power-domains: Optional phandle to associated power domain as described in + the file ../power/power_domain.txt + Required nodes: The connections to the VPU output video ports are modeled using the OF graph Modified: vendor/device-tree/dist/Bindings/display/exynos/exynos_dsim.txt ============================================================================== --- vendor/device-tree/dist/Bindings/display/exynos/exynos_dsim.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/display/exynos/exynos_dsim.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -54,7 +54,7 @@ Video interfaces: Example: - dsi@11C80000 { + dsi@11c80000 { compatible = "samsung,exynos4210-mipi-dsi"; reg = <0x11C80000 0x10000>; interrupts = <0 79 0>; Modified: vendor/device-tree/dist/Bindings/display/exynos/exynos_hdmi.txt ============================================================================== --- vendor/device-tree/dist/Bindings/display/exynos/exynos_hdmi.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/display/exynos/exynos_hdmi.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -16,6 +16,7 @@ Required properties: - ddc: phandle to the hdmi ddc node - phy: phandle to the hdmi phy node - samsung,syscon-phandle: phandle for system controller node for PMU. +- #sound-dai-cells: should be 0. Required properties for Exynos 4210, 4212, 5420 and 5433: - clocks: list of clock IDs from SoC clock driver. Added: vendor/device-tree/dist/Bindings/display/ilitek,ili9225.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/display/ilitek,ili9225.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,25 @@ +Ilitek ILI9225 display panels + +This binding is for display panels using an Ilitek ILI9225 controller in SPI +mode. + +Required properties: +- compatible: "vot,v220hf01a-t", "ilitek,ili9225" +- rs-gpios: Register select signal +- reset-gpios: Reset pin + +The node for this driver must be a child node of a SPI controller, hence +all mandatory properties described in ../spi/spi-bus.txt must be specified. + +Optional properties: +- rotation: panel rotation in degrees counter clockwise (0,90,180,270) + +Example: + display@0{ + compatible = "vot,v220hf01a-t", "ilitek,ili9225"; + reg = <0>; + spi-max-frequency = <12000000>; + rs-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; + rotation = <270>; + }; Added: vendor/device-tree/dist/Bindings/display/panel/ilitek,ili9322.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/display/panel/ilitek,ili9322.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,49 @@ +Ilitek ILI9322 TFT panel driver with SPI control bus + +This is a driver for 320x240 TFT panels, accepting a variety of input +streams that get adapted and scaled to the panel. The panel output has +960 TFT source driver pins and 240 TFT gate driver pins, VCOM, VCOML and +VCOMH outputs. + +Required properties: + - compatible: "dlink,dir-685-panel", "ilitek,ili9322" + (full system-specific compatible is always required to look up configuration) + - reg: address of the panel on the SPI bus + +Optional properties: + - vcc-supply: core voltage supply, see regulator/regulator.txt + - iovcc-supply: voltage supply for the interface input/output signals, + see regulator/regulator.txt + - vci-supply: voltage supply for analog parts, see regulator/regulator.txt + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt + + The following optional properties only apply to RGB and YUV input modes and + can be omitted for BT.656 input modes: + + - pixelclk-active: see display/panel/display-timing.txt + - de-active: see display/panel/display-timing.txt + - hsync-active: see display/panel/display-timing.txt + - vsync-active: see display/panel/display-timing.txt + +The panel must obey the rules for a SPI slave device as specified in +spi/spi-bus.txt + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in +media/video-interfaces.txt. This node should describe panel's video bus. + +Example: + +panel: display@0 { + compatible = "dlink,dir-685-panel", "ilitek,ili9322"; + reg = <0>; + vcc-supply = <&vdisp>; + iovcc-supply = <&vdisp>; + vci-supply = <&vdisp>; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; +}; Added: vendor/device-tree/dist/Bindings/display/panel/mitsubishi,aa070mc01.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/display/panel/mitsubishi,aa070mc01.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -0,0 +1,7 @@ +Mitsubishi "AA070MC01 7.0" WVGA TFT LCD panel + +Required properties: +- compatible: should be "mitsubishi,aa070mc01-ca1" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. Modified: vendor/device-tree/dist/Bindings/display/panel/panel-common.txt ============================================================================== --- vendor/device-tree/dist/Bindings/display/panel/panel-common.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/display/panel/panel-common.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -78,6 +78,16 @@ used for panels that implement compatible control sign while active. Active high reset signals can be supported by inverting the GPIO specifier polarity flag. +Power +----- + +- power-supply: display panels require power to be supplied. While several + panels need more than one power supply with panel-specific constraints + governing the order and timings of the power supplies, in many cases a single + power supply is sufficient, either because the panel has a single power rail, + or because all its power rails can be driven by the same supply. In that case + the power-supply property specifies the supply powering the panel as a phandle + to a regulator. Backlight --------- Modified: vendor/device-tree/dist/Bindings/display/panel/panel-lvds.txt ============================================================================== --- vendor/device-tree/dist/Bindings/display/panel/panel-lvds.txt Fri Apr 20 18:38:36 2018 (r332835) +++ vendor/device-tree/dist/Bindings/display/panel/panel-lvds.txt Fri Apr 20 18:44:52 2018 (r332836) @@ -32,6 +32,7 @@ Optional properties: - label: See panel-common.txt. - gpios: See panel-common.txt. - backlight: See panel-common.txt. +- power-supply: See panel-common.txt. - data-mirror: If set, reverse the bit order described in the data mappings below on all data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 20 18:45:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A79A0F9101A; Fri, 20 Apr 2018 18:45:41 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 596257C762; Fri, 20 Apr 2018 18:45:41 +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 39DA61C150; Fri, 20 Apr 2018 18:45:41 +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 w3KIjfgi086646; Fri, 20 Apr 2018 18:45:41 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KIjfUJ086645; Fri, 20 Apr 2018 18:45:41 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201804201845.w3KIjfUJ086645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 20 Apr 2018 18:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r332837 - vendor/device-tree/4.16 X-SVN-Group: vendor X-SVN-Commit-Author: manu X-SVN-Commit-Paths: vendor/device-tree/4.16 X-SVN-Commit-Revision: 332837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 18:45:41 -0000 Author: manu Date: Fri Apr 20 18:45:40 2018 New Revision: 332837 URL: https://svnweb.freebsd.org/changeset/base/332837 Log: Tag our copy of Linux 4.16 dts files Added: vendor/device-tree/4.16/ - copied from r332836, vendor/device-tree/dist/ From owner-svn-src-all@freebsd.org Fri Apr 20 18:46:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EDB6F91124; Fri, 20 Apr 2018 18:46:07 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D8437C874; Fri, 20 Apr 2018 18:46:07 +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 2897C1C155; Fri, 20 Apr 2018 18:46:07 +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 w3KIk73o086708; Fri, 20 Apr 2018 18:46:07 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KIk7Xv086707; Fri, 20 Apr 2018 18:46:07 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201804201846.w3KIk7Xv086707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 20 Apr 2018 18:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r332838 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: manu X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 332838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 18:46:07 -0000 Author: manu Date: Fri Apr 20 18:46:06 2018 New Revision: 332838 URL: https://svnweb.freebsd.org/changeset/base/332838 Log: Don't need the limit anymore. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Fri Apr 20 18:45:40 2018 (r332837) +++ svnadmin/conf/sizelimit.conf Fri Apr 20 18:46:06 2018 (r332838) @@ -21,7 +21,6 @@ dim imp jb jeff -manu mm np obrien From owner-svn-src-all@freebsd.org Fri Apr 20 18:57:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18AC7F91F70; Fri, 20 Apr 2018 18:57:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB7BF7F629; Fri, 20 Apr 2018 18:57:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f44.google.com with SMTP id h143-v6so3766745ita.4; Fri, 20 Apr 2018 11:57:27 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=slrl8SFk6amIK+OD6cMKVNugV26ixpS6hCGrL2jGXhg=; b=H+H2li7wGbJTx7NN3wD4Txdag8V+Bunyq07xNbDbPtbuuQ0RKYI6hmRlzUW0HIyoU7 2jVDIw2VOZx9aXBWQb/ZKv8QVMlpDwUXEvjto2MrR5fsOQ6nJ4lK3+7AK0RDLHNKq1Ty jOpGU9Ay6I8iORppDZ6EEL1QebnVsdrcKfMmtukDKBJG+8KZow7CD/BcXjCk0LGKMUUr JnbSpOZtT9cAIuhFhTx7FhqlkqGWg0OiAMnEuMSF4fLOeBT9XabbvA5+Qs/BGNA1V6UQ srAxL2FyKn4R6mMlSVS9O5eg5qScBmXzB8Q5ioP1Nn3o1pPGoZSltvuC5aipLs8RL2LX +8iw== X-Gm-Message-State: ALQs6tB9bfrYEiMclzKMxEcAkPmJGMUDe8t9iMQBPP1147Lr7sdNa30n 79Onyiw/7FpTfubvdiK4mQvbNaKT X-Google-Smtp-Source: AIpwx4++Uj2EfRDjstJyjjSWtenMi+eY44R/UXlgTYHkjHDyI5hF+shGcaqKvrM07GHsNKiBPzkuBw== X-Received: by 2002:a24:27c9:: with SMTP id g192-v6mr4238232ita.112.1524250218966; Fri, 20 Apr 2018 11:50:18 -0700 (PDT) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com. [209.85.214.51]) by smtp.gmail.com with ESMTPSA id b3-v6sm3255068iob.55.2018.04.20.11.50.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 11:50:18 -0700 (PDT) Received: by mail-it0-f51.google.com with SMTP id m134-v6so3754081itb.3; Fri, 20 Apr 2018 11:50:18 -0700 (PDT) X-Received: by 2002:a24:4090:: with SMTP id n138-v6mr4284583ita.135.1524250218541; Fri, 20 Apr 2018 11:50:18 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:224d:0:0:0:0:0 with HTTP; Fri, 20 Apr 2018 11:50:18 -0700 (PDT) In-Reply-To: <201804201138.w3KBcTou070611@repo.freebsd.org> References: <201804201138.w3KBcTou070611@repo.freebsd.org> From: Conrad Meyer Date: Fri, 20 Apr 2018 11:50:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332813 - head/sys/fs/nfsclient To: Rick Macklem Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 18:57:28 -0000 On Fri, Apr 20, 2018 at 4:38 AM, Rick Macklem wrote: > Author: rmacklem > Date: Fri Apr 20 11:38:29 2018 > New Revision: 332813 > URL: https://svnweb.freebsd.org/changeset/base/332813 > > Log: > Fix use of pointer after being set NULL. > > Using a pointer after setting it NULL is probably not a good plan. > Spotted by inspection during changes for Flexible File Layout Ioerr handling. > This code path obviously isn't normally executed. This is definitely the kind of thing that Coverity can catch. I would strongly encourage you to take a look at the Coverity scan output for nfsclient. There are a bunch of reports, many of which I have confirmed are valid. Best, Conrad From owner-svn-src-all@freebsd.org Fri Apr 20 19:37:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCEBAF9603B; Fri, 20 Apr 2018 19:37:10 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C926685BD; Fri, 20 Apr 2018 19:37:10 +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 733491C93A; Fri, 20 Apr 2018 19:37:10 +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 w3KJbAMA011734; Fri, 20 Apr 2018 19:37:10 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KJb8ZF011717; Fri, 20 Apr 2018 19:37:08 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201804201937.w3KJb8ZF011717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 20 Apr 2018 19:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332839 - in head/sys/gnu/dts: arm include/dt-bindings/bus include/dt-bindings/clock include/dt-bindings/gpio include/dt-bindings/input include/dt-bindings/memory include/dt-bindings/pi... X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/gnu/dts: arm include/dt-bindings/bus include/dt-bindings/clock include/dt-bindings/gpio include/dt-bindings/input include/dt-bindings/memory include/dt-bindings/pinctrl include/dt-bindings... X-SVN-Commit-Revision: 332839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 19:37:11 -0000 Author: manu Date: Fri Apr 20 19:37:08 2018 New Revision: 332839 URL: https://svnweb.freebsd.org/changeset/base/332839 Log: gnu/dts: Update our copy of arm dts from Linux 4.16 Added: head/sys/gnu/dts/arm/am572x-idk-common.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/am572x-idk-common.dtsi head/sys/gnu/dts/arm/am574x-idk.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/am574x-idk.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-witherspoon.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/aspeed-bmc-opp-witherspoon.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-zaius.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/aspeed-bmc-opp-zaius.dts head/sys/gnu/dts/arm/aspeed-bmc-quanta-q71l.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/aspeed-bmc-quanta-q71l.dts head/sys/gnu/dts/arm/at91-natte.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/at91-natte.dtsi head/sys/gnu/dts/arm/at91-nattis-2-natte-2.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/at91-nattis-2-natte-2.dts head/sys/gnu/dts/arm/at91-sama5d2_ptc_ek.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/at91-sama5d2_ptc_ek.dts head/sys/gnu/dts/arm/gemini-dlink-dns-313.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/gemini-dlink-dns-313.dts head/sys/gnu/dts/arm/imx28-ts4600.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx28-ts4600.dts head/sys/gnu/dts/arm/imx6dl-cubox-i-emmc-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6dl-cubox-i-emmc-som-v15.dts head/sys/gnu/dts/arm/imx6dl-cubox-i-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6dl-cubox-i-som-v15.dts head/sys/gnu/dts/arm/imx6dl-hummingboard-emmc-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6dl-hummingboard-emmc-som-v15.dts head/sys/gnu/dts/arm/imx6dl-hummingboard-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6dl-hummingboard-som-v15.dts head/sys/gnu/dts/arm/imx6dl-hummingboard2-emmc-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6dl-hummingboard2-emmc-som-v15.dts head/sys/gnu/dts/arm/imx6dl-hummingboard2-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6dl-hummingboard2-som-v15.dts head/sys/gnu/dts/arm/imx6dl-hummingboard2.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6dl-hummingboard2.dts head/sys/gnu/dts/arm/imx6dl-ts7970.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6dl-ts7970.dts head/sys/gnu/dts/arm/imx6q-cubox-i-emmc-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-cubox-i-emmc-som-v15.dts head/sys/gnu/dts/arm/imx6q-cubox-i-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-cubox-i-som-v15.dts head/sys/gnu/dts/arm/imx6q-hummingboard-emmc-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-hummingboard-emmc-som-v15.dts head/sys/gnu/dts/arm/imx6q-hummingboard-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-hummingboard-som-v15.dts head/sys/gnu/dts/arm/imx6q-hummingboard2-emmc-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-hummingboard2-emmc-som-v15.dts head/sys/gnu/dts/arm/imx6q-hummingboard2-som-v15.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-hummingboard2-som-v15.dts head/sys/gnu/dts/arm/imx6q-hummingboard2.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-hummingboard2.dts head/sys/gnu/dts/arm/imx6q-ts7970.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-ts7970.dts head/sys/gnu/dts/arm/imx6q-var-dt6customboard.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6q-var-dt6customboard.dts head/sys/gnu/dts/arm/imx6qdl-hummingboard2-emmc.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6qdl-hummingboard2-emmc.dtsi head/sys/gnu/dts/arm/imx6qdl-hummingboard2.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6qdl-hummingboard2.dtsi head/sys/gnu/dts/arm/imx6qdl-sr-som-brcm.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6qdl-sr-som-brcm.dtsi head/sys/gnu/dts/arm/imx6qdl-sr-som-emmc.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6qdl-sr-som-emmc.dtsi head/sys/gnu/dts/arm/imx6qdl-sr-som-ti.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6qdl-sr-som-ti.dtsi head/sys/gnu/dts/arm/imx6qdl-sr-som.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6qdl-sr-som.dtsi head/sys/gnu/dts/arm/imx6qdl-ts7970.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6qdl-ts7970.dtsi head/sys/gnu/dts/arm/imx6qdl-var-dart.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx6qdl-var-dart.dtsi head/sys/gnu/dts/arm/imx7d-colibri-emmc-eval-v3.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx7d-colibri-emmc-eval-v3.dts head/sys/gnu/dts/arm/imx7d-colibri-emmc.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx7d-colibri-emmc.dtsi head/sys/gnu/dts/arm/imx7d-pico-pi.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx7d-pico-pi.dts head/sys/gnu/dts/arm/imx7d-pico.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/imx7d-pico.dtsi head/sys/gnu/dts/arm/logicpd-som-lv-35xx-devkit.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/logicpd-som-lv-35xx-devkit.dts head/sys/gnu/dts/arm/logicpd-som-lv-baseboard.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/logicpd-som-lv-baseboard.dtsi head/sys/gnu/dts/arm/logicpd-torpedo-35xx-devkit.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/logicpd-torpedo-35xx-devkit.dts head/sys/gnu/dts/arm/logicpd-torpedo-baseboard.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/logicpd-torpedo-baseboard.dtsi head/sys/gnu/dts/arm/ls1021a-moxa-uc-8410a.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/ls1021a-moxa-uc-8410a.dts head/sys/gnu/dts/arm/openbmc-flash-layout.dtsi - copied unchanged from r332836, vendor/device-tree/dist/src/arm/openbmc-flash-layout.dtsi head/sys/gnu/dts/arm/owl-s500-sparky.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/owl-s500-sparky.dts head/sys/gnu/dts/arm/ox810se-wd-mbwe.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/ox810se-wd-mbwe.dts head/sys/gnu/dts/arm/ox820-cloudengines-pogoplug-series-3.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/ox820-cloudengines-pogoplug-series-3.dts head/sys/gnu/dts/arm/r8a7745-iwg22d-sodimm-dbhd-ca.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/r8a7745-iwg22d-sodimm-dbhd-ca.dts head/sys/gnu/dts/arm/sun8i-h2-plus-orangepi-r1.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/sun8i-h2-plus-orangepi-r1.dts head/sys/gnu/dts/arm/sun8i-h3-libretech-all-h3-cc.dts - copied unchanged from r332836, vendor/device-tree/dist/src/arm/sun8i-h3-libretech-all-h3-cc.dts head/sys/gnu/dts/include/dt-bindings/bus/ - copied from r332836, vendor/device-tree/dist/include/dt-bindings/bus/ - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/am3.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/am4.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/aspeed-clock.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/axg-clkc.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/dm814.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/dm816.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/dra7.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/jz4770-cgu.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/omap5.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/clock/sprd,sc9860-clk.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/gpio/aspeed-gpio.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/gpio/meson-axg-gpio.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/memory/tegra186-mc.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/power/mt2712-power.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/power/owl-s700-powergate.h - copied unchanged from r332836, vendor/device-tree/dist/include/dt-bindings/reset/amlogic,meson-axg-reset.h Directory Properties: head/sys/gnu/dts/include/dt-bindings/clock/am3.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/am4.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/dm814.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/dm816.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/dra7.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/jz4770-cgu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/omap5.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sprd,sc9860-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/aspeed-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/meson-axg-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/memory/tegra186-mc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/mt2712-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/owl-s700-powergate.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-axg-reset.h (props changed) Deleted: head/sys/gnu/dts/arm/cloudengines-pogoplug-series-3.dts head/sys/gnu/dts/arm/imx6qdl-microsom-ar8035.dtsi head/sys/gnu/dts/arm/imx6qdl-microsom.dtsi head/sys/gnu/dts/arm/imx7d-pico.dts head/sys/gnu/dts/arm/wd-mbwe.dts Modified: head/sys/gnu/dts/arm/am335x-bone-common.dtsi head/sys/gnu/dts/arm/am335x-boneblue.dts head/sys/gnu/dts/arm/am335x-evm.dts head/sys/gnu/dts/arm/am335x-evmsk.dts head/sys/gnu/dts/arm/am335x-pepper.dts head/sys/gnu/dts/arm/am33xx-clocks.dtsi head/sys/gnu/dts/arm/am33xx.dtsi head/sys/gnu/dts/arm/am3517.dtsi head/sys/gnu/dts/arm/am4372.dtsi head/sys/gnu/dts/arm/am437x-gp-evm.dts head/sys/gnu/dts/arm/am437x-idk-evm.dts head/sys/gnu/dts/arm/am437x-sk-evm.dts head/sys/gnu/dts/arm/am43x-epos-evm.dts head/sys/gnu/dts/arm/am43xx-clocks.dtsi head/sys/gnu/dts/arm/am571x-idk.dts head/sys/gnu/dts/arm/am572x-idk.dts head/sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi head/sys/gnu/dts/arm/animeo_ip.dts head/sys/gnu/dts/arm/arm-realview-eb-mp.dtsi head/sys/gnu/dts/arm/armada-38x.dtsi head/sys/gnu/dts/arm/aspeed-ast2500-evb.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-romulus.dts head/sys/gnu/dts/arm/aspeed-g4.dtsi head/sys/gnu/dts/arm/aspeed-g5.dtsi head/sys/gnu/dts/arm/at91-ariag25.dts head/sys/gnu/dts/arm/at91-ariettag25.dts head/sys/gnu/dts/arm/at91-cosino.dtsi head/sys/gnu/dts/arm/at91-foxg20.dts head/sys/gnu/dts/arm/at91-kizbox.dts head/sys/gnu/dts/arm/at91-kizbox2.dts head/sys/gnu/dts/arm/at91-kizboxmini.dts head/sys/gnu/dts/arm/at91-linea.dtsi head/sys/gnu/dts/arm/at91-qil_a9260.dts head/sys/gnu/dts/arm/at91-sam9_l9260.dts head/sys/gnu/dts/arm/at91-sama5d27_som1_ek.dts head/sys/gnu/dts/arm/at91-sama5d2_xplained.dts head/sys/gnu/dts/arm/at91-sama5d3_xplained.dts head/sys/gnu/dts/arm/at91-sama5d4_ma5d4.dtsi head/sys/gnu/dts/arm/at91-sama5d4_xplained.dts head/sys/gnu/dts/arm/at91-sama5d4ek.dts head/sys/gnu/dts/arm/at91-vinco.dts head/sys/gnu/dts/arm/at91rm9200.dtsi head/sys/gnu/dts/arm/at91rm9200ek.dts head/sys/gnu/dts/arm/at91sam9260.dtsi head/sys/gnu/dts/arm/at91sam9260ek.dts head/sys/gnu/dts/arm/at91sam9261.dtsi head/sys/gnu/dts/arm/at91sam9261ek.dts head/sys/gnu/dts/arm/at91sam9263.dtsi head/sys/gnu/dts/arm/at91sam9263ek.dts head/sys/gnu/dts/arm/at91sam9g20ek_common.dtsi head/sys/gnu/dts/arm/at91sam9g25ek.dts head/sys/gnu/dts/arm/at91sam9g45.dtsi head/sys/gnu/dts/arm/at91sam9m10g45ek.dts head/sys/gnu/dts/arm/at91sam9n12.dtsi head/sys/gnu/dts/arm/at91sam9n12ek.dts head/sys/gnu/dts/arm/at91sam9rl.dtsi head/sys/gnu/dts/arm/at91sam9rlek.dts head/sys/gnu/dts/arm/at91sam9x5.dtsi head/sys/gnu/dts/arm/at91sam9x5cm.dtsi head/sys/gnu/dts/arm/axp81x.dtsi head/sys/gnu/dts/arm/bcm11351.dtsi head/sys/gnu/dts/arm/bcm21664.dtsi head/sys/gnu/dts/arm/bcm2835-rpi-a-plus.dts head/sys/gnu/dts/arm/bcm2835-rpi-a.dts head/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts head/sys/gnu/dts/arm/bcm2835-rpi-b-rev2.dts head/sys/gnu/dts/arm/bcm2835-rpi-b.dts head/sys/gnu/dts/arm/bcm2835.dtsi head/sys/gnu/dts/arm/bcm2836-rpi-2-b.dts head/sys/gnu/dts/arm/bcm2836.dtsi head/sys/gnu/dts/arm/bcm2837-rpi-3-b.dts head/sys/gnu/dts/arm/bcm2837.dtsi head/sys/gnu/dts/arm/bcm283x.dtsi head/sys/gnu/dts/arm/bcm958625hr.dts head/sys/gnu/dts/arm/dm814x-clocks.dtsi head/sys/gnu/dts/arm/dm814x.dtsi head/sys/gnu/dts/arm/dm816x-clocks.dtsi head/sys/gnu/dts/arm/dm816x.dtsi head/sys/gnu/dts/arm/dra62x-j5eco-evm.dts head/sys/gnu/dts/arm/dra7-evm-common.dtsi head/sys/gnu/dts/arm/dra7-evm.dts head/sys/gnu/dts/arm/dra7.dtsi head/sys/gnu/dts/arm/dra72-evm-common.dtsi head/sys/gnu/dts/arm/dra72-evm-tps65917.dtsi head/sys/gnu/dts/arm/dra72x.dtsi head/sys/gnu/dts/arm/dra74x.dtsi head/sys/gnu/dts/arm/dra76-evm.dts head/sys/gnu/dts/arm/dra7xx-clocks.dtsi head/sys/gnu/dts/arm/efm32gg-dk3750.dts head/sys/gnu/dts/arm/ethernut5.dts head/sys/gnu/dts/arm/exynos3250-artik5-eval.dts head/sys/gnu/dts/arm/exynos3250-artik5.dtsi head/sys/gnu/dts/arm/exynos3250-monk.dts head/sys/gnu/dts/arm/exynos3250-pinctrl.dtsi head/sys/gnu/dts/arm/exynos3250-rinato.dts head/sys/gnu/dts/arm/exynos3250.dtsi head/sys/gnu/dts/arm/exynos4-cpu-thermal.dtsi head/sys/gnu/dts/arm/exynos4.dtsi head/sys/gnu/dts/arm/exynos4210-origen.dts head/sys/gnu/dts/arm/exynos4210-pinctrl.dtsi head/sys/gnu/dts/arm/exynos4210-smdkv310.dts head/sys/gnu/dts/arm/exynos4210-trats.dts head/sys/gnu/dts/arm/exynos4210-universal_c210.dts head/sys/gnu/dts/arm/exynos4210.dtsi head/sys/gnu/dts/arm/exynos4412-itop-elite.dts head/sys/gnu/dts/arm/exynos4412-itop-scp-core.dtsi head/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi head/sys/gnu/dts/arm/exynos4412-odroidu3.dts head/sys/gnu/dts/arm/exynos4412-odroidx.dts head/sys/gnu/dts/arm/exynos4412-odroidx2.dts head/sys/gnu/dts/arm/exynos4412-origen.dts head/sys/gnu/dts/arm/exynos4412-pinctrl.dtsi head/sys/gnu/dts/arm/exynos4412-ppmu-common.dtsi head/sys/gnu/dts/arm/exynos4412-prime.dtsi head/sys/gnu/dts/arm/exynos4412-smdk4412.dts head/sys/gnu/dts/arm/exynos4412-trats2.dts head/sys/gnu/dts/arm/exynos4412.dtsi head/sys/gnu/dts/arm/exynos5.dtsi head/sys/gnu/dts/arm/exynos5250-arndale.dts head/sys/gnu/dts/arm/exynos5250-pinctrl.dtsi head/sys/gnu/dts/arm/exynos5250-smdk5250.dts head/sys/gnu/dts/arm/exynos5250-snow-common.dtsi head/sys/gnu/dts/arm/exynos5250-snow-rev5.dts head/sys/gnu/dts/arm/exynos5250-snow.dts head/sys/gnu/dts/arm/exynos5250-spring.dts head/sys/gnu/dts/arm/exynos5250.dtsi head/sys/gnu/dts/arm/exynos5260-pinctrl.dtsi head/sys/gnu/dts/arm/exynos5260-xyref5260.dts head/sys/gnu/dts/arm/exynos5260.dtsi head/sys/gnu/dts/arm/exynos5410-odroidxu.dts head/sys/gnu/dts/arm/exynos5410-pinctrl.dtsi head/sys/gnu/dts/arm/exynos5410-smdk5410.dts head/sys/gnu/dts/arm/exynos5410.dtsi head/sys/gnu/dts/arm/exynos5420-arndale-octa.dts head/sys/gnu/dts/arm/exynos5420-cpus.dtsi head/sys/gnu/dts/arm/exynos5420-peach-pit.dts head/sys/gnu/dts/arm/exynos5420-pinctrl.dtsi head/sys/gnu/dts/arm/exynos5420-smdk5420.dts head/sys/gnu/dts/arm/exynos5420-tmu-sensor-conf.dtsi head/sys/gnu/dts/arm/exynos5420-trip-points.dtsi head/sys/gnu/dts/arm/exynos5420.dtsi head/sys/gnu/dts/arm/exynos5422-cpus.dtsi head/sys/gnu/dts/arm/exynos5422-odroid-core.dtsi head/sys/gnu/dts/arm/exynos5422-odroidhc1.dts head/sys/gnu/dts/arm/exynos5422-odroidxu3-audio.dtsi head/sys/gnu/dts/arm/exynos5422-odroidxu3-common.dtsi head/sys/gnu/dts/arm/exynos5422-odroidxu3-lite.dts head/sys/gnu/dts/arm/exynos5422-odroidxu3.dts head/sys/gnu/dts/arm/exynos5422-odroidxu4.dts head/sys/gnu/dts/arm/exynos5440-sd5v1.dts head/sys/gnu/dts/arm/exynos5440-ssdk5440.dts head/sys/gnu/dts/arm/exynos5440-tmu-sensor-conf.dtsi head/sys/gnu/dts/arm/exynos5440-trip-points.dtsi head/sys/gnu/dts/arm/exynos5440.dtsi head/sys/gnu/dts/arm/exynos54xx-odroidxu-leds.dtsi head/sys/gnu/dts/arm/exynos54xx.dtsi head/sys/gnu/dts/arm/ge863-pro3.dtsi head/sys/gnu/dts/arm/gemini-dlink-dir-685.dts head/sys/gnu/dts/arm/gemini-nas4220b.dts head/sys/gnu/dts/arm/gemini-rut1xx.dts head/sys/gnu/dts/arm/gemini-wbd111.dts head/sys/gnu/dts/arm/gemini-wbd222.dts head/sys/gnu/dts/arm/gemini.dtsi head/sys/gnu/dts/arm/imx25.dtsi head/sys/gnu/dts/arm/imx27-pdk.dts head/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts head/sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi head/sys/gnu/dts/arm/imx28.dtsi head/sys/gnu/dts/arm/imx35.dtsi head/sys/gnu/dts/arm/imx51-babbage.dts head/sys/gnu/dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts head/sys/gnu/dts/arm/imx51-ts4800.dts head/sys/gnu/dts/arm/imx51-zii-rdu1.dts head/sys/gnu/dts/arm/imx51.dtsi head/sys/gnu/dts/arm/imx53-cx9020.dts head/sys/gnu/dts/arm/imx53-m53.dtsi head/sys/gnu/dts/arm/imx53-tx53-x03x.dts head/sys/gnu/dts/arm/imx53-tx53.dtsi head/sys/gnu/dts/arm/imx53.dtsi head/sys/gnu/dts/arm/imx6dl-aristainetos_4.dts head/sys/gnu/dts/arm/imx6dl-aristainetos_7.dts head/sys/gnu/dts/arm/imx6dl-colibri-eval-v3.dts head/sys/gnu/dts/arm/imx6dl-cubox-i.dts head/sys/gnu/dts/arm/imx6dl-hummingboard.dts head/sys/gnu/dts/arm/imx6dl-icore-rqs.dts head/sys/gnu/dts/arm/imx6dl-pinfunc.h head/sys/gnu/dts/arm/imx6dl.dtsi head/sys/gnu/dts/arm/imx6q-apalis-eval.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora-v1.1.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora.dts head/sys/gnu/dts/arm/imx6q-b450v3.dts head/sys/gnu/dts/arm/imx6q-b650v3.dts head/sys/gnu/dts/arm/imx6q-b850v3.dts head/sys/gnu/dts/arm/imx6q-bx50v3.dtsi head/sys/gnu/dts/arm/imx6q-cubox-i.dts head/sys/gnu/dts/arm/imx6q-display5.dtsi head/sys/gnu/dts/arm/imx6q-h100.dts head/sys/gnu/dts/arm/imx6q-hummingboard.dts head/sys/gnu/dts/arm/imx6q-pinfunc.h head/sys/gnu/dts/arm/imx6qdl-apalis.dtsi head/sys/gnu/dts/arm/imx6qdl-apf6dev.dtsi head/sys/gnu/dts/arm/imx6qdl-aristainetos.dtsi head/sys/gnu/dts/arm/imx6qdl-aristainetos2.dtsi head/sys/gnu/dts/arm/imx6qdl-colibri.dtsi head/sys/gnu/dts/arm/imx6qdl-cubox-i.dtsi head/sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi head/sys/gnu/dts/arm/imx6qdl-nitrogen6_max.dtsi head/sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi head/sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi head/sys/gnu/dts/arm/imx6qdl-udoo.dtsi head/sys/gnu/dts/arm/imx6qdl-wandboard-revd1.dtsi head/sys/gnu/dts/arm/imx6qdl-zii-rdu2.dtsi head/sys/gnu/dts/arm/imx6qdl.dtsi head/sys/gnu/dts/arm/imx6sl-evk.dts head/sys/gnu/dts/arm/imx6sl.dtsi head/sys/gnu/dts/arm/imx6sx-sdb.dtsi head/sys/gnu/dts/arm/imx6sx.dtsi head/sys/gnu/dts/arm/imx6ul-14x14-evk.dts head/sys/gnu/dts/arm/imx6ul.dtsi head/sys/gnu/dts/arm/imx7-colibri-eval-v3.dtsi head/sys/gnu/dts/arm/imx7-colibri.dtsi head/sys/gnu/dts/arm/imx7d-colibri-eval-v3.dts head/sys/gnu/dts/arm/imx7d-colibri.dtsi head/sys/gnu/dts/arm/imx7d-sdb.dts head/sys/gnu/dts/arm/imx7d.dtsi head/sys/gnu/dts/arm/imx7s.dtsi head/sys/gnu/dts/arm/iwg20d-q7-common.dtsi head/sys/gnu/dts/arm/iwg20d-q7-dbcm-ca.dtsi head/sys/gnu/dts/arm/keystone-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2e-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2e-evm.dts head/sys/gnu/dts/arm/keystone-k2e-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2e.dtsi head/sys/gnu/dts/arm/keystone-k2g-evm.dts head/sys/gnu/dts/arm/keystone-k2g-ice.dts head/sys/gnu/dts/arm/keystone-k2g.dtsi head/sys/gnu/dts/arm/keystone-k2hk-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2hk-evm.dts head/sys/gnu/dts/arm/keystone-k2hk-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2hk.dtsi head/sys/gnu/dts/arm/keystone-k2l-clocks.dtsi head/sys/gnu/dts/arm/keystone-k2l-evm.dts head/sys/gnu/dts/arm/keystone-k2l-netcp.dtsi head/sys/gnu/dts/arm/keystone-k2l.dtsi head/sys/gnu/dts/arm/keystone.dtsi head/sys/gnu/dts/arm/kirkwood-linksys-viper.dts head/sys/gnu/dts/arm/logicpd-som-lv-37xx-devkit.dts head/sys/gnu/dts/arm/logicpd-som-lv.dtsi head/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit.dts head/sys/gnu/dts/arm/logicpd-torpedo-som.dtsi head/sys/gnu/dts/arm/lpc3250-ea3250.dts head/sys/gnu/dts/arm/lpc3250-phy3250.dts head/sys/gnu/dts/arm/lpc4337-ciaa.dts head/sys/gnu/dts/arm/lpc4350-hitex-eval.dts head/sys/gnu/dts/arm/lpc4357-ea4357-devkit.dts head/sys/gnu/dts/arm/ls1021a-qds.dts head/sys/gnu/dts/arm/ls1021a-twr.dts head/sys/gnu/dts/arm/ls1021a.dtsi head/sys/gnu/dts/arm/meson8.dtsi head/sys/gnu/dts/arm/meson8b.dtsi head/sys/gnu/dts/arm/mpa1600.dts head/sys/gnu/dts/arm/mt2701.dtsi head/sys/gnu/dts/arm/mt7623.dtsi head/sys/gnu/dts/arm/mt7623n-bananapi-bpi-r2.dts head/sys/gnu/dts/arm/mt7623n-rfb-nand.dts head/sys/gnu/dts/arm/omap2420-n8x0-common.dtsi head/sys/gnu/dts/arm/omap3-cm-t3x.dtsi head/sys/gnu/dts/arm/omap3-evm-37xx.dts head/sys/gnu/dts/arm/omap3-gta04.dtsi head/sys/gnu/dts/arm/omap3-igep.dtsi head/sys/gnu/dts/arm/omap3-lilly-a83x.dtsi head/sys/gnu/dts/arm/omap3-n9.dts head/sys/gnu/dts/arm/omap3-n900.dts head/sys/gnu/dts/arm/omap3-n950-n9.dtsi head/sys/gnu/dts/arm/omap3-n950.dts head/sys/gnu/dts/arm/omap3-pandora-common.dtsi head/sys/gnu/dts/arm/omap3.dtsi head/sys/gnu/dts/arm/omap3430-sdp.dts head/sys/gnu/dts/arm/omap34xx.dtsi head/sys/gnu/dts/arm/omap36xx.dtsi head/sys/gnu/dts/arm/omap4-droid4-xt894.dts head/sys/gnu/dts/arm/omap4.dtsi head/sys/gnu/dts/arm/omap44xx-clocks.dtsi head/sys/gnu/dts/arm/omap5-uevm.dts head/sys/gnu/dts/arm/omap5.dtsi head/sys/gnu/dts/arm/omap54xx-clocks.dtsi head/sys/gnu/dts/arm/pm9g45.dts head/sys/gnu/dts/arm/qcom-msm8974-fairphone-fp2.dts head/sys/gnu/dts/arm/r7s72100-genmai.dts head/sys/gnu/dts/arm/r8a73a4.dtsi head/sys/gnu/dts/arm/r8a7740-armadillo800eva.dts head/sys/gnu/dts/arm/r8a7740.dtsi head/sys/gnu/dts/arm/r8a7743.dtsi head/sys/gnu/dts/arm/r8a7745-iwg22d-sodimm.dts head/sys/gnu/dts/arm/r8a7745.dtsi head/sys/gnu/dts/arm/r8a7778.dtsi head/sys/gnu/dts/arm/r8a7779.dtsi head/sys/gnu/dts/arm/r8a7790-lager.dts head/sys/gnu/dts/arm/r8a7790.dtsi head/sys/gnu/dts/arm/r8a7791-koelsch.dts head/sys/gnu/dts/arm/r8a7791.dtsi head/sys/gnu/dts/arm/r8a7792.dtsi head/sys/gnu/dts/arm/r8a7793.dtsi head/sys/gnu/dts/arm/r8a7794-alt.dts head/sys/gnu/dts/arm/r8a7794.dtsi head/sys/gnu/dts/arm/rk3036.dtsi head/sys/gnu/dts/arm/rk3066a-rayeager.dts head/sys/gnu/dts/arm/rk322x.dtsi head/sys/gnu/dts/arm/rk3288-phycore-som.dtsi head/sys/gnu/dts/arm/rk3288.dtsi head/sys/gnu/dts/arm/s3c2416-pinctrl.dtsi head/sys/gnu/dts/arm/s3c2416-smdk2416.dts head/sys/gnu/dts/arm/s3c2416.dtsi head/sys/gnu/dts/arm/s3c24xx.dtsi head/sys/gnu/dts/arm/s3c6400.dtsi head/sys/gnu/dts/arm/s3c6410-mini6410.dts head/sys/gnu/dts/arm/s3c6410-smdk6410.dts head/sys/gnu/dts/arm/s3c6410.dtsi head/sys/gnu/dts/arm/s3c64xx-pinctrl.dtsi head/sys/gnu/dts/arm/s3c64xx.dtsi head/sys/gnu/dts/arm/s5pv210-aquila.dts head/sys/gnu/dts/arm/s5pv210-goni.dts head/sys/gnu/dts/arm/s5pv210-pinctrl.dtsi head/sys/gnu/dts/arm/s5pv210-smdkc110.dts head/sys/gnu/dts/arm/s5pv210-smdkv210.dts head/sys/gnu/dts/arm/s5pv210-torbreck.dts head/sys/gnu/dts/arm/s5pv210.dtsi head/sys/gnu/dts/arm/sama5d2.dtsi head/sys/gnu/dts/arm/sama5d3.dtsi head/sys/gnu/dts/arm/sama5d3_tcb1.dtsi head/sys/gnu/dts/arm/sama5d3xcm.dtsi head/sys/gnu/dts/arm/sama5d3xcm_cmp.dtsi head/sys/gnu/dts/arm/sama5d3xmb.dtsi head/sys/gnu/dts/arm/sama5d3xmb_cmp.dtsi head/sys/gnu/dts/arm/sama5d4.dtsi head/sys/gnu/dts/arm/sh73a0.dtsi head/sys/gnu/dts/arm/socfpga.dtsi head/sys/gnu/dts/arm/socfpga_arria10_socdk.dtsi head/sys/gnu/dts/arm/socfpga_cyclone5_vining_fpga.dts head/sys/gnu/dts/arm/spear1310-evb.dts head/sys/gnu/dts/arm/spear1340.dtsi head/sys/gnu/dts/arm/spear13xx.dtsi head/sys/gnu/dts/arm/spear600.dtsi head/sys/gnu/dts/arm/ste-nomadik-stn8815.dtsi head/sys/gnu/dts/arm/stih407.dtsi head/sys/gnu/dts/arm/stih410.dtsi head/sys/gnu/dts/arm/sun5i-a13-olinuxino.dts head/sys/gnu/dts/arm/sun6i-a31s-sinovoip-bpi-m2.dts head/sys/gnu/dts/arm/sun7i-a20-pcduino3-nano.dts head/sys/gnu/dts/arm/sun8i-a83t-bananapi-m3.dts head/sys/gnu/dts/arm/sun8i-a83t-cubietruck-plus.dts head/sys/gnu/dts/arm/sun8i-a83t-tbs-a711.dts head/sys/gnu/dts/arm/sun8i-a83t.dtsi head/sys/gnu/dts/arm/sun8i-h3-bananapi-m2-plus.dts head/sys/gnu/dts/arm/sun8i-h3-nanopi-m1-plus.dts head/sys/gnu/dts/arm/sun8i-h3-nanopi-m1.dts head/sys/gnu/dts/arm/sun8i-h3-nanopi-neo.dts head/sys/gnu/dts/arm/sun8i-h3-orangepi-plus.dts head/sys/gnu/dts/arm/sun8i-h3.dtsi head/sys/gnu/dts/arm/sunxi-h3-h5.dtsi head/sys/gnu/dts/arm/tegra20.dtsi head/sys/gnu/dts/arm/tny_a9260_common.dtsi head/sys/gnu/dts/arm/tny_a9263.dts head/sys/gnu/dts/arm/uniphier-ld4-ref.dts head/sys/gnu/dts/arm/uniphier-ld4.dtsi head/sys/gnu/dts/arm/uniphier-ld6b-ref.dts head/sys/gnu/dts/arm/uniphier-pro4-ref.dts head/sys/gnu/dts/arm/uniphier-pro4.dtsi head/sys/gnu/dts/arm/uniphier-pro5.dtsi head/sys/gnu/dts/arm/uniphier-pxs2.dtsi head/sys/gnu/dts/arm/uniphier-sld8-ref.dts head/sys/gnu/dts/arm/uniphier-sld8.dtsi head/sys/gnu/dts/arm/usb_a9260_common.dtsi head/sys/gnu/dts/arm/usb_a9263.dts head/sys/gnu/dts/arm/vf-colibri-eval-v3.dtsi head/sys/gnu/dts/arm/vf500.dtsi head/sys/gnu/dts/arm/vf610-zii-dev-rev-b.dts head/sys/gnu/dts/arm/vf610-zii-dev-rev-c.dts head/sys/gnu/dts/arm/vf610-zii-dev.dtsi head/sys/gnu/dts/arm/vfxxx.dtsi head/sys/gnu/dts/arm/zx296702.dtsi head/sys/gnu/dts/include/dt-bindings/clock/hi3660-clock.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq8074.h head/sys/gnu/dts/include/dt-bindings/gpio/gpio.h head/sys/gnu/dts/include/dt-bindings/input/linux-event-codes.h head/sys/gnu/dts/include/dt-bindings/pinctrl/am43xx.h head/sys/gnu/dts/include/dt-bindings/pinctrl/stm32-pinfunc.h Directory Properties: head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/include/ (props changed) head/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h (props changed) Modified: head/sys/gnu/dts/arm/am335x-bone-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-bone-common.dtsi Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am335x-bone-common.dtsi Fri Apr 20 19:37:08 2018 (r332839) @@ -409,6 +409,6 @@ }; &rtc { - clocks = <&clk_32768_ck>, <&clkdiv32k_ick>; + clocks = <&clk_32768_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; clock-names = "ext-clk", "int-clk"; }; Modified: head/sys/gnu/dts/arm/am335x-boneblue.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-boneblue.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am335x-boneblue.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -159,6 +159,7 @@ >; }; + /* UT0 */ uart0_pins: pinmux_uart0_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* (E15) uart0_rxd.uart0_rxd */ @@ -166,6 +167,37 @@ >; }; + /* UT1 */ + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0) /* (D16) uart1_rxd.uart1_rxd */ + AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (D15) uart1_txd.uart1_txd */ + >; + }; + + /* GPS */ + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE1) /* (A17) spi0_sclk.uart2_rxd */ + AM33XX_IOPAD(0x954, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (B17) spi0_d0.uart2_txd */ + >; + }; + + /* DSM2 */ + uart4_pins: pinmux_uart4_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE6) /* (T17) gpmc_wait0.uart4_rxd */ + >; + }; + + /* UT5 */ + uart5_pins: pinmux_uart5_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8C4, PIN_INPUT_PULLUP | MUX_MODE4) /* (U2) lcd_data9.uart5_rxd */ + AM33XX_IOPAD(0x8C0, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* (U1) lcd_data8.uart5_txd */ + >; + }; + mmc1_pins: pinmux_mmc1_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* (C15) spi0_cs1.gpio0[6] */ @@ -216,10 +248,19 @@ wl18xx_pins: pinmux_wl18xx_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (K18) gmii1_txclk.gpio3[9] - WL_EN */ - AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (H18) rmii1_refclk.gpio0[29] - WL_IRQ */ + AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K16) gmii1_txd1.gpio0[21] - WL_IRQ */ AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (L18) gmii1_rxclk.gpio3[10] - LS_BUF_EN */ >; }; + + /* DCAN */ + dcan1_pins: pinmux_dcan1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x96c, PIN_INPUT | MUX_MODE2) /* (E17) uart0_rtsn.dcan1_rx */ + AM33XX_IOPAD(0x968, PIN_OUTPUT | MUX_MODE2) /* (E18) uart0_ctsn.dcan1_tx */ + AM33XX_IOPAD(0x940, PIN_OUTPUT | MUX_MODE7) /* (M16) gmii1_rxd0.gpio2[21] */ + >; + }; }; &uart0 { @@ -229,6 +270,34 @@ status = "okay"; }; +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + + status = "okay"; +}; + +&uart4 { + pinctrl-names = "default"; + pinctrl-0 = <&uart4_pins>; + + status = "okay"; +}; + +&uart5 { + pinctrl-names = "default"; + pinctrl-0 = <&uart5_pins>; + + status = "okay"; +}; + &usb { status = "okay"; }; @@ -414,7 +483,7 @@ compatible = "ti,wl1835"; reg = <2>; interrupt-parent = <&gpio0>; - interrupts = <29 IRQ_TYPE_EDGE_RISING>; + interrupts = <21 IRQ_TYPE_EDGE_RISING>; }; }; @@ -446,8 +515,14 @@ &rtc { system-power-controller; - clocks = <&clk_32768_ck>, <&clkdiv32k_ick>; + clocks = <&clk_32768_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; clock-names = "ext-clk", "int-clk"; +}; + +&dcan1 { + pinctrl-names = "default"; + pinctrl-0 = <&dcan1_pins>; + status = "okay"; }; &gpio3 { Modified: head/sys/gnu/dts/arm/am335x-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evm.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am335x-evm.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -790,6 +790,6 @@ }; &rtc { - clocks = <&clk_32768_ck>, <&clkdiv32k_ick>; + clocks = <&clk_32768_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; clock-names = "ext-clk", "int-clk"; }; Modified: head/sys/gnu/dts/arm/am335x-evmsk.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evmsk.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am335x-evmsk.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -722,6 +722,6 @@ }; &rtc { - clocks = <&clk_32768_ck>, <&clkdiv32k_ick>; + clocks = <&clk_32768_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; clock-names = "ext-clk", "int-clk"; }; Modified: head/sys/gnu/dts/arm/am335x-pepper.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-pepper.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am335x-pepper.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -139,7 +139,7 @@ &audio_codec { status = "okay"; - gpio-reset = <&gpio1 16 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; AVDD-supply = <&ldo3_reg>; IOVDD-supply = <&ldo3_reg>; DRVDD-supply = <&ldo3_reg>; Modified: head/sys/gnu/dts/arm/am33xx-clocks.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am33xx-clocks.dtsi Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am33xx-clocks.dtsi Fri Apr 20 19:37:08 2018 (r332839) @@ -292,14 +292,6 @@ clock-div = <4>; }; - cefuse_fck: cefuse_fck@a20 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&sys_clkin_ck>; - ti,bit-shift = <1>; - reg = <0x0a20>; - }; - clk_24mhz: clk_24mhz { #clock-cells = <0>; compatible = "fixed-factor-clock"; @@ -316,14 +308,6 @@ clock-div = <732>; }; - clkdiv32k_ick: clkdiv32k_ick@14c { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ck>; - ti,bit-shift = <1>; - reg = <0x014c>; - }; - l3_gclk: l3_gclk { #clock-cells = <0>; compatible = "fixed-factor-clock"; @@ -350,49 +334,49 @@ timer1_fck: timer1_fck@528 { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&sys_clkin_ck>, <&clkdiv32k_ick>, <&tclkin_ck>, <&clk_rc32k_ck>, <&clk_32768_ck>; + clocks = <&sys_clkin_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>, <&tclkin_ck>, <&clk_rc32k_ck>, <&clk_32768_ck>; reg = <0x0528>; }; timer2_fck: timer2_fck@508 { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&clkdiv32k_ick>; + clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; reg = <0x0508>; }; timer3_fck: timer3_fck@50c { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&clkdiv32k_ick>; + clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; reg = <0x050c>; }; timer4_fck: timer4_fck@510 { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&clkdiv32k_ick>; + clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; reg = <0x0510>; }; timer5_fck: timer5_fck@518 { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&clkdiv32k_ick>; + clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; reg = <0x0518>; }; timer6_fck: timer6_fck@51c { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&clkdiv32k_ick>; + clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; reg = <0x051c>; }; timer7_fck: timer7_fck@504 { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&clkdiv32k_ick>; + clocks = <&tclkin_ck>, <&sys_clkin_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; reg = <0x0504>; }; @@ -423,7 +407,7 @@ wdt1_fck: wdt1_fck@538 { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&clk_rc32k_ck>, <&clkdiv32k_ick>; + clocks = <&clk_rc32k_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; reg = <0x0538>; }; @@ -493,42 +477,10 @@ gpio0_dbclk_mux_ck: gpio0_dbclk_mux_ck@53c { #clock-cells = <0>; compatible = "ti,mux-clock"; - clocks = <&clk_rc32k_ck>, <&clk_32768_ck>, <&clkdiv32k_ick>; + clocks = <&clk_rc32k_ck>, <&clk_32768_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; reg = <0x053c>; }; - gpio0_dbclk: gpio0_dbclk@408 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&gpio0_dbclk_mux_ck>; - ti,bit-shift = <18>; - reg = <0x0408>; - }; - - gpio1_dbclk: gpio1_dbclk@ac { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ick>; - ti,bit-shift = <18>; - reg = <0x00ac>; - }; - - gpio2_dbclk: gpio2_dbclk@b0 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ick>; - ti,bit-shift = <18>; - reg = <0x00b0>; - }; - - gpio3_dbclk: gpio3_dbclk@b4 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ick>; - ti,bit-shift = <18>; - reg = <0x00b4>; - }; - lcd_gclk: lcd_gclk@534 { #clock-cells = <0>; compatible = "ti,mux-clock"; @@ -577,70 +529,97 @@ reg = <0x0700>; }; - dbg_sysclk_ck: dbg_sysclk_ck@414 { + clkout2_ck: clkout2_ck@700 { #clock-cells = <0>; compatible = "ti,gate-clock"; - clocks = <&sys_clkin_ck>; - ti,bit-shift = <19>; - reg = <0x0414>; + clocks = <&clkout2_div_ck>; + ti,bit-shift = <7>; + reg = <0x0700>; }; +}; - dbg_clka_ck: dbg_clka_ck@414 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&dpll_core_m4_ck>; - ti,bit-shift = <30>; - reg = <0x0414>; - }; +&prcm { + l4_per_cm: l4_per_cm@0 { + compatible = "ti,omap4-cm"; + reg = <0x0 0x200>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x0 0x200>; - stm_pmd_clock_mux_ck: stm_pmd_clock_mux_ck@414 { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&dbg_sysclk_ck>, <&dbg_clka_ck>; - ti,bit-shift = <22>; - reg = <0x0414>; + l4_per_clkctrl: clk@14 { + compatible = "ti,clkctrl"; + reg = <0x14 0x13c>; + #clock-cells = <2>; + }; }; - trace_pmd_clk_mux_ck: trace_pmd_clk_mux_ck@414 { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&dbg_sysclk_ck>, <&dbg_clka_ck>; - ti,bit-shift = <20>; - reg = <0x0414>; + l4_wkup_cm: l4_wkup_cm@400 { + compatible = "ti,omap4-cm"; + reg = <0x400 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x400 0x100>; + + l4_wkup_clkctrl: clk@4 { + compatible = "ti,clkctrl"; + reg = <0x4 0xd4>; + #clock-cells = <2>; + }; }; - stm_clk_div_ck: stm_clk_div_ck@414 { - #clock-cells = <0>; - compatible = "ti,divider-clock"; - clocks = <&stm_pmd_clock_mux_ck>; - ti,bit-shift = <27>; - ti,max-div = <64>; - reg = <0x0414>; - ti,index-power-of-two; + mpu_cm: mpu_cm@600 { + compatible = "ti,omap4-cm"; + reg = <0x600 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x600 0x100>; + + mpu_clkctrl: clk@4 { + compatible = "ti,clkctrl"; + reg = <0x4 0x4>; + #clock-cells = <2>; + }; }; - trace_clk_div_ck: trace_clk_div_ck@414 { - #clock-cells = <0>; - compatible = "ti,divider-clock"; - clocks = <&trace_pmd_clk_mux_ck>; - ti,bit-shift = <24>; - ti,max-div = <64>; - reg = <0x0414>; - ti,index-power-of-two; + l4_rtc_cm: l4_rtc_cm@800 { + compatible = "ti,omap4-cm"; + reg = <0x800 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x800 0x100>; + + l4_rtc_clkctrl: clk@0 { + compatible = "ti,clkctrl"; + reg = <0x0 0x4>; + #clock-cells = <2>; + }; }; - clkout2_ck: clkout2_ck@700 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkout2_div_ck>; - ti,bit-shift = <7>; - reg = <0x0700>; + gfx_l3_cm: gfx_l3_cm@900 { + compatible = "ti,omap4-cm"; + reg = <0x900 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x900 0x100>; + + gfx_l3_clkctrl: clk@4 { + compatible = "ti,clkctrl"; + reg = <0x4 0x4>; + #clock-cells = <2>; + }; }; -}; -&prcm_clockdomains { - clk_24mhz_clkdm: clk_24mhz_clkdm { - compatible = "ti,clockdomain"; - clocks = <&clkdiv32k_ick>; + l4_cefuse_cm: l4_cefuse_cm@a00 { + compatible = "ti,omap4-cm"; + reg = <0xa00 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0xa00 0x100>; + + l4_cefuse_clkctrl: clk@20 { + compatible = "ti,clkctrl"; + reg = <0x20 0x4>; + #clock-cells = <2>; + }; }; }; Modified: head/sys/gnu/dts/arm/am33xx.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am33xx.dtsi Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am33xx.dtsi Fri Apr 20 19:37:08 2018 (r332839) @@ -10,6 +10,7 @@ #include #include +#include / { compatible = "ti,am33xx"; @@ -179,8 +180,11 @@ }; prcm: prcm@200000 { - compatible = "ti,am3-prcm"; + compatible = "ti,am3-prcm", "simple-bus"; reg = <0x200000 0x4000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x200000 0x4000>; prcm_clocks: clocks { #address-cells = <1>; @@ -496,7 +500,7 @@ status = "disabled"; }; - mailbox: mailbox@480C8000 { + mailbox: mailbox@480c8000 { compatible = "ti,omap4-mailbox"; reg = <0x480C8000 0x200>; interrupts = <77>; @@ -517,6 +521,8 @@ interrupts = <67>; ti,hwmods = "timer1"; ti,timer-alwon; + clocks = <&timer1_fck>; + clock-names = "fck"; }; timer2: timer@48040000 { @@ -524,6 +530,8 @@ reg = <0x48040000 0x400>; interrupts = <68>; ti,hwmods = "timer2"; + clocks = <&timer2_fck>; + clock-names = "fck"; }; timer3: timer@48042000 { @@ -571,7 +579,7 @@ interrupts = <75 76>; ti,hwmods = "rtc"; - clocks = <&clkdiv32k_ick>; + clocks = <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>; clock-names = "int-clk"; }; @@ -991,7 +999,7 @@ dma-names = "tx", "rx"; }; - mcasp1: mcasp@4803C000 { + mcasp1: mcasp@4803c000 { compatible = "ti,am33xx-mcasp-audio"; ti,hwmods = "mcasp1"; reg = <0x4803C000 0x2000>, @@ -1014,4 +1022,4 @@ }; }; -/include/ "am33xx-clocks.dtsi" +#include "am33xx-clocks.dtsi" Modified: head/sys/gnu/dts/arm/am3517.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am3517.dtsi Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am3517.dtsi Fri Apr 20 19:37:08 2018 (r332839) @@ -26,7 +26,7 @@ interrupt-names = "mc"; }; - davinci_emac: ethernet@0x5c000000 { + davinci_emac: ethernet@5c000000 { compatible = "ti,am3517-emac"; ti,hwmods = "davinci_emac"; status = "disabled"; @@ -41,7 +41,7 @@ local-mac-address = [ 00 00 00 00 00 00 ]; }; - davinci_mdio: ethernet@0x5c030000 { + davinci_mdio: ethernet@5c030000 { compatible = "ti,davinci_mdio"; ti,hwmods = "davinci_mdio"; status = "disabled"; @@ -96,10 +96,6 @@ }; &mmu_isp { - status = "disabled"; -}; - -&smartreflex_mpu_iva { status = "disabled"; }; Modified: head/sys/gnu/dts/arm/am4372.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am4372.dtsi Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am4372.dtsi Fri Apr 20 19:37:08 2018 (r332839) @@ -10,6 +10,7 @@ #include #include +#include / { compatible = "ti,am4372", "ti,am43"; @@ -163,9 +164,12 @@ }; prcm: prcm@1f0000 { - compatible = "ti,am4-prcm"; + compatible = "ti,am4-prcm", "simple-bus"; reg = <0x1f0000 0x11000>; interrupts = ; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x1f0000 0x11000>; prcm_clocks: clocks { #address-cells = <1>; @@ -325,7 +329,7 @@ status = "disabled"; }; - mailbox: mailbox@480C8000 { + mailbox: mailbox@480c8000 { compatible = "ti,omap4-mailbox"; reg = <0x480C8000 0x200>; interrupts = ; @@ -346,6 +350,8 @@ interrupts = ; ti,timer-alwon; ti,hwmods = "timer1"; + clocks = <&timer1_fck>; + clock-names = "fck"; }; timer2: timer@48040000 { @@ -353,6 +359,8 @@ reg = <0x48040000 0x400>; interrupts = ; ti,hwmods = "timer2"; + clocks = <&timer2_fck>; + clock-names = "fck"; }; timer3: timer@48042000 { @@ -936,7 +944,7 @@ dma-names = "tx", "rx"; }; - mcasp1: mcasp@4803C000 { + mcasp1: mcasp@4803c000 { compatible = "ti,am33xx-mcasp-audio"; ti,hwmods = "mcasp1"; reg = <0x4803C000 0x2000>, @@ -993,7 +1001,7 @@ reg = <0x483a8000 0x8000>; syscon-phy-power = <&scm_conf 0x620>; clocks = <&usb_phy0_always_on_clk32k>, - <&usb_otg_ss0_refclk960m>; + <&l4_per_clkctrl AM4_USB_OTG_SS0_CLKCTRL 8>; clock-names = "wkupclk", "refclk"; #phy-cells = <0>; status = "disabled"; @@ -1012,7 +1020,7 @@ reg = <0x483e8000 0x8000>; syscon-phy-power = <&scm_conf 0x628>; clocks = <&usb_phy1_always_on_clk32k>, - <&usb_otg_ss1_refclk960m>; + <&l4_per_clkctrl AM4_USB_OTG_SS1_CLKCTRL 8>; clock-names = "wkupclk", "refclk"; #phy-cells = <0>; status = "disabled"; @@ -1175,4 +1183,4 @@ }; }; -/include/ "am43xx-clocks.dtsi" +#include "am43xx-clocks.dtsi" Modified: head/sys/gnu/dts/arm/am437x-gp-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am437x-gp-evm.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am437x-gp-evm.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -55,7 +55,7 @@ enable-active-high; }; - backlight { + lcd_bl: backlight { compatible = "pwm-backlight"; pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>; brightness-levels = <0 51 53 56 62 75 101 152 255>; @@ -85,6 +85,8 @@ lcd0: display { compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; label = "lcd"; + + backlight = <&lcd_bl>; panel-timing { clock-frequency = <33000000>; Modified: head/sys/gnu/dts/arm/am437x-idk-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am437x-idk-evm.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am437x-idk-evm.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -519,3 +519,17 @@ &cpu { cpu0-supply = <&tps>; }; + +&cpu0_opp_table { + /* + * Supply voltage supervisor on board will not allow opp50 so + * disable it and set opp100 as suspend OPP. + */ + opp50@300000000 { + status = "disabled"; + }; + + opp100@600000000 { + opp-suspend; + }; +}; Modified: head/sys/gnu/dts/arm/am437x-sk-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am437x-sk-evm.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am437x-sk-evm.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -35,7 +35,7 @@ clock-frequency = <32768>; }; - backlight { + lcd_bl: backlight { compatible = "pwm-backlight"; pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>; brightness-levels = <0 51 53 56 62 75 101 152 255>; @@ -131,6 +131,8 @@ pinctrl-names = "default"; pinctrl-0 = <&lcd_pins>; + + backlight = <&lcd_bl>; enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; Modified: head/sys/gnu/dts/arm/am43x-epos-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am43x-epos-evm.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am43x-epos-evm.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -48,6 +48,8 @@ compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; label = "lcd"; + backlight = <&lcd_bl>; + panel-timing { clock-frequency = <33000000>; hactive = <800>; @@ -107,7 +109,7 @@ 0x03030069>; /* LEFT */ }; - backlight { + lcd_bl: backlight { compatible = "pwm-backlight"; pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>; brightness-levels = <0 51 53 56 62 75 101 152 255>; @@ -985,7 +987,11 @@ rx-num-evt = <32>; }; -&synctimer_32kclk { +&mux_synctimer32k_ck { assigned-clocks = <&mux_synctimer32k_ck>; assigned-clock-parents = <&clkdiv32k_ick>; +}; + +&cpu { + cpu0-supply = <&dcdc2>; }; Modified: head/sys/gnu/dts/arm/am43xx-clocks.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am43xx-clocks.dtsi Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am43xx-clocks.dtsi Fri Apr 20 19:37:08 2018 (r332839) @@ -524,54 +524,6 @@ reg = <0x4240>; }; - gpio0_dbclk: gpio0_dbclk@2b68 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&gpio0_dbclk_mux_ck>; - ti,bit-shift = <8>; - reg = <0x2b68>; - }; - - gpio1_dbclk: gpio1_dbclk@8c78 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ick>; - ti,bit-shift = <8>; - reg = <0x8c78>; - }; - - gpio2_dbclk: gpio2_dbclk@8c80 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ick>; - ti,bit-shift = <8>; - reg = <0x8c80>; - }; - - gpio3_dbclk: gpio3_dbclk@8c88 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ick>; - ti,bit-shift = <8>; - reg = <0x8c88>; - }; - - gpio4_dbclk: gpio4_dbclk@8c90 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ick>; - ti,bit-shift = <8>; - reg = <0x8c90>; - }; - - gpio5_dbclk: gpio5_dbclk@8c98 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkdiv32k_ick>; - ti,bit-shift = <8>; - reg = <0x8c98>; - }; - mmc_clk: mmc_clk { #clock-cells = <0>; compatible = "fixed-factor-clock"; @@ -629,14 +581,6 @@ reg = <0x4230>; }; - synctimer_32kclk: synctimer_32kclk@2a30 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&mux_synctimer32k_ck>; - ti,bit-shift = <8>; - reg = <0x2a30>; - }; - timer8_fck: timer8_fck@421c { #clock-cells = <0>; compatible = "ti,mux-clock"; @@ -763,110 +707,76 @@ ti,bit-shift = <8>; reg = <0x2a48>; }; +}; - usb_otg_ss0_refclk960m: usb_otg_ss0_refclk960m@8a60 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&dpll_per_clkdcoldo>; - ti,bit-shift = <8>; - reg = <0x8a60>; - }; +&prcm { + l4_wkup_cm: l4_wkup_cm@2800 { + compatible = "ti,omap4-cm"; + reg = <0x2800 0x400>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x2800 0x400>; - usb_otg_ss1_refclk960m: usb_otg_ss1_refclk960m@8a68 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&dpll_per_clkdcoldo>; - ti,bit-shift = <8>; - reg = <0x8a68>; + l4_wkup_clkctrl: clk@20 { + compatible = "ti,clkctrl"; + reg = <0x20 0x34c>; + #clock-cells = <2>; + }; }; - clkout1_osc_div_ck: clkout1_osc_div_ck { - #clock-cells = <0>; - compatible = "ti,divider-clock"; - clocks = <&sys_clkin_ck>; - ti,bit-shift = <20>; - ti,max-div = <4>; - reg = <0x4100>; - }; + mpu_cm: mpu_cm@8300 { + compatible = "ti,omap4-cm"; + reg = <0x8300 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x8300 0x100>; - clkout1_src2_mux_ck: clkout1_src2_mux_ck { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&clk_rc32k_ck>, <&sysclk_div>, <&dpll_ddr_m2_ck>, - <&dpll_per_m2_ck>, <&dpll_disp_m2_ck>, - <&dpll_mpu_m2_ck>; - reg = <0x4100>; + mpu_clkctrl: clk@20 { + compatible = "ti,clkctrl"; + reg = <0x20 0x4>; + #clock-cells = <2>; + }; }; - clkout1_src2_pre_div_ck: clkout1_src2_pre_div_ck { - #clock-cells = <0>; - compatible = "ti,divider-clock"; - clocks = <&clkout1_src2_mux_ck>; - ti,bit-shift = <4>; - ti,max-div = <8>; - reg = <0x4100>; - }; + gfx_l3_cm: gfx_l3_cm@8400 { + compatible = "ti,omap4-cm"; + reg = <0x8400 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x8400 0x100>; - clkout1_src2_post_div_ck: clkout1_src2_post_div_ck { - #clock-cells = <0>; - compatible = "ti,divider-clock"; - clocks = <&clkout1_src2_pre_div_ck>; - ti,bit-shift = <8>; - ti,max-div = <32>; - ti,index-power-of-two; - reg = <0x4100>; + gfx_l3_clkctrl: clk@20 { + compatible = "ti,clkctrl"; + reg = <0x20 0x4>; + #clock-cells = <2>; + }; }; - clkout1_mux_ck: clkout1_mux_ck { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&clkout1_osc_div_ck>, <&clk_rc32k_ck>, - <&clkout1_src2_post_div_ck>, <&dpll_extdev_m2_ck>; - ti,bit-shift = <16>; - reg = <0x4100>; - }; + l4_rtc_cm: l4_rtc_cm@8500 { + compatible = "ti,omap4-cm"; + reg = <0x8500 0x100>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x8500 0x100>; - clkout1_ck: clkout1_ck { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkout1_mux_ck>; - ti,bit-shift = <23>; - reg = <0x4100>; + l4_rtc_clkctrl: clk@20 { + compatible = "ti,clkctrl"; + reg = <0x20 0x4>; + #clock-cells = <2>; + }; }; - clkout2_src_mux_ck: clkout2_src_mux_ck { - #clock-cells = <0>; - compatible = "ti,mux-clock"; - clocks = <&clk_rc32k_ck>, <&sysclk_div>, <&dpll_ddr_m2_ck>, - <&dpll_per_m2_ck>, <&dpll_disp_m2_ck>, - <&dpll_mpu_m2_ck>, <&dpll_extdev_ck>; - reg = <0x4108>; - }; + l4_per_cm: l4_per_cm@8800 { + compatible = "ti,omap4-cm"; + reg = <0x8800 0xc00>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x8800 0xc00>; - clkout2_pre_div_ck: clkout2_pre_div_ck { - #clock-cells = <0>; - compatible = "ti,divider-clock"; - clocks = <&clkout2_src_mux_ck>; - ti,bit-shift = <4>; - ti,max-div = <8>; - reg = <0x4108>; - }; - - clkout2_post_div_ck: clkout2_post_div_ck { - #clock-cells = <0>; - compatible = "ti,divider-clock"; - clocks = <&clkout2_pre_div_ck>; - ti,bit-shift = <8>; - ti,max-div = <32>; - ti,index-power-of-two; - reg = <0x4108>; - }; - - clkout2_ck: clkout2_ck { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&clkout2_post_div_ck>; - ti,bit-shift = <16>; - reg = <0x4108>; + l4_per_clkctrl: clk@20 { + compatible = "ti,clkctrl"; + reg = <0x20 0xb04>; + #clock-cells = <2>; + }; }; }; Modified: head/sys/gnu/dts/arm/am571x-idk.dts ============================================================================== --- head/sys/gnu/dts/arm/am571x-idk.dts Fri Apr 20 18:46:06 2018 (r332838) +++ head/sys/gnu/dts/arm/am571x-idk.dts Fri Apr 20 19:37:08 2018 (r332839) @@ -117,3 +117,7 @@ pinctrl-1 = <&mmc2_pins_hs>; pinctrl-2 = <&mmc2_pins_ddr_rev20 &mmc2_iodelay_ddr_conf>; }; + +&cpu0 { + vdd-supply = <&smps12_reg>; +}; Copied: head/sys/gnu/dts/arm/am572x-idk-common.dtsi (from r332836, vendor/device-tree/dist/src/arm/am572x-idk-common.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am572x-idk-common.dtsi Fri Apr 20 19:37:08 2018 (r332839, copy of r332836, vendor/device-tree/dist/src/arm/am572x-idk-common.dtsi) @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ + */ + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 20 20:09:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69F5BF99709; Fri, 20 Apr 2018 20:09:43 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1AC166E717; Fri, 20 Apr 2018 20:09:43 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF9FC1CE1C; Fri, 20 Apr 2018 20:09:42 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KK9gOb026960; Fri, 20 Apr 2018 20:09:42 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KK9gMa026957; Fri, 20 Apr 2018 20:09:42 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804202009.w3KK9gMa026957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 20:09: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: r332840 - in stable/11/sys: netinet netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: in stable/11/sys: netinet netinet6 X-SVN-Commit-Revision: 332840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 20:09:43 -0000 Author: jtl Date: Fri Apr 20 20:09:42 2018 New Revision: 332840 URL: https://svnweb.freebsd.org/changeset/base/332840 Log: MFC r319214: Enforce the limit on ICMP messages before doing work to formulate the response. Delete an unneeded rate limit for UDP under IPv6. Because ICMP6 messages have their own rate limit, it is unnecessary to apply a second rate limit to UDP messages. Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet/ip_icmp.c stable/11/sys/netinet6/udp6_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_icmp.c ============================================================================== --- stable/11/sys/netinet/ip_icmp.c Fri Apr 20 19:37:08 2018 (r332839) +++ stable/11/sys/netinet/ip_icmp.c Fri Apr 20 20:09:42 2018 (r332840) @@ -555,11 +555,10 @@ icmp_input(struct mbuf **mp, int *offp, int proto) ICMPSTAT_INC(icps_bmcastecho); break; } - icp->icmp_type = ICMP_ECHOREPLY; if (badport_bandlim(BANDLIM_ICMP_ECHO) < 0) goto freeit; - else - goto reflect; + icp->icmp_type = ICMP_ECHOREPLY; + goto reflect; case ICMP_TSTAMP: if (V_icmptstamprepl == 0) @@ -573,13 +572,12 @@ icmp_input(struct mbuf **mp, int *offp, int proto) ICMPSTAT_INC(icps_badlen); break; } + if (badport_bandlim(BANDLIM_ICMP_TSTAMP) < 0) + goto freeit; icp->icmp_type = ICMP_TSTAMPREPLY; icp->icmp_rtime = iptime(); icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */ - if (badport_bandlim(BANDLIM_ICMP_TSTAMP) < 0) - goto freeit; - else - goto reflect; + goto reflect; case ICMP_MASKREQ: if (V_icmpmaskrepl == 0) Modified: stable/11/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/11/sys/netinet6/udp6_usrreq.c Fri Apr 20 19:37:08 2018 (r332839) +++ stable/11/sys/netinet6/udp6_usrreq.c Fri Apr 20 20:09:42 2018 (r332840) @@ -104,9 +104,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include @@ -465,8 +463,6 @@ udp6_input(struct mbuf **mp, int *offp, int proto) goto badunlocked; } if (V_udp_blackhole) - goto badunlocked; - if (badport_bandlim(BANDLIM_ICMP6_UNREACH) < 0) goto badunlocked; icmp6_error(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, 0); return (IPPROTO_DONE); From owner-svn-src-all@freebsd.org Fri Apr 20 20:16:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEA00F9A1FB; Fri, 20 Apr 2018 20:16:42 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7483E6F6DD; Fri, 20 Apr 2018 20:16:42 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DE9D1CFE5; Fri, 20 Apr 2018 20:16:42 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KKGgWs031938; Fri, 20 Apr 2018 20:16:42 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KKGghi031937; Fri, 20 Apr 2018 20:16:42 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804202016.w3KKGghi031937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 20:16: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: r332841 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 332841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 20:16:42 -0000 Author: jtl Date: Fri Apr 20 20:16:42 2018 New Revision: 332841 URL: https://svnweb.freebsd.org/changeset/base/332841 Log: MFC r319215: Fix two places in the ICMP6 code where we could dereference a NULL pointer in the icmp6_input() function. When processing an ICMP6_ECHO_REQUEST, if IP6_EXTHDR_GET fails, it will set nicmp6 and n to NULL. Therefore, we should condition our modification to nicmp6 on n being not NULL. And, when processing an ICMP6_WRUREQUEST in the (mode != FQDN) case, if m_dup_pkthdr() fails, the code will set n to NULL. However, the very next line dereferences n. Therefore, when m_dup_pkthdr() fails, we should discontinue further processing and follow the same path as when m_gethdr() fails. Reported by: clang static analyzer Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet6/icmp6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/icmp6.c ============================================================================== --- stable/11/sys/netinet6/icmp6.c Fri Apr 20 20:09:42 2018 (r332840) +++ stable/11/sys/netinet6/icmp6.c Fri Apr 20 20:16:42 2018 (r332841) @@ -596,9 +596,9 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) sizeof(*nicmp6)); noff = off; } - nicmp6->icmp6_type = ICMP6_ECHO_REPLY; - nicmp6->icmp6_code = 0; if (n) { + nicmp6->icmp6_type = ICMP6_ECHO_REPLY; + nicmp6->icmp6_code = 0; ICMP6STAT_INC(icp6s_reflect); ICMP6STAT_INC(icp6s_outhist[ICMP6_ECHO_REPLY]); icmp6_reflect(n, noff); @@ -688,6 +688,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) */ m_free(n); n = NULL; + break; } maxhlen = M_TRAILINGSPACE(n) - (sizeof(*nip6) + sizeof(*nicmp6) + 4); From owner-svn-src-all@freebsd.org Fri Apr 20 20:18:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB049F9A3E7; Fri, 20 Apr 2018 20:18:10 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A352704A1; Fri, 20 Apr 2018 20:18:10 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8544C1CFE6; Fri, 20 Apr 2018 20:18:10 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3KKIAA9032049; Fri, 20 Apr 2018 20:18:10 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KKIAw7032048; Fri, 20 Apr 2018 20:18:10 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804202018.w3KKIAw7032048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 20:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332842 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 332842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 20:18:11 -0000 Author: jtl Date: Fri Apr 20 20:18:10 2018 New Revision: 332842 URL: https://svnweb.freebsd.org/changeset/base/332842 Log: MFC r319216: Fix an unnecessary/incorrect check in the PKTOPT_EXTHDRCPY macro. This macro allocates memory and, if malloc does not return NULL, copies data into the new memory. However, it doesn't just check whether malloc returns NULL. It also checks whether we called malloc with M_NOWAIT. That is not necessary. While it may be that malloc() will only return NULL when the M_NOWAIT flag is set, we don't need to check for this when checking malloc's return value. Further, in this case, the check was not completely accurate, because it checked for flags == M_NOWAIT, rather than treating it as a bit field and checking for (flags & M_NOWAIT). Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Fri Apr 20 20:16:42 2018 (r332841) +++ stable/11/sys/netinet6/ip6_output.c Fri Apr 20 20:18:10 2018 (r332842) @@ -2421,7 +2421,7 @@ do {\ if (src->type) {\ int hlen = (((struct ip6_ext *)src->type)->ip6e_len + 1) << 3;\ dst->type = malloc(hlen, M_IP6OPT, canwait);\ - if (dst->type == NULL && canwait == M_NOWAIT)\ + if (dst->type == NULL)\ goto bad;\ bcopy(src->type, dst->type, hlen);\ }\ From owner-svn-src-all@freebsd.org Fri Apr 20 20:30:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15DD1F9E581; Fri, 20 Apr 2018 20:30:34 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFA11734AA; Fri, 20 Apr 2018 20:30: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 B662D1D18B; Fri, 20 Apr 2018 20:30: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 w3KKUXcn037051; Fri, 20 Apr 2018 20:30:33 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KKUXHs037049; Fri, 20 Apr 2018 20:30:33 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201804202030.w3KKUXHs037049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 20 Apr 2018 20:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332843 - head/sys/dev/extres/regulator X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/extres/regulator X-SVN-Commit-Revision: 332843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 20:30:34 -0000 Author: manu Date: Fri Apr 20 20:30:33 2018 New Revision: 332843 URL: https://svnweb.freebsd.org/changeset/base/332843 Log: regulator: Check status before disabling When disabling regulator when they are unused, check before is they are enabled. While here don't check the enable_cnt on the regulator entry as it is checked by regnode_stop. This solve the panic on any board using a fixed regulator that is driven by a gpio when the regulator is unused. Tested On: OrangePi One Pointy Hat to: myself Reported by: kevans, Milan Obuch (freebsd-arm@dino.sk) Modified: head/sys/dev/extres/regulator/regulator.c Modified: head/sys/dev/extres/regulator/regulator.c ============================================================================== --- head/sys/dev/extres/regulator/regulator.c Fri Apr 20 20:18:10 2018 (r332842) +++ head/sys/dev/extres/regulator/regulator.c Fri Apr 20 20:30:33 2018 (r332843) @@ -166,17 +166,19 @@ static void regulator_shutdown(void *dummy) { struct regnode *entry; + int status, ret; int disable = 1; REG_TOPO_SLOCK(); TUNABLE_INT_FETCH("hw.regulator.disable_unused", &disable); TAILQ_FOREACH(entry, ®node_list, reglist_link) { - if (entry->enable_cnt == 0 && - entry->std_param.always_on == 0 && disable) { + if (entry->std_param.always_on == 0 && disable) { if (bootverbose) printf("regulator: shuting down %s\n", entry->name); - regnode_stop(entry, 0); + ret = regnode_status(entry, &status); + if (ret == 0 && status == REGULATOR_STATUS_ENABLED) + regnode_stop(entry, 0); } } REG_TOPO_UNLOCK(); From owner-svn-src-all@freebsd.org Fri Apr 20 20:35:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA88F9ECB4; Fri, 20 Apr 2018 20:35:51 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FDF573D96; Fri, 20 Apr 2018 20:35:50 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wr0-f175.google.com with SMTP id q3-v6so16021712wrj.6; Fri, 20 Apr 2018 13:35:50 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YXyIurVF9nW8x6gh3Gozy+aDxM/rCgxGP7hJaALbEUw=; b=eFdnp8cp/ywplAcA0hHQZ4LMgIBPjK3kGtcRymcBGE3EY9k6/JywW6ipzEY3qOo7DF iIgEk/k9lWJlns2Ywdqx1QP3H/dJD0nPlbyYWcaR4KQ2SmmUTm4kxDHiKaAojATOteZU ePUpBU5PqijXMK6XhjFX+Dup0R4HrUl1dKf8iu9XrQHsI0NLyLfo8ytLGXhd312VYAQd Vp6epBdo09xIvuTP7IKpLumiIj9EKnoVABYYn3la9z9Esb7l6ccVuFEWF/3VuXDenhLF wtYa8XR3PHnPaBkkFafKUp/58lvIL26IX05397/o8OFcKVyE8inmyic1lerMexXaqN5O oYdw== X-Gm-Message-State: ALQs6tDty7k6AFQrmH/d0/5+7Dbn1aKJ/FVnsHV4QU0uofv+mNs4M27l EBOAf2OYa6wmPefOvpCT9zrM0LKg X-Google-Smtp-Source: AIpwx4/rjhpyYqokKURVxH2OfwyoKhN/SGCFPXgTFltZUp7TjFGvIJU9kAVBuFfBG7XeGwnxjS9TbA== X-Received: by 10.80.167.4 with SMTP id h4mr15804326edc.239.1524256544394; Fri, 20 Apr 2018 13:35:44 -0700 (PDT) Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com. [209.85.128.182]) by smtp.gmail.com with ESMTPSA id o6sm3993416edj.31.2018.04.20.13.35.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 13:35:44 -0700 (PDT) Received: by mail-wr0-f182.google.com with SMTP id h3-v6so26063469wrh.5; Fri, 20 Apr 2018 13:35:44 -0700 (PDT) X-Received: by 2002:adf:ab56:: with SMTP id r22-v6mr9434526wrc.228.1524256544095; Fri, 20 Apr 2018 13:35:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.199.203 with HTTP; Fri, 20 Apr 2018 13:35:43 -0700 (PDT) In-Reply-To: <201804201820.w3KIKthB073527@repo.freebsd.org> References: <201804201820.w3KIKthB073527@repo.freebsd.org> From: "Jonathan T. Looney" Date: Fri, 20 Apr 2018 16:35:43 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332833 - in head: contrib/llvm/include/llvm/CodeGen contrib/llvm/lib/CodeGen contrib/llvm/lib/Target/X86 contrib/llvm/lib/Target/X86/Disassembler contrib/llvm/tools/clang/include/clang... To: Dimitry Andric Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 20:35:52 -0000 On Fri, Apr 20, 2018 at 2:20 PM, Dimitry Andric wrote: > > Author: dim > Date: Fri Apr 20 18:20:55 2018 > New Revision: 332833 > URL: https://svnweb.freebsd.org/changeset/base/332833 > > Log: > Recommit r332501, with an additional upstream fix for "Cannot lower > EFLAGS copy that lives out of a basic block!" errors on i386. > > [...] > > Together, these should ensure clang does not use pushf/popf sequences to > save and restore flags, avoiding problems with unrelated flags (such as > the interrupt flag) being restored unexpectedly. > > Requested by: jtl > PR: 225330 > MFC after: 1 week Thanks (again)! Jonathan From owner-svn-src-all@freebsd.org Fri Apr 20 22:23:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CC53FA78E1; Fri, 20 Apr 2018 22:23:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E38076D947; Fri, 20 Apr 2018 22:23:38 +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 DE70E1E455; Fri, 20 Apr 2018 22:23:38 +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 w3KMNcHA096235; Fri, 20 Apr 2018 22:23:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3KMNcnT096231; Fri, 20 Apr 2018 22:23:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804202223.w3KMNcnT096231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 20 Apr 2018 22:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332844 - in head/usr.sbin/makefs: . cd9660 ffs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/usr.sbin/makefs: . cd9660 ffs X-SVN-Commit-Revision: 332844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2018 22:23:39 -0000 Author: emaste Date: Fri Apr 20 22:23:38 2018 New Revision: 332844 URL: https://svnweb.freebsd.org/changeset/base/332844 Log: makefs: tidy up reach-over source - cd9660 relies on an #include "iso.h" but does not build any .c files out of source, so remove reach-over .PATH - ffs does not rely on any sys/ headers, so remove -I from CFLAGS. - ffs_tables from sys/ is used by ffs; move the SRCS entry from the top- level Makefile to ffs' Makefile.inc. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/Makefile head/usr.sbin/makefs/cd9660/Makefile.inc head/usr.sbin/makefs/ffs/Makefile.inc Modified: head/usr.sbin/makefs/Makefile ============================================================================== --- head/usr.sbin/makefs/Makefile Fri Apr 20 20:30:33 2018 (r332843) +++ head/usr.sbin/makefs/Makefile Fri Apr 20 22:23:38 2018 (r332844) @@ -29,9 +29,6 @@ SRCS+= getid.c misc.c spec.c CFLAGS+=-I${SRCTOP}/contrib/mknod SRCS+= pack_dev.c -.PATH: ${SRCTOP}/sys/ufs/ffs -SRCS+= ffs_tables.c - CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= netbsd util sbuf Modified: head/usr.sbin/makefs/cd9660/Makefile.inc ============================================================================== --- head/usr.sbin/makefs/cd9660/Makefile.inc Fri Apr 20 20:30:33 2018 (r332843) +++ head/usr.sbin/makefs/cd9660/Makefile.inc Fri Apr 20 22:23:38 2018 (r332844) @@ -1,7 +1,7 @@ # $FreeBSD$ # -.PATH: ${SRCDIR}/cd9660 ${SRCTOP}/sys/fs/cd9660/ +.PATH: ${SRCDIR}/cd9660 CFLAGS+=-I${SRCTOP}/sys/fs/cd9660/ Modified: head/usr.sbin/makefs/ffs/Makefile.inc ============================================================================== --- head/usr.sbin/makefs/ffs/Makefile.inc Fri Apr 20 20:30:33 2018 (r332843) +++ head/usr.sbin/makefs/ffs/Makefile.inc Fri Apr 20 22:23:38 2018 (r332844) @@ -2,8 +2,8 @@ # .PATH: ${SRCDIR}/ffs ${SRCTOP}/sys/ufs/ffs - -CFLAGS+= -I${SRCTOP}/sys/ufs/ffs - SRCS+= ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c ufs_bmap.c SRCS+= buf.c mkfs.c + +# Reach-over source from sys/ufs/ffs +SRCS+= ffs_tables.c From owner-svn-src-all@freebsd.org Sat Apr 21 00:27:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAEBEFAEFD0; Sat, 21 Apr 2018 00:27:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 818056905E; Sat, 21 Apr 2018 00:27:35 +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 7B3761F730; Sat, 21 Apr 2018 00:27:35 +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 w3L0RZ1k056297; Sat, 21 Apr 2018 00:27:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3L0RZYT056296; Sat, 21 Apr 2018 00:27:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804210027.w3L0RZYT056296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 21 Apr 2018 00:27:35 +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: r332848 - stable/11/tools/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/tools/tools X-SVN-Commit-Revision: 332848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 00:27:36 -0000 Author: emaste Date: Sat Apr 21 00:27:35 2018 New Revision: 332848 URL: https://svnweb.freebsd.org/changeset/base/332848 Log: MFC r332673: Remove mention of tools/recoverdisk, now in sbin PR: 227570 Modified: stable/11/tools/tools/README Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/README ============================================================================== --- stable/11/tools/tools/README Fri Apr 20 22:41:40 2018 (r332847) +++ stable/11/tools/tools/README Sat Apr 21 00:27:35 2018 (r332848) @@ -54,7 +54,6 @@ pciid Generate src/share/misc/pci_vendors. pciroms A tool for dumping PCI ROM images. WARNING: alpha quality. pirtool A tool for dumping the $PIR table on i386 machines at runtime. portsinfo Generate list of new ports for last two weeks. -recoverdisk Copy as much data as possible from a defective disk. scsi-defects Get at the primary or grown defect list of a SCSI disk. sysdoc Build a manual page with available sysctls for a specific kernel configuration. From owner-svn-src-all@freebsd.org Sat Apr 21 00:34:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84526FAF72F; Sat, 21 Apr 2018 00:34:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 386DB6BB9F; Sat, 21 Apr 2018 00:34:47 +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 2C5FE1F8B9; Sat, 21 Apr 2018 00:34:47 +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 w3L0Ykwt061068; Sat, 21 Apr 2018 00:34:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3L0Yk1L061067; Sat, 21 Apr 2018 00:34:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201804210034.w3L0Yk1L061067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 21 Apr 2018 00:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332849 - head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD X-SVN-Commit-Revision: 332849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 00:34:47 -0000 Author: emaste Date: Sat Apr 21 00:34:46 2018 New Revision: 332849 URL: https://svnweb.freebsd.org/changeset/base/332849 Log: lldb: propagate error to user if memory read fails Previously, an attempt to read an unreadable access reported zeros: (lldb) memory read -format hex -size 8 0 0x00000000: 0x0000000000000000 0x0000000000000000 0x00000010: 0x0000000000000000 0x0000000000000000 ... Now, if DoReadMemory encounters error then return 0 (bytes read) so we report the error to the user: (lldb) memory read -format hex -size 8 0 error: Bad address LLVM PR: 37190 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Sat Apr 21 00:27:35 2018 (r332848) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Sat Apr 21 00:34:46 2018 (r332849) @@ -163,8 +163,10 @@ static size_t DoReadMemory(lldb::pid_t pid, lldb::addr pi_desc.piod_addr = buf; pi_desc.piod_len = size; - if (PTRACE(PT_IO, pid, (caddr_t)&pi_desc, 0) < 0) + if (PTRACE(PT_IO, pid, (caddr_t)&pi_desc, 0) < 0) { error.SetErrorToErrno(); + return 0; + } return pi_desc.piod_len; } From owner-svn-src-all@freebsd.org Sat Apr 21 01:02:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B56B9FB14C7; Sat, 21 Apr 2018 01:02:36 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF3896FF46; Sat, 21 Apr 2018 01:02:35 +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 A98BC1FD68; Sat, 21 Apr 2018 01:02:35 +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 w3L12Zwt075849; Sat, 21 Apr 2018 01:02:35 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3L12ZUg075848; Sat, 21 Apr 2018 01:02:35 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804210102.w3L12ZUg075848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 21 Apr 2018 01:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332850 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 01:02:36 -0000 Author: kevans Date: Sat Apr 21 01:02:35 2018 New Revision: 332850 URL: https://svnweb.freebsd.org/changeset/base/332850 Log: bsdgrep: Some light cleanup There's no point checking for a bunch of file modes if we're not a practicing believer of DIR_SKIP or DEV_SKIP. This also reduces some style violations that were particularly ugly looking when browsing through. Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Sat Apr 21 00:34:46 2018 (r332849) +++ head/usr.bin/grep/util.c Sat Apr 21 01:02:35 2018 (r332850) @@ -308,14 +308,14 @@ procfile(const char *fn) fn = label != NULL ? label : getstr(1); f = grep_open(NULL); } else { - if (!stat(fn, &sb)) { + if (stat(fn, &sb) == 0) { /* Check if we need to process the file */ s = sb.st_mode & S_IFMT; - if (s == S_IFDIR && dirbehave == DIR_SKIP) + if (dirbehave == DIR_SKIP && s == S_IFDIR) return (0); - if ((s == S_IFIFO || s == S_IFCHR || s == S_IFBLK - || s == S_IFSOCK) && devbehave == DEV_SKIP) - return (0); + if (devbehave == DEV_SKIP && (s == S_IFIFO || + s == S_IFCHR || s == S_IFBLK || s == S_IFSOCK)) + return (0); } f = grep_open(fn); } From owner-svn-src-all@freebsd.org Sat Apr 21 01:33:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B54FB35EE; Sat, 21 Apr 2018 01:33:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 836C9755A0; Sat, 21 Apr 2018 01:33:13 +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 7D72420312; Sat, 21 Apr 2018 01:33:13 +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 w3L1XD5g090487; Sat, 21 Apr 2018 01:33:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3L1XDgv090486; Sat, 21 Apr 2018 01:33:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804210133.w3L1XDgv090486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 21 Apr 2018 01:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332851 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 01:33:14 -0000 Author: kevans Date: Sat Apr 21 01:33:13 2018 New Revision: 332851 URL: https://svnweb.freebsd.org/changeset/base/332851 Log: bsdgrep: More trivial cleanup/style cleanup We can avoid branching for these easily reduced patterns Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Sat Apr 21 01:02:35 2018 (r332850) +++ head/usr.bin/grep/util.c Sat Apr 21 01:33:13 2018 (r332851) @@ -110,11 +110,8 @@ file_matching(const char *fname) for (unsigned int i = 0; i < fpatterns; ++i) { if (fnmatch(fpattern[i].pat, fname, 0) == 0 || fnmatch(fpattern[i].pat, fname_base, 0) == 0) { - if (fpattern[i].mode == EXCL_PAT) { - ret = false; - break; - } else - ret = true; + ret = (fpattern[i].mode != EXCL_PAT); + break; } } free(fname_buf); @@ -129,13 +126,8 @@ dir_matching(const char *dname) ret = dinclude ? false : true; for (unsigned int i = 0; i < dpatterns; ++i) { - if (dname != NULL && - fnmatch(dpattern[i].pat, dname, 0) == 0) { - if (dpattern[i].mode == EXCL_PAT) - return (false); - else - ret = true; - } + if (dname != NULL && fnmatch(dpattern[i].pat, dname, 0) == 0) + return (dpattern[i].mode != EXCL_PAT); } return (ret); } @@ -164,7 +156,6 @@ grep_tree(char **argv) break; default: fts_flags = FTS_LOGICAL; - } fts_flags |= FTS_NOSTAT | FTS_NOCHDIR; @@ -193,7 +184,7 @@ grep_tree(char **argv) case FTS_DC: /* Print a warning for recursive directory loop */ warnx("warning: %s: recursive directory loop", - p->fts_path); + p->fts_path); break; default: /* Check for file exclusion/inclusion */ From owner-svn-src-all@freebsd.org Sat Apr 21 02:08:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 012C9F86876; Sat, 21 Apr 2018 02:08: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A99477E163; Sat, 21 Apr 2018 02:08: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 A48BB20954; Sat, 21 Apr 2018 02:08: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 w3L28uOT005675; Sat, 21 Apr 2018 02:08:56 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3L28uCk005672; Sat, 21 Apr 2018 02:08:56 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201804210208.w3L28uCk005672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 21 Apr 2018 02:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332853 - in head/sys: conf modules/blake2 modules/crypto X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: conf modules/blake2 modules/crypto X-SVN-Commit-Revision: 332853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 02:08:57 -0000 Author: cem Date: Sat Apr 21 02:08:56 2018 New Revision: 332853 URL: https://svnweb.freebsd.org/changeset/base/332853 Log: blake2: Disable warnings (not just error) for code we will not modify Leave libb2 pristine and silence the warnings for mjg. Modified: head/sys/conf/files head/sys/modules/blake2/Makefile head/sys/modules/crypto/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Apr 21 01:42:02 2018 (r332852) +++ head/sys/conf/files Sat Apr 21 02:08:56 2018 (r332853) @@ -653,11 +653,11 @@ contrib/zstd/lib/decompress/zstd_decompress.c standard contrib/zstd/lib/decompress/huf_decompress.c standard compile-with ${ZSTD_C} # Blake 2 contrib/libb2/blake2b-ref.c optional crypto | ipsec | ipsec_support \ - compile-with "${NORMAL_C} -I$S/crypto/blake2 ${NO_WCAST_QUAL} -DSUFFIX=_ref" + compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" contrib/libb2/blake2s-ref.c optional crypto | ipsec | ipsec_support \ - compile-with "${NORMAL_C} -I$S/crypto/blake2 ${NO_WCAST_QUAL} -DSUFFIX=_ref" + compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" crypto/blake2/blake2-sw.c optional crypto | ipsec | ipsec_support \ - compile-with "${NORMAL_C} -I$S/crypto/blake2 ${NO_WCAST_QUAL}" + compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual" crypto/blowfish/bf_ecb.c optional ipsec | ipsec_support crypto/blowfish/bf_skey.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support Modified: head/sys/modules/blake2/Makefile ============================================================================== --- head/sys/modules/blake2/Makefile Sat Apr 21 01:42:02 2018 (r332852) +++ head/sys/modules/blake2/Makefile Sat Apr 21 02:08:56 2018 (r332853) @@ -61,7 +61,7 @@ CFLAGS.blake2s-xop.c += -DSUFFIX=_xop -msse2 -mssse3 - .for src in ${SRCS_IN} ${src:S/.c/.o/}: ${src} ${CC} -c ${CFLAGS:N-nostdinc} ${CFLAGS.${src}} ${WERROR} ${PROF} \ - -D_MM_MALLOC_H_INCLUDED ${.IMPSRC} + -D_MM_MALLOC_H_INCLUDED -Wno-unused-function ${.IMPSRC} ${CTFCONVERT_CMD} ${src:S/.c/.o/}: intrin.h emmintrin.h tmmintrin.h smmintrin.h immintrin.h \ @@ -86,5 +86,5 @@ WARNS ?= 6 .include -CWARNFLAGS.blake2-dispatch.c += -Wno-error=unused-const-variable -CWARNFLAGS += ${NO_WCAST_QUAL} +CWARNFLAGS.blake2-dispatch.c += -Wno-unused-const-variable +CWARNFLAGS += -Wno-cast-qual Modified: head/sys/modules/crypto/Makefile ============================================================================== --- head/sys/modules/crypto/Makefile Sat Apr 21 01:42:02 2018 (r332852) +++ head/sys/modules/crypto/Makefile Sat Apr 21 02:08:56 2018 (r332853) @@ -40,8 +40,8 @@ SRCS += blake2-sw.c CFLAGS.blake2b-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref CFLAGS.blake2s-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref CFLAGS.blake2-sw.c += -I${SRCTOP}/sys/crypto/blake2 -CWARNFLAGS.blake2b-ref.c += ${NO_WCAST_QUAL} -CWARNFLAGS.blake2s-ref.c += ${NO_WCAST_QUAL} +CWARNFLAGS.blake2b-ref.c += -Wno-cast-qual +CWARNFLAGS.blake2s-ref.c += -Wno-cast-qual SRCS += chacha.c SRCS += chacha-sw.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h From owner-svn-src-all@freebsd.org Sat Apr 21 01:42:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37202FB416C; Sat, 21 Apr 2018 01:42:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDABF782D0; Sat, 21 Apr 2018 01:42:02 +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 D752A20521; Sat, 21 Apr 2018 01:42:02 +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 w3L1g2ge094660; Sat, 21 Apr 2018 01:42:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3L1g27q094659; Sat, 21 Apr 2018 01:42:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804210142.w3L1g27q094659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 21 Apr 2018 01:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332852 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 01:42:03 -0000 Author: kevans Date: Sat Apr 21 01:42:02 2018 New Revision: 332852 URL: https://svnweb.freebsd.org/changeset/base/332852 Log: bsdgrep: if chain => switch This makes some of this a little easier to follow (in my opinion). Modified: head/usr.bin/grep/file.c Modified: head/usr.bin/grep/file.c ============================================================================== --- head/usr.bin/grep/file.c Sat Apr 21 01:33:13 2018 (r332851) +++ head/usr.bin/grep/file.c Sat Apr 21 01:42:02 2018 (r332852) @@ -86,6 +86,9 @@ static inline int grep_refill(struct file *f) { ssize_t nr; +#ifndef WITHOUT_LZMA + lzma_ret lzmaret; +#endif if (filebehave == FILE_MMAP) return (0); @@ -93,41 +96,52 @@ grep_refill(struct file *f) bufpos = buffer; bufrem = 0; - if (filebehave == FILE_GZIP) { + switch (filebehave) { + case FILE_GZIP: nr = gzread(gzbufdesc, buffer, MAXBUFSIZ); + break; #ifndef WITHOUT_BZIP2 - } else if (filebehave == FILE_BZIP && bzbufdesc != NULL) { - int bzerr; + case FILE_BZIP: + if (bzbufdesc != NULL) { + int bzerr; - nr = BZ2_bzRead(&bzerr, bzbufdesc, buffer, MAXBUFSIZ); - switch (bzerr) { - case BZ_OK: - case BZ_STREAM_END: - /* No problem, nr will be okay */ - break; - case BZ_DATA_ERROR_MAGIC: + nr = BZ2_bzRead(&bzerr, bzbufdesc, buffer, MAXBUFSIZ); + switch (bzerr) { + case BZ_OK: + case BZ_STREAM_END: + /* No problem, nr will be okay */ + break; + case BZ_DATA_ERROR_MAGIC: + /* + * As opposed to gzread(), which simply returns the + * plain file data, if it is not in the correct + * compressed format, BZ2_bzRead() instead aborts. + * + * So, just restart at the beginning of the file again, + * and use plain reads from now on. + */ + BZ2_bzReadClose(&bzerr, bzbufdesc); + bzbufdesc = NULL; + if (lseek(f->fd, 0, SEEK_SET) == -1) + return (-1); + nr = read(f->fd, buffer, MAXBUFSIZ); + break; + default: + /* Make sure we exit with an error */ + nr = -1; + } + } else /* - * As opposed to gzread(), which simply returns the - * plain file data, if it is not in the correct - * compressed format, BZ2_bzRead() instead aborts. - * - * So, just restart at the beginning of the file again, - * and use plain reads from now on. + * Also an error case; we should never have a scenario + * where we have an open file but no bzip descriptor + * at this point. See: grep_open */ - BZ2_bzReadClose(&bzerr, bzbufdesc); - bzbufdesc = NULL; - if (lseek(f->fd, 0, SEEK_SET) == -1) - return (-1); - nr = read(f->fd, buffer, MAXBUFSIZ); - break; - default: - /* Make sure we exit with an error */ nr = -1; - } + break; #endif #ifndef WITHOUT_LZMA - } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { - lzma_ret ret; + case FILE_XZ: + case FILE_LZMA: lstrm.next_out = buffer; do { @@ -143,23 +157,23 @@ grep_refill(struct file *f) lstrm.avail_in = nr; } - ret = lzma_code(&lstrm, laction); + lzmaret = lzma_code(&lstrm, laction); - if (ret != LZMA_OK && ret != LZMA_STREAM_END) + if (lzmaret != LZMA_OK && lzmaret != LZMA_STREAM_END) return (-1); - if (lstrm.avail_out == 0 || ret == LZMA_STREAM_END) { + if (lstrm.avail_out == 0 || lzmaret == LZMA_STREAM_END) { bufrem = MAXBUFSIZ - lstrm.avail_out; lstrm.next_out = buffer; lstrm.avail_out = MAXBUFSIZ; } - } while (bufrem == 0 && ret != LZMA_STREAM_END); + } while (bufrem == 0 && lzmaret != LZMA_STREAM_END); return (0); -#endif /* WIHTOUT_LZMA */ - } else +#endif /* WITHOUT_LZMA */ + default: nr = read(f->fd, buffer, MAXBUFSIZ); - + } if (nr < 0) return (-1); @@ -255,6 +269,9 @@ struct file * grep_open(const char *path) { struct file *f; +#ifndef WITHOUT_LZMA + lzma_ret lzmaret; +#endif f = grep_malloc(sizeof *f); memset(f, 0, sizeof *f); @@ -292,30 +309,34 @@ grep_open(const char *path) if ((buffer == NULL) || (buffer == MAP_FAILED)) buffer = grep_malloc(MAXBUFSIZ); - if (filebehave == FILE_GZIP && - (gzbufdesc = gzdopen(f->fd, "r")) == NULL) - goto error2; - + switch (filebehave) { + case FILE_GZIP: + if ((gzbufdesc = gzdopen(f->fd, "r")) == NULL) + goto error2; + break; #ifndef WITHOUT_BZIP2 - if (filebehave == FILE_BZIP && - (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) - goto error2; + case FILE_BZIP: + if ((bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) + goto error2; + break; #endif #ifndef WITHOUT_LZMA - else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { - lzma_ret ret; + case FILE_XZ: + case FILE_LZMA: - ret = (filebehave == FILE_XZ) ? - lzma_stream_decoder(&lstrm, UINT64_MAX, - LZMA_CONCATENATED) : - lzma_alone_decoder(&lstrm, UINT64_MAX); + if (filebehave == FILE_XZ) + lzmaret = lzma_stream_decoder(&lstrm, UINT64_MAX, + LZMA_CONCATENATED); + else + lzmaret = lzma_alone_decoder(&lstrm, UINT64_MAX); - if (ret != LZMA_OK) + if (lzmaret != LZMA_OK) goto error2; lstrm.avail_in = 0; lstrm.avail_out = MAXBUFSIZ; laction = LZMA_RUN; + break; } #endif @@ -326,7 +347,7 @@ grep_open(const char *path) /* Check for binary stuff, if necessary */ if (binbehave != BINFILE_TEXT && fileeol != '\0' && memchr(bufpos, '\0', bufrem) != NULL) - f->binary = true; + f->binary = true; return (f); From owner-svn-src-all@freebsd.org Sat Apr 21 04:18:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39171F9820E; Sat, 21 Apr 2018 04:18:18 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAAA27B122; Sat, 21 Apr 2018 04:18:17 +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 D5A462209C; Sat, 21 Apr 2018 04:18:17 +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 w3L4IHRb071357; Sat, 21 Apr 2018 04:18:17 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3L4IHaB071355; Sat, 21 Apr 2018 04:18:17 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201804210418.w3L4IHaB071355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 21 Apr 2018 04:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332854 - in head/sys/powerpc: include powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: include powerpc X-SVN-Commit-Revision: 332854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 04:18:18 -0000 Author: jhibbits Date: Sat Apr 21 04:18:17 2018 New Revision: 332854 URL: https://svnweb.freebsd.org/changeset/base/332854 Log: Sync powerpc feature flags with Linux Not all feature flags are synced. Those for processors we don't currently support are ignored currently. Those that are supported are synced best I can tell. One flag was renamed to match the Linux flag name (PPC_FEATURE2_VCRYPTO -> PPC_FEATURE2_VEC_CRYPTO). Modified: head/sys/powerpc/include/cpu.h head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Sat Apr 21 02:08:56 2018 (r332853) +++ head/sys/powerpc/include/cpu.h Sat Apr 21 04:18:17 2018 (r332854) @@ -54,6 +54,7 @@ extern int cpu_features2; #define PPC_FEATURE_32 0x80000000 /* Always true */ #define PPC_FEATURE_64 0x40000000 /* Defined on a 64-bit CPU */ +#define PPC_FEATURE_601_INSTR 0x20000000 /* Defined on a 64-bit CPU */ #define PPC_FEATURE_HAS_ALTIVEC 0x10000000 #define PPC_FEATURE_HAS_FPU 0x08000000 #define PPC_FEATURE_HAS_MMU 0x04000000 @@ -61,26 +62,45 @@ extern int cpu_features2; #define PPC_FEATURE_HAS_SPE 0x00800000 #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 +#define PPC_FEATURE_NO_TB 0x00100000 +#define PPC_FEATURE_POWER4 0x00080000 +#define PPC_FEATURE_POWER5 0x00040000 +#define PPC_FEATURE_POWER5_PLUS 0x00020000 +#define PPC_FEATURE_CELL 0x00010000 #define PPC_FEATURE_BOOKE 0x00008000 #define PPC_FEATURE_SMT 0x00004000 +#define PPC_FEATURE_ICACHE_SNOOP 0x00002000 #define PPC_FEATURE_ARCH_2_05 0x00001000 #define PPC_FEATURE_HAS_DFP 0x00000400 +#define PPC_FEATURE_POWER6_EXT 0x00000200 #define PPC_FEATURE_ARCH_2_06 0x00000100 #define PPC_FEATURE_HAS_VSX 0x00000080 +#define PPC_FEATURE_TRUE_LE 0x00000002 +#define PPC_FEATURE_PPC_LE 0x00000001 #define PPC_FEATURE2_ARCH_2_07 0x80000000 -#define PPC_FEATURE2_HAS_HTM 0x40000000 +#define PPC_FEATURE2_HTM 0x40000000 +#define PPC_FEATURE2_DSCR 0x20000000 #define PPC_FEATURE2_ISEL 0x08000000 -#define PPC_FEATURE2_HAS_VCRYPTO 0x02000000 +#define PPC_FEATURE2_TAR 0x04000000 +#define PPC_FEATURE2_HAS_VEC_CRYPTO 0x02000000 +#define PPC_FEATURE2_HTM_NOSC 0x01000000 +#define PPC_FEATURE2_ARCH_3_00 0x00800000 +#define PPC_FEATURE2_HAS_IEEE128 0x00400000 +#define PPC_FEATURE2_DARN 0x00200000 +#define PPC_FEATURE2_SCV 0x00100000 +#define PPC_FEATURE2_HTM_NOSUSPEND 0x01000000 #define PPC_FEATURE_BITMASK \ "\20" \ - "\040PPC32\037PPC64\035ALTIVEC\034FPU\033MMU\031UNIFIEDCACHE" \ - "\030SPE\027SPESFP\026DPESFP\020BOOKE\017SMT\015ARCH205\013DFP" \ - "\011ARCH206\010VSX" + "\040PPC32\037PPC64\036PPC601\035ALTIVEC\034FPU\033MMU\031UNIFIEDCACHE" \ + "\030SPE\027SPESFP\026DPESFP\025NOTB\024POWER4\023POWER5\022P5PLUS\021CELL"\ + "\020BOOKE\017SMT\016ISNOOP\015ARCH205\013DFP\011ARCH206\010VSX"\ + "\002TRUELE\001PPCLE" #define PPC_FEATURE2_BITMASK \ "\20" \ - "\040ARCH207\037HTM\034ISEL\032VCRYPTO" + "\040ARCH207\037HTM\036DSCR\034ISEL\033TAR\032VCRYPTO\031HTMNOSC" \ + "\030ARCH300\027IEEE128\026DARN\025SCV\024HTMNOSUSP" #define TRAPF_USERMODE(frame) (((frame)->srr1 & PSL_PR) != 0) #define TRAPF_PC(frame) ((frame)->srr0) Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sat Apr 21 02:08:56 2018 (r332853) +++ head/sys/powerpc/powerpc/cpu.c Sat Apr 21 04:18:17 2018 (r332854) @@ -139,42 +139,49 @@ static const struct cputab models[] = { PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, 0, cpu_970_setup }, { "IBM POWER4", IBMPOWER4, REVFMT_MAJMIN, - PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU, 0, NULL }, + PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU | PPC_FEATURE_POWER4, 0, NULL }, { "IBM POWER4+", IBMPOWER4PLUS, REVFMT_MAJMIN, - PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU, 0, NULL }, + PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU | PPC_FEATURE_POWER4, 0, NULL }, { "IBM POWER5", IBMPOWER5, REVFMT_MAJMIN, - PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU | PPC_FEATURE_SMT, 0, NULL }, + PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU | PPC_FEATURE_POWER4 | + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP, 0, NULL }, { "IBM POWER5+", IBMPOWER5PLUS, REVFMT_MAJMIN, - PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU | PPC_FEATURE_SMT, 0, NULL }, + PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU | PPC_FEATURE_POWER5_PLUS | + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP, 0, NULL }, { "IBM POWER6", IBMPOWER6, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | - PPC_FEATURE_SMT | PPC_FEATURE_ARCH_2_05, 0, NULL }, + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | PPC_FEATURE_ARCH_2_05 | + PPC_FEATURE_TRUE_LE, 0, NULL }, { "IBM POWER7", IBMPOWER7, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | PPC_FEATURE_SMT | PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | - PPC_FEATURE_HAS_VSX, 0, NULL }, + PPC_FEATURE_HAS_VSX | PPC_FEATURE_TRUE_LE, PPC_FEATURE2_DSCR, NULL }, { "IBM POWER7+", IBMPOWER7PLUS, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | PPC_FEATURE_SMT | PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | - PPC_FEATURE_HAS_VSX, 0, NULL }, + PPC_FEATURE_HAS_VSX, PPC_FEATURE2_DSCR, NULL }, { "IBM POWER8E", IBMPOWER8E, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | - PPC_FEATURE_SMT | PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | - PPC_FEATURE_HAS_VSX, - PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HAS_HTM | PPC_FEATURE2_ISEL | - PPC_FEATURE2_HAS_VCRYPTO, cpu_powerx_setup }, + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | PPC_FEATURE_ARCH_2_05 | + PPC_FEATURE_ARCH_2_06 | PPC_FEATURE_HAS_VSX | PPC_FEATURE_TRUE_LE, + PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HTM | PPC_FEATURE2_DSCR | + PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | PPC_FEATURE2_HAS_VEC_CRYPTO | + PPC_FEATURE2_HTM_NOSC, cpu_powerx_setup }, { "IBM POWER8", IBMPOWER8, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | - PPC_FEATURE_SMT | PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | - PPC_FEATURE_HAS_VSX, - PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HAS_HTM | PPC_FEATURE2_ISEL | - PPC_FEATURE2_HAS_VCRYPTO, cpu_powerx_setup }, + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | PPC_FEATURE_ARCH_2_05 | + PPC_FEATURE_ARCH_2_06 | PPC_FEATURE_HAS_VSX | PPC_FEATURE_TRUE_LE, + PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HTM | PPC_FEATURE2_DSCR | + PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | PPC_FEATURE2_HAS_VEC_CRYPTO | + PPC_FEATURE2_HTM_NOSC, cpu_powerx_setup }, { "IBM POWER9", IBMPOWER9, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | - PPC_FEATURE_SMT | PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | - PPC_FEATURE_HAS_VSX, - PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HAS_HTM | PPC_FEATURE2_ISEL | - PPC_FEATURE2_HAS_VCRYPTO, NULL }, + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | PPC_FEATURE_ARCH_2_05 | + PPC_FEATURE_ARCH_2_06 | PPC_FEATURE_HAS_VSX | PPC_FEATURE_TRUE_LE, + PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HTM | PPC_FEATURE2_DSCR | + PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | PPC_FEATURE2_HAS_VEC_CRYPTO | + PPC_FEATURE2_ARCH_3_00 | PPC_FEATURE2_HAS_IEEE128 | + PPC_FEATURE2_DARN, NULL }, { "Motorola PowerPC 7400", MPC7400, REVFMT_MAJMIN, PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU, 0, cpu_6xx_setup }, { "Motorola PowerPC 7410", MPC7410, REVFMT_MAJMIN, @@ -194,24 +201,27 @@ static const struct cputab models[] = { { "Motorola PowerPC 8245", MPC8245, REVFMT_MAJMIN, PPC_FEATURE_HAS_FPU, 0, cpu_6xx_setup }, { "Freescale e500v1 core", FSL_E500v1, REVFMT_MAJMIN, - PPC_FEATURE_BOOKE | PPC_FEATURE_HAS_SPE | PPC_FEATURE_HAS_EFP_SINGLE, + PPC_FEATURE_HAS_SPE | PPC_FEATURE_HAS_EFP_SINGLE | PPC_FEATURE_BOOKE, PPC_FEATURE2_ISEL, cpu_booke_setup }, { "Freescale e500v2 core", FSL_E500v2, REVFMT_MAJMIN, - PPC_FEATURE_BOOKE | PPC_FEATURE_HAS_SPE | + PPC_FEATURE_HAS_SPE | PPC_FEATURE_BOOKE | PPC_FEATURE_HAS_EFP_SINGLE | PPC_FEATURE_HAS_EFP_DOUBLE, PPC_FEATURE2_ISEL, cpu_booke_setup }, { "Freescale e500mc core", FSL_E500mc, REVFMT_MAJMIN, - PPC_FEATURE_BOOKE | PPC_FEATURE_HAS_FPU, PPC_FEATURE2_ISEL, + PPC_FEATURE_HAS_FPU | PPC_FEATURE_BOOKE | PPC_FEATURE_ARCH_2_05 | + PPC_FEATURE_ARCH_2_06, PPC_FEATURE2_ISEL, cpu_booke_setup }, { "Freescale e5500 core", FSL_E5500, REVFMT_MAJMIN, - PPC_FEATURE_BOOKE | PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU, + PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU | PPC_FEATURE_BOOKE | + PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06, PPC_FEATURE2_ISEL, cpu_booke_setup }, { "Freescale e6500 core", FSL_E6500, REVFMT_MAJMIN, - PPC_FEATURE_BOOKE | PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | - PPC_FEATURE_HAS_FPU, PPC_FEATURE2_ISEL, cpu_booke_setup }, + PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | + PPC_FEATURE_BOOKE | PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06, + PPC_FEATURE2_ISEL, cpu_booke_setup }, { "IBM Cell Broadband Engine", IBMCELLBE, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | - PPC_FEATURE_SMT, 0, NULL}, + PPC_FEATURE_CELL | PPC_FEATURE_SMT, 0, NULL}, { "Unknown PowerPC CPU", 0, REVFMT_HEX, 0, 0, NULL }, }; From owner-svn-src-all@freebsd.org Sat Apr 21 09:58:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58DF7FB49F6; Sat, 21 Apr 2018 09:58:01 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E91387D5D; Sat, 21 Apr 2018 09:58:01 +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 0969325670; Sat, 21 Apr 2018 09:58:01 +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 w3L9w0Wl040864; Sat, 21 Apr 2018 09:58:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3L9w0q0040863; Sat, 21 Apr 2018 09:58:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201804210958.w3L9w0q0040863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 21 Apr 2018 09:58: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: r332855 - stable/11/usr.bin/clang/clang X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/usr.bin/clang/clang X-SVN-Commit-Revision: 332855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 09:58:01 -0000 Author: dim Date: Sat Apr 21 09:58:00 2018 New Revision: 332855 URL: https://svnweb.freebsd.org/changeset/base/332855 Log: MFC r332414: Regenerate clang man page after upstream change to document the possible values for the -std= option. Noticed by: Steve Kargl Obtained from: https://reviews.llvm.org/rL329827 Modified: stable/11/usr.bin/clang/clang/clang.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/clang/clang/clang.1 ============================================================================== --- stable/11/usr.bin/clang/clang/clang.1 Sat Apr 21 04:18:17 2018 (r332854) +++ stable/11/usr.bin/clang/clang/clang.1 Sat Apr 21 09:58:00 2018 (r332855) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "CLANG" "1" "Dec 24, 2017" "6" "Clang" +.TH "CLANG" "1" "Apr 11, 2018" "6" "Clang" .SH NAME clang \- the Clang C, C++, and Objective-C compiler . @@ -128,10 +128,265 @@ Treat subsequent input files as having type language. .UNINDENT .INDENT 0.0 .TP -.B \-std= +.B \-std= Specify the language standard to compile for. +.sp +Supported values for the C language are: +.INDENT 7.0 +.INDENT 3.5 +.nf +\fBc89\fP +\fBc90\fP +\fBiso9899:1990\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C 1990 .UNINDENT +.UNINDENT +.nf +\fBiso9899:199409\fP +.fi +.sp .INDENT 0.0 +.INDENT 3.5 +ISO C 1990 with amendment 1 +.UNINDENT +.UNINDENT +.nf +\fBgnu89\fP +\fBgnu90\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C 1990 with GNU extensions +.UNINDENT +.UNINDENT +.nf +\fBc99\fP +\fBiso9899:1999\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C 1999 +.UNINDENT +.UNINDENT +.nf +\fBgnu99\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C 1999 with GNU extensions +.UNINDENT +.UNINDENT +.nf +\fBc11\fP +\fBiso9899:2011\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C 2011 +.UNINDENT +.UNINDENT +.nf +\fBgnu11\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C 2011 with GNU extensions +.UNINDENT +.UNINDENT +.nf +\fBc17\fP +\fBiso9899:2017\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C 2017 +.UNINDENT +.UNINDENT +.nf +\fBgnu17\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C 2017 with GNU extensions +.UNINDENT +.UNINDENT +.UNINDENT +.UNINDENT +.sp +The default C language standard is \fBgnu11\fP, except on PS4, where it is +\fBgnu99\fP\&. +.sp +Supported values for the C++ language are: +.INDENT 7.0 +.INDENT 3.5 +.nf +\fBc++98\fP +\fBc++03\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C++ 1998 with amendments +.UNINDENT +.UNINDENT +.nf +\fBgnu++98\fP +\fBgnu++03\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C++ 1998 with amendments and GNU extensions +.UNINDENT +.UNINDENT +.nf +\fBc++11\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C++ 2011 with amendments +.UNINDENT +.UNINDENT +.nf +\fBgnu++11\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C++ 2011 with amendments and GNU extensions +.UNINDENT +.UNINDENT +.nf +\fBc++14\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C++ 2014 with amendments +.UNINDENT +.UNINDENT +.nf +\fBgnu++14\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C++ 2014 with amendments and GNU extensions +.UNINDENT +.UNINDENT +.nf +\fBc++17\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C++ 2017 with amendments +.UNINDENT +.UNINDENT +.nf +\fBgnu++17\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +ISO C++ 2017 with amendments and GNU extensions +.UNINDENT +.UNINDENT +.nf +\fBc++2a\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +Working draft for ISO C++ 2020 +.UNINDENT +.UNINDENT +.nf +\fBgnu++2a\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +Working draft for ISO C++ 2020 with GNU extensions +.UNINDENT +.UNINDENT +.UNINDENT +.UNINDENT +.sp +The default C++ language standard is \fBgnu++14\fP\&. +.sp +Supported values for the OpenCL language are: +.INDENT 7.0 +.INDENT 3.5 +.nf +\fBcl1.0\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +OpenCL 1.0 +.UNINDENT +.UNINDENT +.nf +\fBcl1.1\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +OpenCL 1.1 +.UNINDENT +.UNINDENT +.nf +\fBcl1.2\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +OpenCL 1.2 +.UNINDENT +.UNINDENT +.nf +\fBcl2.0\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +OpenCL 2.0 +.UNINDENT +.UNINDENT +.UNINDENT +.UNINDENT +.sp +The default OpenCL language standard is \fBcl1.0\fP\&. +.sp +Supported values for the CUDA language are: +.INDENT 7.0 +.INDENT 3.5 +.nf +\fBcuda\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +NVIDIA CUDA(tm) +.UNINDENT +.UNINDENT +.UNINDENT +.UNINDENT +.UNINDENT +.INDENT 0.0 .TP .B \-stdlib= Specify the C++ standard library to use; supported options are libstdc++ and @@ -602,6 +857,6 @@ output of the compiler, along with information to repr .SH AUTHOR Maintained by the Clang / LLVM Team () .SH COPYRIGHT -2007-2017, The Clang Team +2007-2018, The Clang Team .\" Generated by docutils manpage writer. . From owner-svn-src-all@freebsd.org Sat Apr 21 13:46:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B68AFA6E7B; Sat, 21 Apr 2018 13:46:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3ECA87B283; Sat, 21 Apr 2018 13:46:08 +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 2AA7B27B2D; Sat, 21 Apr 2018 13:46: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 w3LDk7YY056253; Sat, 21 Apr 2018 13:46:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3LDk7YM056252; Sat, 21 Apr 2018 13:46:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804211346.w3LDk7YM056252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 21 Apr 2018 13:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332856 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 13:46:08 -0000 Author: kevans Date: Sat Apr 21 13:46:07 2018 New Revision: 332856 URL: https://svnweb.freebsd.org/changeset/base/332856 Log: bsdgrep: Fix --include/--exclude ordering issues Prior to r332851: * --exclude always win out over --include * --exclude-dir always wins out over --include-dir r332851 broke that behavior, resulting in: * First of --exclude, --include wins * First of --exclude-dir, --include-dir wins As it turns out, both behaviors are wrong by modern grep standards- the latest rule wins. e.g.: `grep --exclude foo --include foo 'thing' foo` foo is included `grep --include foo --exclude foo 'thing' foo` foo is excluded As tested with GNU grep 3.1. This commit makes bsdgrep follow this behavior. Reported by: se Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Sat Apr 21 09:58:00 2018 (r332855) +++ head/usr.bin/grep/util.c Sat Apr 21 13:46:07 2018 (r332856) @@ -109,10 +109,12 @@ file_matching(const char *fname) for (unsigned int i = 0; i < fpatterns; ++i) { if (fnmatch(fpattern[i].pat, fname, 0) == 0 || - fnmatch(fpattern[i].pat, fname_base, 0) == 0) { + fnmatch(fpattern[i].pat, fname_base, 0) == 0) + /* + * The last pattern matched wins exclusion/inclusion + * rights, so we can't reasonably bail out early here. + */ ret = (fpattern[i].mode != EXCL_PAT); - break; - } } free(fname_buf); return (ret); @@ -127,7 +129,11 @@ dir_matching(const char *dname) for (unsigned int i = 0; i < dpatterns; ++i) { if (dname != NULL && fnmatch(dpattern[i].pat, dname, 0) == 0) - return (dpattern[i].mode != EXCL_PAT); + /* + * The last pattern matched wins exclusion/inclusion + * rights, so we can't reasonably bail out early here. + */ + ret = (dpattern[i].mode != EXCL_PAT); } return (ret); } From owner-svn-src-all@freebsd.org Sat Apr 21 13:48:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 700D6FA7154; Sat, 21 Apr 2018 13:48:43 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D4547B495; Sat, 21 Apr 2018 13:48:43 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id C66A111635; Sat, 21 Apr 2018 13:48:42 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f50.google.com with SMTP id o123-v6so6252642lfe.8; Sat, 21 Apr 2018 06:48:42 -0700 (PDT) X-Gm-Message-State: ALQs6tD4YQgYAofoXGJREdez8WOKKqAbopZi/OLwt9DjB451uvZZM+jT OCir2iMlFmB9O59bcPglcAZgEqRJTzrJelw3R/g= X-Google-Smtp-Source: AB8JxZrRObniNcXMRDL8S2l1wngT1rFQjmrP6BltmzUWoMUlv+cCkU7CNpAAgxHGAPU1jWL38XT9KC9z/6H33ExDL78= X-Received: by 2002:a19:2902:: with SMTP id p2-v6mr1624876lfp.99.1524318521160; Sat, 21 Apr 2018 06:48:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.129.90 with HTTP; Sat, 21 Apr 2018 06:48:20 -0700 (PDT) In-Reply-To: <201804211346.w3LDk7YM056252@repo.freebsd.org> References: <201804211346.w3LDk7YM056252@repo.freebsd.org> From: Kyle Evans Date: Sat, 21 Apr 2018 08:48:20 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332856 - head/usr.bin/grep To: Kyle Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 13:48:43 -0000 On Sat, Apr 21, 2018 at 8:46 AM, Kyle Evans wrote: > Author: kevans > Date: Sat Apr 21 13:46:07 2018 > New Revision: 332856 > URL: https://svnweb.freebsd.org/changeset/base/332856 > > Log: > bsdgrep: Fix --include/--exclude ordering issues > > Prior to r332851: > * --exclude always win out over --include > * --exclude-dir always wins out over --include-dir > > r332851 broke that behavior, resulting in: > * First of --exclude, --include wins > * First of --exclude-dir, --include-dir wins > > As it turns out, both behaviors are wrong by modern grep standards- the > latest rule wins. e.g.: > > `grep --exclude foo --include foo 'thing' foo` > foo is included > > `grep --include foo --exclude foo 'thing' foo` > foo is excluded > > As tested with GNU grep 3.1. > > This commit makes bsdgrep follow this behavior. > > Reported by: se > Just to be clear, because I don't want to mislead- se's report was specifically that I broke the previous behavior. Later investigation found that both behaviors were wrong. From owner-svn-src-all@freebsd.org Sat Apr 21 14:56:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F5C5FAB0BF; Sat, 21 Apr 2018 14:56:42 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6B788299; Sat, 21 Apr 2018 14:56:42 +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 31658690; Sat, 21 Apr 2018 14:56:42 +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 w3LEugo1091533; Sat, 21 Apr 2018 14:56:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3LEufpK091527; Sat, 21 Apr 2018 14:56:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201804211456.w3LEufpK091527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 21 Apr 2018 14:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332857 - in head: etc/defaults etc/rc.d share/man/man4 share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: etc/defaults etc/rc.d share/man/man4 share/man/man5 X-SVN-Commit-Revision: 332857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 14:56:42 -0000 Author: trasz Date: Sat Apr 21 14:56:41 2018 New Revision: 332857 URL: https://svnweb.freebsd.org/changeset/base/332857 Log: Add cfumass rc script, to create a LUN for cfumass(4). MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14844 Added: head/etc/rc.d/cfumass (contents, props changed) Modified: head/etc/defaults/rc.conf head/etc/rc.d/Makefile head/share/man/man4/cfumass.4 head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Apr 21 13:46:07 2018 (r332856) +++ head/etc/defaults/rc.conf Sat Apr 21 14:56:41 2018 (r332857) @@ -592,6 +592,9 @@ cron_enable="YES" # Run the periodic job daemon. cron_program="/usr/sbin/cron" # Which cron executable to run (if enabled). cron_dst="YES" # Handle DST transitions intelligently (YES/NO) cron_flags="" # Which options to pass to the cron daemon. +cfumass_enable="NO" # Create default LUN for cfumass(4). +cfumass_dir="/var/cfumass" # File to LUN's contents. +cfumass_image="/var/tmp/cfumass.img" # LUN's backing file path. lpd_enable="NO" # Run the line printer daemon. lpd_program="/usr/sbin/lpd" # path to lpd, if you want a different one. lpd_flags="" # Flags to lpd (if enabled). Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sat Apr 21 13:46:07 2018 (r332856) +++ head/etc/rc.d/Makefile Sat Apr 21 14:56:41 2018 (r332857) @@ -21,6 +21,7 @@ FILES= DAEMON \ ${_bluetooth} \ bridge \ ${_bthidd} \ + cfumass \ cleanvar \ cleartmp \ cron \ Added: head/etc/rc.d/cfumass ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/cfumass Sat Apr 21 14:56:41 2018 (r332857) @@ -0,0 +1,125 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: cfumass +# REQUIRE: var +# KEYWORD: nojail + +. /etc/rc.subr + +name="cfumass" +desc="Configure the LUN for device mode USB mass storage" +rcvar="cfumass_enable" + +start_cmd="${name}_start" +stop_cmd="${name}_stop" + +extra_commands="reload" +reload_cmd="${name}_start" + +: ${cfumass_dir:=/var/cfumass} +: ${cfumass_image:=/var/tmp/cfumass.img} +: ${cfumass_vendor:="FreeBSD"} +: ${cfumass_product:="cfumass(4)"} + +remove_luns() +{ + local _lun _luns + + _luns=`ctladm devlist -b block -v | awk ' + + $1 ~ /^[0-9]+$/ { + lun = $1 + } + + $1 == "file='"${cfumass_image}"'" { + print lun + }'` + + for _lun in ${_luns}; do + ctladm remove -b block -l "${_lun}" > /dev/null + done +} + +cfumass_start() +{ + local err _files _template + + if [ ! -d "${cfumass_dir}" ]; then + warn "${cfumass_dir} does not exist" + return 1 + fi + + _files=`find "${cfumass_dir}" -newer "${cfumass_image}" -print 2> /dev/null` + if [ ! -e "${cfumass_image}" -o -n "${_files}" ]; then + # The image doesn't exist or is out of date. + makefs -t cd9660 -o rockridge "${cfumass_image}" "${cfumass_dir}" + err=$? + if [ "${err}" -ne 0 ]; then + warn "unable to create ${cfumass_image}" + return "${err}" + fi + fi + + remove_luns + + ctladm create -b block -o file="${cfumass_image}" -o readonly=on \ + -o vendor="${cfumass_vendor}" -o product="${cfumass_product}" \ + -t 5 -S 0 > /dev/null + err=$? + if [ "${err}" -ne 0 ]; then + warn "unable to create CTL LUN" + return "${err}" + fi + + load_kld -e cfumass cfumass + + # If the template is already switched to Mass Storage, then reset + # it to -1 to force the host to reenumerate it; otherwise it might + # not notice the new LUN. + _template=`sysctl -n hw.usb.template` + if [ "${_template}" -eq 0 ]; then + sysctl hw.usb.template=-1 > /dev/null + err=$? + if [ "${err}" -ne 0 ]; then + warn "unable to set hw.usb.template sysctl" + return "${err}" + fi + fi + + _template=`sysctl -n hw.usb.template` + if [ "${_template}" -lt 0 ]; then + sysctl hw.usb.template=0 > /dev/null + err=$? + if [ "${err}" -ne 0 ]; then + warn "unable to set hw.usb.template sysctl" + return "${err}" + fi + else + # Otherwise don't touch the sysctl - we could lock the user + # out of the machine otherwise. + warn "hw.usb.template sysctl set to neither -1 nor 0" + fi +} + +cfumass_stop() +{ + local err _template + + _template=`sysctl -n hw.usb.template` + if [ "${_template}" -eq 0 ]; then + sysctl hw.usb.template=-1 > /dev/null + err=$? + if [ "${err}" -ne 0 ]; then + warn "unable to set hw.usb.template sysctl" + return "${err}" + fi + fi + + remove_luns +} + +load_rc_config $name +run_rc_command "$1" Modified: head/share/man/man4/cfumass.4 ============================================================================== --- head/share/man/man4/cfumass.4 Sat Apr 21 13:46:07 2018 (r332856) +++ head/share/man/man4/cfumass.4 Sat Apr 21 14:56:41 2018 (r332857) @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 9, 2018 +.Dd April 21, 2018 .Dt CFUMASS 4 .Os .Sh NAME @@ -88,6 +88,14 @@ See and .Xr ctld 8 for details on configuring the LUN. +See the +.Cm cfumass_enable +and +.Cm cfumass_dir +.Xr rc 8 +variables in +.Xr rc.conf 5 +for an automated way to configure it at boot. .Sh SYSCTL VARIABLES These variables are available as both .Xr sysctl 8 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Apr 21 13:46:07 2018 (r332856) +++ head/share/man/man5/rc.conf.5 Sat Apr 21 14:56:41 2018 (r332857) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2018 +.Dd April 21, 2018 .Dt RC.CONF 5 .Os .Sh NAME @@ -4482,6 +4482,18 @@ The default is which configures sessions based on the .Pa /etc/iscsi.conf configuration file. +.It Va cfumass_enable +.Pq Vt bool +If set to +.Dq Li YES , +create and export an USB LUN using +.Xr cfumass 4 +at boot time. +.It Va cfumass_dir +.Pq Vt str +The directory where the files exported by USB LUN are located. +The default directory is +.Pa /var/cfumass . .El .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact From owner-svn-src-all@freebsd.org Sat Apr 21 14:58:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E22D5FAB32F; Sat, 21 Apr 2018 14:58: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94CE3895EF; Sat, 21 Apr 2018 14:58: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 8E0C66A1; Sat, 21 Apr 2018 14:58: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 w3LEwjjv091643; Sat, 21 Apr 2018 14:58:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3LEwjdt091642; Sat, 21 Apr 2018 14:58:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804211458.w3LEwjdt091642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 21 Apr 2018 14:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332858 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 332858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 14:58:46 -0000 Author: kevans Date: Sat Apr 21 14:58:45 2018 New Revision: 332858 URL: https://svnweb.freebsd.org/changeset/base/332858 Log: bsdgrep: Use grep_strdup instead of grep_malloc+strcpy Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Sat Apr 21 14:56:41 2018 (r332857) +++ head/usr.bin/grep/util.c Sat Apr 21 14:58:45 2018 (r332858) @@ -323,8 +323,7 @@ procfile(const char *fn) return (0); } - pc.ln.file = grep_malloc(strlen(fn) + 1); - strcpy(pc.ln.file, fn); + pc.ln.file = grep_strdup(fn); pc.ln.line_no = 0; pc.ln.len = 0; pc.ln.boff = 0; From owner-svn-src-all@freebsd.org Sat Apr 21 15:15:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34F1FFAC5EB; Sat, 21 Apr 2018 15:15:48 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBDC58B25C; Sat, 21 Apr 2018 15:15:47 +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 D6DFB9C8; Sat, 21 Apr 2018 15:15:47 +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 w3LFFlr8002079; Sat, 21 Apr 2018 15:15:47 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3LFFlV3002077; Sat, 21 Apr 2018 15:15:47 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201804211515.w3LFFlV3002077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 21 Apr 2018 15:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332859 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 332859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 15:15:48 -0000 Author: jhibbits Date: Sat Apr 21 15:15:47 2018 New Revision: 332859 URL: https://svnweb.freebsd.org/changeset/base/332859 Log: Export powerpc CPU features for auxvec FreeBSD exports the AT_HWCAP* auxvec items if provided by the ELF sysentvec structure. Add the CPU features to be exported, so user space can more easily check for them without using the hw.cpu_features and hw.cpu_features2 sysctls. Modified: head/sys/powerpc/powerpc/elf32_machdep.c head/sys/powerpc/powerpc/elf64_machdep.c Modified: head/sys/powerpc/powerpc/elf32_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf32_machdep.c Sat Apr 21 14:58:45 2018 (r332858) +++ head/sys/powerpc/powerpc/elf32_machdep.c Sat Apr 21 15:15:47 2018 (r332859) @@ -123,6 +123,8 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, + .sv_hwcap = &cpu_features, + .sv_hwcap2 = &cpu_features2, }; INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec); Modified: head/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf64_machdep.c Sat Apr 21 14:58:45 2018 (r332858) +++ head/sys/powerpc/powerpc/elf64_machdep.c Sat Apr 21 15:15:47 2018 (r332859) @@ -88,6 +88,8 @@ struct sysentvec elf64_freebsd_sysvec_v1 = { .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, + .sv_hwcap = &cpu_features, + .sv_hwcap2 = &cpu_features2, }; INIT_SYSENTVEC(elf64_sysvec_v1, &elf64_freebsd_sysvec_v1); From owner-svn-src-all@freebsd.org Sat Apr 21 17:05:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03FF6FB3571; Sat, 21 Apr 2018 17:05:00 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EB877DA2E; Sat, 21 Apr 2018 17:05:00 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 954841B3B; Sat, 21 Apr 2018 17:05:00 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3LH50lT056340; Sat, 21 Apr 2018 17:05:00 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3LH50Dk056339; Sat, 21 Apr 2018 17:05:00 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201804211705.w3LH50Dk056339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Sat, 21 Apr 2018 17:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332860 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 332860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 17:05:01 -0000 Author: jtl Date: Sat Apr 21 17:05:00 2018 New Revision: 332860 URL: https://svnweb.freebsd.org/changeset/base/332860 Log: When running with INVARIANTS, the kernel contains extra checks. However, these assumptions may not hold true once we've panic'd. Therefore, the checks hold less value after a panic. Additionally, if one of the checks fails while we are already panic'd, this creates a double-panic which can interfere with debugging the original panic. Therefore, this commit allows an administrator to suppress a response to KASSERT checks after a panic by setting a tunable/sysctl. The tunable/sysctl (debug.kassert.suppress_in_panic) defaults to being enabled. Reviewed by: kib Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D12920 Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Sat Apr 21 15:15:47 2018 (r332859) +++ head/sys/kern/kern_shutdown.c Sat Apr 21 17:05:00 2018 (r332860) @@ -642,6 +642,7 @@ static int kassert_do_log = 1; static int kassert_log_pps_limit = 4; static int kassert_log_mute_at = 0; static int kassert_log_panic_at = 0; +static int kassert_suppress_in_panic = 1; static int kassert_warnings = 0; SYSCTL_NODE(_debug, OID_AUTO, kassert, CTLFLAG_RW, NULL, "kassert options"); @@ -676,6 +677,10 @@ SYSCTL_INT(_debug_kassert, OID_AUTO, log_pps_limit, CT SYSCTL_INT(_debug_kassert, OID_AUTO, log_mute_at, CTLFLAG_RWTUN, &kassert_log_mute_at, 0, "max number of KASSERTS to log"); +SYSCTL_INT(_debug_kassert, OID_AUTO, suppress_in_panic, CTLFLAG_RWTUN, + &kassert_suppress_in_panic, 0, + "KASSERTs will be suppressed while handling a panic"); + static int kassert_sysctl_kassert(SYSCTL_HANDLER_ARGS); SYSCTL_PROC(_debug_kassert, OID_AUTO, kassert, @@ -707,6 +712,10 @@ kassert_panic(const char *fmt, ...) { static char buf[256]; va_list ap; + + /* If we already panic'd, don't create a double-fault. */ + if (panicstr != NULL && kassert_suppress_in_panic) + return; va_start(ap, fmt); (void)vsnprintf(buf, sizeof(buf), fmt, ap); From owner-svn-src-all@freebsd.org Sat Apr 21 17:41:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 271F8FB5B02; Sat, 21 Apr 2018 17:41:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 6AED287445; Sat, 21 Apr 2018 17:41:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 82749D4FD11; Sun, 22 Apr 2018 03:41:16 +1000 (AEST) Date: Sun, 22 Apr 2018 03:41:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Jonathan T. Looney" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332860 - head/sys/kern In-Reply-To: <201804211705.w3LH50Dk056339@repo.freebsd.org> Message-ID: <20180422032027.D1653@besplex.bde.org> References: <201804211705.w3LH50Dk056339@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VJytp5HX c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=5cUxu2C0Djz_aW9bb3oA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 17:41:26 -0000 On Sat, 21 Apr 2018, Jonathan T. Looney wrote: > Log: > When running with INVARIANTS, the kernel contains extra checks. However, > these assumptions may not hold true once we've panic'd. Therefore, the > checks hold less value after a panic. Additionally, if one of the checks > fails while we are already panic'd, this creates a double-panic which can > interfere with debugging the original panic. > > Therefore, this commit allows an administrator to suppress a response to > KASSERT checks after a panic by setting a tunable/sysctl. The > tunable/sysctl (debug.kassert.suppress_in_panic) defaults to being > enabled. > ... > Modified: head/sys/kern/kern_shutdown.c > ============================================================================== > --- head/sys/kern/kern_shutdown.c Sat Apr 21 15:15:47 2018 (r332859) > +++ head/sys/kern/kern_shutdown.c Sat Apr 21 17:05:00 2018 (r332860) > @@ -642,6 +642,7 @@ static int kassert_do_log = 1; > static int kassert_log_pps_limit = 4; > static int kassert_log_mute_at = 0; > static int kassert_log_panic_at = 0; > +static int kassert_suppress_in_panic = 1; > static int kassert_warnings = 0; > > SYSCTL_NODE(_debug, OID_AUTO, kassert, CTLFLAG_RW, NULL, "kassert options"); > @@ -676,6 +677,10 @@ SYSCTL_INT(_debug_kassert, OID_AUTO, log_pps_limit, CT > SYSCTL_INT(_debug_kassert, OID_AUTO, log_mute_at, CTLFLAG_RWTUN, > &kassert_log_mute_at, 0, "max number of KASSERTS to log"); > > +SYSCTL_INT(_debug_kassert, OID_AUTO, suppress_in_panic, CTLFLAG_RWTUN, > + &kassert_suppress_in_panic, 0, > + "KASSERTs will be suppressed while handling a panic"); > + > static int kassert_sysctl_kassert(SYSCTL_HANDLER_ARGS); > > SYSCTL_PROC(_debug_kassert, OID_AUTO, kassert, > @@ -707,6 +712,10 @@ kassert_panic(const char *fmt, ...) > { > static char buf[256]; > va_list ap; > + > + /* If we already panic'd, don't create a double-fault. */ > + if (panicstr != NULL && kassert_suppress_in_panic) > + return; > > va_start(ap, fmt); > (void)vsnprintf(buf, sizeof(buf), fmt, ap); panic() can't return, but I see that KASSERT() has already been broken to use kassert_panic() which does return in some cases including this new one. KASSERT(9) is still documented to call panic(), and none of the options to break it including this new one, or kassert_panic() itself are documented in KASSERT(9) or in any other section 9 man page. Lots of code was and still is written under the assumption that KASSERT() works as documented. E.g., after a null pointer check using KASSERT(), the pointer is normally used and the page fault for this should cause a panic anyway. This is actually a feature -- it works around KASSERT() breaking restartability of the fault. Other cases are not so good. There man be a cascade of KASSERT() failures, and the new option prevents even printing a message about even one of them. If you are lucky then you get a clean null pointer recursive panic. The only example in KASSERT(9) is to give the worst use of it (for breaking clean null pointer panics when KASSERT() works as documented, but now doesn't even break them when KASSERT() returns). Bruce From owner-svn-src-all@freebsd.org Sat Apr 21 17:53:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED886FB67E7; Sat, 21 Apr 2018 17:53:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88B7B6A303; Sat, 21 Apr 2018 17:53:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f46.google.com with SMTP id u62-v6so6042539ita.5; Sat, 21 Apr 2018 10:53: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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=gmEOZhUas7+Jr1TXOutPCyWtThxkIkjbET9E1YpwAIE=; b=E8UUb33a0iO21SlA6AZ+NtQ6XuXd3hgyyzjv0viJF4xG701kF2mazhleVLpkcfFX9s WTFOWuOHgWq9lgsGwWaay41pmf5Mtiw9oCNnlQ0oGGRmW1ND415zr9/r9rky4cVVn5ej G83oRdoHVWI32ZHrg4Z8gez8++VTKHyzxs6msywTkvichoA5zDfEKyYI0Zuunipq33Xx fuMqnfIPydBQ8tjqxuXw9GYmNOcVM4d3FGCe27V9PDPI88rwkiR6ble+sDlxEhi/BtbN M3Nnis3hDPrg9fbqc3iL3XkjYdLjHFK0g79Z2yzaq7oNa0FENIbWj/4hd5lV+4SvHLnh 6PNw== X-Gm-Message-State: ALQs6tC1xloGatvc5thvOlWKp3fEd2OzKQqw56lqCb9CqPjgYC7dJAlg C3eVC4PSIqj+zCFzobYLjv787dSU X-Google-Smtp-Source: AIpwx49fn3rXj+12z9Ax1Q06eMg6an2xMD7hgM832hMGUjIr85kwNw9ovfoew/SYHpGTHpINNz7GsA== X-Received: by 2002:a24:2ec8:: with SMTP id i191-v6mr7532840ita.149.1524333222307; Sat, 21 Apr 2018 10:53:42 -0700 (PDT) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com. [209.85.223.172]) by smtp.gmail.com with ESMTPSA id s142-v6sm2144368itb.4.2018.04.21.10.53.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Apr 2018 10:53:41 -0700 (PDT) Received: by mail-io0-f172.google.com with SMTP id d26-v6so13956652ioc.2; Sat, 21 Apr 2018 10:53:41 -0700 (PDT) X-Received: by 2002:a6b:da04:: with SMTP id x4-v6mr6398772iob.19.1524333221780; Sat, 21 Apr 2018 10:53:41 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:224d:0:0:0:0:0 with HTTP; Sat, 21 Apr 2018 10:53:41 -0700 (PDT) In-Reply-To: <201804211705.w3LH50Dk056339@repo.freebsd.org> References: <201804211705.w3LH50Dk056339@repo.freebsd.org> From: Conrad Meyer Date: Sat, 21 Apr 2018 10:53:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332860 - head/sys/kern To: "Jonathan T. Looney" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 17:53:49 -0000 On Sat, Apr 21, 2018 at 10:05 AM, Jonathan T. Looney wrote: > Author: jtl > Date: Sat Apr 21 17:05:00 2018 > New Revision: 332860 > URL: https://svnweb.freebsd.org/changeset/base/332860 > > Log: > When running with INVARIANTS, the kernel contains extra checks. However, > these assumptions may not hold true once we've panic'd. Therefore, the > checks hold less value after a panic. Additionally, if one of the checks > fails while we are already panic'd, this creates a double-panic which can > interfere with debugging the original panic. > > Therefore, this commit allows an administrator to suppress a response to > KASSERT checks after a panic by setting a tunable/sysctl. The > tunable/sysctl (debug.kassert.suppress_in_panic) defaults to being > enabled. Hi Jonathan, I don't think this should be enabled by default. Can we leave it disabled by default and let consumers opt-in? To expand on this a little: this is a big hammer. We already disable specific invariants in a few cases during panic (lock assertions come to mind). If there are specific assertions that do not hold during panic, we can/should selectively weaken them. But in general, invariants are invariant, and we should not proceed past violated ones by default. Thanks, Conrad From owner-svn-src-all@freebsd.org Sat Apr 21 17:59:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDB86FB6C1D; Sat, 21 Apr 2018 17:59:06 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57BEC6A576; Sat, 21 Apr 2018 17:59:06 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f178.google.com with SMTP id v13-v6so13959294iob.6; Sat, 21 Apr 2018 10:59:06 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=ulRyKD0u8kkCGd7g+chbmF/j4icsVSqoiChkW9Td2Wc=; b=NmsS6lFjo3gOhL3PRVLYvzRnLfcroXQD5j15rID0KUcP6Ue68TAxfjsNIsrrvKR5PD xCVECHjuJsbFZxplEm7a83AzlAlur7BqLnuVVZwEAQ7IKPn65qi8C4tXrEBQe5JPrEQK +qT/tx4ECCq95IeM4uGj2bLYaOY2JPMWcSPqpnXiQ3qLjdmll7xzI2NV2FGDf+9z+RAD h3NAvlh8B17UmxzHSgOlPYgsutuu+94DGObzdMfwDvuNyQbA944l+g72DyRcVFajapUC MAys3Nqub8GUj2ueod5xun99FE9VQd2OIqBWLtHBYJX8y05PYIn1Vz8lFkudXdEH0sWq +eXw== X-Gm-Message-State: ALQs6tD0JJPfjlgwcbKKqSIf05RCtqkUxZbsISCZtCAGukszt9fxvpJr EZT6kyskR6/BEHTl787xkM08yF9c X-Google-Smtp-Source: AIpwx49bvg8k0NL4q+VT4XLtnjoRe995sAxlR/cqx8nK216CH01Fj9KdbjSQmE1G/FxyuS/NfdXViQ== X-Received: by 2002:a6b:e815:: with SMTP id f21-v6mr8976736ioh.244.1524333540325; Sat, 21 Apr 2018 10:59:00 -0700 (PDT) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com. [209.85.223.170]) by smtp.gmail.com with ESMTPSA id o187-v6sm1434866ioo.65.2018.04.21.10.58.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Apr 2018 10:59:00 -0700 (PDT) Received: by mail-io0-f170.google.com with SMTP id r22-v6so4892052ioc.12; Sat, 21 Apr 2018 10:58:59 -0700 (PDT) X-Received: by 2002:a6b:545:: with SMTP id 66-v6mr15145876iof.173.1524333539841; Sat, 21 Apr 2018 10:58:59 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:224d:0:0:0:0:0 with HTTP; Sat, 21 Apr 2018 10:58:59 -0700 (PDT) In-Reply-To: <20180422032027.D1653@besplex.bde.org> References: <201804211705.w3LH50Dk056339@repo.freebsd.org> <20180422032027.D1653@besplex.bde.org> From: Conrad Meyer Date: Sat, 21 Apr 2018 10:58:59 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r332860 - head/sys/kern To: Bruce Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 17:59:07 -0000 On Sat, Apr 21, 2018 at 10:41 AM, Bruce Evans wrote: > panic() can't return, but I see that KASSERT() has already been broken > to use kassert_panic() which does return in some cases including this > new one. Oddly enough, I find myself agreeing with Bruce on this. That kassert_panic does not always assert, during ordinary (non-panic) runtime, based on a runtime configurable toggle breaks the concept of invariants and confuses the heck out of static analyzers like Coverity. Ideally, we just remove it. IMO it is a crappy hack that should have remained in iX's local tree. If we want to be really generous, we can make it an off-by-default build option. Is anyone clamoring for allowing violation of multiple assertions without panic, other than Linus Torvalds? > KASSERT(9) is still documented to call panic(), and none of the options > to break it including this new one, or kassert_panic() itself are > documented in KASSERT(9) or in any other section 9 man page. Yeah. This is unfortunate :-(. Best, Conrad From owner-svn-src-all@freebsd.org Sat Apr 21 18:31:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22F80FB8D92 for ; Sat, 21 Apr 2018 18:31:37 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0E0F72E3A for ; Sat, 21 Apr 2018 18:31:36 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22c.google.com with SMTP id u10-v6so3526208ywl.11 for ; Sat, 21 Apr 2018 11:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pj6sYxA9m7yqraLYRDjzuE31ChH+9piaowmKqemEjH8=; b=om5u/BXoMun5g5rKUboQUV0t97a95Dr1Z4XbFPjTwxAcxkpcZc78xjKeR8m7lkiHZ8 3L42wZu0k6WI8xay1ZfezdXXE3B7e7B+pKs0ipk/FYVLN1l8n22JS+P9z7zNLEgiJN5l 5cHXb/+gIfSL/QPm4B8oQPNZHH9V3m9RdFNUo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pj6sYxA9m7yqraLYRDjzuE31ChH+9piaowmKqemEjH8=; b=WrAP0xhIw5ok0e69upXZS/Q7lG/ZA9ONTvj4bBWOUN2De9I8OH0MefkATAMUgiH6eJ zuFcpljI/sir0MACFLwhKO549kPqXfvrNHebKs5Vjl2qEpi6Owf8AGNPtDOA94ni12BC l1IhST6ytzBgpaq5bqYM+gfxms89pXRpwzMONS0w5aW/du9rsvn9wrYICB/XxX3LZ7UK 4k2U/HttY8cOXXkMoqgp4x2FnixaQsmo1MnHhieHwYh0L0xHUBTUHIcdG+uKB/hEWmzJ 2wgEwb0XOVIB3F5nF6s5Z3ATn9FOF5JO+L1EsaU/70xcXmZmwEtjzqkBrZ22oNrqFchx 9qxg== X-Gm-Message-State: ALQs6tCbzR0RmuYYe34X8ZkafneFZ4MdHPV8w9+r0O4MlhSc+Zxk7Gq2 loOKHYShkEGVN5Pt8SphjCmfIQcQChVyCr6TfKip4Q== X-Google-Smtp-Source: AIpwx485PdRkOhJUaTE2HQlzERMBg4mNVcUIEzCK2vaEYj3kxWxMfbNsevcz4dV4P74xZqa4aFBx+T0MvIteCVxNLec= X-Received: by 2002:a0d:c446:: with SMTP id g67-v6mr8121098ywd.387.1524335495835; Sat, 21 Apr 2018 11:31:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Sat, 21 Apr 2018 11:31:05 -0700 (PDT) In-Reply-To: <201804211705.w3LH50Dk056339@repo.freebsd.org> References: <201804211705.w3LH50Dk056339@repo.freebsd.org> From: Eitan Adler Date: Sat, 21 Apr 2018 11:31:05 -0700 Message-ID: Subject: Re: svn commit: r332860 - head/sys/kern To: "Jonathan T. Looney" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 18:31:37 -0000 On 21 April 2018 at 10:05, Jonathan T. Looney wrote: > Author: jtl > Date: Sat Apr 21 17:05:00 2018 > New Revision: 332860 > URL: https://svnweb.freebsd.org/changeset/base/332860 > > Log: > When running with INVARIANTS, the kernel contains extra checks. However, > these assumptions may not hold true once we've panic'd. Therefore, the > checks hold less value after a panic. Additionally, if one of the checks > fails while we are already panic'd, this creates a double-panic which can > interfere with debugging the original panic. Rather than do this I'd rather we modify the invariants to more explicitly state under what conditions it holds. This might be something like KASSERT(!panic && ...) or KASSERT_NOT_IN_PANIC(...) or some other spelling. -- Eitan Adler From owner-svn-src-all@freebsd.org Sat Apr 21 18:43:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C504FFB9A17; Sat, 21 Apr 2018 18:43:09 +0000 (UTC) (envelope-from riggs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78C5574F0E; Sat, 21 Apr 2018 18:43:09 +0000 (UTC) (envelope-from riggs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 735F52B01; Sat, 21 Apr 2018 18:43:09 +0000 (UTC) (envelope-from riggs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3LIh9eC005615; Sat, 21 Apr 2018 18:43:09 GMT (envelope-from riggs@FreeBSD.org) Received: (from riggs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3LIh9nO005614; Sat, 21 Apr 2018 18:43:09 GMT (envelope-from riggs@FreeBSD.org) Message-Id: <201804211843.w3LIh9nO005614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: riggs set sender to riggs@FreeBSD.org using -f From: Thomas Zander Date: Sat, 21 Apr 2018 18:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332861 - head/sys/dev/bktr X-SVN-Group: head X-SVN-Commit-Author: riggs X-SVN-Commit-Paths: head/sys/dev/bktr X-SVN-Commit-Revision: 332861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 18:43:10 -0000 Author: riggs (ports committer) Date: Sat Apr 21 18:43:09 2018 New Revision: 332861 URL: https://svnweb.freebsd.org/changeset/base/332861 Log: Remove unused definition bl_dfp; fix build with bktr compiled into kernel PR: 216566 Submitted by: mail@fbsd.e4m.org Reviewed by: riggs, cognet Approved by: cognet MFC after: 3 days Modified: head/sys/dev/bktr/msp34xx.c Modified: head/sys/dev/bktr/msp34xx.c ============================================================================== --- head/sys/dev/bktr/msp34xx.c Sat Apr 21 17:05:00 2018 (r332860) +++ head/sys/dev/bktr/msp34xx.c Sat Apr 21 18:43:09 2018 (r332861) @@ -111,10 +111,6 @@ #define VIDEO_SOUND_LANG2 8 #define DFP_COUNT 0x41 -static const int bl_dfp[] = { - 0x00, 0x01, 0x02, 0x03, 0x06, 0x08, 0x09, 0x0a, - 0x0b, 0x0d, 0x0e, 0x10 -}; struct msp3400c { int simple; From owner-svn-src-all@freebsd.org Sat Apr 21 20:33:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FA9FFA13FE; Sat, 21 Apr 2018 20:33:36 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-wr0-x236.google.com (mail-wr0-x236.google.com [IPv6:2a00:1450:400c:c0c::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C37F66CA2E; Sat, 21 Apr 2018 20:33:35 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wr0-x236.google.com with SMTP id w3-v6so31123758wrg.2; Sat, 21 Apr 2018 13:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GIiSBvhBpP8Sg0eFCbK7058qGvK+RzUmcW2rlTQI/s0=; b=QOlVozQ2ZIJULndDbU28+ELCB51EFlDIIFVpxP9aRizD88tfo+UFQoGPToLzfCpZvp F+0KIWk/+oBRmZ/TLWF7inN9AhoOfX6tDP0oSCR3S17zcNFMRIax/6wPd9h0myDm8XS1 dEw9UxLP0oyHH6BOeYsp5D9w87N4LCwWhzAIafNqcdFXp882I1fpof5ziowJ8IjbcFAY ZBBMNQCl8JotabvA8qOAAtB7d41vA/H1DxZrBYgTB4STqNdN9jGFDEWBjTpTr9pN5MSw e+FPHfhzq6+xHaWdjb1NSyk1ds14bkSHSJt0fzInZTN5MPRCDl6pYR2tq62d1fyLuCfS eNOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GIiSBvhBpP8Sg0eFCbK7058qGvK+RzUmcW2rlTQI/s0=; b=VSyY0ldNMx7pwDof/NE31WrglaOwvq0DCfgWkq0zbyaeMxgptOd2+On/JqVH+f8Y6s ELmEnTSEreNRB+DqJhO4k8SVFm3qbProR//gV299b6Wf3fFXgFZUKqhXKRewRIRYeQsF bjWSg8vNMCITh/4fcvoEgqXaoH9QtnyPHZbOnghdct45i8c7ld4Z45mwtu0S/ew/rjC1 O+x+yxH/e3B3tDaZ6KWHyqslBCtT0VYV27OXCcLnyuVxT+/9vNaHQ9WJ2CTv061FsgZO kQFSkdUSIxHrvpeQlQ6x3VMsfbgVMNm1xwj+ycAzwHm2I5nI91R2B+LytDjGdWNdE5kG MC0w== X-Gm-Message-State: ALQs6tBPJ0FCyLQbvUn8QVzfPWplNZzvVvFst4AD8fFVZVLxzovoSn+Y PXuADWB01xeSEa74ZDOfRLl1fHrmAXxMUMVPcd/uGGnt X-Google-Smtp-Source: AIpwx49UdZjJEZAFsq5orZ2Mja+s6d29EIlvQlrGqD06DrFguK5wKkSSM0q54IC1WkLUzZLSoCUDw5NB1ZVxlIUvRZ4= X-Received: by 10.28.112.3 with SMTP id l3mr5504289wmc.90.1524342814084; Sat, 21 Apr 2018 13:33:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.199.203 with HTTP; Sat, 21 Apr 2018 13:33:33 -0700 (PDT) In-Reply-To: References: <201804211705.w3LH50Dk056339@repo.freebsd.org> From: Jonathan Looney Date: Sat, 21 Apr 2018 16:33:33 -0400 Message-ID: Subject: Re: svn commit: r332860 - head/sys/kern To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2018 20:33:36 -0000 On Sat, Apr 21, 2018 at 1:53 PM, Conrad Meyer wrote: > > I don't think this should be enabled by default. Can we leave it > disabled by default and let consumers opt-in? I'm willing to change the default if there's a good reason or consensus for that. However, it is not obvious to me that the default is actually wrong. I think its important that we remember where we are when we hit this code. By the time we hit this code, we've already panic'd (whether due to a "true" panic or a violated assertion). At this point, the system is already in an unknown/unexpected state and we want to preserve our ability to troubleshoot and/or recover. (And, since we're running a system with INVARIANTS, presumably the ability to troubleshoot is important.) We may well violate a second assertion simply because the system is in an unknown/unexpected state. Once we do that, the question is whether we should try to preserve the ability to troubleshoot, or should give up and reset the system. All too often, my ability to debug assertion violations is hindered because the system trips over yet another assertion while dumping the core. If we skip the assertion, nothing bad happens. (The post-panic debugging code already needs to deal with systems that are inconsistent, and it does a pretty good job at it.) On the other hand, I really am not sure what you are worried might happen if we skip checking assertions after we've already panic'd. As far as I can tell, the likely worst case is that we hit a true panic of some kind. In that case, we're no worse off than before. I think the one obvious exception is when we're purposely trying to validate the post-panic debugging code. In that case, you can change the sysctl/tunable to enable troubleshooting. I would honestly appreciate someone explaining the dangers in disabling a response to assertion violations after we've already panic'd and are simply trying to troubleshoot, because they are not obvious to me. But, I could simply be missing them. Jonathan