From owner-svn-src-stable-10@freebsd.org Sun Oct 25 07:26:14 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 236747ED8; Sun, 25 Oct 2015 07:26: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 mx1.freebsd.org (Postfix) with ESMTPS id CC37D1476; Sun, 25 Oct 2015 07:26: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 t9P7QCW9049796; Sun, 25 Oct 2015 07:26:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9P7QCFX049794; Sun, 25 Oct 2015 07:26:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510250726.t9P7QCFX049794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 25 Oct 2015 07:26:12 +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: r289924 - in stable/10: share/man/man4 sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 07:26:14 -0000 Author: mav Date: Sun Oct 25 07:26:12 2015 New Revision: 289924 URL: https://svnweb.freebsd.org/changeset/base/289924 Log: MFC r289146: Make delete method set via kern.cam.da.X.delete_method persistent. This allows to set delete method via tunable, before device capabilities are known. Also allow ZERO method for devices not reporting LBP, if user explicitly requests it -- it may be useful if storage supports compression and WRITE SAME, but does not support UNMAP. Modified: stable/10/share/man/man4/da.4 stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/da.4 ============================================================================== --- stable/10/share/man/man4/da.4 Sun Oct 25 06:07:46 2015 (r289923) +++ stable/10/share/man/man4/da.4 Sun Oct 25 07:26:12 2015 (r289924) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2014 +.Dd October 11, 2015 .Dt DA 4 .Os .Sh NAME @@ -133,8 +133,7 @@ variables and .Xr loader 8 tunables: .Bl -tag -width 12 -.It kern.cam.da.retry_count -.Pp +.It Va kern.cam.da.retry_count This variable determines how many times the .Nm driver will retry a READ or WRITE command. @@ -143,8 +142,7 @@ the .Nm driver dump routine. This value currently defaults to 4. -.It kern.cam.da.default_timeout -.Pp +.It Va kern.cam.da.default_timeout This variable determines how long the .Nm driver will wait before timing out an outstanding command. @@ -152,20 +150,31 @@ The units for this value are seconds, an seconds. .It Va kern.cam.sort_io_queue .It Va kern.cam.da. Ns Ar X Ns Va .sort_io_queue -.Pp These variables determine whether request queue should be sorted trying to optimize head seeks. Set to 1 to enable sorting, 0 to disable, -1 to leave it as-is. The default is sorting enabled for HDDs and disabled for SSDs. -.It kern.cam.da.%d.minimum_cmd_size -.Pp +.It Va kern.cam.da. Ns Ar X Ns Va .delete_method +This variable specifies method to handle BIO_DELETE requests: +.Bl -tag +.It ATA_TRIM +ATA TRIM via ATA COMMAND PASS THROUGH command, +.It UNMAP +UNMAP command, +.It WS16 +WRITE SAME(16) command with UNMAP flag, +.It WS10 +WRITE SAME(10) command with UNMAP flag, +.It ZERO +WRITE SAME(10) command without UNMAP flag, +.It DISABLE +disable BIO_DELETE support. +.El +.It Va kern.cam.da. Ns Ar X Ns Va .minimum_cmd_size This variable determines what the minimum READ/WRITE CDB size is for a given .Nm unit. -(The %d above denotes the unit number of the -.Nm -driver instance, e.g.\& 1, 2, 4, 8, etc.) Valid minimum command size values are 6, 10, 12 and 16 bytes. The default is 6 bytes. .Pp Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Sun Oct 25 06:07:46 2015 (r289923) +++ stable/10/sys/cam/scsi/scsi_da.c Sun Oct 25 07:26:12 2015 (r289924) @@ -219,6 +219,7 @@ struct da_softc { uint32_t unmap_max_ranges; uint32_t unmap_max_lba; /* Max LBAs in UNMAP req */ uint64_t ws_max_blks; + da_delete_methods delete_method_pref; da_delete_methods delete_method; da_delete_func_t *delete_func; struct disk_params params; @@ -1805,7 +1806,7 @@ dasysctlinit(void *context, int pending) * the fly. */ SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW, + OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RWTUN, softc, 0, dadeletemethodsysctl, "A", "BIO_DELETE execution method"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), @@ -1916,7 +1917,6 @@ static void dadeletemethodset(struct da_softc *softc, da_delete_methods delete_method) { - softc->delete_method = delete_method; softc->disk->d_delmaxsize = dadeletemaxsize(softc, delete_method); softc->delete_func = da_delete_functions[delete_method]; @@ -1969,25 +1969,17 @@ daprobedone(struct cam_periph *periph, u snprintf(buf, sizeof(buf), "Delete methods: <"); sep = 0; - for (i = DA_DELETE_MIN; i <= DA_DELETE_MAX; i++) { - if (softc->delete_available & (1 << i)) { - if (sep) { - strlcat(buf, ",", sizeof(buf)); - } else { - sep = 1; - } - strlcat(buf, da_delete_method_names[i], - sizeof(buf)); - if (i == softc->delete_method) { - strlcat(buf, "(*)", sizeof(buf)); - } - } - } - if (sep == 0) { - if (softc->delete_method == DA_DELETE_NONE) - strlcat(buf, "NONE(*)", sizeof(buf)); - else - strlcat(buf, "DISABLED(*)", sizeof(buf)); + for (i = 0; i <= DA_DELETE_MAX; i++) { + if ((softc->delete_available & (1 << i)) == 0 && + i != softc->delete_method) + continue; + if (sep) + strlcat(buf, ",", sizeof(buf)); + strlcat(buf, da_delete_method_names[i], + sizeof(buf)); + if (i == softc->delete_method) + strlcat(buf, "(*)", sizeof(buf)); + sep = 1; } strlcat(buf, ">", sizeof(buf)); printf("%s%d: %s\n", periph->periph_name, @@ -2017,21 +2009,28 @@ daprobedone(struct cam_periph *periph, u static void dadeletemethodchoose(struct da_softc *softc, da_delete_methods default_method) { - int i, delete_method; + int i, methods; - delete_method = default_method; + /* If available, prefer the method requested by user. */ + i = softc->delete_method_pref; + methods = softc->delete_available | (1 << DA_DELETE_DISABLE); + if (methods & (1 << i)) { + dadeletemethodset(softc, i); + return; + } - /* - * Use the pre-defined order to choose the best - * performing delete. - */ + /* Use the pre-defined order to choose the best performing delete. */ for (i = DA_DELETE_MIN; i <= DA_DELETE_MAX; i++) { + if (i == DA_DELETE_ZERO) + continue; if (softc->delete_available & (1 << i)) { dadeletemethodset(softc, i); return; } } - dadeletemethodset(softc, delete_method); + + /* Fallback to default. */ + dadeletemethodset(softc, default_method); } static int @@ -2055,13 +2054,14 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS return (error); methods = softc->delete_available | (1 << DA_DELETE_DISABLE); for (i = 0; i <= DA_DELETE_MAX; i++) { - if (!(methods & (1 << i)) || - strcmp(buf, da_delete_method_names[i]) != 0) - continue; - dadeletemethodset(softc, i); - return (0); + if (strcmp(buf, da_delete_method_names[i]) == 0) + break; } - return (EINVAL); + if (i > DA_DELETE_MAX) + return (EINVAL); + softc->delete_method_pref = i; + dadeletemethodchoose(softc, DA_DELETE_NONE); + return (0); } static cam_status @@ -3298,6 +3298,7 @@ dadone(struct cam_periph *periph, union /* Ensure re-probe doesn't see old delete. */ softc->delete_available = 0; + dadeleteflag(softc, DA_DELETE_ZERO, 1); if (lbp && (softc->quirks & DA_Q_NO_UNMAP) == 0) { /* * Based on older SBC-3 spec revisions @@ -3314,7 +3315,6 @@ dadone(struct cam_periph *periph, union */ dadeleteflag(softc, DA_DELETE_WS16, 1); dadeleteflag(softc, DA_DELETE_WS10, 1); - dadeleteflag(softc, DA_DELETE_ZERO, 1); dadeleteflag(softc, DA_DELETE_UNMAP, 1); xpt_release_ccb(done_ccb); @@ -3343,8 +3343,6 @@ dadone(struct cam_periph *periph, union (lbp->flags & SVPD_LBP_WS16)); dadeleteflag(softc, DA_DELETE_WS10, (lbp->flags & SVPD_LBP_WS10)); - dadeleteflag(softc, DA_DELETE_ZERO, - (lbp->flags & SVPD_LBP_WS10)); dadeleteflag(softc, DA_DELETE_UNMAP, (lbp->flags & SVPD_LBP_UNMAP)); } else { From owner-svn-src-stable-10@freebsd.org Sun Oct 25 17:17:52 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FF398483; Sun, 25 Oct 2015 17:17:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 5D2791D4E; Sun, 25 Oct 2015 17:17:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PHHpUF021818; Sun, 25 Oct 2015 17:17:51 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PHHpe3021812; Sun, 25 Oct 2015 17:17:51 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201510251717.t9PHHpe3021812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 25 Oct 2015 17:17: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: r289938 - in stable/10: bin/sh lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 17:17:52 -0000 Author: jilles Date: Sun Oct 25 17:17:50 2015 New Revision: 289938 URL: https://svnweb.freebsd.org/changeset/base/289938 Log: MFC r288430: wordexp: Rewrite to make WRDE_NOCMD reliable. Shell syntax is too complicated to detect command substitution and unquoted operators reliably without implementing much of sh's parser. Therefore, have sh do this detection. While changing sh's support anyway, also read input from a pipe instead of arguments to avoid {ARG_MAX} limits and improve privacy, and output count and length using 16 instead of 8 digits. The basic concept is: execl("/bin/sh", "sh", "-c", "freebsd_wordexp ${1:+\"$1\"} -f "$2", "", flags & WRDE_NOCMD ? "-p" : "", ); The WRDE_BADCHAR error is still implemented in libc. POSIX requires us to fail strings containing unquoted braces with code WRDE_BADCHAR. Since this is normally not a syntax error in sh, there is still a need for checking code in libc, we_check(). The new we_check() is an optimistic check that all the characters | & ; < > ( ) { } are quoted. To avoid duplicating too much sh logic, such characters are permitted when quoting characters are seen, even if the quoting characters may themselves be quoted. This code reports all WRDE_BADCHAR errors; bad characters that get past it and are a syntax error in sh return WRDE_SYNTAX. Although many implementations of WRDE_NOCMD erroneously allow some command substitutions (and ours even documented this), there appears to be code that relies on its security (codesearch.debian.net shows quite a few uses). Passing untrusted data to wordexp() still exposes a denial of service possibility and a fairly large attack surface. This is also a MFC of r286830 to reduce conflicts. I changed the code somewhat to avoid changes from r286941; in particular, WRDE_BADVAL can still only be returned if WRDE_UNDEF was passed. Relnotes: yes Security: fixes command execution with wordexp(untrusted, WRDE_NOCMD) Modified: stable/10/bin/sh/builtins.def stable/10/bin/sh/expand.c stable/10/bin/sh/parser.c stable/10/bin/sh/parser.h stable/10/lib/libc/gen/wordexp.3 stable/10/lib/libc/gen/wordexp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/builtins.def ============================================================================== --- stable/10/bin/sh/builtins.def Sun Oct 25 16:04:31 2015 (r289937) +++ stable/10/bin/sh/builtins.def Sun Oct 25 17:17:50 2015 (r289938) @@ -65,6 +65,7 @@ exportcmd -s export -s readonly #exprcmd expr falsecmd false fgcmd -j fg +freebsd_wordexpcmd freebsd_wordexp getoptscmd getopts hashcmd hash histcmd -h fc Modified: stable/10/bin/sh/expand.c ============================================================================== --- stable/10/bin/sh/expand.c Sun Oct 25 16:04:31 2015 (r289937) +++ stable/10/bin/sh/expand.c Sun Oct 25 17:17:50 2015 (r289938) @@ -1660,3 +1660,57 @@ wordexpcmd(int argc, char **argv) outbin(argv[i], strlen(argv[i]) + 1, out1); return (0); } + +/* + * Do most of the work for wordexp(3), new version. + */ + +int +freebsd_wordexpcmd(int argc __unused, char **argv __unused) +{ + struct arglist arglist; + union node *args, *n; + struct strlist *sp; + size_t count, len; + int ch; + int protected = 0; + int fd = -1; + + while ((ch = nextopt("f:p")) != '\0') { + switch (ch) { + case 'f': + fd = number(shoptarg); + break; + case 'p': + protected = 1; + break; + } + } + if (*argptr != NULL) + error("wrong number of arguments"); + if (fd < 0) + error("missing fd"); + INTOFF; + setinputfd(fd, 1); + INTON; + args = parsewordexp(); + popfile(); /* will also close fd */ + if (protected) + for (n = args; n != NULL; n = n->narg.next) { + if (n->narg.backquote != NULL) { + outcslow('C', out1); + error("command substitution disabled"); + } + } + outcslow(' ', out1); + arglist.lastp = &arglist.list; + for (n = args; n != NULL; n = n->narg.next) + expandarg(n, &arglist, EXP_FULL | EXP_TILDE); + *arglist.lastp = NULL; + for (sp = arglist.list, count = len = 0; sp; sp = sp->next) + count++, len += strlen(sp->text); + out1fmt("%016zx %016zx", count, len); + for (sp = arglist.list; sp; sp = sp->next) + outbin(sp->text, strlen(sp->text) + 1, out1); + return (0); +} Modified: stable/10/bin/sh/parser.c ============================================================================== --- stable/10/bin/sh/parser.c Sun Oct 25 16:04:31 2015 (r289937) +++ stable/10/bin/sh/parser.c Sun Oct 25 17:17:50 2015 (r289938) @@ -229,6 +229,39 @@ parsecmd(int interact) } +/* + * Read and parse words for wordexp. + * Returns a list of NARG nodes; NULL if there are no words. + */ +union node * +parsewordexp(void) +{ + union node *n, *first = NULL, **pnext; + int t; + + /* This assumes the parser is not re-entered, + * which could happen if we add command substitution on PS1/PS2. + */ + parser_temp_free_all(); + heredoclist = NULL; + + tokpushback = 0; + checkkwd = 0; + doprompt = 0; + setprompt(0); + needprompt = 0; + pnext = &first; + while ((t = readtoken()) != TEOF) { + if (t != TWORD) + synexpect(TWORD); + n = makename(); + *pnext = n; + pnext = &n->narg.next; + } + return first; +} + + static union node * list(int nlflag) { Modified: stable/10/bin/sh/parser.h ============================================================================== --- stable/10/bin/sh/parser.h Sun Oct 25 16:04:31 2015 (r289937) +++ stable/10/bin/sh/parser.h Sun Oct 25 17:17:50 2015 (r289938) @@ -76,6 +76,7 @@ extern const char *const parsekwd[]; union node *parsecmd(int); +union node *parsewordexp(void); void forcealias(void); void fixredir(union node *, const char *, int); int goodname(const char *); Modified: stable/10/lib/libc/gen/wordexp.3 ============================================================================== --- stable/10/lib/libc/gen/wordexp.3 Sun Oct 25 16:04:31 2015 (r289937) +++ stable/10/lib/libc/gen/wordexp.3 Sun Oct 25 17:17:50 2015 (r289938) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2004 +.Dd September 30, 2015 .Dt WORDEXP 3 .Os .Sh NAME @@ -108,8 +108,8 @@ function frees the memory allocated by .Sh IMPLEMENTATION NOTES The .Fn wordexp -function is implemented as a wrapper around the undocumented -.Ic wordexp +function is implemented using the undocumented +.Ic freebsd_wordexp shell built-in command. .Sh RETURN VALUES The @@ -189,18 +189,19 @@ and functions conform to .St -p1003.1-2001 . .Sh BUGS -Do not pass untrusted user data to -.Fn wordexp , -regardless of whether the -.Dv WRDE_NOCMD -flag is set. -The -.Fn wordexp -function attempts to detect input that would cause commands to be -executed before passing it to the shell -but it does not use the same parser so it may be fooled. -.Pp The current .Fn wordexp -implementation does not recognize multibyte characters, since the -shell (which it invokes to perform expansions) does not. +implementation does not recognize multibyte characters other than UTF-8, since +the shell (which it invokes to perform expansions) does not. +.Sh SECURITY CONSIDERATIONS +Pathname generation may create output that is exponentially larger than the +input size. +.Pp +Although this implementation detects command substitution reliably for +.Dv WRDE_NOCMD , +the attack surface remains fairly large. +Also, some other implementations +(such as older versions of this one) +may execute command substitutions even if +.Dv WRDE_NOCMD +is set. Modified: stable/10/lib/libc/gen/wordexp.c ============================================================================== --- stable/10/lib/libc/gen/wordexp.c Sun Oct 25 16:04:31 2015 (r289937) +++ stable/10/lib/libc/gen/wordexp.c Sun Oct 25 17:17:50 2015 (r289938) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -43,7 +44,7 @@ __FBSDID("$FreeBSD$"); static int we_askshell(const char *, wordexp_t *, int); -static int we_check(const char *, int); +static int we_check(const char *); /* * wordexp -- @@ -65,7 +66,7 @@ wordexp(const char * __restrict words, w we->we_strings = NULL; we->we_nbytes = 0; } - if ((error = we_check(words, flags)) != 0) { + if ((error = we_check(words)) != 0) { wordfree(we); return (error); } @@ -94,18 +95,37 @@ we_read_fully(int fd, char *buffer, size return done; } +static bool +we_write_fully(int fd, const char *buffer, size_t len) +{ + size_t done; + ssize_t nwritten; + + done = 0; + do { + nwritten = _write(fd, buffer + done, len - done); + if (nwritten == -1 && errno == EINTR) + continue; + if (nwritten <= 0) + return (false); + done += nwritten; + } while (done != len); + return (true); +} + /* * we_askshell -- - * Use the `wordexp' /bin/sh builtin function to do most of the work - * in expanding the word string. This function is complicated by + * Use the `freebsd_wordexp' /bin/sh builtin function to do most of the + * work in expanding the word string. This function is complicated by * memory management. */ static int we_askshell(const char *words, wordexp_t *we, int flags) { - int pdes[2]; /* Pipe to child */ - char bbuf[9]; /* Buffer for byte count */ - char wbuf[9]; /* Buffer for word count */ + int pdesw[2]; /* Pipe for writing words */ + int pdes[2]; /* Pipe for reading output */ + char wfdstr[sizeof(int) * 3 + 1]; + char buf[35]; /* Buffer for byte and word count */ long nwords, nbytes; /* Number of words, bytes from child */ long i; /* Handy integer */ size_t sofs; /* Offset into we->we_strings */ @@ -124,13 +144,21 @@ we_askshell(const char *words, wordexp_t serrno = errno; ifs = getenv("IFS"); - if (pipe2(pdes, O_CLOEXEC) < 0) + if (pipe2(pdesw, O_CLOEXEC) < 0) + return (WRDE_NOSPACE); /* XXX */ + snprintf(wfdstr, sizeof(wfdstr), "%d", pdesw[0]); + if (pipe2(pdes, O_CLOEXEC) < 0) { + _close(pdesw[0]); + _close(pdesw[1]); return (WRDE_NOSPACE); /* XXX */ + } (void)sigemptyset(&newsigblock); (void)sigaddset(&newsigblock, SIGCHLD); (void)__libc_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); if ((pid = fork()) < 0) { serrno = errno; + _close(pdesw[0]); + _close(pdesw[1]); _close(pdes[0]); _close(pdes[1]); (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); @@ -139,38 +167,63 @@ we_askshell(const char *words, wordexp_t } else if (pid == 0) { /* - * We are the child; just get /bin/sh to run the wordexp - * builtin on `words'. + * We are the child; make /bin/sh expand `words'. */ (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); if ((pdes[1] != STDOUT_FILENO ? _dup2(pdes[1], STDOUT_FILENO) : _fcntl(pdes[1], F_SETFD, 0)) < 0) _exit(1); + if (_fcntl(pdesw[0], F_SETFD, 0) < 0) + _exit(1); execl(_PATH_BSHELL, "sh", flags & WRDE_UNDEF ? "-u" : "+u", - "-c", "IFS=$1;eval \"$2\";eval \"wordexp $3\"", "", + "-c", "IFS=$1;eval \"$2\";" + "freebsd_wordexp -f \"$3\" ${4:+\"$4\"}", + "", ifs != NULL ? ifs : " \t\n", - flags & WRDE_SHOWERR ? "" : "exec 2>/dev/null", words, + flags & WRDE_SHOWERR ? "" : "exec 2>/dev/null", + wfdstr, + flags & WRDE_NOCMD ? "-p" : "", (char *)NULL); _exit(1); } /* - * We are the parent; read the output of the shell wordexp function, - * which is a 32-bit hexadecimal word count, a 32-bit hexadecimal - * byte count (not including terminating null bytes), followed by - * the expanded words separated by nulls. + * We are the parent; write the words. */ _close(pdes[1]); - if (we_read_fully(pdes[0], wbuf, 8) != 8 || - we_read_fully(pdes[0], bbuf, 8) != 8) { - error = flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX; + _close(pdesw[0]); + if (!we_write_fully(pdesw[1], words, strlen(words))) { + _close(pdesw[1]); + error = WRDE_SYNTAX; + goto cleanup; + } + _close(pdesw[1]); + /* + * Read the output of the shell wordexp function, + * which is a byte indicating that the words were parsed successfully, + * a 64-bit hexadecimal word count, a dummy byte, a 64-bit hexadecimal + * byte count (not including terminating null bytes), followed by the + * expanded words separated by nulls. + */ + switch (we_read_fully(pdes[0], buf, 34)) { + case 1: + error = buf[0] == 'C' ? WRDE_CMDSUB : + flags & WRDE_UNDEF ? WRDE_BADVAL : + WRDE_SYNTAX; + serrno = errno; + goto cleanup; + case 34: + break; + default: + error = WRDE_SYNTAX; serrno = errno; goto cleanup; } - wbuf[8] = bbuf[8] = '\0'; - nwords = strtol(wbuf, NULL, 16); - nbytes = strtol(bbuf, NULL, 16) + nwords; + buf[17] = '\0'; + nwords = strtol(buf + 1, NULL, 16); + buf[34] = '\0'; + nbytes = strtol(buf + 18, NULL, 16) + nwords; /* * Allocate or reallocate (when flags & WRDE_APPEND) the word vector @@ -243,83 +296,96 @@ cleanup: * we_check -- * Check that the string contains none of the following unquoted * special characters: |&;<>(){} - * or command substitutions when WRDE_NOCMD is set in flags. + * This mainly serves for {} which are normally legal in sh. + * It deliberately does not attempt to model full sh syntax. */ static int -we_check(const char *words, int flags) +we_check(const char *words) { char c; - int dquote, level, quote, squote; + /* Saw \ or $, possibly not special: */ + bool quote = false, dollar = false; + /* Saw ', ", ${, ` or $(, possibly not special: */ + bool have_sq = false, have_dq = false, have_par_begin = false; + bool have_cmd = false; + /* Definitely saw a ', ", ${, ` or $(, need a closing character: */ + bool need_sq = false, need_dq = false, need_par_end = false; + bool need_cmd_old = false, need_cmd_new = false; - quote = squote = dquote = 0; while ((c = *words++) != '\0') { switch (c) { case '\\': - if (squote == 0) - quote ^= 1; + quote = !quote; + continue; + case '$': + if (quote) + quote = false; + else + dollar = !dollar; continue; case '\'': - if (quote + dquote == 0) - squote ^= 1; + if (!quote && !have_sq && !have_dq) + need_sq = true; + else + need_sq = false; + have_sq = true; break; case '"': - if (quote + squote == 0) - dquote ^= 1; + if (!quote && !have_sq && !have_dq) + need_dq = true; + else + need_dq = false; + have_dq = true; break; case '`': - if (quote + squote == 0 && flags & WRDE_NOCMD) - return (WRDE_CMDSUB); - while ((c = *words++) != '\0' && c != '`') - if (c == '\\' && (c = *words++) == '\0') - break; - if (c == '\0') - return (WRDE_SYNTAX); + if (!quote && !have_sq && !have_cmd) + need_cmd_old = true; + else + need_cmd_old = false; + have_cmd = true; break; - case '|': case '&': case ';': case '<': case '>': - case '{': case '}': case '(': case ')': case '\n': - if (quote + squote + dquote == 0) + case '{': + if (!quote && !dollar && !have_sq && !have_dq && + !have_cmd) return (WRDE_BADCHAR); + if (dollar) { + if (!quote && !have_sq) + need_par_end = true; + have_par_begin = true; + } break; - case '$': - if ((c = *words++) == '\0') - break; - else if (quote + squote == 0 && c == '(') { - if (flags & WRDE_NOCMD && *words != '(') - return (WRDE_CMDSUB); - level = 1; - while ((c = *words++) != '\0') { - if (c == '\\') { - if ((c = *words++) == '\0') - break; - } else if (c == '(') - level++; - else if (c == ')' && --level == 0) - break; - } - if (c == '\0' || level != 0) - return (WRDE_SYNTAX); - } else if (quote + squote == 0 && c == '{') { - level = 1; - while ((c = *words++) != '\0') { - if (c == '\\') { - if ((c = *words++) == '\0') - break; - } else if (c == '{') - level++; - else if (c == '}' && --level == 0) - break; - } - if (c == '\0' || level != 0) - return (WRDE_SYNTAX); - } else - --words; + case '}': + if (!quote && !have_sq && !have_dq && !have_par_begin && + !have_cmd) + return (WRDE_BADCHAR); + need_par_end = false; + break; + case '(': + if (!quote && !dollar && !have_sq && !have_dq && + !have_cmd) + return (WRDE_BADCHAR); + if (dollar) { + if (!quote && !have_sq) + need_cmd_new = true; + have_cmd = true; + } + break; + case ')': + if (!quote && !have_sq && !have_dq && !have_cmd) + return (WRDE_BADCHAR); + need_cmd_new = false; + break; + case '|': case '&': case ';': case '<': case '>': case '\n': + if (!quote && !have_sq && !have_dq && !have_cmd) + return (WRDE_BADCHAR); break; default: break; } - quote = 0; + quote = dollar = false; } - if (quote + squote + dquote != 0) + if (quote || dollar || need_sq || need_dq || need_par_end || + need_cmd_old || need_cmd_new) return (WRDE_SYNTAX); return (0); From owner-svn-src-stable-10@freebsd.org Sun Oct 25 21:39:25 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BC4D80FD; Sun, 25 Oct 2015 21:39:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 DEDCD1CC1; Sun, 25 Oct 2015 21:39:24 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PLdNjc099205; Sun, 25 Oct 2015 21:39:23 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PLdNJL099204; Sun, 25 Oct 2015 21:39:23 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201510252139.t9PLdNJL099204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 25 Oct 2015 21:39: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: r289943 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 21:39:25 -0000 Author: jilles Date: Sun Oct 25 21:39:23 2015 New Revision: 289943 URL: https://svnweb.freebsd.org/changeset/base/289943 Log: MFC r288309: fnmatch(): Remove exponential behaviour as in sh r229201. The old code was exponential in the number of asterisks in the pattern. However, once a match has been found upto the next asterisk, the previous asterisks are no longer relevant. Modified: stable/10/lib/libc/gen/fnmatch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/fnmatch.c ============================================================================== --- stable/10/lib/libc/gen/fnmatch.c Sun Oct 25 19:55:48 2015 (r289942) +++ stable/10/lib/libc/gen/fnmatch.c Sun Oct 25 21:39:23 2015 (r289943) @@ -91,11 +91,14 @@ fnmatch1(pattern, string, stringstart, f int flags; mbstate_t patmbs, strmbs; { + const char *bt_pattern, *bt_string; + mbstate_t bt_patmbs, bt_strmbs; char *newp; char c; wchar_t pc, sc; size_t pclen, sclen; + bt_pattern = bt_string = NULL; for (;;) { pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) @@ -111,16 +114,18 @@ fnmatch1(pattern, string, stringstart, f case EOS: if ((flags & FNM_LEADING_DIR) && sc == '/') return (0); - return (sc == EOS ? 0 : FNM_NOMATCH); + if (sc == EOS) + return (0); + goto backtrack; case '?': if (sc == EOS) return (FNM_NOMATCH); if (sc == '/' && (flags & FNM_PATHNAME)) - return (FNM_NOMATCH); + goto backtrack; if (sc == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) - return (FNM_NOMATCH); + goto backtrack; string += sclen; break; case '*': @@ -132,7 +137,7 @@ fnmatch1(pattern, string, stringstart, f if (sc == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) - return (FNM_NOMATCH); + goto backtrack; /* Optimize for pattern with * at end or before /. */ if (c == EOS) @@ -148,33 +153,24 @@ fnmatch1(pattern, string, stringstart, f break; } - /* General case, use recursion. */ - while (sc != EOS) { - if (!fnmatch1(pattern, string, stringstart, - flags, patmbs, strmbs)) - return (0); - sclen = mbrtowc(&sc, string, MB_LEN_MAX, - &strmbs); - if (sclen == (size_t)-1 || - sclen == (size_t)-2) { - sc = (unsigned char)*string; - sclen = 1; - memset(&strmbs, 0, sizeof(strmbs)); - } - if (sc == '/' && flags & FNM_PATHNAME) - break; - string += sclen; - } - return (FNM_NOMATCH); + /* + * First try the shortest match for the '*' that + * could work. We can forget any earlier '*' since + * there is no way having it match more characters + * can help us, given that we are already here. + */ + bt_pattern = pattern, bt_patmbs = patmbs; + bt_string = string, bt_strmbs = strmbs; + break; case '[': if (sc == EOS) return (FNM_NOMATCH); if (sc == '/' && (flags & FNM_PATHNAME)) - return (FNM_NOMATCH); + goto backtrack; if (sc == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) - return (FNM_NOMATCH); + goto backtrack; switch (rangematch(pattern, sc, flags, &newp, &patmbs)) { @@ -184,7 +180,7 @@ fnmatch1(pattern, string, stringstart, f pattern = newp; break; case RANGE_NOMATCH: - return (FNM_NOMATCH); + goto backtrack; } string += sclen; break; @@ -199,14 +195,39 @@ fnmatch1(pattern, string, stringstart, f /* FALLTHROUGH */ default: norm: + string += sclen; if (pc == sc) ; else if ((flags & FNM_CASEFOLD) && (towlower(pc) == towlower(sc))) ; - else - return (FNM_NOMATCH); - string += sclen; + else { + backtrack: + /* + * If we have a mismatch (other than hitting + * the end of the string), go back to the last + * '*' seen and have it match one additional + * character. + */ + if (bt_pattern == NULL) + return (FNM_NOMATCH); + sclen = mbrtowc(&sc, bt_string, MB_LEN_MAX, + &bt_strmbs); + if (sclen == (size_t)-1 || + sclen == (size_t)-2) { + sc = (unsigned char)*bt_string; + sclen = 1; + memset(&bt_strmbs, 0, + sizeof(bt_strmbs)); + } + if (sc == EOS) + return (FNM_NOMATCH); + if (sc == '/' && flags & FNM_PATHNAME) + return (FNM_NOMATCH); + bt_string += sclen; + pattern = bt_pattern, patmbs = bt_patmbs; + string = bt_string, strmbs = bt_strmbs; + } break; } } From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:17:45 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C7808DBD; Sun, 25 Oct 2015 22:17:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEFFC1875; Sun, 25 Oct 2015 22:17:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMHhM4011284; Sun, 25 Oct 2015 22:17:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMHhI5011283; Sun, 25 Oct 2015 22:17:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252217.t9PMHhI5011283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:17:43 +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: r289949 - stable/10/usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:17:45 -0000 Author: ngie Date: Sun Oct 25 22:17:43 2015 New Revision: 289949 URL: https://svnweb.freebsd.org/changeset/base/289949 Log: MFC r286304: Set f_file to -1/F_UNUSED when after closing when possible This will help ensure we don't trash file descriptors that get used later on in the daemon Found via internal Coverity scan Discussed with: cem, ed, markj Differential Revision: https://reviews.freebsd.org/D3081 Submitted by: Miles Ohlrich Sponsored by: EMC / Isilon Storage Division Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Sun Oct 25 22:17:10 2015 (r289948) +++ stable/10/usr.sbin/syslogd/syslogd.c Sun Oct 25 22:17:43 2015 (r289949) @@ -339,6 +339,18 @@ static int waitdaemon(int, int, int); static void timedout(int); static void increase_rcvbuf(int); +static void +close_filed(struct filed *f) +{ + + if (f == NULL || f->f_file == -1) + return; + + (void)close(f->f_file); + f->f_file = -1; + f->f_type = F_UNUSED; +} + int main(int argc, char *argv[]) { @@ -986,7 +998,8 @@ logmsg(int pri, const char *msg, const c (void)strlcpy(f->f_lasttime, timestamp, sizeof(f->f_lasttime)); fprintlog(f, flags, msg); - (void)close(f->f_file); + close(f->f_file); + f->f_file = -1; } (void)sigsetmask(omask); return; @@ -1275,8 +1288,7 @@ fprintlog(struct filed *f, int flags, co */ if (errno != ENOSPC) { int e = errno; - (void)close(f->f_file); - f->f_type = F_UNUSED; + close_filed(f); errno = e; logerror(f->f_un.f_fname); } @@ -1300,7 +1312,7 @@ fprintlog(struct filed *f, int flags, co } if (writev(f->f_file, iov, IOV_SIZE) < 0) { int e = errno; - (void)close(f->f_file); + close_filed(f); if (f->f_un.f_pipe.f_pid > 0) deadq_enter(f->f_un.f_pipe.f_pid, f->f_un.f_pipe.f_pname); @@ -1408,7 +1420,7 @@ reapchild(int signo __unused) for (f = Files; f; f = f->f_next) if (f->f_type == F_PIPE && f->f_un.f_pipe.f_pid == pid) { - (void)close(f->f_file); + close_filed(f); f->f_un.f_pipe.f_pid = 0; log_deadchild(pid, status, f->f_un.f_pipe.f_pname); @@ -1512,7 +1524,7 @@ die(int signo) if (f->f_prevcount) fprintlog(f, 0, (char *)NULL); if (f->f_type == F_PIPE && f->f_un.f_pipe.f_pid > 0) { - (void)close(f->f_file); + close_filed(f); f->f_un.f_pipe.f_pid = 0; } } @@ -1578,11 +1590,11 @@ init(int signo) case F_FORW: case F_CONSOLE: case F_TTY: - (void)close(f->f_file); + close_filed(f); break; case F_PIPE: if (f->f_un.f_pipe.f_pid > 0) { - (void)close(f->f_file); + close_filed(f); deadq_enter(f->f_un.f_pipe.f_pid, f->f_un.f_pipe.f_pname); } From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:21:20 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78976A1708A; Sun, 25 Oct 2015 22:21:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41FD11D56; Sun, 25 Oct 2015 22:21:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMLJxh011606; Sun, 25 Oct 2015 22:21:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMLJcJ011605; Sun, 25 Oct 2015 22:21:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252221.t9PMLJcJ011605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:21:19 +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: r289952 - stable/10/sys/geom/uzip X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:21:20 -0000 Author: ngie Date: Sun Oct 25 22:21:19 2015 New Revision: 289952 URL: https://svnweb.freebsd.org/changeset/base/289952 Log: MFC r286367: Make some debug printf's into DPRINTF's to reduce noise on attach/detach Differential Revision: https://reviews.freebsd.org/D3306 Reviewed by: loos Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/geom/uzip/g_uzip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/uzip/g_uzip.c ============================================================================== --- stable/10/sys/geom/uzip/g_uzip.c Sun Oct 25 22:20:13 2015 (r289951) +++ stable/10/sys/geom/uzip/g_uzip.c Sun Oct 25 22:21:19 2015 (r289952) @@ -94,8 +94,8 @@ g_uzip_softc_free(struct g_uzip_softc *s { if (gp != NULL) { - printf("%s: %d requests, %d cached\n", - gp->name, sc->req_total, sc->req_cached); + DPRINTF(("%s: %d requests, %d cached\n", + gp->name, sc->req_total, sc->req_cached)); } if (sc->offsets != NULL) { free(sc->offsets, M_GEOM_UZIP); @@ -519,7 +519,7 @@ g_uzip_taste(struct g_class *mp, struct gp->name, pp2->sectorsize, (intmax_t)pp2->mediasize, pp2->stripeoffset, pp2->stripesize, pp2->flags)); - printf("%s: %u x %u blocks\n", gp->name, sc->nblocks, sc->blksz); + DPRINTF(("%s: %u x %u blocks\n", gp->name, sc->nblocks, sc->blksz)); return (gp); err: @@ -547,7 +547,7 @@ g_uzip_destroy_geom(struct gctl_req *req g_topology_assert(); if (gp->softc == NULL) { - printf("%s(%s): gp->softc == NULL\n", __func__, gp->name); + DPRINTF(("%s(%s): gp->softc == NULL\n", __func__, gp->name)); return (ENXIO); } From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:23:05 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2010A1710A; Sun, 25 Oct 2015 22:23:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 639F5101D; Sun, 25 Oct 2015 22:23:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMN4QR014141; Sun, 25 Oct 2015 22:23:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMN4xY014139; Sun, 25 Oct 2015 22:23:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252223.t9PMN4xY014139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:23:04 +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: r289953 - in stable/10: . share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:23:05 -0000 Author: ngie Date: Sun Oct 25 22:23:04 2015 New Revision: 289953 URL: https://svnweb.freebsd.org/changeset/base/289953 Log: MFC r284405: Remove ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support from atf.test.mk The legacy atf tools were removed in atf 0.20 Modified: stable/10/UPDATING stable/10/share/mk/atf.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Sun Oct 25 22:21:19 2015 (r289952) +++ stable/10/UPDATING Sun Oct 25 22:23:04 2015 (r289953) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20151025: + ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support has been removed from + atf.test.mk (included from bsd.test.mk). Please upgrade devel/atf + and devel/kyua to version 0.20+ and adjust any calling code to work + with Kyuafile and kyua. + 20150823: The polarity of Pulse Per Second (PPS) capture events with the uart(4) driver has been corrected. Prior to this change the PPS Modified: stable/10/share/mk/atf.test.mk ============================================================================== --- stable/10/share/mk/atf.test.mk Sun Oct 25 22:21:19 2015 (r289952) +++ stable/10/share/mk/atf.test.mk Sun Oct 25 22:23:04 2015 (r289953) @@ -22,28 +22,10 @@ ATF_TESTS_C?= ATF_TESTS_CXX?= ATF_TESTS_SH?= -# Whether to allow using the deprecated ATF tools or not. -# -# If 'yes', this file will generate Atffiles when requested and will also -# support using the deprecated atf-run tool to execute the tests. -ALLOW_DEPRECATED_ATF_TOOLS?= no - -# Knob to control the handling of the Atffile for this Makefile. -# -# If 'yes', an Atffile exists in the source tree and is installed into -# TESTSDIR. -# -# If 'auto', an Atffile is automatically generated based on the list of test -# programs built by the Makefile and is installed into TESTSDIR. This is the -# default and is sufficient in the majority of the cases. -# -# If 'no', no Atffile is installed. -ATFFILE?= auto - # Path to the prefix of the installed ATF tools, if any. # # If atf-run and atf-report are installed from ports, we automatically define a -# realtest target below to run the tests using these tools. The tools are +# realregress target below to run the tests using these tools. The tools are # searched for in the hierarchy specified by this variable. ATF_PREFIX?= /usr/local @@ -115,67 +97,3 @@ ${_T}: ${ATF_TESTS_SH_SRC_${_T}} mv ${.TARGET}.tmp ${.TARGET} .endfor .endif - -.if ${ALLOW_DEPRECATED_ATF_TOOLS} != "no" - -.if ${ATFFILE:tl} != "no" -FILES+= Atffile -FILESDIR_Atffile= ${TESTSDIR} - -.if ${ATFFILE:tl} == "auto" -CLEANFILES+= Atffile Atffile.tmp - -Atffile: Makefile - @{ echo 'Content-Type: application/X-atf-atffile; version="1"'; \ - echo; \ - echo '# Automatically generated by atf-test.mk.'; \ - echo; \ - echo 'prop: test-suite = "'${TESTSUITE}'"'; \ - echo; \ - for tp in ${ATF_TESTS_C} ${ATF_TESTS_CXX} ${ATF_TESTS_SH} \ - ${TESTS_SUBDIRS}; \ - do \ - echo "tp: $${tp}"; \ - done; } >Atffile.tmp - @mv Atffile.tmp Atffile -.endif -.endif - -ATF_REPORT?= ${ATF_PREFIX}/bin/atf-report -ATF_RUN?= ${ATF_PREFIX}/bin/atf-run -.if exists(${ATF_RUN}) && exists(${ATF_REPORT}) -# Definition of the "make test" target and supporting variables. -# -# This target, by necessity, can only work for native builds (i.e. a freeBSD -# host building a release for the same system). The target runs ATF, which is -# not in the toolchain, and the tests execute code built for the target host. -# -# Due to the dependencies of the binaries built by the source tree and how they -# are used by tests, it is highly possible for a execution of "make test" to -# report bogus results unless the new binaries are put in place. -_TESTS_FIFO= ${.OBJDIR}/atf-run.fifo -_TESTS_LOG= ${.OBJDIR}/atf-run.log -CLEANFILES+= ${_TESTS_FIFO} ${_TESTS_LOG} -realtest: .PHONY - @set -e; \ - if [ -z "${TESTSDIR}" ]; then \ - echo "*** No TESTSDIR defined; nothing to do."; \ - exit 0; \ - fi; \ - cd ${DESTDIR}${TESTSDIR}; \ - rm -f ${_TESTS_FIFO}; \ - mkfifo ${_TESTS_FIFO}; \ - tee ${_TESTS_LOG} < ${_TESTS_FIFO} | ${TESTS_ENV} ${ATF_REPORT} & \ - set +e; \ - ${TESTS_ENV} ${ATF_RUN} >> ${_TESTS_FIFO}; \ - result=$${?}; \ - wait; \ - rm -f ${_TESTS_FIFO}; \ - echo; \ - echo "*** The verbatim output of atf-run has been saved to ${_TESTS_LOG}"; \ - echo "***"; \ - echo "*** WARNING: atf-run is deprecated; please install kyua instead"; \ - exit $${result} -.endif - -.endif From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:30:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC9D4A17265; Sun, 25 Oct 2015 22:30:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE93A127B; Sun, 25 Oct 2015 22:30:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMUjqd014568; Sun, 25 Oct 2015 22:30:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMUjog014562; Sun, 25 Oct 2015 22:30:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252230.t9PMUjog014562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:30:45 +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: r289954 - stable/10/tools/regression/p1003_1b X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:30:47 -0000 Author: ngie Date: Sun Oct 25 22:30:45 2015 New Revision: 289954 URL: https://svnweb.freebsd.org/changeset/base/289954 Log: MFC r282072,r283018: r282072: - Fix compilation (MAP_INHERIT's dead) - Fix warnings - Use mkstemp instead of tmpnam r283018: Fix more warnings related to missing headers Modified: stable/10/tools/regression/p1003_1b/Makefile stable/10/tools/regression/p1003_1b/fifo.c stable/10/tools/regression/p1003_1b/main.c stable/10/tools/regression/p1003_1b/prutil.c stable/10/tools/regression/p1003_1b/sched.c stable/10/tools/regression/p1003_1b/yield.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/p1003_1b/Makefile ============================================================================== --- stable/10/tools/regression/p1003_1b/Makefile Sun Oct 25 22:23:04 2015 (r289953) +++ stable/10/tools/regression/p1003_1b/Makefile Sun Oct 25 22:30:45 2015 (r289954) @@ -14,4 +14,5 @@ SRCS=\ MAN= CFLAGS+=-DNO_MEMLOCK + .include Modified: stable/10/tools/regression/p1003_1b/fifo.c ============================================================================== --- stable/10/tools/regression/p1003_1b/fifo.c Sun Oct 25 22:23:04 2015 (r289953) +++ stable/10/tools/regression/p1003_1b/fifo.c Sun Oct 25 22:30:45 2015 (r289954) @@ -31,17 +31,17 @@ * * $FreeBSD$ */ -#include -#include -#include -#include -#include -#include #include #include #include +#include +#include +#include #include #include +#include +#include +#include volatile int ticked; #define CAN_USE_ALARMS @@ -109,7 +109,7 @@ int fifo(int argc, char *argv[]) fifo_param.sched_priority = 1; p = (long *)mmap(0, sizeof(*p), - PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED|MAP_INHERIT, -1, 0); + PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0); if (p == (long *)-1) err(errno, "mmap"); Modified: stable/10/tools/regression/p1003_1b/main.c ============================================================================== --- stable/10/tools/regression/p1003_1b/main.c Sun Oct 25 22:23:04 2015 (r289953) +++ stable/10/tools/regression/p1003_1b/main.c Sun Oct 25 22:30:45 2015 (r289954) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ #include +#include int fifo(int argc, char *argv[]); int memlock(int argc, char *argv[]); Modified: stable/10/tools/regression/p1003_1b/prutil.c ============================================================================== --- stable/10/tools/regression/p1003_1b/prutil.c Sun Oct 25 22:23:04 2015 (r289953) +++ stable/10/tools/regression/p1003_1b/prutil.c Sun Oct 25 22:30:45 2015 (r289954) @@ -1,10 +1,11 @@ +#include #include -#include #include #include - -#include +#include #include +#include + #include "prutil.h" /* @@ -12,7 +13,7 @@ */ void quit(const char *text) { - err(errno, text); + err(errno, "%s", text); } char *sched_text(int scheduler) Modified: stable/10/tools/regression/p1003_1b/sched.c ============================================================================== --- stable/10/tools/regression/p1003_1b/sched.c Sun Oct 25 22:23:04 2015 (r289953) +++ stable/10/tools/regression/p1003_1b/sched.c Sun Oct 25 22:30:45 2015 (r289954) @@ -41,16 +41,17 @@ #define _POSIX_SOURCE #define _POSIX_C_SOURCE 199309L -#include -#include - -#include -#include +#include #include #include -#include - +#include #include +#include +#define __XSI_VISIBLE 1 +#include +#undef __XSI_VISIBLE +#include +#include #include "prutil.h" @@ -209,17 +210,14 @@ int sched(int ac, char *av[]) { -#define NAM "P1003_1b_schedXXXX" - char nam[L_tmpnam]; + char nam[] = "P1003_1b_schedXXXXXX"; int fd; pid_t p; pid_t *lastrun; - strcpy(nam, NAM); - if (tmpnam(nam) != nam) - q(__LINE__, errno, "tmpnam " NAM); - q(__LINE__, (fd = open(nam, O_RDWR|O_CREAT, 0666)), - "open " NAM); + fd = mkstemp(nam); + if (fd == -1) + q(__LINE__, errno, "mkstemp failed"); (void)unlink(nam); Modified: stable/10/tools/regression/p1003_1b/yield.c ============================================================================== --- stable/10/tools/regression/p1003_1b/yield.c Sun Oct 25 22:23:04 2015 (r289953) +++ stable/10/tools/regression/p1003_1b/yield.c Sun Oct 25 22:30:45 2015 (r289954) @@ -89,7 +89,7 @@ int yield(int argc, char *argv[]) n = nslaves = atoi(argv[1]); p = (int *)mmap(0, sizeof(int), - PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED|MAP_INHERIT, -1, 0); + PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0); if (p == (int *)-1) err(errno, "mmap"); From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:34:50 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81774A1750E; Sun, 25 Oct 2015 22:34:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A5CF19C3; Sun, 25 Oct 2015 22:34:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMYn7G017347; Sun, 25 Oct 2015 22:34:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMYntg017346; Sun, 25 Oct 2015 22:34:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252234.t9PMYntg017346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:34:49 +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: r289956 - stable/10/cddl/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:34:50 -0000 Author: ngie Date: Sun Oct 25 22:34:49 2015 New Revision: 289956 URL: https://svnweb.freebsd.org/changeset/base/289956 Log: MFC r283144: Articulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs Parallelize the build in this subdirectory Sponsored by: EMC / Isilon Storage Division Modified: stable/10/cddl/lib/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/lib/Makefile ============================================================================== --- stable/10/cddl/lib/Makefile Sun Oct 25 22:33:04 2015 (r289955) +++ stable/10/cddl/lib/Makefile Sun Oct 25 22:34:49 2015 (r289956) @@ -32,4 +32,9 @@ _drti= drti _libdtrace= libdtrace .endif +SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core + +SUBDIR_PARALLEL= + .include From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:38:19 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01665A17605; Sun, 25 Oct 2015 22:38:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A767D1CCB; Sun, 25 Oct 2015 22:38:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMcHrO017589; Sun, 25 Oct 2015 22:38:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMcHU9017588; Sun, 25 Oct 2015 22:38:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252238.t9PMcHU9017588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:38: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: r289958 - stable/10/sys/geom/uncompress X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:38:19 -0000 Author: ngie Date: Sun Oct 25 22:38:17 2015 New Revision: 289958 URL: https://svnweb.freebsd.org/changeset/base/289958 Log: MFC r286512: Make some debug printf's into DPRINTF's to reduce noise on attach/detahh Similar reasoning to what was done in r286367 with geom_uzip(4) Differential Revision: D3320 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/geom/uncompress/g_uncompress.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/uncompress/g_uncompress.c ============================================================================== --- stable/10/sys/geom/uncompress/g_uncompress.c Sun Oct 25 22:35:43 2015 (r289957) +++ stable/10/sys/geom/uncompress/g_uncompress.c Sun Oct 25 22:38:17 2015 (r289958) @@ -111,8 +111,8 @@ g_uncompress_softc_free(struct g_uncompr { if (gp != NULL) { - printf("%s: %d requests, %d cached\n", - gp->name, sc->req_total, sc->req_cached); + DPRINTF(("%s: %d requests, %d cached\n", + gp->name, sc->req_total, sc->req_cached)); } if (sc->offsets != NULL) { free(sc->offsets, M_GEOM_UNCOMPRESS); @@ -518,7 +518,7 @@ g_uncompress_taste(struct g_class *mp, s DPRINTF(("%s: image version too old\n", gp->name)); goto err; } - printf("%s: GEOM_ULZMA image found\n", gp->name); + DPRINTF(("%s: GEOM_ULZMA image found\n", gp->name)); break; case 'V': type = GEOM_UZIP; @@ -526,7 +526,7 @@ g_uncompress_taste(struct g_class *mp, s DPRINTF(("%s: image version too old\n", gp->name)); goto err; } - printf("%s: GEOM_UZIP image found\n", gp->name); + DPRINTF(("%s: GEOM_UZIP image found\n", gp->name)); break; default: DPRINTF(("%s: unsupported image type\n", gp->name)); @@ -622,7 +622,7 @@ g_uncompress_taste(struct g_class *mp, s gp->name, pp2->sectorsize, (intmax_t)pp2->mediasize, pp2->stripeoffset, pp2->stripesize, pp2->flags)); - printf("%s: %u x %u blocks\n", gp->name, sc->nblocks, sc->blksz); + DPRINTF(("%s: %u x %u blocks\n", gp->name, sc->nblocks, sc->blksz)); return (gp); err: @@ -651,7 +651,7 @@ g_uncompress_destroy_geom(struct gctl_re g_topology_assert(); if (gp->softc == NULL) { - printf("%s(%s): gp->softc == NULL\n", __func__, gp->name); + DPRINTF(("%s(%s): gp->softc == NULL\n", __func__, gp->name)); return (ENXIO); } From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:41:28 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E30FA176BB; Sun, 25 Oct 2015 22:41:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 374B61EB9; Sun, 25 Oct 2015 22:41:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMfRrn017769; Sun, 25 Oct 2015 22:41:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMfRKS017767; Sun, 25 Oct 2015 22:41:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252241.t9PMfRKS017767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:41:27 +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: r289959 - in stable/10: share/mk tools/build/options tools/tools/nanobsd/gateworks X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:41:28 -0000 Author: ngie Date: Sun Oct 25 22:41:26 2015 New Revision: 289959 URL: https://svnweb.freebsd.org/changeset/base/289959 Log: MFC r286822: Reap MK_SYSINSTALL It's no longer in use in the tree (most likely missed when sade/sysinstall were removed) Deleted: stable/10/tools/build/options/WITHOUT_SYSINSTALL Modified: stable/10/share/mk/bsd.own.mk stable/10/tools/tools/nanobsd/gateworks/common Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Sun Oct 25 22:38:17 2015 (r289958) +++ stable/10/share/mk/bsd.own.mk Sun Oct 25 22:41:26 2015 (r289959) @@ -369,7 +369,6 @@ __DEFAULT_YES_OPTIONS = \ SVNLITE \ SYMVER \ SYSCONS \ - SYSINSTALL \ TALK \ TCSH \ TCP_WRAPPERS \ Modified: stable/10/tools/tools/nanobsd/gateworks/common ============================================================================== --- stable/10/tools/tools/nanobsd/gateworks/common Sun Oct 25 22:38:17 2015 (r289958) +++ stable/10/tools/tools/nanobsd/gateworks/common Sun Oct 25 22:41:26 2015 (r289959) @@ -147,7 +147,6 @@ WITHOUT_SENDMAIL=true WITHOUT_SHAREDOCS=true WITHOUT_SSP=true WITHOUT_SYSCONS=true -WITHOUT_SYSINSTALL=true WITHOUT_TCSH=true WITHOUT_TFTPD=true WITHOUT_ZFS=true From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:43:12 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DF04A17805; Sun, 25 Oct 2015 22:43:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 151351197; Sun, 25 Oct 2015 22:43:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMhBCB020387; Sun, 25 Oct 2015 22:43:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMhBvw020386; Sun, 25 Oct 2015 22:43:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252243.t9PMhBvw020386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:43:11 +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: r289960 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:43:12 -0000 Author: ngie Date: Sun Oct 25 22:43:10 2015 New Revision: 289960 URL: https://svnweb.freebsd.org/changeset/base/289960 Log: Regen src.conf(5) after r289959 Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Sun Oct 25 22:41:26 2015 (r289959) +++ stable/10/share/man/man5/src.conf.5 Sun Oct 25 22:43:10 2015 (r289960) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des +.\" from FreeBSD: stable/10/tools/build/options/makeman 288396 2015-09-29 21:45:23Z bdrewery .\" $FreeBSD$ -.Dd April 23, 2015 +.Dd October 25, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1063,11 +1063,6 @@ Set to disable symbol versioning when bu Set to not build .Xr syscons 4 support files such as keyboard maps, fonts, and screen output maps. -.It Va WITHOUT_SYSINSTALL -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SYSINSTALL 183242 2008-09-21 22:02:26Z sam -Set to not build -.Xr sysinstall 8 -and related programs. .It Va WITHOUT_TALK .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TALK 278710 2015-02-13 21:19:54Z ngie Set to not build or install From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:44:38 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C401A17871; Sun, 25 Oct 2015 22:44:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5141812DE; Sun, 25 Oct 2015 22:44:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMibbM020510; Sun, 25 Oct 2015 22:44:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMibAs020509; Sun, 25 Oct 2015 22:44:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252244.t9PMibAs020509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:44:37 +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: r289961 - stable/10/usr.sbin/ntp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:44:38 -0000 Author: ngie Date: Sun Oct 25 22:44:37 2015 New Revision: 289961 URL: https://svnweb.freebsd.org/changeset/base/289961 Log: MFC r287520: Parallelize the usr.sbin/ntp subdirectory build Articulate all needed dependencies for the subdirectories Modified: stable/10/usr.sbin/ntp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ntp/Makefile ============================================================================== --- stable/10/usr.sbin/ntp/Makefile Sun Oct 25 22:43:10 2015 (r289960) +++ stable/10/usr.sbin/ntp/Makefile Sun Oct 25 22:44:37 2015 (r289961) @@ -5,4 +5,14 @@ SUBDIR= libopts libntp libntpevent libpa ntptime ntp-keygen sntp SUBDIR+= doc +SUBDIR_DEPEND_ntpd= libntp libopts libparse +SUBDIR_DEPEND_ntpdate= libntp +SUBDIR_DEPEND_ntpdc= libntp libopts +SUBDIR_DEPEND_ntpq= libntp libopts +SUBDIR_DEPEND_ntptime= libntp +SUBDIR_DEPEND_ntp-keygen= libntp libopts +SUBDIR_DEPEND_sntp= libntp libntpevent libopts + +SUBDIR_PARALLEL= + .include From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:50:35 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4045EA17A43; Sun, 25 Oct 2015 22:50:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA36159D; Sun, 25 Oct 2015 22:50:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMoY67020837; Sun, 25 Oct 2015 22:50:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMoYJF020836; Sun, 25 Oct 2015 22:50:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252250.t9PMoYJF020836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:50:34 +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: r289962 - stable/10/tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:50:35 -0000 Author: ngie Date: Sun Oct 25 22:50:33 2015 New Revision: 289962 URL: https://svnweb.freebsd.org/changeset/base/289962 Log: MFC r288057: Delete /etc/autofs/special_noauto when MK_AUTOFS == no Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Oct 25 22:44:37 2015 (r289961) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Oct 25 22:50:33 2015 (r289962) @@ -154,6 +154,7 @@ OLD_FILES+=usr/share/man/man8/authpf-noi OLD_FILES+=etc/autofs/include_ldap OLD_FILES+=etc/autofs/special_hosts OLD_FILES+=etc/autofs/special_media +OLD_FILES+=etc/autofs/special_noauto OLD_FILES+=etc/autofs/special_null OLD_FILES+=etc/auto_master OLD_FILES+=etc/rc.d/automount From owner-svn-src-stable-10@freebsd.org Sun Oct 25 22:55:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0792A17B98; Sun, 25 Oct 2015 22:55:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 467671A0E; Sun, 25 Oct 2015 22:55:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PMtKYM023583; Sun, 25 Oct 2015 22:55:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PMtKtC023580; Sun, 25 Oct 2015 22:55:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252255.t9PMtKtC023580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 22:55:20 +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: r289963 - in stable/10: . share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:55:21 -0000 Author: ngie Date: Sun Oct 25 22:55:19 2015 New Revision: 289963 URL: https://svnweb.freebsd.org/changeset/base/289963 Log: MFC r288295,r288298: r288295: Posthumously remove all references to MFREE(9) The macro was removed in r90227 Sponsored by: EMC / Isilon Storage Division r288298: Remove MLINKS to more non-existent mbuf(9) macros Sponsored by: EMC / Isilon Storage Division Modified: stable/10/ObsoleteFiles.inc stable/10/share/man/man9/Makefile stable/10/share/man/man9/mbuf.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sun Oct 25 22:50:33 2015 (r289962) +++ stable/10/ObsoleteFiles.inc Sun Oct 25 22:55:19 2015 (r289963) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20151025: remove links to removed/unimplemented mbuf(9) macros +OLD_FILES+=usr/share/man/man9/MEXT_ADD_REF.9.gz +OLD_FILES+=usr/share/man/man9/MEXTFREE.9.gz +OLD_FILES+=usr/share/man/man9/MEXT_IS_REF.9.gz +OLD_FILES+=usr/share/man/man9/MEXT_REM_REF.9.gz +OLD_FILES+=usr/share/man/man9/MFREE.9.gz # 20151023: unused sgsmsg utility is removed OLD_FILES+=usr/bin/sgsmsg # 20150506 Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Sun Oct 25 22:50:33 2015 (r289962) +++ stable/10/share/man/man9/Makefile Sun Oct 25 22:55:19 2015 (r289963) @@ -898,12 +898,7 @@ MLINKS+=\ mbuf.9 m_dup.9 \ mbuf.9 m_dup_pkthdr.9 \ mbuf.9 MEXTADD.9 \ - mbuf.9 MEXT_ADD_REF.9 \ - mbuf.9 MEXTFREE.9 \ - mbuf.9 MEXT_IS_REF.9 \ - mbuf.9 MEXT_REM_REF.9 \ mbuf.9 m_fixhdr.9 \ - mbuf.9 MFREE.9 \ mbuf.9 m_free.9 \ mbuf.9 m_freem.9 \ mbuf.9 MGET.9 \ Modified: stable/10/share/man/man9/mbuf.9 ============================================================================== --- stable/10/share/man/man9/mbuf.9 Sun Oct 25 22:50:33 2015 (r289962) +++ stable/10/share/man/man9/mbuf.9 Sun Oct 25 22:55:19 2015 (r289963) @@ -51,8 +51,6 @@ .Fa "short flags" .Fa "int type" .Fc -.Fn MEXTFREE "struct mbuf *mbuf" -.Fn MFREE "struct mbuf *mbuf" "struct mbuf *successor" .\" .Ss Mbuf utility macros .Fn mtod "struct mbuf *mbuf" "type" From owner-svn-src-stable-10@freebsd.org Sun Oct 25 23:03:05 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC156A17DA2; Sun, 25 Oct 2015 23:03:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74DCF1F87; Sun, 25 Oct 2015 23:03:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PN34Lw026511; Sun, 25 Oct 2015 23:03:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PN34uq026507; Sun, 25 Oct 2015 23:03:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510252303.t9PN34uq026507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Oct 2015 23:03:04 +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: r289965 - in stable/10: bin/ls bin/ls/tests etc/mtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 23:03:05 -0000 Author: ngie Date: Sun Oct 25 23:03:04 2015 New Revision: 289965 URL: https://svnweb.freebsd.org/changeset/base/289965 Log: MFC r288330,r288423,r288678,r288905,r288906,r288907,r289102: r288330: Add initial testcases for bin/ls Sponsored by: EMC / Isilon Storage Division r288423: Skip the B_flag testcase to stop blowing up freebsd-current@ with "test failure emails" because kyua report-jenkins doesn't properly escape non-printable chars r288678: Merge additional testcases and improvements to bin/ls/ls_tests from ^/user/ngie/more-tests. - Additional testcases added: -- ls -D -- ls -F -- ls -H -- ls -L -- ls -R -- ls -S -- ls -T -- ls -b -- ls -d -- ls -f -- ls -g -- ls -h -- ls -i -- ls -k -- ls -l -- ls -m -- ls -n -- ls -o -- ls -p -- ls -q/ls -w -- ls -r -- ls -s -- ls -t -- ls -u -- ls -y - Socket file creation is limited to the ls -F testcase, greatly speeding up the test process - The ls -C testcase was made more robust by limiting the number of columns via COLUMNS and by dynamically formulating the columns/lines. - Add `atf_test_case` before all testcase `head` functions. Sponsored by: EMC / Isilon Storage Division r288905: Add some more syncs to quiesce the filesystem after creating the files to see if this fixes deterministic Jenkin failures r288906: Explicitly set BLOCKSIZE to 512 in the environment r288907: Call sync consistently using atf_check Remove superfluous sync's r289102: Remove all of the syncs They're unnecessary as shown by further testing on my VM Requested by: jhb Added: stable/10/bin/ls/tests/ - copied from r288330, head/bin/ls/tests/ Modified: stable/10/bin/ls/Makefile stable/10/bin/ls/tests/Makefile stable/10/bin/ls/tests/ls_tests.sh stable/10/etc/mtree/BSD.tests.dist Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ls/Makefile ============================================================================== --- stable/10/bin/ls/Makefile Sun Oct 25 22:57:05 2015 (r289964) +++ stable/10/bin/ls/Makefile Sun Oct 25 23:03:04 2015 (r289965) @@ -15,4 +15,8 @@ DPADD+= ${LIBTERMCAP} LDADD+= -ltermcap .endif +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/bin/ls/tests/Makefile ============================================================================== --- head/bin/ls/tests/Makefile Mon Sep 28 03:36:15 2015 (r288330) +++ stable/10/bin/ls/tests/Makefile Sun Oct 25 23:03:04 2015 (r289965) @@ -6,6 +6,6 @@ ATF_TESTS_SH+= ls_tests # This seems like overkill, but the idea in mind is that all of the testcases # should be runnable as !root TEST_METADATA.ls_tests+= required_user="unprivileged" -TEST_METADATA.ls_tests+= required_files="/usr/bin/nc" +TEST_METADATA.ls_tests+= required_files="/usr/bin/awk /usr/bin/nc /usr/bin/sort" .include Modified: stable/10/bin/ls/tests/ls_tests.sh ============================================================================== --- head/bin/ls/tests/ls_tests.sh Mon Sep 28 03:36:15 2015 (r288330) +++ stable/10/bin/ls/tests/ls_tests.sh Sun Oct 25 23:03:04 2015 (r289965) @@ -45,7 +45,7 @@ create_test_inputs() { create_test_dir - atf_check -e empty -s exit:0 mkdir -m 0755 -p a/b + atf_check -e empty -s exit:0 mkdir -m 0755 -p a/b/1 atf_check -e empty -s exit:0 ln -s a/b c atf_check -e empty -s exit:0 touch d atf_check -e empty -s exit:0 ln d e @@ -53,12 +53,10 @@ create_test_inputs() atf_check -e empty -s exit:0 mkdir .g atf_check -e empty -s exit:0 mkfifo h atf_check -e ignore -s exit:0 dd if=/dev/zero of=i count=1000 bs=1 - atf_check -e empty -s exit:0 \ - sh -c "pid=${ATF_TMPDIR}/nc.pid; daemon -p \$pid nc -lU j; sleep 2; pkill -F \$pid" atf_check -e empty -s exit:0 touch klmn atf_check -e empty -s exit:0 touch opqr atf_check -e empty -s exit:0 touch stuv - atf_check -e empty -s exit:0 touch wxyz + atf_check -e empty -s exit:0 install -m 0755 /dev/null wxyz atf_check -e empty -s exit:0 touch 0b00000001 atf_check -e empty -s exit:0 touch 0b00000010 atf_check -e empty -s exit:0 touch 0b00000011 @@ -76,37 +74,29 @@ create_test_inputs() atf_check -e empty -s exit:0 touch 0b00001111 } -atf_test_case a_flag -a_flag_head() -{ - atf_set "descr" "Verify -a support" -} +KB=1024 +MB=$(( 1024 * $KB )) +GB=$(( 1024 * $MB )) +TB=$(( 1024 * $GB )) +PB=$(( 1024 * $TB )) -a_flag_body() +create_test_inputs2() { create_test_dir - # Make sure "." and ".." show up with -a - atf_check -e empty -o match:'\.[[:space:]]+\.\.' -s exit:0 ls -ax - - create_test_inputs - - WITH_a=$PWD/../with_a.out - WITHOUT_a=$PWD/../without_a.out - - atf_check -e empty -o save:$WITH_a -s exit:0 ls -A - atf_check -e empty -o save:$WITHOUT_a -s exit:0 ls - - echo "-A usage" - cat $WITH_a - echo "No -A usage" - cat $WITHOUT_a + for filesize in 1 512 $(( 2 * $KB )) $(( 10 * $KB )) $(( 512 * $KB )); \ + do + atf_check -e ignore -o empty -s exit:0 \ + dd if=/dev/zero of=${filesize}.file bs=1 \ + count=1 oseek=${filesize} conv=sparse + files="${files} ${filesize}.file" + done - for dot_path in '\.f' '\.g'; do - atf_check -e empty -o not-empty -s exit:0 grep "${dot_path}" \ - $WITH_a - atf_check -e empty -o empty -s not-exit:0 grep "${dot_path}" \ - $WITHOUT_a + for filesize in $MB $GB $TB; do + atf_check -e ignore -o empty -s exit:0 \ + dd if=/dev/zero of=${filesize}.file bs=$MB \ + count=1 oseek=$(( $filesize / $MB )) conv=sparse + files="${files} ${filesize}.file" done } @@ -180,6 +170,7 @@ B_flag_head() B_flag_body() { + atf_skip "kyua report-jenkins doesn't properly escape non-printable chars: https://github.com/jmmv/kyua/issues/136" atf_check -e empty -o empty -s exit:0 touch "$(printf "y\013z")" atf_check -e empty -o match:'y\\013z' -s exit:0 ls -B @@ -191,21 +182,101 @@ C_flag_head() atf_set "descr" "Verify that the output from ls -C is multi-column, sorted down" } +print_index() +{ + local i=1 + local wanted_index=$1; shift + + while [ $i -le $wanted_index ]; do + if [ $i -eq $wanted_index ]; then + echo $1 + return + fi + shift + : $(( i += 1 )) + done +} + C_flag_body() { create_test_inputs WITH_C=$PWD/../with_C.out + export COLUMNS=40 atf_check -e empty -o save:$WITH_C -s exit:0 ls -C echo "With -C usage" cat $WITH_C - atf_check -e ignore -o not-empty -s exit:0 \ - egrep "0b00000001[[:space:]]+0b00000111[[:space:]]+0b00001101[[:space:]]+e[[:space:]]+stuv" $WITH_C - atf_check -e ignore -o not-empty -s exit:0 \ - egrep "0b00000010[[:space:]]+0b00001000[[:space:]]+0b00001110[[:space:]]+h[[:space:]]+wxyz" $WITH_C + paths=$(find -s . -mindepth 1 -maxdepth 1 \! -name '.*' -exec basename {} \; ) + set -- $paths + num_paths=$# + num_columns=2 + + max_num_paths_per_column=$(( $(( $num_paths + 1 )) / $num_columns )) + + local i=1 + while [ $i -le $max_num_paths_per_column ]; do + column_1=$(print_index $i $paths) + column_2=$(print_index $(( $i + $max_num_paths_per_column )) $paths) + #echo "paths[$(( $i + $max_num_paths_per_column ))] = $column_2" + expected_expr="$column_1" + if [ -n "$column_2" ]; then + expected_expr="$expected_expr[[:space:]]+$column_2" + fi + atf_check -e ignore -o not-empty -s exit:0 \ + egrep "$expected_expr" $WITH_C + : $(( i += 1 )) + done +} + +atf_test_case D_flag +D_flag_head() +{ + atf_set "descr" "Verify that the output from ls -D modifies the time format used with ls -l" +} + +D_flag_body() +{ + atf_check -e empty -o empty -s exit:0 touch a.file + atf_check -e empty -o match:"$(stat -f '%c[[:space:]]+%N' a.file)" \ + -s exit:0 ls -lD '%s' +} + +atf_test_case F_flag +F_flag_head() +{ + atf_set "descr" "Verify that the output from ls -F prints out appropriate symbols after files" +} + +F_flag_body() +{ + create_test_inputs + + atf_check -e empty -s exit:0 \ + sh -c "pid=${ATF_TMPDIR}/nc.pid; daemon -p \$pid nc -lU j; sleep 2; pkill -F \$pid" + + atf_check -e empty -o match:'a/' -s exit:0 ls -F + atf_check -e empty -o match:'c@' -s exit:0 ls -F + atf_check -e empty -o match:'h\|' -s exit:0 ls -F + atf_check -e empty -o match:'j=' -s exit:0 ls -F + #atf_check -e empty -o match:'%' -s exit:0 ls -F + atf_check -e empty -o match:'stuv' -s exit:0 ls -F + atf_check -e empty -o match:'wxyz\*' -s exit:0 ls -F +} + +atf_test_case H_flag +H_flag_head() +{ + atf_set "descr" "Verify that ls -H follows symlinks" +} + +H_flag_body() +{ + create_test_inputs + + atf_check -e empty -o match:'1' -s exit:0 ls -H c } atf_test_case I_flag @@ -250,9 +321,323 @@ I_flag_voids_implied_A_flag_when_root_bo atf_check -o match:'\.g' -s exit:0 ls -A -I } +atf_test_case L_flag +L_flag_head() +{ + atf_set "descr" "Verify that -L prints out the symbolic link and conversely -P prints out the target for the symbolic link" +} + +L_flag_body() +{ + atf_check -e empty -o empty -s exit:0 ln -s target1/target2 link1 + atf_check -e empty -o match:link1 -s exit:0 ls -L + atf_check -e empty -o not-match:target1/target2 -s exit:0 ls -L +} + +atf_test_case R_flag +R_flag_head() +{ + atf_set "descr" "Verify that the output from ls -R prints out the directory contents recursively" +} + +R_flag_body() +{ + create_test_inputs + + WITH_R=$PWD/../with_R.out + WITH_R_expected_output=$PWD/../with_R_expected.out + + atf_check -e empty -o save:$WITH_R -s exit:0 ls -R + + set -- . $(find -s . \! -name '.*' -type d) + while [ $# -gt 0 ]; do + dir=$1; shift + [ "$dir" != "." ] && echo "$dir:" + (cd $dir && ls -1A | sed -e '/^\./d') + [ $# -ne 0 ] && echo + done > $WITH_R_expected_output + + echo "-R usage" + cat $WITH_R + echo "-R expected output" + cat $WITH_R_expected_output + + atf_check_equal "$(cat $WITH_R)" "$(cat $WITH_R_expected_output)" +} + +atf_test_case S_flag +S_flag_head() +{ + atf_set "descr" "Verify that -S sorts by file size, then by filename lexicographically" +} + +S_flag_body() +{ + create_test_dir + + file_list_dir=$PWD/../files + + atf_check -e empty -o empty -s exit:0 mkdir -p $file_list_dir + + create_test_inputs + create_test_inputs2 + + WITH_S=$PWD/../with_S.out + WITHOUT_S=$PWD/../without_S.out + + atf_check -e empty -o save:$WITH_S ls -D '%s' -lS + atf_check -e empty -o save:$WITHOUT_S ls -D '%s' -l + + WITH_S_parsed=$(awk '! /^total/ { print $7 }' $WITH_S) + set -- $(awk '! /^total/ { print $5, $7 }' $WITHOUT_S) + while [ $# -gt 0 ]; do + size=$1; shift + filename=$1; shift + echo $filename >> $file_list_dir/${size} + done + file_lists=$(find $file_list_dir -type f -exec basename {} \; | sort -nr) + WITHOUT_S_parsed=$(for file_list in $file_lists; do sort < $file_list_dir/$file_list; done) + + echo "-lS usage (parsed)" + echo "$WITH_S_parsed" + echo "-l usage (parsed)" + echo "$WITHOUT_S_parsed" + + atf_check_equal "$WITHOUT_S_parsed" "$WITH_S_parsed" +} + +atf_test_case T_flag +T_flag_head() +{ + atf_set "descr" "Verify -T support" +} + +T_flag_body() +{ + create_test_dir + + atf_check -e empty -o empty -s exit:0 touch a.file + + birthtime_in_secs=$(stat -f %B -t %s a.file) + birthtime=$(date -j -f %s $birthtime_in_secs +"[[:space:]]+%b[[:space:]]+%e[[:space:]]+%H:%M:%S[[:space:]]+%Y") + + atf_check -e empty -o match:"$birthtime"'[[:space:]]+a\.file' \ + -s exit:0 ls -lT a.file +} + +atf_test_case a_flag +a_flag_head() +{ + atf_set "descr" "Verify -a support" +} + +a_flag_body() +{ + create_test_dir + + # Make sure "." and ".." show up with -a + atf_check -e empty -o match:'\.[[:space:]]+\.\.' -s exit:0 ls -ax + + create_test_inputs + + WITH_a=$PWD/../with_a.out + WITHOUT_a=$PWD/../without_a.out + + atf_check -e empty -o save:$WITH_a -s exit:0 ls -a + atf_check -e empty -o save:$WITHOUT_a -s exit:0 ls + + echo "-a usage" + cat $WITH_a + echo "No -a usage" + cat $WITHOUT_a + + for dot_path in '\.f' '\.g'; do + atf_check -e empty -o not-empty -s exit:0 grep "${dot_path}" \ + $WITH_a + atf_check -e empty -o empty -s not-exit:0 grep "${dot_path}" \ + $WITHOUT_a + done +} + +atf_test_case b_flag +b_flag_head() +{ + atf_set "descr" "Verify that the output from ls -b prints out non-printable characters" +} + +b_flag_body() +{ + atf_skip "kyua report-jenkins doesn't properly escape non-printable chars: https://github.com/jmmv/kyua/issues/136" + + atf_check -e empty -o empty -s exit:0 touch "$(printf "y\013z")" + atf_check -e empty -o match:'y\\vz' -s exit:0 ls -b +} + +atf_test_case d_flag +d_flag_head() +{ + atf_set "descr" "Verify that -d doesn't descend down directories" +} + +d_flag_body() +{ + create_test_dir + + output=$PWD/../output + + atf_check -e empty -o empty -s exit:0 mkdir -p a/b + + for path in . $PWD a; do + atf_check -e empty -o save:$output -s exit:0 ls -d $path + atf_check_equal "$(cat $output)" "$path" + done +} + +atf_test_case f_flag +f_flag_head() +{ + atf_set "descr" "Verify that -f prints out the contents of a directory unsorted" +} + +f_flag_body() +{ + create_test_inputs + + output=$PWD/../output + + # XXX: I don't have enough understanding of how the algorithm works yet + # to determine more than the fact that all the entries printed out + # exist + paths=$(find -s . -mindepth 1 -maxdepth 1 \! -name '.*' -exec basename {} \; ) + + atf_check -e empty -o save:$output -s exit:0 ls -f + + for path in $paths; do + atf_check -e ignore -o not-empty -s exit:0 \ + egrep "^$path$" $output + done +} + +atf_test_case g_flag +g_flag_head() +{ + atf_set "descr" "Verify that -g does nothing (compatibility flag)" +} + +g_flag_body() +{ + create_test_inputs2 + for file in $files; do + atf_check -e empty -o match:"$(ls -a $file)" -s exit:0 \ + ls -ag $file + atf_check -e empty -o match:"$(ls -la $file)" -s exit:0 \ + ls -alg $file + done +} + +atf_test_case h_flag +h_flag_head() +{ + atf_set "descr" "Verify that -h prints out the humanized units for file sizes with ls -l" + atf_set "require.files" "/usr/bin/bc" +} + +h_flag_body() +{ + # XXX: this test doesn't currently show how 999 bytes will be 999B, + # but 1000 bytes will be 1.0K, due to how humanize_number(3) works. + create_test_inputs2 + for file in $files; do + file_size=$(stat -f '%z' "$file") || \ + atf_fail "stat'ing $file failed" + scale=2 + if [ $file_size -lt $KB ]; then + divisor=1 + scale=0 + suffix=B + elif [ $file_size -lt $MB ]; then + divisor=$KB + suffix=K + elif [ $file_size -lt $GB ]; then + divisor=$MB + suffix=M + elif [ $file_size -lt $TB ]; then + divisor=$GB + suffix=G + elif [ $file_size -lt $PB ]; then + divisor=$TB + suffix=T + else + divisor=$PB + suffix=P + fi + + bc_expr="$(printf "scale=%s\n%s/%s\nquit" $scale $file_size $divisor)" + size_humanized=$(bc -e "$bc_expr" | tr '.' '\.' | sed -e 's,\.00,,') + + atf_check -e empty -o match:"$size_humanized.+$file" \ + -s exit:0 ls -hl $file + done +} + +atf_test_case i_flag +i_flag_head() +{ + atf_set "descr" "Verify that -i prints out the inode for files" +} + +i_flag_body() +{ + create_test_inputs + + paths=$(find -L . -mindepth 1) + [ -n "$paths" ] || atf_skip 'Could not find any paths to iterate over (!)' + + for path in $paths; do + atf_check -e empty \ + -o match:"$(stat -f '[[:space:]]*%i[[:space:]]+%N' $path)" \ + -s exit:0 ls -d1i $path + done +} + +atf_test_case k_flag +k_flag_head() +{ + atf_set "descr" "Verify that -k prints out the size with a block size of 1kB" +} + +k_flag_body() +{ + create_test_inputs2 + for file in $files; do + atf_check -e empty \ + -o match:"[[:space:]]+$(stat -f "%z" $file)[[:space:]]+.+[[:space:]]+$file" ls -lk $file + done +} + +atf_test_case l_flag +l_flag_head() +{ + atf_set "descr" "Verify that -l prints out the output in long format" +} + +l_flag_body() +{ + + atf_check -e empty -o empty -s exit:0 touch a.file + + birthtime_in_secs=$(stat -f "%B" -t "%s" a.file) + birthtime=$(date -j -f "%s" $birthtime_in_secs +"%b[[:space:]]+%e[[:space:]]+%H:%M") + + expected_output=$(stat -f "%Sp[[:space:]]+%l[[:space:]]+%Su[[:space:]]+%Sg[[:space:]]+%z[[:space:]]+$birthtime[[:space:]]+a\\.file" a.file) + + atf_check -e empty -o match:"$expected_output" -s exit:0 ls -l a.file +} + +atf_test_case lcomma_flag lcomma_flag_head() { - atf_set "descr" "Verify that -l, prints out the size with , delimiters" + atf_set "descr" "Verify that -l, prints out the size with ',' delimiters" } lcomma_flag_body() @@ -264,9 +649,205 @@ lcomma_flag_body() env LC_ALL=en_US.ISO8859-1 ls -l, i } +atf_test_case m_flag +m_flag_head() +{ + atf_set "descr" "Verify that the output from ls -m is comma-separated" +} + +m_flag_body() +{ + create_test_dir + + output=$PWD/../output + + atf_check -e empty -o empty -s exit:0 touch ,, "a,b " c d e + + atf_check -e empty -o save:$output -s exit:0 ls -m + + atf_check_equal "$(cat $output)" ",,, a,b , c, d, e" +} + +atf_test_case n_flag +n_flag_head() +{ + atf_set "descr" "Verify that the output from ls -n prints out numeric GIDs/UIDs instead of symbolic GIDs/UIDs" + atf_set "require.user" "root" +} + +n_flag_body() +{ + daemon_gid=$(id -g daemon) || atf_skip "could not resolve gid for daemon (!)" + nobody_uid=$(id -u nobody) || atf_skip "could not resolve uid for nobody (!)" + + atf_check -e empty -o empty -s exit:0 touch a.file + atf_check -e empty -o empty -s exit:0 chown $nobody_uid:$daemon_gid a.file + + atf_check -e empty \ + -o match:'\-rw\-r\-\-r\-\-[[:space:]]+1[[:space:]]+'"$nobody_uid[[:space:]]+$daemon_gid"'[[:space:]]+.+a\.file' \ + ls -ln a.file + +} + +atf_test_case o_flag +o_flag_head() +{ + atf_set "descr" "Verify that the output from ls -o prints out the chflag values or '-' if none are set" + atf_set "require.user" "root" +} + +o_flag_body() +{ + local size=12345 + + create_test_dir + + atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=a.file \ + bs=$size count=1 + atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=b.file \ + bs=$size count=1 + atf_check -e empty -o empty -s exit:0 chflags uarch a.file + + atf_check -e empty -o match:"[[:space:]]+uarch[[:space:]]$size+.+a\\.file" \ + -s exit:0 ls -lo a.file + atf_check -e empty -o match:"[[:space:]]+\\-[[:space:]]$size+.+b\\.file" \ + -s exit:0 ls -lo b.file +} + +atf_test_case p_flag +p_flag_head() +{ + atf_set "descr" "Verify that the output from ls -p prints out '/' after directories" +} + +p_flag_body() +{ + create_test_inputs + + paths=$(find -L .) + [ -n "$paths" ] || atf_skip 'Could not find any paths to iterate over (!)' + + for path in $paths; do + suffix= + # If path is not a symlink and is a directory, then the suffix + # must be "/". + if [ ! -L "${path}" -a -d "$path" ]; then + suffix=/ + fi + atf_check -e empty -o match:"$path${suffix}" -s exit:0 \ + ls -dp $path + done +} + +atf_test_case q_flag_and_w_flag +q_flag_and_w_flag_head() +{ + atf_set "descr" "Verify that the output from ls -q prints out '?' for ESC and ls -w prints out the escape character" +} + +q_flag_and_w_flag_body() +{ + atf_skip "kyua report-jenkins doesn't properly escape non-printable chars: https://github.com/jmmv/kyua/issues/136" + + create_test_dir + + test_file="$(printf "y\01z")" + + atf_check -e empty -o empty -s exit:0 touch "$test_file" + + atf_check -e empty -o match:'y\?z' -s exit:0 ls -q "$test_file" + atf_check -e empty -o match:"$test_file" -s exit:0 ls -w "$test_file" +} + +atf_test_case r_flag +r_flag_head() +{ + atf_set "descr" "Verify that the output from ls -r sorts the same way as reverse sorting with sort(1)" +} + +r_flag_body() +{ + create_test_inputs + + WITH_r=$PWD/../with_r.out + WITH_sort=$PWD/../with_sort.out + + atf_check -e empty -o save:$WITH_r -s exit:0 ls -1r + atf_check -e empty -o save:$WITH_sort -s exit:0 sh -c 'ls -1 | sort -r' + + echo "Sorted with -r" + cat $WITH_r + echo "Reverse sorted with sort(1)" + cat $WITH_sort + + atf_check_equal "$(cat $WITH_r)" "$(cat $WITH_sort)" +} + +atf_test_case s_flag +s_flag_head() +{ + atf_set "descr" "Verify that the output from ls -s matches the output from stat(1)" +} + +s_flag_body() +{ + create_test_inputs2 + for file in $files; do + atf_check -e empty \ + -o match:"$(stat -f "%b" $file)[[:space:]]+$file" ls -s $file + done +} + +atf_test_case t_flag +t_flag_head() +{ + atf_set "descr" "Verify that the output from ls -t sorts by modification time" +} + +t_flag_body() +{ + create_test_dir + + atf_check -e empty -o empty -s exit:0 touch a.file + atf_check -e empty -o empty -s exit:0 touch b.file + + atf_check -e empty -o match:'a\.file' -s exit:0 sh -c 'ls -lt | tail -n 1' + atf_check -e empty -o match:'b\.file.*a\.file' -s exit:0 ls -Ct + + atf_check -e empty -o empty -s exit:0 rm a.file + atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' + + atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lt | tail -n 1' + atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Ct +} + +atf_test_case u_flag +u_flag_head() +{ + atf_set "descr" "Verify that the output from ls -u sorts by last access" +} + +u_flag_body() +{ + create_test_dir + + atf_check -e empty -o empty -s exit:0 touch a.file + atf_check -e empty -o empty -s exit:0 touch b.file + + atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' + atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu + + atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' + atf_check -e empty -o match:'i am a' -s exit:0 cat a.file + + atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' + atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu +} + +atf_test_case x_flag x_flag_head() { - atf_set "descr" "Verify that -x prints out one item per line" + atf_set "descr" "Verify that the output from ls -x is multi-column, sorted across" } x_flag_body() @@ -283,9 +864,34 @@ x_flag_body() atf_check -e ignore -o not-empty -s exit:0 \ egrep "a[[:space:]]+c[[:space:]]+d[[:space:]]+e[[:space:]]+h" $WITH_x atf_check -e ignore -o not-empty -s exit:0 \ - egrep "i[[:space:]]+j[[:space:]]+klmn[[:space:]]+opqr[[:space:]]+stuv" $WITH_x + egrep "i[[:space:]]+klmn[[:space:]]+opqr[[:space:]]+stuv[[:space:]]+wxyz" $WITH_x +} + +atf_test_case y_flag +y_flag_head() +{ + atf_set "descr" "Verify that the output from ls -y sorts the same way as sort(1)" +} + +y_flag_body() +{ + create_test_inputs + + WITH_sort=$PWD/../with_sort.out + WITH_y=$PWD/../with_y.out + + atf_check -e empty -o save:$WITH_sort -s exit:0 sh -c 'ls -1 | sort' + atf_check -e empty -o save:$WITH_y -s exit:0 ls -1y + + echo "Sorted with sort(1)" + cat $WITH_sort + echo "Sorted with -y" + cat $WITH_y + + atf_check_equal "$(cat $WITH_sort)" "$(cat $WITH_y)" } +atf_test_case 1_flag 1_flag_head() { atf_set "descr" "Verify that -1 prints out one item per line" @@ -312,47 +918,47 @@ x_flag_body() atf_init_test_cases() { + export BLOCKSIZE=512 atf_add_test_case A_flag atf_add_test_case A_flag_implied_when_root atf_add_test_case B_flag atf_add_test_case C_flag - #atf_add_test_case D_flag - #atf_add_test_case F_flag + atf_add_test_case D_flag + atf_add_test_case F_flag #atf_add_test_case G_flag - #atf_add_test_case H_flag + atf_add_test_case H_flag atf_add_test_case I_flag atf_add_test_case I_flag_voids_implied_A_flag_when_root - #atf_add_test_case L_flag + atf_add_test_case L_flag #atf_add_test_case P_flag - #atf_add_test_case R_flag - #atf_add_test_case S_flag - #atf_add_test_case T_flag + atf_add_test_case R_flag + atf_add_test_case S_flag + atf_add_test_case T_flag #atf_add_test_case U_flag #atf_add_test_case W_flag #atf_add_test_case Z_flag atf_add_test_case a_flag - #atf_add_test_case b_flag + atf_add_test_case b_flag #atf_add_test_case c_flag - #atf_add_test_case d_flag - #atf_add_test_case f_flag - #atf_add_test_case g_flag - #atf_add_test_case h_flag - #atf_add_test_case i_flag - #atf_add_test_case k_flag - #atf_add_test_case l_flag + atf_add_test_case d_flag + atf_add_test_case f_flag + atf_add_test_case g_flag + atf_add_test_case h_flag + atf_add_test_case i_flag + atf_add_test_case k_flag + atf_add_test_case l_flag atf_add_test_case lcomma_flag - #atf_add_test_case m_flag - #atf_add_test_case n_flag - #atf_add_test_case o_flag - #atf_add_test_case p_flag - #atf_add_test_case q_flag - #atf_add_test_case r_flag - #atf_add_test_case s_flag - #atf_add_test_case t_flag - #atf_add_test_case u_flag - #atf_add_test_case w_flag + atf_add_test_case m_flag + atf_add_test_case n_flag + atf_add_test_case o_flag + atf_add_test_case p_flag + atf_add_test_case q_flag_and_w_flag + atf_add_test_case r_flag + atf_add_test_case s_flag + atf_add_test_case t_flag + atf_add_test_case u_flag atf_add_test_case x_flag - #atf_add_test_case y_flag + atf_add_test_case y_flag atf_add_test_case 1_flag } Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun Oct 25 22:57:05 2015 (r289964) +++ stable/10/etc/mtree/BSD.tests.dist Sun Oct 25 23:03:04 2015 (r289965) @@ -12,6 +12,8 @@ .. expr .. + ls + .. mv .. pax From owner-svn-src-stable-10@freebsd.org Mon Oct 26 00:05:03 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1CACA18B35; Mon, 26 Oct 2015 00:05:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAB9A1BF1; Mon, 26 Oct 2015 00:05:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q052TP044253; Mon, 26 Oct 2015 00:05:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q0525t044252; Mon, 26 Oct 2015 00:05:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260005.t9Q0525t044252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 00:05: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: r289969 - stable/10/bin/test/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 00:05:04 -0000 Author: ngie Date: Mon Oct 26 00:05:02 2015 New Revision: 289969 URL: https://svnweb.freebsd.org/changeset/base/289969 Log: MFC r289488: Clean up trailing whitespace Modified: stable/10/bin/test/tests/legacy_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/test/tests/legacy_test.sh ============================================================================== --- stable/10/bin/test/tests/legacy_test.sh Sun Oct 25 23:59:41 2015 (r289968) +++ stable/10/bin/test/tests/legacy_test.sh Mon Oct 26 00:05:02 2015 (r289969) @@ -2,7 +2,7 @@ #- # Copyright (c) June 1996 Wolfram Schneider . Berlin. -# All rights reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ # $FreeBSD$ # force a specified test program, e.g. `env test=/bin/test sh regress.sh' -: ${test=test} +: ${test=test} t () { @@ -54,13 +54,13 @@ t () count=0 echo "1..130" -t 0 'b = b' -t 0 'b == b' -t 1 'b != b' -t 0 '\( b = b \)' -t 0 '\( b == b \)' -t 1 '! \( b = b \)' -t 1 '! \( b == b \)' +t 0 'b = b' +t 0 'b == b' +t 1 'b != b' +t 0 '\( b = b \)' +t 0 '\( b == b \)' +t 1 '! \( b = b \)' +t 1 '! \( b == b \)' t 1 '! -f /etc/passwd' t 0 '-h = -h' From owner-svn-src-stable-10@freebsd.org Mon Oct 26 00:06:05 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8652A18B96; Mon, 26 Oct 2015 00:06:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76C7F1D4D; Mon, 26 Oct 2015 00:06:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q064bs044353; Mon, 26 Oct 2015 00:06:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q06462044352; Mon, 26 Oct 2015 00:06:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260006.t9Q06462044352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 00:06:04 +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: r289970 - stable/10/tools/regression/lib/msun X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 00:06:05 -0000 Author: ngie Date: Mon Oct 26 00:06:04 2015 New Revision: 289970 URL: https://svnweb.freebsd.org/changeset/base/289970 Log: MFC r289332: Fix test-fenv:test_dfl_env when run on some amd64 CPUs Compare the fields that the AMD [1] and Intel [2] specs say will be set once fnstenv returns. Not all amd64 capable processors zero out the env.__x87.__other field (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the env.__x87.__other field will contain after fnstenv is executed, so the values in env.__x87.__other could be filled with arbitrary data depending on how the CPU-specific implementation of fnstenv. 1. http://support.amd.com/TechDocs/26569_APM_v5.pdf 2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf Discussed with: kib, Anton Rang Reviewed by: Daniel O'Connor (earlier patch; pre-generalization) Sponsored by: EMC / Isilon Storage Division Reported by: Bill Morchin Modified: stable/10/tools/regression/lib/msun/test-fenv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/lib/msun/test-fenv.c ============================================================================== --- stable/10/tools/regression/lib/msun/test-fenv.c Mon Oct 26 00:05:02 2015 (r289969) +++ stable/10/tools/regression/lib/msun/test-fenv.c Mon Oct 26 00:06:04 2015 (r289970) @@ -133,8 +133,35 @@ test_dfl_env(void) fenv_t env; fegetenv(&env); + +#ifdef __amd64__ + /* + * Compare the fields that the AMD [1] and Intel [2] specs say will be + * set once fnstenv returns. + * + * Not all amd64 capable processors implement the fnstenv instruction + * by zero'ing out the env.__x87.__other field (example: AMD Opteron + * 6308). The AMD64/x64 specs aren't explicit on what the + * env.__x87.__other field will contain after fnstenv is executed, so + * the values in env.__x87.__other could be filled with arbitrary + * data depending on how the CPU implements fnstenv. + * + * 1. http://support.amd.com/TechDocs/26569_APM_v5.pdf + * 2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf + */ + assert(memcmp(&env.__mxcsr, &FE_DFL_ENV->__mxcsr, + sizeof(env.__mxcsr)) == 0); + assert(memcmp(&env.__x87.__control, &FE_DFL_ENV->__x87.__control, + sizeof(env.__x87.__control)) == 0); + assert(memcmp(&env.__x87.__status, &FE_DFL_ENV->__x87.__status, + sizeof(env.__x87.__status)) == 0); + assert(memcmp(&env.__x87.__tag, &FE_DFL_ENV->__x87.__tag, + sizeof(env.__x87.__tag)) == 0); +#else assert(memcmp(&env, FE_DFL_ENV, sizeof(env)) == 0); #endif + +#endif assert(fetestexcept(FE_ALL_EXCEPT) == 0); } From owner-svn-src-stable-10@freebsd.org Mon Oct 26 00:08:42 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 464DEA18CA3; Mon, 26 Oct 2015 00:08:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 122FC1034; Mon, 26 Oct 2015 00:08:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q08f7u044559; Mon, 26 Oct 2015 00:08:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q08fvB044558; Mon, 26 Oct 2015 00:08:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260008.t9Q08fvB044558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 00:08: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: r289972 - stable/10/lib/libcam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 00:08:42 -0000 Author: ngie Date: Mon Oct 26 00:08:40 2015 New Revision: 289972 URL: https://svnweb.freebsd.org/changeset/base/289972 Log: MFC r289450: Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd descriptor to avoid trashing valid file descriptors that access dev->fd at a later point in time PR: 192671 Submitted by: Scott Ferris Sponsored by: EMC / Isilon Storage Division Modified: stable/10/lib/libcam/camlib.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcam/camlib.c ============================================================================== --- stable/10/lib/libcam/camlib.c Mon Oct 26 00:07:11 2015 (r289971) +++ stable/10/lib/libcam/camlib.c Mon Oct 26 00:08:40 2015 (r289972) @@ -676,8 +676,10 @@ cam_close_spec_device(struct cam_device if (dev == NULL) return; - if (dev->fd >= 0) + if (dev->fd >= 0) { close(dev->fd); + dev->fd = -1; + } } char * From owner-svn-src-stable-10@freebsd.org Mon Oct 26 00:11:09 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D8F5A18DBE; Mon, 26 Oct 2015 00:11:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC69213D5; Mon, 26 Oct 2015 00:11:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q0B8RO044821; Mon, 26 Oct 2015 00:11:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q0B8jn044820; Mon, 26 Oct 2015 00:11:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260011.t9Q0B8jn044820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 00:11:08 +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: r289974 - stable/10/share/zoneinfo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 00:11:09 -0000 Author: ngie Date: Mon Oct 26 00:11:07 2015 New Revision: 289974 URL: https://svnweb.freebsd.org/changeset/base/289974 Log: MFC r289451: Install share/zoneinfo in a deterministic way by sorting the results from find This helps produce deterministic METALOG output PR: 200674 Submitted by: Fabian Keil Reviewed by: emaste Obtained from: ElectroBSD Modified: stable/10/share/zoneinfo/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/zoneinfo/Makefile ============================================================================== --- stable/10/share/zoneinfo/Makefile Mon Oct 26 00:09:30 2015 (r289973) +++ stable/10/share/zoneinfo/Makefile Mon Oct 26 00:11:07 2015 (r289974) @@ -79,7 +79,7 @@ zoneinfo: yearistype ${TDATA} beforeinstall: cd ${TZBUILDDIR} && \ - find * -type f -print -exec ${INSTALL} \ + find -s * -type f -print -exec ${INSTALL} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ From owner-svn-src-stable-10@freebsd.org Mon Oct 26 00:13:50 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9BA9A18F99; Mon, 26 Oct 2015 00:13:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B57CD192B; Mon, 26 Oct 2015 00:13:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q0DnWF047571; Mon, 26 Oct 2015 00:13:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q0DnNx047570; Mon, 26 Oct 2015 00:13:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260013.t9Q0DnNx047570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 00:13:49 +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: r289976 - stable/10/sys/modules/netgraph X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 00:13:51 -0000 Author: ngie Date: Mon Oct 26 00:13:49 2015 New Revision: 289976 URL: https://svnweb.freebsd.org/changeset/base/289976 Log: MFC r288304: Enable parallel subdirectory building with sys/modules/netgraph Modified: stable/10/sys/modules/netgraph/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/netgraph/Makefile ============================================================================== --- stable/10/sys/modules/netgraph/Makefile Mon Oct 26 00:12:00 2015 (r289975) +++ stable/10/sys/modules/netgraph/Makefile Mon Oct 26 00:13:49 2015 (r289976) @@ -62,4 +62,6 @@ _bluetooth= bluetooth _mppc= mppc .endif +SUBDIR_PARALLEL= + .include From owner-svn-src-stable-10@freebsd.org Mon Oct 26 00:28:07 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F9C18224; Mon, 26 Oct 2015 00:28:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6D331F73; Mon, 26 Oct 2015 00:28:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q0S5qT050730; Mon, 26 Oct 2015 00:28:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q0S5f4050729; Mon, 26 Oct 2015 00:28:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260028.t9Q0S5f4050729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 00:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289978 - stable/10/usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 00:28:07 -0000 Author: ngie Date: Mon Oct 26 00:28:05 2015 New Revision: 289978 URL: https://svnweb.freebsd.org/changeset/base/289978 Log: MFC r289600: Initialize `quiet` to false so `pw groupnext` again prints out the next gid by default Reported by: Florian Degner PR: 203876 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/usr.sbin/pw/pw_group.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw_group.c ============================================================================== --- stable/10/usr.sbin/pw/pw_group.c Mon Oct 26 00:15:02 2015 (r289977) +++ stable/10/usr.sbin/pw/pw_group.c Mon Oct 26 00:28:05 2015 (r289978) @@ -259,7 +259,7 @@ pw_group_next(int argc, char **argv, cha struct userconf *cnf; const char *cfg = NULL; int ch; - bool quiet; + bool quiet = false; while ((ch = getopt(argc, argv, "Cq")) != -1) { switch (ch) { From owner-svn-src-stable-10@freebsd.org Mon Oct 26 03:15:08 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 588AF8475; Mon, 26 Oct 2015 03:15:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AD481A4E; Mon, 26 Oct 2015 03:15:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q3F7RB099725; Mon, 26 Oct 2015 03:15:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q3F6LQ099722; Mon, 26 Oct 2015 03:15:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260315.t9Q3F6LQ099722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 03:15:06 +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: r289981 - in stable/10: etc/mtree usr.bin/col usr.bin/col/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 03:15:08 -0000 Author: ngie Date: Mon Oct 26 03:15:06 2015 New Revision: 289981 URL: https://svnweb.freebsd.org/changeset/base/289981 Log: MFC r282339,r282341: r282339 (by bapt): Add regression test about reverse line feed to col(1) r282341 (by bapt): Actually push the right tests Added: stable/10/usr.bin/col/tests/ - copied from r282339, head/usr.bin/col/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/usr.bin/col/Makefile stable/10/usr.bin/col/tests/col.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Mon Oct 26 02:21:32 2015 (r289980) +++ stable/10/etc/mtree/BSD.tests.dist Mon Oct 26 03:15:06 2015 (r289981) @@ -340,6 +340,8 @@ .. cmp .. + col + .. comm .. cut Modified: stable/10/usr.bin/col/Makefile ============================================================================== --- stable/10/usr.bin/col/Makefile Mon Oct 26 02:21:32 2015 (r289980) +++ stable/10/usr.bin/col/Makefile Mon Oct 26 03:15:06 2015 (r289981) @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= col +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/col/tests/col.sh ============================================================================== --- head/usr.bin/col/tests/col.sh Sat May 2 12:08:28 2015 (r282339) +++ stable/10/usr.bin/col/tests/col.sh Mon Oct 26 03:15:06 2015 (r289981) @@ -15,22 +15,16 @@ rlf_body() col < $(atf_get_srcdir)/rlf.in atf_check \ - -o inline:"a b3\n" \ + -o inline:"a b\n" \ -e empty \ -s exit:0 \ col < $(atf_get_srcdir)/rlf2.in atf_check \ - -o inline:"a b3\n" \ + -o inline:"a b\n" \ -e empty \ -s exit:0 \ col -x < $(atf_get_srcdir)/rlf2.in - - atf_check \ - -o inline:"a b3\n" \ - -e empty \ - -s exit:0 \ - col -p < $(atf_get_srcdir)/rlf2.in } atf_init_test_cases() From owner-svn-src-stable-10@freebsd.org Mon Oct 26 03:33:41 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1064888C; Mon, 26 Oct 2015 03:33:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8BC113AC; Mon, 26 Oct 2015 03:33:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q3Xe5h005663; Mon, 26 Oct 2015 03:33:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q3Xesu005662; Mon, 26 Oct 2015 03:33:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260333.t9Q3Xesu005662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 03:33:40 +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: r289984 - stable/10/tools/regression/vfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 03:33:42 -0000 Author: ngie Date: Mon Oct 26 03:33:40 2015 New Revision: 289984 URL: https://svnweb.freebsd.org/changeset/base/289984 Log: MFC r264965: r264965 (by des): Note that the bug was fixed, and when. Modified: stable/10/tools/regression/vfs/trailing_slash.t Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/vfs/trailing_slash.t ============================================================================== --- stable/10/tools/regression/vfs/trailing_slash.t Mon Oct 26 03:30:50 2015 (r289983) +++ stable/10/tools/regression/vfs/trailing_slash.t Mon Oct 26 03:33:40 2015 (r289984) @@ -3,7 +3,7 @@ # $FreeBSD$ # # Tests vfs_lookup()'s handling of trailing slashes for symlinks that -# point to files. See kern/21768 +# point to files. See kern/21768 for details. Fixed in r193028. # testfile="/tmp/testfile-$$" From owner-svn-src-stable-10@freebsd.org Mon Oct 26 03:37:02 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F96E88F5; Mon, 26 Oct 2015 03:37:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CA12159C; Mon, 26 Oct 2015 03:37:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q3b1GK005841; Mon, 26 Oct 2015 03:37:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q3b1jW005839; Mon, 26 Oct 2015 03:37:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260337.t9Q3b1jW005839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 03:37:01 +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: r289985 - in stable/10: etc/mtree tests/sys tests/sys/vfs tools/regression/vfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 03:37:02 -0000 Author: ngie Date: Mon Oct 26 03:37:01 2015 New Revision: 289985 URL: https://svnweb.freebsd.org/changeset/base/289985 Log: MFC r289300: Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs Sponsored by: EMC / Isilon Storage Division Added: stable/10/tests/sys/vfs/ - copied from r289300, head/tests/sys/vfs/ Deleted: stable/10/tools/regression/vfs/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Mon Oct 26 03:33:40 2015 (r289984) +++ stable/10/etc/mtree/BSD.tests.dist Mon Oct 26 03:37:01 2015 (r289985) @@ -230,6 +230,8 @@ unlink .. .. + vfs + .. vm .. .. Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Mon Oct 26 03:33:40 2015 (r289984) +++ stable/10/tests/sys/Makefile Mon Oct 26 03:37:01 2015 (r289985) @@ -11,6 +11,7 @@ TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet +TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default From owner-svn-src-stable-10@freebsd.org Mon Oct 26 03:43:31 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90B628ACE; Mon, 26 Oct 2015 03:43:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AF551AAC; Mon, 26 Oct 2015 03:43:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q3hUmv008682; Mon, 26 Oct 2015 03:43:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q3hStR008666; Mon, 26 Oct 2015 03:43:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260343.t9Q3hStR008666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 03:43:28 +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: r289986 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 03:43:31 -0000 Author: ngie Date: Mon Oct 26 03:43:28 2015 New Revision: 289986 URL: https://svnweb.freebsd.org/changeset/base/289986 Log: MFC r288305: Replace N #defines with nitems to simplify ifconfig code slightly Modified: stable/10/sbin/ifconfig/af_atalk.c stable/10/sbin/ifconfig/af_inet6.c stable/10/sbin/ifconfig/carp.c stable/10/sbin/ifconfig/ifbridge.c stable/10/sbin/ifconfig/ifclone.c stable/10/sbin/ifconfig/ifconfig.c stable/10/sbin/ifconfig/iffib.c stable/10/sbin/ifconfig/ifgre.c stable/10/sbin/ifconfig/ifgroup.c stable/10/sbin/ifconfig/ifieee80211.c stable/10/sbin/ifconfig/iflagg.c stable/10/sbin/ifconfig/ifmac.c stable/10/sbin/ifconfig/ifmedia.c stable/10/sbin/ifconfig/ifpfsync.c stable/10/sbin/ifconfig/ifvlan.c stable/10/sbin/ifconfig/ifvxlan.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/af_atalk.c ============================================================================== --- stable/10/sbin/ifconfig/af_atalk.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/af_atalk.c Mon Oct 26 03:43:28 2015 (r289986) @@ -32,7 +32,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include #include #include @@ -172,11 +172,9 @@ static struct afswtch af_atalk = { static __constructor void atalk_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(atalk_cmds); i++) + for (i = 0; i < nitems(atalk_cmds); i++) cmd_register(&atalk_cmds[i]); af_register(&af_atalk); -#undef N } Modified: stable/10/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/10/sbin/ifconfig/af_inet6.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/af_inet6.c Mon Oct 26 03:43:28 2015 (r289986) @@ -516,7 +516,6 @@ static struct option in6_Lopt = { .opt = static __constructor void inet6_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; #ifndef RESCUE @@ -524,9 +523,8 @@ inet6_ctor(void) return; #endif - for (i = 0; i < N(inet6_cmds); i++) + for (i = 0; i < nitems(inet6_cmds); i++) cmd_register(&inet6_cmds[i]); af_register(&af_inet6); opt_register(&in6_Lopt); -#undef N } Modified: stable/10/sbin/ifconfig/carp.c ============================================================================== --- stable/10/sbin/ifconfig/carp.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/carp.c Mon Oct 26 03:43:28 2015 (r289986) @@ -218,11 +218,9 @@ static struct afswtch af_carp = { static __constructor void carp_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) int i; - for (i = 0; i < N(carp_cmds); i++) + for (i = 0; i < nitems(carp_cmds); i++) cmd_register(&carp_cmds[i]); af_register(&af_carp); -#undef N } Modified: stable/10/sbin/ifconfig/ifbridge.c ============================================================================== --- stable/10/sbin/ifconfig/ifbridge.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifbridge.c Mon Oct 26 03:43:28 2015 (r289986) @@ -749,11 +749,9 @@ static struct afswtch af_bridge = { static __constructor void bridge_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) int i; - for (i = 0; i < N(bridge_cmds); i++) + for (i = 0; i < nitems(bridge_cmds); i++) cmd_register(&bridge_cmds[i]); af_register(&af_bridge); -#undef N } Modified: stable/10/sbin/ifconfig/ifclone.c ============================================================================== --- stable/10/sbin/ifconfig/ifclone.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifclone.c Mon Oct 26 03:43:28 2015 (r289986) @@ -32,9 +32,9 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include -#include +#include #include +#include #include #include @@ -184,11 +184,9 @@ static struct option clone_Copt = { .opt static __constructor void clone_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(clone_cmds); i++) + for (i = 0; i < nitems(clone_cmds); i++) cmd_register(&clone_cmds[i]); opt_register(&clone_Copt); -#undef N } Modified: stable/10/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifconfig.c Mon Oct 26 03:43:28 2015 (r289986) @@ -43,10 +43,10 @@ static const char rcsid[] = #include #include -#include -#include #include #include +#include +#include #include #include @@ -435,7 +435,6 @@ cmd_register(struct cmd *p) static const struct cmd * cmd_lookup(const char *name, int iscreate) { -#define N(a) (sizeof(a)/sizeof(a[0])) const struct cmd *p; for (p = cmds; p != NULL; p = p->c_next) @@ -449,7 +448,6 @@ cmd_lookup(const char *name, int iscreat } } return NULL; -#undef N } struct callback { @@ -1236,10 +1234,8 @@ static struct cmd basic_cmds[] = { static __constructor void ifconfig_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(basic_cmds); i++) + for (i = 0; i < nitems(basic_cmds); i++) cmd_register(&basic_cmds[i]); -#undef N } Modified: stable/10/sbin/ifconfig/iffib.c ============================================================================== --- stable/10/sbin/ifconfig/iffib.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/iffib.c Mon Oct 26 03:43:28 2015 (r289986) @@ -113,11 +113,9 @@ static struct afswtch af_fib = { static __constructor void fib_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(fib_cmds); i++) + for (i = 0; i < nitems(fib_cmds); i++) cmd_register(&fib_cmds[i]); af_register(&af_fib); -#undef N } Modified: stable/10/sbin/ifconfig/ifgre.c ============================================================================== --- stable/10/sbin/ifconfig/ifgre.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifgre.c Mon Oct 26 03:43:28 2015 (r289986) @@ -113,11 +113,9 @@ static struct afswtch af_gre = { static __constructor void gre_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(gre_cmds); i++) + for (i = 0; i < nitems(gre_cmds); i++) cmd_register(&gre_cmds[i]); af_register(&af_gre); -#undef N } Modified: stable/10/sbin/ifconfig/ifgroup.c ============================================================================== --- stable/10/sbin/ifconfig/ifgroup.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifgroup.c Mon Oct 26 03:43:28 2015 (r289986) @@ -28,7 +28,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include #include #include @@ -175,12 +175,10 @@ static struct option group_gopt = { "g:" static __constructor void group_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) int i; - for (i = 0; i < N(group_cmds); i++) + for (i = 0; i < nitems(group_cmds); i++) cmd_register(&group_cmds[i]); af_register(&af_group); opt_register(&group_gopt); -#undef N } Modified: stable/10/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/10/sbin/ifconfig/ifieee80211.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifieee80211.c Mon Oct 26 03:43:28 2015 (r289986) @@ -2856,7 +2856,6 @@ printrsnie(const char *tag, const u_int8 static void printwpsie(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen) { -#define N(a) (sizeof(a) / sizeof(a[0])) u_int8_t len = ie[1]; printf("%s", tag); @@ -2897,7 +2896,7 @@ printwpsie(const char *tag, const u_int8 break; case IEEE80211_WPS_DEV_PASS_ID: n = LE_READ_2(ie); - if (n < N(dev_pass_id)) + if (n < nitems(dev_pass_id)) printf(" dpi:%s", dev_pass_id[n]); break; case IEEE80211_WPS_UUID_E: @@ -2911,7 +2910,6 @@ printwpsie(const char *tag, const u_int8 } printf(">"); } -#undef N } static void @@ -3418,7 +3416,6 @@ list_stations(int s) static const char * mesh_linkstate_string(uint8_t state) { -#define N(a) (sizeof(a) / sizeof(a[0])) static const char *state_names[] = { [0] = "IDLE", [1] = "OPEN-TX", @@ -3428,13 +3425,12 @@ mesh_linkstate_string(uint8_t state) [5] = "HOLDING", }; - if (state >= N(state_names)) { + if (state >= nitems(state_names)) { static char buf[10]; snprintf(buf, sizeof(buf), "#%u", state); return buf; } else return state_names[state]; -#undef N } static const char * @@ -5320,12 +5316,10 @@ static struct afswtch af_ieee80211 = { static __constructor void ieee80211_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) int i; - for (i = 0; i < N(ieee80211_cmds); i++) + for (i = 0; i < nitems(ieee80211_cmds); i++) cmd_register(&ieee80211_cmds[i]); af_register(&af_ieee80211); clone_setdefcallback("wlan", wlan_create); -#undef N } Modified: stable/10/sbin/ifconfig/iflagg.c ============================================================================== --- stable/10/sbin/ifconfig/iflagg.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/iflagg.c Mon Oct 26 03:43:28 2015 (r289986) @@ -308,11 +308,9 @@ static struct afswtch af_lagg = { static __constructor void lagg_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) int i; - for (i = 0; i < N(lagg_cmds); i++) + for (i = 0; i < nitems(lagg_cmds); i++) cmd_register(&lagg_cmds[i]); af_register(&af_lagg); -#undef N } Modified: stable/10/sbin/ifconfig/ifmac.c ============================================================================== --- stable/10/sbin/ifconfig/ifmac.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifmac.c Mon Oct 26 03:43:28 2015 (r289986) @@ -111,11 +111,9 @@ static struct afswtch af_mac = { static __constructor void mac_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(mac_cmds); i++) + for (i = 0; i < nitems(mac_cmds); i++) cmd_register(&mac_cmds[i]); af_register(&af_mac); -#undef N } Modified: stable/10/sbin/ifconfig/ifmedia.c ============================================================================== --- stable/10/sbin/ifconfig/ifmedia.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifmedia.c Mon Oct 26 03:43:28 2015 (r289986) @@ -845,11 +845,9 @@ static struct afswtch af_media = { static __constructor void ifmedia_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(media_cmds); i++) + for (i = 0; i < nitems(media_cmds); i++) cmd_register(&media_cmds[i]); af_register(&af_media); -#undef N } Modified: stable/10/sbin/ifconfig/ifpfsync.c ============================================================================== --- stable/10/sbin/ifconfig/ifpfsync.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifpfsync.c Mon Oct 26 03:43:28 2015 (r289986) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include @@ -227,11 +227,9 @@ static struct afswtch af_pfsync = { static __constructor void pfsync_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) int i; - for (i = 0; i < N(pfsync_cmds); i++) + for (i = 0; i < nitems(pfsync_cmds); i++) cmd_register(&pfsync_cmds[i]); af_register(&af_pfsync); -#undef N } Modified: stable/10/sbin/ifconfig/ifvlan.c ============================================================================== --- stable/10/sbin/ifconfig/ifvlan.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifvlan.c Mon Oct 26 03:43:28 2015 (r289986) @@ -195,13 +195,11 @@ static struct afswtch af_vlan = { static __constructor void vlan_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(vlan_cmds); i++) + for (i = 0; i < nitems(vlan_cmds); i++) cmd_register(&vlan_cmds[i]); af_register(&af_vlan); callback_register(vlan_cb, NULL); clone_setdefcallback("vlan", vlan_create); -#undef N } Modified: stable/10/sbin/ifconfig/ifvxlan.c ============================================================================== --- stable/10/sbin/ifconfig/ifvxlan.c Mon Oct 26 03:37:01 2015 (r289985) +++ stable/10/sbin/ifconfig/ifvxlan.c Mon Oct 26 03:43:28 2015 (r289986) @@ -636,13 +636,11 @@ static struct afswtch af_vxlan = { static __constructor void vxlan_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(vxlan_cmds); i++) + for (i = 0; i < nitems(vxlan_cmds); i++) cmd_register(&vxlan_cmds[i]); af_register(&af_vxlan); callback_register(vxlan_cb, NULL); clone_setdefcallback("vxlan", vxlan_create); -#undef N } From owner-svn-src-stable-10@freebsd.org Mon Oct 26 03:53:50 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 298EE8DDC; Mon, 26 Oct 2015 03:53:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4A4A1160; Mon, 26 Oct 2015 03:53:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9Q3rmZp011814; Mon, 26 Oct 2015 03:53:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q3rmAk011813; Mon, 26 Oct 2015 03:53:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510260353.t9Q3rmAk011813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 26 Oct 2015 03:53:48 +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: r289989 - stable/10/usr.sbin/makefs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 03:53:50 -0000 Author: ngie Date: Mon Oct 26 03:53:48 2015 New Revision: 289989 URL: https://svnweb.freebsd.org/changeset/base/289989 Log: MFC r289601: Don't check if `val` is NULL before calling free; free(3) already handles this PR: 203649 Submitted by: Thomas Schmitt Coverity CID: 1305659 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/usr.sbin/makefs/cd9660.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/makefs/cd9660.c ============================================================================== --- stable/10/usr.sbin/makefs/cd9660.c Mon Oct 26 03:48:38 2015 (r289988) +++ stable/10/usr.sbin/makefs/cd9660.c Mon Oct 26 03:53:48 2015 (r289989) @@ -428,8 +428,7 @@ cd9660_parse_opts(const char *option, fs rv = set_option(cd9660_options, var, val); } - if (var) - free(var); + free(var); return (rv); } From owner-svn-src-stable-10@freebsd.org Mon Oct 26 11:35:42 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEF23A19657; Mon, 26 Oct 2015 11:35:42 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7095C1BCE; Mon, 26 Oct 2015 11:35:42 +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 t9QBZfYU044744; Mon, 26 Oct 2015 11:35:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9QBZfA6044741; Mon, 26 Oct 2015 11:35:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510261135.t9QBZfA6044741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 26 Oct 2015 11:35: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: r289997 - in stable/10: . contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kerne... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 11:35:43 -0000 Author: glebius Date: Mon Oct 26 11:35:40 2015 New Revision: 289997 URL: https://svnweb.freebsd.org/changeset/base/289997 Log: Upgrade NTP to 4.2.8p4. Security: FreeBSD-SA-15:25.ntp Security: CVE-2015-7871 Security: CVE-2015-7855 Security: CVE-2015-7854 Security: CVE-2015-7853 Security: CVE-2015-7852 Security: CVE-2015-7851 Security: CVE-2015-7850 Security: CVE-2015-7849 Security: CVE-2015-7848 Security: CVE-2015-7701 Security: CVE-2015-7703 Security: CVE-2015-7704, CVE-2015-7705 Security: CVE-2015-7691, CVE-2015-7692, CVE-2015-7702 Added: stable/10/contrib/ntp/include/rc_cmdlength.h - copied unchanged from r289764, head/contrib/ntp/include/rc_cmdlength.h stable/10/contrib/ntp/sntp/m4/ntp_problemtests.m4 - copied unchanged from r289764, head/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/10/contrib/ntp/sntp/tests/fileHandlingTest.c - copied unchanged from r289764, head/contrib/ntp/sntp/tests/fileHandlingTest.c stable/10/contrib/ntp/sntp/tests/run-t-log.c - copied unchanged from r289764, head/contrib/ntp/sntp/tests/run-t-log.c stable/10/contrib/ntp/sntp/tests/sntptest.c - copied unchanged from r289764, head/contrib/ntp/sntp/tests/sntptest.c stable/10/contrib/ntp/sntp/tests/t-log.c - copied unchanged from r289764, head/contrib/ntp/sntp/tests/t-log.c stable/10/contrib/ntp/sntp/unity/auto/parseOutput.rb - copied unchanged from r289764, head/contrib/ntp/sntp/unity/auto/parseOutput.rb stable/10/contrib/ntp/sntp/unity/auto/type_sanitizer.rb - copied unchanged from r289764, head/contrib/ntp/sntp/unity/auto/type_sanitizer.rb stable/10/contrib/ntp/sntp/unity/auto/unity_test_summary.py - copied unchanged from r289764, head/contrib/ntp/sntp/unity/auto/unity_test_summary.py stable/10/contrib/ntp/sntp/unity/unity_config.h - copied unchanged from r289764, head/contrib/ntp/sntp/unity/unity_config.h stable/10/contrib/ntp/tests/libntp/lfptest.c - copied unchanged from r289764, head/contrib/ntp/tests/libntp/lfptest.c stable/10/contrib/ntp/tests/libntp/sockaddrtest.c - copied unchanged from r289764, head/contrib/ntp/tests/libntp/sockaddrtest.c stable/10/contrib/ntp/tests/ntpd/leapsec.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/leapsec.c stable/10/contrib/ntp/tests/ntpd/ntp_prio_q.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/ntp_prio_q.c stable/10/contrib/ntp/tests/ntpd/ntp_restrict.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/ntp_restrict.c stable/10/contrib/ntp/tests/ntpd/rc_cmdlength.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/rc_cmdlength.c stable/10/contrib/ntp/tests/ntpd/run-leapsec.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/run-leapsec.c stable/10/contrib/ntp/tests/ntpd/run-ntp_prio_q.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/run-ntp_prio_q.c stable/10/contrib/ntp/tests/ntpd/run-ntp_restrict.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/run-ntp_restrict.c stable/10/contrib/ntp/tests/ntpd/run-rc_cmdlength.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/run-rc_cmdlength.c stable/10/contrib/ntp/tests/ntpd/run-t-ntp_scanner.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/run-t-ntp_scanner.c stable/10/contrib/ntp/tests/ntpd/run-t-ntp_signd.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/run-t-ntp_signd.c stable/10/contrib/ntp/tests/ntpd/t-ntp_scanner.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/t-ntp_scanner.c stable/10/contrib/ntp/tests/ntpd/t-ntp_signd.c - copied unchanged from r289764, head/contrib/ntp/tests/ntpd/t-ntp_signd.c stable/10/contrib/ntp/tests/ntpq/ - copied from r289764, head/contrib/ntp/tests/ntpq/ Deleted: stable/10/contrib/ntp/FREEBSD-Xlist stable/10/contrib/ntp/FREEBSD-upgrade stable/10/contrib/ntp/sntp/libevent/sample/ stable/10/contrib/ntp/sntp/tests/fileHandlingTest.h stable/10/contrib/ntp/sntp/tests/g_fileHandlingTest.h stable/10/contrib/ntp/sntp/tests/g_networking.cpp stable/10/contrib/ntp/sntp/tests/g_packetHandling.cpp stable/10/contrib/ntp/sntp/tests/g_packetProcessing.cpp stable/10/contrib/ntp/sntp/tests/g_sntptest.h stable/10/contrib/ntp/sntp/tests_main.cpp stable/10/contrib/ntp/sntp/tests_main.h stable/10/contrib/ntp/tests/libntp/g_a_md5encrypt.cpp stable/10/contrib/ntp/tests/libntp/g_atoint.cpp stable/10/contrib/ntp/tests/libntp/g_atouint.cpp stable/10/contrib/ntp/tests/libntp/g_authkeys.cpp stable/10/contrib/ntp/tests/libntp/g_buftvtots.cpp stable/10/contrib/ntp/tests/libntp/g_calendar.cpp stable/10/contrib/ntp/tests/libntp/g_caljulian.cpp stable/10/contrib/ntp/tests/libntp/g_caltontp.cpp stable/10/contrib/ntp/tests/libntp/g_calyearstart.cpp stable/10/contrib/ntp/tests/libntp/g_clocktime.cpp stable/10/contrib/ntp/tests/libntp/g_decodenetnum.cpp stable/10/contrib/ntp/tests/libntp/g_hextoint.cpp stable/10/contrib/ntp/tests/libntp/g_hextolfp.cpp stable/10/contrib/ntp/tests/libntp/g_humandate.cpp stable/10/contrib/ntp/tests/libntp/g_lfpfunc.cpp stable/10/contrib/ntp/tests/libntp/g_lfptest.h stable/10/contrib/ntp/tests/libntp/g_lfptostr.cpp stable/10/contrib/ntp/tests/libntp/g_libntptest.cpp stable/10/contrib/ntp/tests/libntp/g_libntptest.h stable/10/contrib/ntp/tests/libntp/g_modetoa.cpp stable/10/contrib/ntp/tests/libntp/g_msyslog.cpp stable/10/contrib/ntp/tests/libntp/g_netof.cpp stable/10/contrib/ntp/tests/libntp/g_numtoa.cpp stable/10/contrib/ntp/tests/libntp/g_numtohost.cpp stable/10/contrib/ntp/tests/libntp/g_octtoint.cpp stable/10/contrib/ntp/tests/libntp/g_prettydate.cpp stable/10/contrib/ntp/tests/libntp/g_recvbuff.cpp stable/10/contrib/ntp/tests/libntp/g_refnumtoa.cpp stable/10/contrib/ntp/tests/libntp/g_sfptostr.cpp stable/10/contrib/ntp/tests/libntp/g_sockaddrtest.h stable/10/contrib/ntp/tests/libntp/g_socktoa.cpp stable/10/contrib/ntp/tests/libntp/g_ssl_init.cpp stable/10/contrib/ntp/tests/libntp/g_statestr.cpp stable/10/contrib/ntp/tests/libntp/g_strtolfp.cpp stable/10/contrib/ntp/tests/libntp/g_timespecops.cpp stable/10/contrib/ntp/tests/libntp/g_timestructs.cpp stable/10/contrib/ntp/tests/libntp/g_timestructs.h stable/10/contrib/ntp/tests/libntp/g_timevalops.cpp stable/10/contrib/ntp/tests/libntp/g_tstotv.cpp stable/10/contrib/ntp/tests/libntp/g_tvtots.cpp stable/10/contrib/ntp/tests/libntp/g_uglydate.cpp stable/10/contrib/ntp/tests/libntp/g_vi64ops.cpp stable/10/contrib/ntp/tests/libntp/g_ymd2yd.cpp stable/10/contrib/ntp/tests/ntpd/leapsec.cpp stable/10/contrib/ntp/tests/ntpd/ntpdtest.cpp stable/10/contrib/ntp/tests/ntpd/ntpdtest.h Modified: stable/10/UPDATING stable/10/contrib/ntp/ChangeLog stable/10/contrib/ntp/CommitLog stable/10/contrib/ntp/Makefile.am stable/10/contrib/ntp/Makefile.in stable/10/contrib/ntp/NEWS stable/10/contrib/ntp/aclocal.m4 stable/10/contrib/ntp/adjtimed/Makefile.in stable/10/contrib/ntp/adjtimed/adjtimed.c stable/10/contrib/ntp/clockstuff/Makefile.in stable/10/contrib/ntp/clockstuff/chutest.c stable/10/contrib/ntp/clockstuff/propdelay.c stable/10/contrib/ntp/configure stable/10/contrib/ntp/configure.ac stable/10/contrib/ntp/html/decode.html stable/10/contrib/ntp/html/miscopt.html stable/10/contrib/ntp/html/stats.html stable/10/contrib/ntp/include/Makefile.am stable/10/contrib/ntp/include/Makefile.in stable/10/contrib/ntp/include/isc/Makefile.in stable/10/contrib/ntp/include/ntp_assert.h stable/10/contrib/ntp/include/ntp_calendar.h stable/10/contrib/ntp/include/ntp_config.h stable/10/contrib/ntp/include/ntp_control.h stable/10/contrib/ntp/include/ntp_lists.h stable/10/contrib/ntp/include/ntp_stdlib.h stable/10/contrib/ntp/include/ntp_syslog.h stable/10/contrib/ntp/include/ntp_types.h stable/10/contrib/ntp/kernel/Makefile.in stable/10/contrib/ntp/kernel/sys/Makefile.in stable/10/contrib/ntp/libntp/Makefile.in stable/10/contrib/ntp/libntp/atolfp.c stable/10/contrib/ntp/libntp/audio.c stable/10/contrib/ntp/libntp/authkeys.c stable/10/contrib/ntp/libntp/authreadkeys.c stable/10/contrib/ntp/libntp/caljulian.c stable/10/contrib/ntp/libntp/caltontp.c stable/10/contrib/ntp/libntp/decodenetnum.c stable/10/contrib/ntp/libntp/emalloc.c stable/10/contrib/ntp/libntp/icom.c stable/10/contrib/ntp/libntp/machines.c stable/10/contrib/ntp/libntp/msyslog.c stable/10/contrib/ntp/libntp/ntp_calendar.c stable/10/contrib/ntp/libntp/ntp_intres.c stable/10/contrib/ntp/libntp/ntp_lineedit.c stable/10/contrib/ntp/libntp/ntp_rfc2553.c stable/10/contrib/ntp/libntp/ntp_worker.c stable/10/contrib/ntp/libntp/prettydate.c stable/10/contrib/ntp/libntp/recvbuff.c stable/10/contrib/ntp/libntp/socket.c stable/10/contrib/ntp/libntp/socktohost.c stable/10/contrib/ntp/libntp/statestr.c stable/10/contrib/ntp/libparse/Makefile.in stable/10/contrib/ntp/ntpd/Makefile.am stable/10/contrib/ntp/ntpd/Makefile.in stable/10/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/10/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/10/contrib/ntp/ntpd/invoke-ntpd.texi stable/10/contrib/ntp/ntpd/ntp.conf.5man stable/10/contrib/ntp/ntpd/ntp.conf.5mdoc stable/10/contrib/ntp/ntpd/ntp.conf.def stable/10/contrib/ntp/ntpd/ntp.conf.html stable/10/contrib/ntp/ntpd/ntp.conf.man.in stable/10/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/10/contrib/ntp/ntpd/ntp.keys.5man stable/10/contrib/ntp/ntpd/ntp.keys.5mdoc stable/10/contrib/ntp/ntpd/ntp.keys.html stable/10/contrib/ntp/ntpd/ntp.keys.man.in stable/10/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/10/contrib/ntp/ntpd/ntp_config.c stable/10/contrib/ntp/ntpd/ntp_control.c stable/10/contrib/ntp/ntpd/ntp_crypto.c stable/10/contrib/ntp/ntpd/ntp_io.c stable/10/contrib/ntp/ntpd/ntp_loopfilter.c stable/10/contrib/ntp/ntpd/ntp_monitor.c stable/10/contrib/ntp/ntpd/ntp_parser.c stable/10/contrib/ntp/ntpd/ntp_parser.h stable/10/contrib/ntp/ntpd/ntp_peer.c stable/10/contrib/ntp/ntpd/ntp_proto.c stable/10/contrib/ntp/ntpd/ntp_refclock.c stable/10/contrib/ntp/ntpd/ntp_request.c stable/10/contrib/ntp/ntpd/ntp_restrict.c stable/10/contrib/ntp/ntpd/ntp_timer.c stable/10/contrib/ntp/ntpd/ntpd-opts.c stable/10/contrib/ntp/ntpd/ntpd-opts.def stable/10/contrib/ntp/ntpd/ntpd-opts.h stable/10/contrib/ntp/ntpd/ntpd.1ntpdman stable/10/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/10/contrib/ntp/ntpd/ntpd.c stable/10/contrib/ntp/ntpd/ntpd.html stable/10/contrib/ntp/ntpd/ntpd.man.in stable/10/contrib/ntp/ntpd/ntpd.mdoc.in stable/10/contrib/ntp/ntpd/rc_cmdlength.c (contents, props changed) stable/10/contrib/ntp/ntpd/refclock_arc.c stable/10/contrib/ntp/ntpd/refclock_chu.c stable/10/contrib/ntp/ntpd/refclock_gpsdjson.c stable/10/contrib/ntp/ntpd/refclock_local.c stable/10/contrib/ntp/ntpd/refclock_nmea.c stable/10/contrib/ntp/ntpd/refclock_palisade.c stable/10/contrib/ntp/ntpd/refclock_parse.c stable/10/contrib/ntp/ntpd/refclock_wwv.c stable/10/contrib/ntp/ntpdate/Makefile.in stable/10/contrib/ntp/ntpdate/ntpdate.c stable/10/contrib/ntp/ntpdc/Makefile.in stable/10/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/10/contrib/ntp/ntpdc/ntpdc-opts.c stable/10/contrib/ntp/ntpdc/ntpdc-opts.h stable/10/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/10/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/10/contrib/ntp/ntpdc/ntpdc.c stable/10/contrib/ntp/ntpdc/ntpdc.html stable/10/contrib/ntp/ntpdc/ntpdc.man.in stable/10/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/10/contrib/ntp/ntpq/Makefile.in stable/10/contrib/ntp/ntpq/invoke-ntpq.texi stable/10/contrib/ntp/ntpq/libntpq.h stable/10/contrib/ntp/ntpq/ntpq-opts.c stable/10/contrib/ntp/ntpq/ntpq-opts.h stable/10/contrib/ntp/ntpq/ntpq-subs.c stable/10/contrib/ntp/ntpq/ntpq.1ntpqman stable/10/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/10/contrib/ntp/ntpq/ntpq.c stable/10/contrib/ntp/ntpq/ntpq.html stable/10/contrib/ntp/ntpq/ntpq.man.in stable/10/contrib/ntp/ntpq/ntpq.mdoc.in stable/10/contrib/ntp/ntpsnmpd/Makefile.in stable/10/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/10/contrib/ntp/packageinfo.sh stable/10/contrib/ntp/parseutil/Makefile.in stable/10/contrib/ntp/scripts/Makefile.in stable/10/contrib/ntp/scripts/build/Makefile.in stable/10/contrib/ntp/scripts/calc_tickadj/Makefile.in stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/10/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/10/contrib/ntp/scripts/invoke-plot_summary.texi stable/10/contrib/ntp/scripts/invoke-summary.texi stable/10/contrib/ntp/scripts/lib/Makefile.in stable/10/contrib/ntp/scripts/lib/NTP/Util.pm stable/10/contrib/ntp/scripts/ntp-wait/Makefile.in stable/10/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/10/contrib/ntp/scripts/ntpsweep/Makefile.in stable/10/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.in stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/10/contrib/ntp/scripts/ntptrace/Makefile.in stable/10/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/10/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/10/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/10/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/10/contrib/ntp/scripts/ntptrace/ntptrace.html stable/10/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/10/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/10/contrib/ntp/scripts/plot_summary-opts stable/10/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/10/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/10/contrib/ntp/scripts/plot_summary.html stable/10/contrib/ntp/scripts/plot_summary.man.in stable/10/contrib/ntp/scripts/plot_summary.mdoc.in stable/10/contrib/ntp/scripts/summary-opts stable/10/contrib/ntp/scripts/summary.1summaryman stable/10/contrib/ntp/scripts/summary.1summarymdoc stable/10/contrib/ntp/scripts/summary.html stable/10/contrib/ntp/scripts/summary.man.in stable/10/contrib/ntp/scripts/summary.mdoc.in stable/10/contrib/ntp/scripts/update-leap/Makefile.in (contents, props changed) stable/10/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/10/contrib/ntp/scripts/update-leap/update-leap-opts stable/10/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/10/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/10/contrib/ntp/scripts/update-leap/update-leap.html (contents, props changed) stable/10/contrib/ntp/scripts/update-leap/update-leap.man.in (contents, props changed) stable/10/contrib/ntp/scripts/update-leap/update-leap.mdoc.in (contents, props changed) stable/10/contrib/ntp/sntp/Makefile.am stable/10/contrib/ntp/sntp/Makefile.in stable/10/contrib/ntp/sntp/configure stable/10/contrib/ntp/sntp/configure.ac stable/10/contrib/ntp/sntp/include/Makefile.in stable/10/contrib/ntp/sntp/include/version.def stable/10/contrib/ntp/sntp/include/version.texi stable/10/contrib/ntp/sntp/invoke-sntp.texi stable/10/contrib/ntp/sntp/libevent/Makefile.am stable/10/contrib/ntp/sntp/libevent/Makefile.in stable/10/contrib/ntp/sntp/libevent/test/bench_httpclient.c stable/10/contrib/ntp/sntp/libevent/test/regress.c stable/10/contrib/ntp/sntp/libevent/test/regress_dns.c stable/10/contrib/ntp/sntp/libevent/test/regress_http.c stable/10/contrib/ntp/sntp/libevent/test/regress_minheap.c stable/10/contrib/ntp/sntp/libevent/test/test-ratelim.c stable/10/contrib/ntp/sntp/libevent/test/test-time.c stable/10/contrib/ntp/sntp/libopts/Makefile.in stable/10/contrib/ntp/sntp/libopts/compat/pathfind.c stable/10/contrib/ntp/sntp/log.c stable/10/contrib/ntp/sntp/log.h stable/10/contrib/ntp/sntp/m4/ntp_libevent.m4 stable/10/contrib/ntp/sntp/m4/ntp_libntp.m4 stable/10/contrib/ntp/sntp/m4/ntp_rlimit.m4 stable/10/contrib/ntp/sntp/m4/openldap-thread-check.m4 stable/10/contrib/ntp/sntp/m4/os_cflags.m4 stable/10/contrib/ntp/sntp/m4/version.m4 stable/10/contrib/ntp/sntp/networking.c stable/10/contrib/ntp/sntp/scripts/Makefile.in stable/10/contrib/ntp/sntp/sntp-opts.c stable/10/contrib/ntp/sntp/sntp-opts.h stable/10/contrib/ntp/sntp/sntp.1sntpman stable/10/contrib/ntp/sntp/sntp.1sntpmdoc stable/10/contrib/ntp/sntp/sntp.html stable/10/contrib/ntp/sntp/sntp.man.in stable/10/contrib/ntp/sntp/sntp.mdoc.in stable/10/contrib/ntp/sntp/tests/Makefile.am stable/10/contrib/ntp/sntp/tests/Makefile.in stable/10/contrib/ntp/sntp/tests/crypto.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/fileHandlingTest.h.in (contents, props changed) stable/10/contrib/ntp/sntp/tests/keyFile.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/kodDatabase.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/kodFile.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/packetHandling.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/packetProcessing.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/run-crypto.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/run-keyFile.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/run-kodDatabase.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/run-kodFile.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/run-networking.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/run-packetHandling.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/run-packetProcessing.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/run-utilities.c (contents, props changed) stable/10/contrib/ntp/sntp/tests/sntptest.h stable/10/contrib/ntp/sntp/tests/utilities.c (contents, props changed) stable/10/contrib/ntp/sntp/unity/Makefile.am (contents, props changed) stable/10/contrib/ntp/sntp/unity/Makefile.in (contents, props changed) stable/10/contrib/ntp/sntp/unity/auto/generate_test_runner.rb (contents, props changed) stable/10/contrib/ntp/sntp/unity/auto/unity_test_summary.rb (contents, props changed) stable/10/contrib/ntp/sntp/unity/unity.c (contents, props changed) stable/10/contrib/ntp/sntp/unity/unity_internals.h (contents, props changed) stable/10/contrib/ntp/sntp/version.c (contents, props changed) stable/10/contrib/ntp/tests/Makefile.am stable/10/contrib/ntp/tests/Makefile.in stable/10/contrib/ntp/tests/bug-2803/Makefile.am (contents, props changed) stable/10/contrib/ntp/tests/bug-2803/Makefile.in (contents, props changed) stable/10/contrib/ntp/tests/bug-2803/run-bug-2803.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/Makefile.am stable/10/contrib/ntp/tests/libntp/Makefile.in stable/10/contrib/ntp/tests/libntp/a_md5encrypt.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/atoint.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/atouint.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/authkeys.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/buftvtots.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/calendar.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/caljulian.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/caltontp.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/calyearstart.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/clocktime.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/decodenetnum.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/hextoint.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/hextolfp.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/humandate.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/lfpfunc.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/lfptest.h stable/10/contrib/ntp/tests/libntp/lfptostr.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/modetoa.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/msyslog.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/netof.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/numtoa.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/numtohost.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/octtoint.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/prettydate.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/recvbuff.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/refidsmear.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/refnumtoa.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-a_md5encrypt.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-atoint.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-atouint.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-authkeys.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-buftvtots.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-calendar.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-caljulian.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-caltontp.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-calyearstart.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-clocktime.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-decodenetnum.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-hextoint.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-hextolfp.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-humandate.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-lfpfunc.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-lfptostr.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-modetoa.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-msyslog.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-netof.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-numtoa.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-numtohost.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-octtoint.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-prettydate.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-recvbuff.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-refidsmear.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-refnumtoa.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-sfptostr.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-socktoa.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-ssl_init.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-statestr.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-strtolfp.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-timespecops.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-timevalops.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-tstotv.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-tvtots.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-uglydate.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-vi64ops.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/run-ymd2yd.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/sfptostr.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/sockaddrtest.h stable/10/contrib/ntp/tests/libntp/socktoa.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/ssl_init.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/statestr.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/strtolfp.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/test-libntp.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/test-libntp.h (contents, props changed) stable/10/contrib/ntp/tests/libntp/timespecops.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/timevalops.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/tstotv.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/tvtots.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/uglydate.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/vi64ops.c (contents, props changed) stable/10/contrib/ntp/tests/libntp/ymd2yd.c (contents, props changed) stable/10/contrib/ntp/tests/ntpd/Makefile.am stable/10/contrib/ntp/tests/ntpd/Makefile.in stable/10/contrib/ntp/tests/sandbox/Makefile.am (contents, props changed) stable/10/contrib/ntp/tests/sandbox/Makefile.in (contents, props changed) stable/10/contrib/ntp/tests/sandbox/run-modetoa.c (contents, props changed) stable/10/contrib/ntp/tests/sandbox/run-uglydate.c (contents, props changed) stable/10/contrib/ntp/tests/sandbox/run-ut-2803.c (contents, props changed) stable/10/contrib/ntp/tests/sandbox/smeartest.c (contents, props changed) stable/10/contrib/ntp/tests/sec-2853/Makefile.am (contents, props changed) stable/10/contrib/ntp/tests/sec-2853/Makefile.in (contents, props changed) stable/10/contrib/ntp/tests/sec-2853/run-sec-2853.c (contents, props changed) stable/10/contrib/ntp/tests/sec-2853/sec-2853.c (contents, props changed) stable/10/contrib/ntp/util/Makefile.in stable/10/contrib/ntp/util/invoke-ntp-keygen.texi stable/10/contrib/ntp/util/ntp-keygen-opts.c stable/10/contrib/ntp/util/ntp-keygen-opts.h stable/10/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/10/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/10/contrib/ntp/util/ntp-keygen.c stable/10/contrib/ntp/util/ntp-keygen.html stable/10/contrib/ntp/util/ntp-keygen.man.in stable/10/contrib/ntp/util/ntp-keygen.mdoc.in stable/10/contrib/ntp/util/ntptime.c stable/10/usr.sbin/ntp/config.h stable/10/usr.sbin/ntp/doc/ntp-keygen.8 stable/10/usr.sbin/ntp/doc/ntp.conf.5 stable/10/usr.sbin/ntp/doc/ntp.keys.5 stable/10/usr.sbin/ntp/doc/ntpd.8 stable/10/usr.sbin/ntp/doc/ntpdc.8 stable/10/usr.sbin/ntp/doc/ntpq.8 stable/10/usr.sbin/ntp/doc/sntp.8 stable/10/usr.sbin/ntp/ntpdc/Makefile stable/10/usr.sbin/ntp/ntpq/Makefile stable/10/usr.sbin/ntp/scripts/mkver Directory Properties: stable/10/ (props changed) stable/10/contrib/ntp/html/drivers/driver40-ja.html (props changed) stable/10/contrib/ntp/include/refidsmear.h (props changed) stable/10/contrib/ntp/libjsmn/example/jsondump.c (props changed) stable/10/contrib/ntp/libjsmn/example/simple.c (props changed) stable/10/contrib/ntp/libntp/refidsmear.c (props changed) stable/10/contrib/ntp/scripts/update-leap/Makefile.am (props changed) stable/10/contrib/ntp/scripts/update-leap/update-leap.in (props changed) stable/10/contrib/ntp/scripts/update-leap/update-leap.sh (props changed) stable/10/contrib/ntp/sntp/ag-tpl/Mdoc.pm (props changed) stable/10/contrib/ntp/sntp/libpkgver/colcomp.c (props changed) stable/10/contrib/ntp/sntp/libpkgver/pkgver.h (props changed) stable/10/contrib/ntp/sntp/tests/networking.c (props changed) stable/10/contrib/ntp/sntp/unity/auto/colour_prompt.rb (props changed) stable/10/contrib/ntp/sntp/unity/auto/colour_reporter.rb (props changed) stable/10/contrib/ntp/sntp/unity/auto/generate_module.rb (props changed) stable/10/contrib/ntp/sntp/unity/auto/runner_maybe.c (props changed) stable/10/contrib/ntp/sntp/unity/auto/test_file_filter.rb (props changed) stable/10/contrib/ntp/sntp/unity/unity.h (props changed) stable/10/contrib/ntp/sntp/unity/unity_fixture.c (props changed) stable/10/contrib/ntp/sntp/unity/unity_fixture.h (props changed) stable/10/contrib/ntp/sntp/unity/unity_fixture_internals.h (props changed) stable/10/contrib/ntp/sntp/unity/unity_fixture_malloc_overrides.h (props changed) stable/10/contrib/ntp/tests/bug-2803/bug-2803.c (props changed) stable/10/contrib/ntp/tests/sandbox/bug-2803.c (props changed) stable/10/contrib/ntp/tests/sandbox/modetoa.c (props changed) stable/10/contrib/ntp/tests/sandbox/uglydate.c (props changed) stable/10/contrib/ntp/tests/sandbox/ut-2803.c (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Mon Oct 26 11:02:57 2015 (r289996) +++ stable/10/UPDATING Mon Oct 26 11:35:40 2015 (r289997) @@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20151026: + NTP has been upgraded to 4.2.8p4. + 20151025: ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support has been removed from atf.test.mk (included from bsd.test.mk). Please upgrade devel/atf Modified: stable/10/contrib/ntp/ChangeLog ============================================================================== --- stable/10/contrib/ntp/ChangeLog Mon Oct 26 11:02:57 2015 (r289996) +++ stable/10/contrib/ntp/ChangeLog Mon Oct 26 11:35:40 2015 (r289997) @@ -1,4 +1,159 @@ --- +(4.2.8p4) 2015/10/21 Released by Harlan Stenn +(4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn + +* [Sec 2899] CVE-2014-9297 perlinger@ntp.org +* [Sec 2901] Drop invalid packet before checking KoD. Check for all KoD's. + Danny Mayer. Log incoming packets that fail TEST2. Harlan Stenn. +* [Sec 2902] configuration directives "pidfile" and "driftfile" + should be local-only. perlinger@ntp.org (patch by Miroslav Lichvar) +* [Sec 2909] added missing call to 'free()' in ntp_crypto.c. perlinger@ntp.org +* [Sec 2913] TALOS-CAN-0052: crash by loop counter underrun. perlinger@ntp.org +* [Sec 2916] TALOS-CAN-0054: memory corruption in password store. JPerlinger +* [Sec 2917] TALOS-CAN-0055: Infinite loop if extended logging enabled and + the logfile and keyfile are the same. perlinger@ntp.org +* [Sec 1918] TALOS-CAN-0062: prevent directory traversal for VMS, too, when + using 'saveconfig' command. perlinger@ntp.org +* [Bug 2919] TALOS-CAN-0063: avoid buffer overrun in ntpq. perlinger@ntp.org +* [Sec 2020] TALOS-CAN-0064: signed/unsiged clash could lead to buffer overun + and memory corruption. perlinger@ntp.org +* [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger. +* [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL + on some bogus values. Harlan Stenn. +* [Sec 2941] NAK to the Future: Symmetric association authentication + bypass via crypto-NAK. Patch applied. perlinger@ntp.org +* [Bug 2332] (reopened) Exercise thread cancellation once before dropping + privileges and limiting resources in NTPD removes the need to link + forcefully against 'libgcc_s' which does not always work. J.Perlinger +* [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn. +* [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn. +* [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn. +* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c. perlinger@ntp.org +* [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn. +* [Bug 2849] Systems with more than one default route may never + synchronize. Brian Utterback. Note that this patch might need to + be reverted once Bug 2043 has been fixed. +* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger +* [Bug 2866] segmentation fault at initgroups(). Harlan Stenn. +* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger +* [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn +* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn +* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must + be configured for the distribution targets. Harlan Stenn. +* [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar. +* [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org +* [Bug 2888] streamline calendar functions. perlinger@ntp.org +* [Bug 2889] ntp-dev-4.3.67 does not build on Windows. perlinger@ntp.org +* [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov. +* [Bug 2906] make check needs better support for pthreads. Harlan Stenn. +* [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn. +* [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn. +* libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn. +* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. +* tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn. +* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn. +* On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn. +* top_srcdir can change based on ntp v. sntp. Harlan Stenn. +* sntp/tests/ function parameter list cleanup. Damir Tomić. +* tests/libntp/ function parameter list cleanup. Damir Tomić. +* tests/ntpd/ function parameter list cleanup. Damir Tomić. +* sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn. +* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. H.Stenn. +* tests/libntp/timevalops.c and timespecops.c fixed error printing. D.Tomić. +* tests/libntp/ improvements in code and fixed error printing. Damir Tomić. +* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c, + caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed + formatting; first declaration, then code (C90); deleted unnecessary comments; + changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich +* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments, + fix formatting, cleanup. Tomasz Flendrich +* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting. + Tomasz Flendrich +* tests/libntp/statestr.c remove empty functions, remove unnecessary include, + fix formatting. Tomasz Flendrich +* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich +* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting. + Tomasz Flendrich +* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich +* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich +* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich +* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich +* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting. +* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include, +fixed formatting. Tomasz Flendrich +* tests/libntp/timespecops.c fixed formatting, fixed the order of includes, + removed unnecessary comments, cleanup. Tomasz Flendrich +* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary + comments, cleanup. Tomasz Flendrich +* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting. + Tomasz Flendrich +* tests/libntp/lfptest.h cleanup. Tomasz Flendrich +* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich +* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/kodDatabase.c added consts, deleted empty function, + fixed formatting. Tomasz Flendrich +* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich +* sntp/tests/packetHandling.c is now using proper Unity's assertions, + fixed formatting, deleted unused variable. Tomasz Flendrich +* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/packetProcessing.c changed from sprintf to snprintf, + fixed formatting. Tomasz Flendrich +* sntp/tests/utilities.c is now using proper Unity's assertions, changed + the order of includes, fixed formatting, removed unnecessary comments. + Tomasz Flendrich +* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich +* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem, + made one function do its job, deleted unnecessary prints, fixed formatting. + Tomasz Flendrich +* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich +* sntp/unity/unity_config.h: Distribute it. Harlan Stenn. +* sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn. +* sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn. +* sntp/unity/unity.c: Clean up a printf(). Harlan Stenn. +* Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn. +* Don't build sntp/libevent/sample/. Harlan Stenn. +* tests/libntp/test_caltontp needs -lpthread. Harlan Stenn. +* br-flock: --enable-local-libevent. Harlan Stenn. +* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich +* scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn. +* Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn. +* Code cleanup. Harlan Stenn. +* libntp/icom.c: Typo fix. Harlan Stenn. +* util/ntptime.c: initialization nit. Harlan Stenn. +* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn. +* Add std_unity_tests to various Makefile.am files. Harlan Stenn. +* ntpd/ntp_restrict.c: added a few assertions, created tests for this file. + Tomasz Flendrich +* Changed progname to be const in many files - now it's consistent. Tomasz + Flendrich +* Typo fix for GCC warning suppression. Harlan Stenn. +* Added tests/ntpd/ntp_scanner.c test. Damir Tomić. +* Added declarations to all Unity tests, and did minor fixes to them. + Reduced the number of warnings by half. Damir Tomić. +* Updated generate_test_runner.rb and updated the sntp/unity/auto directory + with the latest Unity updates from Mark. Damir Tomić. +* Retire google test - phase I. Harlan Stenn. +* Unity test cleanup: move declaration of 'initializing'. Harlan Stenn. +* Update the NEWS file. Harlan Stenn. +* Autoconf cleanup. Harlan Stenn. +* Unit test dist cleanup. Harlan Stenn. +* Cleanup various test Makefile.am files. Harlan Stenn. +* Pthread autoconf macro cleanup. Harlan Stenn. +* Fix progname definition in unity runner scripts. Harlan Stenn. +* Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn. +* Update the patch for bug 2817. Harlan Stenn. +* More updates for bug 2817. Harlan Stenn. +* Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn. +* gcc on older HPUX may need +allowdups. Harlan Stenn. +* Adding missing MCAST protection. Harlan Stenn. +* Disable certain test programs on certain platforms. Harlan Stenn. +* Implement --enable-problem-tests (on by default). Harlan Stenn. +* build system tweaks. Harlan Stenn. +--- (4.2.8p3) 2015/06/29 Released by Harlan Stenn * [Sec 2853] Crafted remote config packet can crash some versions of Modified: stable/10/contrib/ntp/CommitLog ============================================================================== --- stable/10/contrib/ntp/CommitLog Mon Oct 26 11:02:57 2015 (r289996) +++ stable/10/contrib/ntp/CommitLog Mon Oct 26 11:35:40 2015 (r289997) @@ -1,3 +1,4916 @@ +ChangeSet@1.3577, 2015-10-21 12:42:02-04:00, stenn@deacon.udel.edu + NTP_4_2_8P4 + TAG: NTP_4_2_8P4 + + ChangeLog@1.1757 +1 -0 + NTP_4_2_8P4 + + ntpd/invoke-ntp.conf.texi@1.193 +1 -1 + NTP_4_2_8P4 + + ntpd/invoke-ntp.keys.texi@1.185 +1 -1 + NTP_4_2_8P4 + + ntpd/invoke-ntpd.texi@1.502 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.conf.5man@1.227 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.conf.5mdoc@1.227 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.conf.html@1.181 +94 -107 + NTP_4_2_8P4 + + ntpd/ntp.conf.man.in@1.227 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.conf.mdoc.in@1.227 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.5man@1.219 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.5mdoc@1.219 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.keys.html@1.181 +21 -33 + NTP_4_2_8P4 + + ntpd/ntp.keys.man.in@1.219 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.mdoc.in@1.219 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd-opts.c@1.524 +245 -245 + NTP_4_2_8P4 + + ntpd/ntpd-opts.h@1.523 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.1ntpdman@1.331 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.1ntpdmdoc@1.331 +2 -2 + NTP_4_2_8P4 + + ntpd/ntpd.html@1.175 +142 -186 + NTP_4_2_8P4 + + ntpd/ntpd.man.in@1.331 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.mdoc.in@1.331 +2 -2 + NTP_4_2_8P4 + + ntpdc/invoke-ntpdc.texi@1.499 +2 -2 + NTP_4_2_8P4 + + ntpdc/ntpdc-opts.c@1.517 +107 -107 + NTP_4_2_8P4 + + ntpdc/ntpdc-opts.h@1.516 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.1ntpdcman@1.330 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.1ntpdcmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + ntpdc/ntpdc.html@1.343 +75 -95 + NTP_4_2_8P4 + + ntpdc/ntpdc.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + + ntpq/invoke-ntpq.texi@1.506 +2 -2 + NTP_4_2_8P4 + + ntpq/ntpq-opts.c@1.523 +106 -106 + NTP_4_2_8P4 + + ntpq/ntpq-opts.h@1.521 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.1ntpqman@1.334 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.1ntpqmdoc@1.334 +2 -2 + NTP_4_2_8P4 + + ntpq/ntpq.html@1.172 +132 -155 + NTP_4_2_8P4 + + ntpq/ntpq.man.in@1.334 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.mdoc.in@1.334 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.501 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd-opts.c@1.519 +68 -68 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd-opts.h@1.518 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.330 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.html@1.170 +10 -14 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + + packageinfo.sh@1.520 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.91 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.92 +2 -2 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.html@1.93 +30 -42 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.man.in@1.90 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.92 +2 -2 + NTP_4_2_8P4 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.95 +1 -1 + NTP_4_2_8P4 + + scripts/invoke-plot_summary.texi@1.112 +2 -2 + NTP_4_2_8P4 + + scripts/invoke-summary.texi@1.112 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.322 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait-opts@1.58 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.319 +3 -3 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.320 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.html@1.339 +41 -59 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.man.in@1.319 +3 -3 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.320 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.98 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.html@1.111 +46 -57 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.man.in@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.99 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/invoke-ntptrace.texi@1.111 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.1ntptraceman@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.99 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.html@1.112 +38 -47 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.man.in@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.mdoc.in@1.100 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary.1plot_summaryman@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/plot_summary.1plot_summarymdoc@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary.html@1.113 +40 -58 + NTP_4_2_8P4 + + scripts/plot_summary.man.in@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/plot_summary.mdoc.in@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/summary-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/summary.1summaryman@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/summary.1summarymdoc@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/summary.html@1.113 +37 -49 + NTP_4_2_8P4 + + scripts/summary.man.in@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/summary.mdoc.in@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/invoke-update-leap.texi@1.11 +1 -1 + NTP_4_2_8P4 + + scripts/update-leap/update-leap-opts@1.11 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.1update-leapman@1.11 +3 -3 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.1update-leapmdoc@1.11 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.html@1.11 +48 -72 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.man.in@1.11 +3 -3 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.mdoc.in@1.11 +2 -2 + NTP_4_2_8P4 + + sntp/invoke-sntp.texi@1.499 +2 -2 + NTP_4_2_8P4 + + sntp/sntp-opts.c@1.518 +159 -159 + NTP_4_2_8P4 + + sntp/sntp-opts.h@1.516 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.1sntpman@1.334 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.1sntpmdoc@1.334 +2 -2 + NTP_4_2_8P4 + + sntp/sntp.html@1.514 +111 -135 + NTP_4_2_8P4 + + sntp/sntp.man.in@1.334 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.mdoc.in@1.334 +2 -2 + NTP_4_2_8P4 + + util/invoke-ntp-keygen.texi@1.502 +2 -2 + NTP_4_2_8P4 + + util/ntp-keygen-opts.c@1.520 +173 -173 + NTP_4_2_8P4 + + util/ntp-keygen-opts.h@1.518 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.1ntp-keygenman@1.330 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.1ntp-keygenmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + util/ntp-keygen.html@1.176 +157 -216 + NTP_4_2_8P4 + + util/ntp-keygen.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + +ChangeSet@1.3576, 2015-10-21 11:58:26-04:00, stenn@deacon.udel.edu + 4.2.8p4 + + packageinfo.sh@1.519 +1 -1 + 4.2.8p4 + +ChangeSet@1.3575, 2015-10-21 15:35:31+00:00, stenn@psp-deb1.ntp.org + Update severity information + + NEWS@1.150 +2 -2 + Update severity information + +ChangeSet@1.3574, 2015-10-20 08:00:43+00:00, stenn@psp-deb1.ntp.org + Update CVEs + + NEWS@1.149 +16 -16 + Update CVEs + +ChangeSet@1.3573, 2015-10-17 06:28:49+00:00, stenn@psp-deb1.ntp.org + ntp-4.2.8p4-sec-RC2 + + NEWS@1.148 +336 -4 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntp.conf.texi@1.192 +1 -1 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntp.keys.texi@1.184 +1 -1 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntpd.texi@1.501 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.5man@1.226 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.5mdoc@1.226 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.html@1.180 +107 -94 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.man.in@1.226 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.mdoc.in@1.226 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.5man@1.218 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.5mdoc@1.218 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.html@1.180 +33 -21 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.man.in@1.218 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.mdoc.in@1.218 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd-opts.c@1.523 +245 -245 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd-opts.h@1.522 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.1ntpdman@1.330 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.1ntpdmdoc@1.330 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.html@1.174 +186 -142 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.man.in@1.330 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.mdoc.in@1.330 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/invoke-ntpdc.texi@1.498 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc-opts.c@1.516 +107 -107 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc-opts.h@1.515 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.1ntpdcman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.1ntpdcmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.html@1.342 +95 -75 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/invoke-ntpq.texi@1.505 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq-opts.c@1.522 +106 -106 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq-opts.h@1.520 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.1ntpqman@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.1ntpqmdoc@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.html@1.171 +155 -132 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.man.in@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.mdoc.in@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.500 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd-opts.c@1.518 +68 -68 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd-opts.h@1.517 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.html@1.169 +14 -10 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + packageinfo.sh@1.518 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.90 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.91 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.html@1.92 +42 -30 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.man.in@1.89 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.91 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.94 +1 -1 + ntp-4.2.8p4-sec-RC2 + + scripts/invoke-plot_summary.texi@1.111 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/invoke-summary.texi@1.111 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.321 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait-opts@1.57 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.318 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.319 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.html@1.338 +59 -41 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.man.in@1.318 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.319 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.97 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.html@1.110 +57 -46 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.man.in@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.98 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/invoke-ntptrace.texi@1.110 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.1ntptraceman@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.98 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.html@1.111 +47 -38 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.man.in@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.mdoc.in@1.99 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.1plot_summaryman@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.1plot_summarymdoc@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.html@1.112 +58 -40 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.man.in@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.mdoc.in@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.1summaryman@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.1summarymdoc@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.html@1.112 +49 -37 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.man.in@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.mdoc.in@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/invoke-update-leap.texi@1.10 +1 -1 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap-opts@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.1update-leapman@1.10 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.1update-leapmdoc@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.html@1.10 +72 -48 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.man.in@1.10 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.mdoc.in@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/invoke-sntp.texi@1.498 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp-opts.c@1.517 +159 -159 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp-opts.h@1.515 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.1sntpman@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.1sntpmdoc@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.html@1.513 +135 -111 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.man.in@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.mdoc.in@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/invoke-ntp-keygen.texi@1.501 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen-opts.c@1.519 +173 -173 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen-opts.h@1.517 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.1ntp-keygenman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.1ntp-keygenmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.html@1.175 +216 -157 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + +ChangeSet@1.3572, 2015-10-17 03:10:01+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1756 +1 -5 + cleanup + +ChangeSet@1.3571, 2015-10-17 01:39:22+00:00, stenn@psp-deb1.ntp.org + [Sec 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ChangeLog@1.1755 +4 -1 + [Sec 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + +ChangeSet@1.3558.3.3, 2015-10-11 08:10:20+02:00, jnperlin@hydra.localnet + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ChangeLog@1.1743.3.3 +3 -0 + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ntpd/ntp_proto.c@1.364.1.1 +18 -0 + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + +ChangeSet@1.3558.3.2, 2015-10-06 06:25:48-04:00, stenn@deacon.udel.edu + NTP_4_2_8P4_RC1 + TAG: NTP_4_2_8P4_RC1 + + ChangeLog@1.1743.3.2 +1 -0 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntp.conf.texi@1.191 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntp.keys.texi@1.183 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntpd.texi@1.500 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.5man@1.225 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.5mdoc@1.225 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.html@1.179 +1196 -1524 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.man.in@1.225 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.mdoc.in@1.225 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.5man@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.5mdoc@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.html@1.179 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.man.in@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.mdoc.in@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntpd-opts.c@1.522 +245 -245 + NTP_4_2_8P4_RC1 + + ntpd/ntpd-opts.h@1.521 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.1ntpdman@1.329 +8 -4 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.1ntpdmdoc@1.329 +7 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.html@1.173 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.man.in@1.329 +8 -4 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.mdoc.in@1.329 +7 -3 + NTP_4_2_8P4_RC1 + + ntpdc/invoke-ntpdc.texi@1.497 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc-opts.c@1.515 +107 -107 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc-opts.h@1.514 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.1ntpdcman@1.328 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.1ntpdcmdoc@1.328 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.html@1.341 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.man.in@1.328 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.mdoc.in@1.328 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/invoke-ntpq.texi@1.504 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq-opts.c@1.521 +106 -106 + NTP_4_2_8P4_RC1 + + ntpq/ntpq-opts.h@1.519 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.1ntpqman@1.332 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.1ntpqmdoc@1.332 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.html@1.170 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.man.in@1.332 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.mdoc.in@1.332 +2 -2 + NTP_4_2_8P4_RC1 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.499 +2 -2 + NTP_4_2_8P4_RC1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Mon Oct 26 15:20:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAC7CA1D3AB; Mon, 26 Oct 2015 15:20:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 6EECB1ED7; Mon, 26 Oct 2015 15:20:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9QFKjD2010722; Mon, 26 Oct 2015 15:20:45 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9QFKjjP010721; Mon, 26 Oct 2015 15:20:45 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510261520.t9QFKjjP010721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Mon, 26 Oct 2015 15:20:45 +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: r290009 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 15:20:46 -0000 Author: des Date: Mon Oct 26 15:20:45 2015 New Revision: 290009 URL: https://svnweb.freebsd.org/changeset/base/290009 Log: MFH (r275359, r290007): make load_rc_config's name argument optional Modified: stable/10/etc/rc.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.subr ============================================================================== --- stable/10/etc/rc.subr Mon Oct 26 15:16:27 2015 (r290008) +++ stable/10/etc/rc.subr Mon Oct 26 15:20:45 2015 (r290009) @@ -1308,16 +1308,15 @@ run_rc_script() } # -# load_rc_config name -# Source in the configuration file for a given name. +# load_rc_config [service] +# Source in the configuration file(s) for a given service. +# If no service is specified, only the global configuration +# file(s) will be loaded. # load_rc_config() { local _name _rcvar_val _var _defval _v _msg _new _d _name=$1 - if [ -z "$_name" ]; then - err 3 'USAGE: load_rc_config name' - fi if ${_rc_conf_loaded:-false}; then : @@ -1333,20 +1332,24 @@ load_rc_config() _rc_conf_loaded=true fi - for _d in /etc ${local_startup%*/rc.d}; do - if [ -f ${_d}/rc.conf.d/"$_name" ]; then - debug "Sourcing ${_d}/rc.conf.d/$_name" - . ${_d}/rc.conf.d/"$_name" - elif [ -d ${_d}/rc.conf.d/"$_name" ] ; then - local _rc - for _rc in ${_d}/rc.conf.d/"$_name"/* ; do - if [ -f "$_rc" ] ; then - debug "Sourcing $_rc" - . "$_rc" - fi - done - fi - done + # If a service name was specified, attempt to load + # service-specific configuration + if [ -n "$_name" ] ; then + for _d in /etc ${local_startup%*/rc.d}; do + if [ -f ${_d}/rc.conf.d/"$_name" ]; then + debug "Sourcing ${_d}/rc.conf.d/$_name" + . ${_d}/rc.conf.d/"$_name" + elif [ -d ${_d}/rc.conf.d/"$_name" ] ; then + local _rc + for _rc in ${_d}/rc.conf.d/"$_name"/* ; do + if [ -f "$_rc" ] ; then + debug "Sourcing $_rc" + . "$_rc" + fi + done + fi + done + fi # Set defaults if defined. for _var in $rcvar $rcvars; do From owner-svn-src-stable-10@freebsd.org Mon Oct 26 16:21:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 220C08DD6; Mon, 26 Oct 2015 16:21:58 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 D138F1E46; Mon, 26 Oct 2015 16:21:57 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9QGLu9x028877; Mon, 26 Oct 2015 16:21:56 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9QGLuL2028872; Mon, 26 Oct 2015 16:21:56 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201510261621.t9QGLuL2028872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 26 Oct 2015 16:21:56 +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: r290014 - in stable/10: lib/libthr/arch/amd64 lib/libthr/arch/i386 libexec/rtld-elf/amd64 libexec/rtld-elf/i386 share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 16:21:58 -0000 Author: vangyzen Date: Mon Oct 26 16:21:56 2015 New Revision: 290014 URL: https://svnweb.freebsd.org/changeset/base/290014 Log: Disable SSE in libthr Clang emits SSE instructions on amd64 in the common path of pthread_mutex_unlock. If the thread does not otherwise use SSE, this usage incurs a context-switch of the FPU/SSE state, which reduces the performance of multiple real-world applications by a non-trivial amount (3-5% in one application). Instead of this change, I experimented with eagerly switching the FPU state at context-switch time. This did not help. Most of the cost seems to be in the read/write of memory--as kib@ stated--and not in the #NM handling. I tested on machines with and without XSAVEOPT. One counter-argument to this change is that most applications already use SIMD, and the number of applications and amount of SIMD usage are only increasing. This is absolutely true. I agree that--in general and in principle--this change is in the wrong direction. However, there are applications that do not use enough SSE to offset the extra context-switch cost. SSE does not provide a clear benefit in the current libthr code with the current compiler, but it does provide a clear loss in some cases. Therefore, disabling SSE in libthr is a non-loss for most, and a gain for some. I refrained from disabling SSE in libc--as was suggested--because I can't make the above argument for libc. It provides a wide variety of code; each case should be analyzed separately. https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html Suggestions from: dim, jmg, rpaulo Sponsored by: Dell Inc. Modified: stable/10/lib/libthr/arch/amd64/Makefile.inc stable/10/lib/libthr/arch/i386/Makefile.inc stable/10/libexec/rtld-elf/amd64/Makefile.inc stable/10/libexec/rtld-elf/i386/Makefile.inc stable/10/share/mk/bsd.cpu.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/arch/amd64/Makefile.inc ============================================================================== --- stable/10/lib/libthr/arch/amd64/Makefile.inc Mon Oct 26 15:50:39 2015 (r290013) +++ stable/10/lib/libthr/arch/amd64/Makefile.inc Mon Oct 26 16:21:56 2015 (r290014) @@ -1,3 +1,9 @@ #$FreeBSD$ SRCS+= pthread_md.c _umtx_op_err.S + +# With the current compiler and libthr code, using SSE in libthr +# does not provide enough performance improvement to outweigh +# the extra context switch cost. This can measurably impact +# performance when the application also does not use enough SSE. +CFLAGS+=${CFLAGS_NO_SIMD} Modified: stable/10/lib/libthr/arch/i386/Makefile.inc ============================================================================== --- stable/10/lib/libthr/arch/i386/Makefile.inc Mon Oct 26 15:50:39 2015 (r290013) +++ stable/10/lib/libthr/arch/i386/Makefile.inc Mon Oct 26 16:21:56 2015 (r290014) @@ -1,3 +1,9 @@ # $FreeBSD$ SRCS+= pthread_md.c _umtx_op_err.S + +# With the current compiler and libthr code, using SSE in libthr +# does not provide enough performance improvement to outweigh +# the extra context switch cost. This can measurably impact +# performance when the application also does not use enough SSE. +CFLAGS+=${CFLAGS_NO_SIMD} Modified: stable/10/libexec/rtld-elf/amd64/Makefile.inc ============================================================================== --- stable/10/libexec/rtld-elf/amd64/Makefile.inc Mon Oct 26 15:50:39 2015 (r290013) +++ stable/10/libexec/rtld-elf/amd64/Makefile.inc Mon Oct 26 16:21:56 2015 (r290014) @@ -1,6 +1,6 @@ # $FreeBSD$ -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float # Uncomment this to build the dynamic linker as an executable instead # of a shared library: #LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x Modified: stable/10/libexec/rtld-elf/i386/Makefile.inc ============================================================================== --- stable/10/libexec/rtld-elf/i386/Makefile.inc Mon Oct 26 15:50:39 2015 (r290013) +++ stable/10/libexec/rtld-elf/i386/Makefile.inc Mon Oct 26 16:21:56 2015 (r290014) @@ -1,6 +1,6 @@ # $FreeBSD$ -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float # Uncomment this to build the dynamic linker as an executable instead # of a shared library: #LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x Modified: stable/10/share/mk/bsd.cpu.mk ============================================================================== --- stable/10/share/mk/bsd.cpu.mk Mon Oct 26 15:50:39 2015 (r290013) +++ stable/10/share/mk/bsd.cpu.mk Mon Oct 26 16:21:56 2015 (r290014) @@ -267,6 +267,27 @@ _CPUCFLAGS += -mfloat-abi=softfp CFLAGS += ${_CPUCFLAGS} .endif +# +# Prohibit the compiler from emitting SIMD instructions. +# These flags are added to CFLAGS in areas where the extra context-switch +# cost outweighs the advantages of SIMD instructions. +# +# gcc: +# Setting -mno-mmx implies -mno-3dnow +# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3 and -mfpmath=387 +# +# clang: +# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa +# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and +# -mno-sse42 +# (-mfpmath= is not supported) +# +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +CFLAGS_NO_SIMD.clang= -mno-avx +CFLAGS_NO_SIMD= -mno-mmx -mno-sse +.endif +CFLAGS_NO_SIMD += ${CFLAGS_NO_SIMD.${COMPILER_TYPE}} + # Add in any architecture-specific CFLAGS. # These come from make.conf or the command line or the environment. CFLAGS += ${CFLAGS.${MACHINE_ARCH}} From owner-svn-src-stable-10@freebsd.org Mon Oct 26 17:45:39 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16E318093; Mon, 26 Oct 2015 17:45:39 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 D8D3E1CA9; Mon, 26 Oct 2015 17:45:38 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9QHjc6P052772; Mon, 26 Oct 2015 17:45:38 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9QHjc6T052771; Mon, 26 Oct 2015 17:45:38 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201510261745.t9QHjc6T052771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 26 Oct 2015 17:45:38 +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: r290016 - stable/10/share/examples/mdoc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 17:45:39 -0000 Author: brueffer Date: Mon Oct 26 17:45:37 2015 New Revision: 290016 URL: https://svnweb.freebsd.org/changeset/base/290016 Log: MFC: r288419 Join excessive split lines. Modified: stable/10/share/examples/mdoc/example.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/mdoc/example.4 ============================================================================== --- stable/10/share/examples/mdoc/example.4 Mon Oct 26 17:07:22 2015 (r290015) +++ stable/10/share/examples/mdoc/example.4 Mon Oct 26 17:45:37 2015 (r290016) @@ -26,15 +26,14 @@ .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd April 1, 2006 +.Dd July 31, 2015 .Dt EXAMPLE 4 i386 .Os .Sh NAME .Nm example .Nd "example device driver manual page" .Sh SYNOPSIS -To compile the -driver into the kernel, +To compile the driver into the kernel, place the following lines in the kernel configuration file: .Bd -ragged -offset indent @@ -42,8 +41,7 @@ kernel configuration file: .Cd "options EXAMPLE_DEBUG" .Ed .Pp -Alternatively, to load the -driver as a +Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent From owner-svn-src-stable-10@freebsd.org Mon Oct 26 17:49:15 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30A8C8158; Mon, 26 Oct 2015 17:49:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE3111E6D; Mon, 26 Oct 2015 17:49:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9QHnElr052923; Mon, 26 Oct 2015 17:49:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9QHnEtB052922; Mon, 26 Oct 2015 17:49:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510261749.t9QHnEtB052922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 26 Oct 2015 17:49:14 +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: r290017 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 17:49:15 -0000 Author: bdrewery Date: Mon Oct 26 17:49:13 2015 New Revision: 290017 URL: https://svnweb.freebsd.org/changeset/base/290017 Log: MFC r289407: Fix delete-old and check-old-files not removing old debug symbols. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Mon Oct 26 17:45:37 2015 (r290016) +++ stable/10/Makefile.inc1 Mon Oct 26 17:49:13 2015 (r290017) @@ -1902,6 +1902,13 @@ delete-old-files: chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ rm ${RM_I} "${DESTDIR}/$${file}" <&3; \ fi; \ + for ext in debug symbols; do \ + if ! [ -e "${DESTDIR}/$${file}" ] && [ -f \ + "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \ + rm ${RM_I} "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" \ + <&3; \ + fi; \ + done; \ done # Remove catpages without corresponding manpages. @exec 3<&0; \ @@ -1924,6 +1931,11 @@ check-old-files: if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ echo "${DESTDIR}/$${file}"; \ fi; \ + for ext in debug symbols; do \ + if [ -f "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \ + echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \ + fi; \ + done; \ done # Check for catpages without corresponding manpages. @find ${DESTDIR}/usr/share/man/cat* ! -type d | \ From owner-svn-src-stable-10@freebsd.org Tue Oct 27 00:37:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02FB782F4; Tue, 27 Oct 2015 00:37:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAFD713A4; Tue, 27 Oct 2015 00:37:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9R0bJGm078625; Tue, 27 Oct 2015 00:37:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9R0bJ2c078624; Tue, 27 Oct 2015 00:37:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510270037.t9R0bJ2c078624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Oct 2015 00:37:19 +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: r290027 - stable/10/usr.sbin/tzsetup X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 00:37:21 -0000 Author: delphij Date: Tue Oct 27 00:37:19 2015 New Revision: 290027 URL: https://svnweb.freebsd.org/changeset/base/290027 Log: MFC r289269: Use chroot(2) instead of using prefixes for files. Previously, the code prefixes the chroot path to actual file paths to simulate the effect. This, however, will not work for tzset(3) which expects the current system have a working set of timezone data files, and that is not always the case. This changeset simplifies the handling of paths and use an actual chroot(2) call to implement the effect. PR: bin/197313 Modified: stable/10/usr.sbin/tzsetup/tzsetup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- stable/10/usr.sbin/tzsetup/tzsetup.c Mon Oct 26 23:28:35 2015 (r290026) +++ stable/10/usr.sbin/tzsetup/tzsetup.c Tue Oct 27 00:37:19 2015 (r290027) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -935,23 +936,18 @@ main(int argc, char **argv) if (argc - optind > 1) usage(); - if (chrootenv == NULL) { - strcpy(path_zonetab, _PATH_ZONETAB); - strcpy(path_iso3166, _PATH_ISO3166); - strcpy(path_zoneinfo, _PATH_ZONEINFO); - strcpy(path_localtime, _PATH_LOCALTIME); - strcpy(path_db, _PATH_DB); - strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK); - } else { - sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB); - sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166); - sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO); - sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME); - sprintf(path_db, "%s/%s", chrootenv, _PATH_DB); - sprintf(path_wall_cmos_clock, "%s/%s", chrootenv, - _PATH_WALL_CMOS_CLOCK); + if (chrootenv != NULL) { + rv = chroot(chrootenv); + if (rv != 0) + err(EX_OSERR, "chroot to %s", chrootenv); } + strcpy(path_zonetab, _PATH_ZONETAB); + strcpy(path_iso3166, _PATH_ISO3166); + strcpy(path_zoneinfo, _PATH_ZONEINFO); + strcpy(path_localtime, _PATH_LOCALTIME); + strcpy(path_db, _PATH_DB); + strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK); /* Override the user-supplied umask. */ (void)umask(S_IWGRP | S_IWOTH); From owner-svn-src-stable-10@freebsd.org Tue Oct 27 01:28:12 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA64D8FC8; Tue, 27 Oct 2015 01:28:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99BB51278; Tue, 27 Oct 2015 01:28:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9R1SBGU093173; Tue, 27 Oct 2015 01:28:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9R1SB4v093172; Tue, 27 Oct 2015 01:28:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510270128.t9R1SB4v093172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 27 Oct 2015 01:28:11 +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: r290033 - stable/10/usr.sbin/tzsetup X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 01:28:13 -0000 Author: delphij Date: Tue Oct 27 01:28:11 2015 New Revision: 290033 URL: https://svnweb.freebsd.org/changeset/base/290033 Log: Revert the merge of r289269 for now as it may break non-root installs. Modified: stable/10/usr.sbin/tzsetup/tzsetup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- stable/10/usr.sbin/tzsetup/tzsetup.c Tue Oct 27 01:28:07 2015 (r290032) +++ stable/10/usr.sbin/tzsetup/tzsetup.c Tue Oct 27 01:28:11 2015 (r290033) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -936,18 +935,23 @@ main(int argc, char **argv) if (argc - optind > 1) usage(); - if (chrootenv != NULL) { - rv = chroot(chrootenv); - if (rv != 0) - err(EX_OSERR, "chroot to %s", chrootenv); + if (chrootenv == NULL) { + strcpy(path_zonetab, _PATH_ZONETAB); + strcpy(path_iso3166, _PATH_ISO3166); + strcpy(path_zoneinfo, _PATH_ZONEINFO); + strcpy(path_localtime, _PATH_LOCALTIME); + strcpy(path_db, _PATH_DB); + strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK); + } else { + sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB); + sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166); + sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO); + sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME); + sprintf(path_db, "%s/%s", chrootenv, _PATH_DB); + sprintf(path_wall_cmos_clock, "%s/%s", chrootenv, + _PATH_WALL_CMOS_CLOCK); } - strcpy(path_zonetab, _PATH_ZONETAB); - strcpy(path_iso3166, _PATH_ISO3166); - strcpy(path_zoneinfo, _PATH_ZONEINFO); - strcpy(path_localtime, _PATH_LOCALTIME); - strcpy(path_db, _PATH_DB); - strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK); /* Override the user-supplied umask. */ (void)umask(S_IWGRP | S_IWOTH); From owner-svn-src-stable-10@freebsd.org Tue Oct 27 02:52:06 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7188A1D5EB; Tue, 27 Oct 2015 02:52:06 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 9D7761D6E; Tue, 27 Oct 2015 02:52:06 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9R2q5Qf019031; Tue, 27 Oct 2015 02:52:05 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9R2q5pl019030; Tue, 27 Oct 2015 02:52:05 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201510270252.t9R2q5pl019030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 27 Oct 2015 02:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290036 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 02:52:06 -0000 Author: vangyzen Date: Tue Oct 27 02:52:05 2015 New Revision: 290036 URL: https://svnweb.freebsd.org/changeset/base/290036 Log: Fix indentation in etc/rc.d/fsck. Modified: stable/10/etc/rc.d/fsck Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/fsck ============================================================================== --- stable/10/etc/rc.d/fsck Tue Oct 27 02:04:21 2015 (r290035) +++ stable/10/etc/rc.d/fsck Tue Oct 27 02:52:05 2015 (r290036) @@ -20,7 +20,7 @@ fsck_start() elif [ ! -r /etc/fstab ]; then echo "Warning! No /etc/fstab: skipping disk checks." elif [ "$autoboot" = yes ]; then - # During fsck ignore SIGQUIT + # During fsck ignore SIGQUIT trap : 3 check_startmsgs && echo "Starting file system checks:" From owner-svn-src-stable-10@freebsd.org Tue Oct 27 07:08:48 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99FC4A1E696; Tue, 27 Oct 2015 07:08:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 6549F1312; Tue, 27 Oct 2015 07:08:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9R78lXR090833; Tue, 27 Oct 2015 07:08:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9R78lef090832; Tue, 27 Oct 2015 07:08:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510270708.t9R78lef090832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 27 Oct 2015 07:08: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: r290040 - stable/10/usr.bin/timeout X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 07:08:48 -0000 Author: bapt Date: Tue Oct 27 07:08:47 2015 New Revision: 290040 URL: https://svnweb.freebsd.org/changeset/base/290040 Log: MFC: r289878 timeout(1): fix the acceptable range values for parse_signal() Before both 0 and sys_nsig would be successfully returned by parse_signal() although being invalid signal numbers. Submitted by: Alexandre Perrin Modified: stable/10/usr.bin/timeout/timeout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/timeout/timeout.c ============================================================================== --- stable/10/usr.bin/timeout/timeout.c Tue Oct 27 03:48:42 2015 (r290039) +++ stable/10/usr.bin/timeout/timeout.c Tue Oct 27 07:08:47 2015 (r290040) @@ -105,7 +105,7 @@ parse_signal(const char *str) int sig, i; const char *errstr; - sig = strtonum(str, 0, sys_nsig, &errstr); + sig = strtonum(str, 1, sys_nsig - 1, &errstr); if (errstr == NULL) return (sig); From owner-svn-src-stable-10@freebsd.org Tue Oct 27 17:00:06 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14FF2A1F869; Tue, 27 Oct 2015 17:00:06 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9A220182A; Tue, 27 Oct 2015 17:00:05 +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 t9RH04UY083778; Tue, 27 Oct 2015 17:00:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9RH04IV083774; Tue, 27 Oct 2015 17:00:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510271700.t9RH04IV083774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 27 Oct 2015 17:00:04 +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: r290052 - stable/10/usr.bin/truss X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 17:00:06 -0000 Author: jhb Date: Tue Oct 27 17:00:04 2015 New Revision: 290052 URL: https://svnweb.freebsd.org/changeset/base/290052 Log: MFC 271389,286330,286331,286358,286378,286380,286381,286383,286388,286848, 286849,286857,286860,286913,286914,286937-286940,286962,286963,288405, 288406,288424,288454-288456,288625,288626,288832,288834,288950,288997, 289080: Merge most of the recent changes to truss in HEAD. The largest effects are that fork following now uses a single truss process (and thus truss -c reports counts for the entire tree of processes instead of separate dumps for each process). truss -c also reports counts for all system calls instead of only a subset. More system call arguments are also decoded. System calls should now report the correct number of arguments (instead of 6), and some platforms that did not properly decode arguments might now do so (e.g. mips64). Changes relative to the equivalent commits to HEAD include: - The ia64 backend was refactored similar to the other backends. - _umtx_lock/_umtx_unlock entries were updated similar to other system call entries. - 10 does not have futimens(), utimensat(), EVFILT_PROCDESC, EVFILT_SENDFILE, RLIMIT_KQUEUES, O_VERIFY, NOTE_FILE_POLL, or EV_FORCEONESHOT. 271389: Stop accessing the saved stack pointer by looking past the end of the array of registers. 286330: Whitespace fix: remove some spurious spaces before commas. 286331: Rework get_string() to make it more robust when fetching strings of unknown length. In particular, instead of blinding fetching 1k blocks, do an initial fetch up to the end of the current page followed by page-sized fetches up to the maximum size. Previously if the 1k buffer crossed a page boundary and the second page was not valid, the entire operation would fail. 286358: Add recently added values of various flags and enumerations including kevent filters, kevent flags, flags to mmap, seek locations, fcntl operations, file flags, socket domains, open flags, resource limits, and pathconf values. 286378: Don't mark the fcntl flag argument as an output parameter so that it is always decoded. Previously the argument was not decoded if fcntl() failed. 286380: Decode the arguments to mkfifo() and fix an off-by-one error in the arguments to mknod(). 286381: Decode the arguments passed to the *at() family of system calls. This is especially useful now that libc's open() always calls openat(). While here, fix a few other things: - Decode the mode argument passed to access(), eaccess(), and faccessat(). - Decode the atfd paramete to pretty-print AT_FDCWD. - Decode the special AT_* flags used with some of the *at() system calls. - Decode arguments for fchmod(), lchmod(), fchown(), lchown(), eaccess(), and futimens(). - Decode both of the timeval structures passed to futimes() instead of just the first one. 286383: Whitespace fixes to consistently use spaces before }'s and wrap long lines. 286388: Consistently use both leading and trailing spaces inside of the {}'s when pretty-printing structures. Most structures used both spaces, but some only used a trailing space and some used neither. 286848: - Decode the arguments for several signal-related system calls: sigpending, sigqueue, sigreturn, sigsuspend, sigtimedwait, sigwait, sigwaitinfo, and thr_kill. - Print signal sets as a structure (with {}'s) and in particular use this to differentiate empty sets from a NULL pointer. - Decode arguments for some other system calls: issetugid, pipe2, sysarch (operations are only decoded for amd64 and i386), and thr_self. 286849: Decode the optional SOCK_NONBLOCK and SOCK_CLOEXEC flags passed in a socket type. 286857: Tidy the linux_socketcall decoding: - Don't exit if get_struct() fails, instead print the raw pointer value to match all other argument decoding cases. - Use an xlat table instead of a home-rolled switch for the operation name. - Display the nested socketcall args structure as a structure instead of as two inline arguments. 286860: Use an xlat table and xlookup() instead of a home-rolled version for the sigprocmask operation type. 286913: Change the argument formatting function to use a stdio FILE object opened with open_memstream() to build the string for each argument. This allows for more complicated argument building without resorting to intermediate malloc's, etc. Related, the strsig*() functions no longer return allocated strings but use a static global buffer instead. 286914: Expand the decoding of kevent structures. - Print the ident value as decimal instead of hexadecimal for filter types that use "small" values such as file descriptors and PIDs. - Decode NOTE_* flags in the fflags field of kevents for several system filter types. 286937: Use nitems(). 286938: Various style and whitespace fixes. 287939: Always use %j with an intmax_t cast to print time_t values. time_t is longer than long on 32-bit platforms with a 64-bit time_t. 286940: ino_t is unsigned, so use uintmax_t instead of intmax_t when printing it. 286962: Rework the argv and env string fetching for execve to be more robust. Before truss would fetch 100 string pointers and happily walk off the end of the array if it never found a NULL. This also means for a short argv list it could fail entirely if the 100 string pointers spanned into an unmapped page. Instead, fetch page-aligned blocks of string pointers in a loop fetching each string until a NULL is found. While here, make use of the open memstream file descriptor instead of allocating a temporary array. This allows us to fetch each string once instead of twice. 286963: Handle the conditional decoding of execve() argument and environment arrays generically rather than duplicating a hack in all of the backends. - Add two new system call argument types and use them instead of StringArray for the argument and environment arguments execve and linux_execve. - Honor the -a/-e flags in the handling of these new types. - Instead of printing "" when the decoding is disabled, print the raw pointer value. 288405: Decode recently added procctl(2) operations. 288406: Trim trailing whitespace. 288424: Several changes to truss. - Refactor the interface between the ABI-independent code and the ABI-specific backends. The backends now provide smaller hooks to fetch system call arguments and return values. The rest of the system call entry and exit handling that was previously duplicated among all the backends has been moved to one place. - Merge the loop when waiting for an event with the loop for handling stops. This also means not emulating a procfs-like interface on top of ptrace(). Instead, use a single event loop that fetches process events via waitid(). Among other things this allows us to report the full 32-bit exit value. - Use PT_FOLLOW_FORK to follow new child processes instead of forking a new truss process for each new child. This allows one truss process to monitor a tree of processes and truss -c should now display one total for the entire tree instead of separate summaries per process. - Use the recently added fields to ptrace_lwpinfo to determine the current system call number and argument count. The latter is especially useful and fixes a regression since the conversion from procfs. truss now generally prints the correct number of arguments for most system calls rather than printing extra arguments for any call not listed in the table in syscalls.c. - Actually check the new ABI when processes call exec. The comments claimed that this happened but it was not being done (perhaps this was another regression in the conversion to ptrace()). If the new ABI after exec is not supported, truss detaches from the process. If truss does not support the ABI for a newly executed process the process is killed before it returns from exec. - Along with the refactor, teach the various ABI-specific backends to fetch both return values, not just the first. Use this to properly report the full 64-bit return value from lseek(). In addition, the handler for "pipe" now pulls the pair of descriptors out of the return values (which is the true kernel system call interface) but displays them as an argument (which matches the interface exported by libc). - Each ABI handler adds entries to a linker set rather than requiring a statically defined table of handlers in main.c. - The arm and mips system call fetching code was changed to follow the same pattern as amd64 (and the in-kernel handler) of fetching register arguments first and then reading any remaining arguments from the stack. This should fix indirect system call arguments on at least arm. - The mipsn32 and n64 ABIs will now look for arguments in A4 through A7. - Use register %ebp for the 6th system call argument for Linux/i386 ABIs to match the in-kernel argument fetch code. - For powerpc binaries on a powerpc64 system, fetch the extra arguments on the stack as 32-bit values that are then copied into the 64-bit argument array instead of reading the 32-bit values directly into the 64-bit array. 288454: - Remove extra integer argument from truncate() and ftruncate(). This is probably fallout from the removal of the extra padding argument before off_t in 7. However, that padding still exists for 32-bit powerpc, so use QUAD_ALIGN. - Fix QUAD_ALIGN to be zero for powerpc64. It should only be set to 1 for 32-bit platforms that add padding to align 64-bit arguments. 288455: The id_t type used to pass IDs to wait6(2) and procctl(6) is a 64-bit integer. Fix the argument decoding to treat this as a quad instead of an int. This includes using QUAD_ALIGN and QUAD_SLOTS as necessary. To continue printing IDs in decimal, add a new QuadHex argument type that prints a 64-bit integer in hex, use QuadHex for the existing off_t arguments, repurpose Quad to print a 64-bit integer in decimal, and use Quad for id_t arguments. This fixes the decoding of wait6(2) and procctl(2) on 32-bit platforms. 288456: Rather than groveling around in a socket address structure for a socket address's length (and then overriding it if it "looks wrong"), use the next argument to the system call to determine the length. This is more reliable since this is what the kernel depends on anyway and is also simpler. 288625: Add decoding for struct statfs. 288626: Style fix. 288832: Fix tracking of unknown syscalls for 'truss -c'. This is done by changing get_syscall() to either lookup the known syscall or add it into the list with the default handlers for printing. This also simplifies some code to not have to check if the syscall variable is set or NULL. 288834: Add decoding for modfind(2) 288950: Group the decoded system calls by ABI and sort the calls within each ABI. 288997: Correct a comment. 289080: Let -c imply -S (hide signal output). Without this, the signals are shown seemingly randomly in the output before the final summary is shown. This is especially noticeable when there is not much output from the application being traced. Modified: stable/10/usr.bin/truss/amd64-fbsd.c stable/10/usr.bin/truss/amd64-fbsd32.c stable/10/usr.bin/truss/amd64-linux32.c stable/10/usr.bin/truss/arm-fbsd.c stable/10/usr.bin/truss/extern.h stable/10/usr.bin/truss/i386-fbsd.c stable/10/usr.bin/truss/i386-linux.c stable/10/usr.bin/truss/ia64-fbsd.c stable/10/usr.bin/truss/main.c stable/10/usr.bin/truss/mips-fbsd.c stable/10/usr.bin/truss/powerpc-fbsd.c stable/10/usr.bin/truss/powerpc64-fbsd.c stable/10/usr.bin/truss/setup.c stable/10/usr.bin/truss/sparc64-fbsd.c stable/10/usr.bin/truss/syscall.h stable/10/usr.bin/truss/syscalls.c stable/10/usr.bin/truss/truss.1 stable/10/usr.bin/truss/truss.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/truss/amd64-fbsd.c ============================================================================== --- stable/10/usr.bin/truss/amd64-fbsd.c Tue Oct 27 16:52:09 2015 (r290051) +++ stable/10/usr.bin/truss/amd64-fbsd.c Tue Oct 27 17:00:04 2015 (r290052) @@ -29,311 +29,103 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - -/* - * FreeBSD/amd64-specific system call handling. This is probably the most - * complex part of the entire truss program, although I've got lots of - * it handled relatively cleanly now. The system call names are generated - * automatically, thanks to /usr/src/sys/kern/syscalls.master. The - * names used for the various structures are confusing, I sadly admit. - */ +#include +__FBSDID("$FreeBSD$"); + +/* FreeBSD/amd64-specific system call handling. */ -#include #include #include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include "truss.h" -#include "syscall.h" -#include "extern.h" #include "syscalls.h" -static int nsyscalls = sizeof(syscallnames) / sizeof(syscallnames[0]); - -/* - * This is what this particular file uses to keep track of a system call. - * It is probably not quite sufficient -- I can probably use the same - * structure for the various syscall personalities, and I also probably - * need to nest system calls (for signal handlers). - * - * 'struct syscall' describes the system call; it may be NULL, however, - * if we don't know about this particular system call yet. - */ -struct freebsd_syscall { - struct syscall *sc; - const char *name; - int number; - unsigned long *args; - int nargs; /* number of arguments -- *not* number of words! */ - char **s_args; /* the printable arguments */ -}; - -static struct freebsd_syscall * -alloc_fsc(void) -{ - - return (malloc(sizeof(struct freebsd_syscall))); -} - -/* Clear up and free parts of the fsc structure. */ -static void -free_fsc(struct freebsd_syscall *fsc) -{ - int i; - - free(fsc->args); - if (fsc->s_args) { - for (i = 0; i < fsc->nargs; i++) - free(fsc->s_args[i]); - free(fsc->s_args); - } - free(fsc); -} - -/* - * Called when a process has entered a system call. nargs is the - * number of words, not number of arguments (a necessary distinction - * in some cases). Note that if the STOPEVENT() code in amd64/amd64/trap.c - * is ever changed these functions need to keep up. - */ - -void -amd64_syscall_entry(struct trussinfo *trussinfo, int nargs) +static int +amd64_fetch_args(struct trussinfo *trussinfo, u_int narg) { struct ptrace_io_desc iorequest; struct reg regs; - struct freebsd_syscall *fsc; - struct syscall *sc; + struct current_syscall *cs; lwpid_t tid; - int i, reg, syscall_num; + u_int i, reg; tid = trussinfo->curthread->tid; - + cs = &trussinfo->curthread->cs; if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return; + return (-1); } /* - * FreeBSD has two special kinds of system call redirctions -- + * FreeBSD has two special kinds of system call redirections -- * SYS_syscall, and SYS___syscall. The former is the old syscall() * routine, basically; the latter is for quad-aligned arguments. + * + * The system call argument count and code from ptrace() already + * account for these, but we need to skip over %rax if it contains + * either of these values. */ reg = 0; - syscall_num = regs.r_rax; - switch (syscall_num) { + switch (regs.r_rax) { case SYS_syscall: case SYS___syscall: - syscall_num = regs.r_rdi; reg++; break; } - fsc = alloc_fsc(); - if (fsc == NULL) - return; - fsc->number = syscall_num; - fsc->name = (syscall_num < 0 || syscall_num >= nsyscalls) ? - NULL : syscallnames[syscall_num]; - if (!fsc->name) { - fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", - syscall_num); - } - - if (fsc->name && (trussinfo->flags & FOLLOWFORKS) && - (strcmp(fsc->name, "fork") == 0 || - strcmp(fsc->name, "pdfork") == 0 || - strcmp(fsc->name, "rfork") == 0 || - strcmp(fsc->name, "vfork") == 0)) - trussinfo->curthread->in_fork = 1; - - if (nargs == 0) - return; - - fsc->args = malloc((1 + nargs) * sizeof(unsigned long)); - for (i = 0; i < nargs && reg < 6; i++, reg++) { + for (i = 0; i < narg && reg < 6; i++, reg++) { switch (reg) { - case 0: fsc->args[i] = regs.r_rdi; break; - case 1: fsc->args[i] = regs.r_rsi; break; - case 2: fsc->args[i] = regs.r_rdx; break; - case 3: fsc->args[i] = regs.r_rcx; break; - case 4: fsc->args[i] = regs.r_r8; break; - case 5: fsc->args[i] = regs.r_r9; break; + case 0: cs->args[i] = regs.r_rdi; break; + case 1: cs->args[i] = regs.r_rsi; break; + case 2: cs->args[i] = regs.r_rdx; break; + case 3: cs->args[i] = regs.r_rcx; break; + case 4: cs->args[i] = regs.r_r8; break; + case 5: cs->args[i] = regs.r_r9; break; } } - if (nargs > i) { + if (narg > i) { iorequest.piod_op = PIOD_READ_D; iorequest.piod_offs = (void *)(regs.r_rsp + sizeof(register_t)); - iorequest.piod_addr = &fsc->args[i]; - iorequest.piod_len = (nargs - i) * sizeof(register_t); + iorequest.piod_addr = &cs->args[i]; + iorequest.piod_len = (narg - i) * sizeof(register_t); ptrace(PT_IO, tid, (caddr_t)&iorequest, 0); if (iorequest.piod_len == 0) - return; - } - - sc = get_syscall(fsc->name); - if (sc) - fsc->nargs = sc->nargs; - else { -#if DEBUG - fprintf(trussinfo->outfile, "unknown syscall %s -- setting " - "args to %d\n", fsc->name, nargs); -#endif - fsc->nargs = nargs; - } - - fsc->s_args = calloc(1, (1 + fsc->nargs) * sizeof(char *)); - fsc->sc = sc; - - /* - * At this point, we set up the system call arguments. - * We ignore any OUT ones, however -- those are arguments that - * are set by the system call, and so are probably meaningless - * now. This doesn't currently support arguments that are - * passed in *and* out, however. - */ - - if (fsc->name) { -#if DEBUG - fprintf(stderr, "syscall %s(", fsc->name); -#endif - for (i = 0; i < fsc->nargs; i++) { -#if DEBUG - fprintf(stderr, "0x%lx%s", sc ? - fsc->args[sc->args[i].offset] : fsc->args[i], - i < (fsc->nargs - 1) ? "," : ""); -#endif - if (sc && !(sc->args[i].type & OUT)) { - fsc->s_args[i] = print_arg(&sc->args[i], - fsc->args, 0, trussinfo); - } - } -#if DEBUG - fprintf(stderr, ")\n"); -#endif + return (-1); } -#if DEBUG - fprintf(trussinfo->outfile, "\n"); -#endif - - if (fsc->name != NULL && (strcmp(fsc->name, "execve") == 0 || - strcmp(fsc->name, "exit") == 0)) { - /* - * XXX - * This could be done in a more general - * manner but it still wouldn't be very pretty. - */ - if (strcmp(fsc->name, "execve") == 0) { - if ((trussinfo->flags & EXECVEARGS) == 0) { - if (fsc->s_args[1]) { - free(fsc->s_args[1]); - fsc->s_args[1] = NULL; - } - } - if ((trussinfo->flags & EXECVEENVS) == 0) { - if (fsc->s_args[2]) { - free(fsc->s_args[2]); - fsc->s_args[2] = NULL; - } - } - } - } - trussinfo->curthread->fsc = fsc; + return (0); } -/* - * And when the system call is done, we handle it here. - * Currently, no attempt is made to ensure that the system calls - * match -- this needs to be fixed (and is, in fact, why S_SCX includes - * the system call number instead of, say, an error status). - */ - -long -amd64_syscall_exit(struct trussinfo *trussinfo, int syscall_num __unused) +static int +amd64_fetch_retval(struct trussinfo *trussinfo, long *retval, int *errorp) { struct reg regs; - struct freebsd_syscall *fsc; - struct syscall *sc; lwpid_t tid; - long retval; - int errorp, i; - - if (trussinfo->curthread->fsc == NULL) - return (-1); tid = trussinfo->curthread->tid; - if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); return (-1); } - retval = regs.r_rax; - errorp = !!(regs.r_rflags & PSL_C); - - /* - * This code, while simpler than the initial versions I used, could - * stand some significant cleaning. - */ - - fsc = trussinfo->curthread->fsc; - sc = fsc->sc; - if (!sc) { - for (i = 0; i < fsc->nargs; i++) - asprintf(&fsc->s_args[i], "0x%lx", fsc->args[i]); - } else { - /* - * Here, we only look for arguments that have OUT masked in -- - * otherwise, they were handled in the syscall_entry function. - */ - for (i = 0; i < sc->nargs; i++) { - char *temp; - if (sc->args[i].type & OUT) { - /* - * If an error occurred, then don't bother - * getting the data; it may not be valid. - */ - if (errorp) { - asprintf(&temp, "0x%lx", - fsc->args[sc->args[i].offset]); - } else { - temp = print_arg(&sc->args[i], - fsc->args, retval, trussinfo); - } - fsc->s_args[i] = temp; - } - } - } - - if (fsc->name != NULL && (strcmp(fsc->name, "execve") == 0 || - strcmp(fsc->name, "exit") == 0)) - trussinfo->curthread->in_syscall = 1; - - /* - * It would probably be a good idea to merge the error handling, - * but that complicates things considerably. - */ + retval[0] = regs.r_rax; + retval[1] = regs.r_rdx; + *errorp = !!(regs.r_rflags & PSL_C); + return (0); +} - print_syscall_ret(trussinfo, fsc->name, fsc->nargs, fsc->s_args, errorp, - retval, fsc->sc); - free_fsc(fsc); +static struct procabi amd64_fbsd = { + "FreeBSD ELF64", + syscallnames, + nitems(syscallnames), + amd64_fetch_args, + amd64_fetch_retval +}; - return (retval); -} +PROCABI(amd64_fbsd); Modified: stable/10/usr.bin/truss/amd64-fbsd32.c ============================================================================== --- stable/10/usr.bin/truss/amd64-fbsd32.c Tue Oct 27 16:52:09 2015 (r290051) +++ stable/10/usr.bin/truss/amd64-fbsd32.c Tue Oct 27 17:00:04 2015 (r290052) @@ -29,312 +29,109 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - -/* - * FreeBSD/i386-specific system call handling. This is probably the most - * complex part of the entire truss program, although I've got lots of - * it handled relatively cleanly now. The system call names are generated - * automatically, thanks to /usr/src/sys/kern/syscalls.master. The - * names used for the various structures are confusing, I sadly admit. - */ +#include +__FBSDID("$FreeBSD$"); + +/* FreeBSD/i386-specific system call handling. */ -#include #include #include #include #include -#include -#include -#include #include #include -#include -#include -#include #include "truss.h" -#include "syscall.h" -#include "extern.h" #include "freebsd32_syscalls.h" -static int nsyscalls = sizeof(freebsd32_syscallnames) / - sizeof(freebsd32_syscallnames[0]); - -/* - * This is what this particular file uses to keep track of a system call. - * It is probably not quite sufficient -- I can probably use the same - * structure for the various syscall personalities, and I also probably - * need to nest system calls (for signal handlers). - * - * 'struct syscall' describes the system call; it may be NULL, however, - * if we don't know about this particular system call yet. - */ -struct freebsd32_syscall { - struct syscall *sc; - const char *name; - int number; - unsigned long *args; - unsigned int *args32; - int nargs; /* number of arguments -- *not* number of words! */ - char **s_args; /* the printable arguments */ -}; - -static struct freebsd32_syscall * -alloc_fsc(void) -{ - - return (malloc(sizeof(struct freebsd32_syscall))); -} - -/* Clear up and free parts of the fsc structure. */ -static void -free_fsc(struct freebsd32_syscall *fsc) -{ - int i; - - free(fsc->args); - free(fsc->args32); - if (fsc->s_args) { - for (i = 0; i < fsc->nargs; i++) - free(fsc->s_args[i]); - free(fsc->s_args); - } - free(fsc); -} - -/* - * Called when a process has entered a system call. nargs is the - * number of words, not number of arguments (a necessary distinction - * in some cases). Note that if the STOPEVENT() code in i386/i386/trap.c - * is ever changed these functions need to keep up. - */ - -void -amd64_fbsd32_syscall_entry(struct trussinfo *trussinfo, int nargs) +static int +amd64_fbsd32_fetch_args(struct trussinfo *trussinfo, u_int narg) { struct ptrace_io_desc iorequest; struct reg regs; - struct freebsd32_syscall *fsc; - struct syscall *sc; - lwpid_t tid; + struct current_syscall *cs; + unsigned int args32[narg]; unsigned long parm_offset; - int i, syscall_num; + lwpid_t tid; + u_int i; tid = trussinfo->curthread->tid; - + cs = &trussinfo->curthread->cs; if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return; + return (-1); } parm_offset = regs.r_rsp + sizeof(int); /* - * FreeBSD has two special kinds of system call redirctions -- + * FreeBSD has two special kinds of system call redirections -- * SYS_syscall, and SYS___syscall. The former is the old syscall() * routine, basically; the latter is for quad-aligned arguments. + * + * The system call argument count and code from ptrace() already + * account for these, but we need to skip over the first argument. */ - syscall_num = regs.r_rax; - switch (syscall_num) { + switch (regs.r_rax) { case SYS_syscall: - syscall_num = ptrace(PT_READ_D, tid, (caddr_t)parm_offset, 0); parm_offset += sizeof(int); break; case SYS___syscall: - syscall_num = ptrace(PT_READ_D, tid, (caddr_t)parm_offset, 0); parm_offset += sizeof(quad_t); break; } - fsc = alloc_fsc(); - if (fsc == NULL) - return; - fsc->number = syscall_num; - fsc->name = (syscall_num < 0 || syscall_num >= nsyscalls) ? - NULL : freebsd32_syscallnames[syscall_num]; - if (!fsc->name) { - fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", - syscall_num); - } - - if (fsc->name && (trussinfo->flags & FOLLOWFORKS) && - (strcmp(fsc->name, "fork") == 0 || - strcmp(fsc->name, "pdfork") == 0 || - strcmp(fsc->name, "rfork") == 0 || - strcmp(fsc->name, "vfork") == 0)) - trussinfo->curthread->in_fork = 1; - - if (nargs == 0) - return; - - fsc->args32 = malloc((1 + nargs) * sizeof(unsigned int)); iorequest.piod_op = PIOD_READ_D; iorequest.piod_offs = (void *)parm_offset; - iorequest.piod_addr = fsc->args32; - iorequest.piod_len = (1 + nargs) * sizeof(unsigned int); + iorequest.piod_addr = args32; + iorequest.piod_len = sizeof(args32); ptrace(PT_IO, tid, (caddr_t)&iorequest, 0); - if (iorequest.piod_len == 0) - return; - - fsc->args = malloc((1 + nargs) * sizeof(unsigned long)); - for (i = 0; i < nargs + 1; i++) - fsc->args[i] = fsc->args32[i]; - - sc = NULL; - if (fsc->name) - sc = get_syscall(fsc->name); - if (sc) - fsc->nargs = sc->nargs; - else { -#if DEBUG - fprintf(trussinfo->outfile, "unknown syscall %s -- setting " - "args to %d\n", fsc->name, nargs); -#endif - fsc->nargs = nargs; - } - - fsc->s_args = calloc(1, (1 + fsc->nargs) * sizeof(char *)); - fsc->sc = sc; - - /* - * At this point, we set up the system call arguments. - * We ignore any OUT ones, however -- those are arguments that - * are set by the system call, and so are probably meaningless - * now. This doesn't currently support arguments that are - * passed in *and* out, however. - */ - - if (fsc->name) { -#if DEBUG - fprintf(stderr, "syscall %s(", fsc->name); -#endif - for (i = 0; i < fsc->nargs; i++) { -#if DEBUG - fprintf(stderr, "0x%x%s", sc ? - fsc->args[sc->args[i].offset] : fsc->args[i], - i < (fsc->nargs - 1) ? "," : ""); -#endif - if (sc && !(sc->args[i].type & OUT)) { - fsc->s_args[i] = print_arg(&sc->args[i], - fsc->args, 0, trussinfo); - } - } -#if DEBUG - fprintf(stderr, ")\n"); -#endif + if (iorequest.piod_len == 0) { + return (-1); } -#if DEBUG - fprintf(trussinfo->outfile, "\n"); -#endif - - if (fsc->name != NULL && (strcmp(fsc->name, "freebsd32_execve") == 0 || - strcmp(fsc->name, "exit") == 0)) { - /* - * XXX - * This could be done in a more general - * manner but it still wouldn't be very pretty. - */ - if (strcmp(fsc->name, "freebsd32_execve") == 0) { - if ((trussinfo->flags & EXECVEARGS) == 0) { - if (fsc->s_args[1]) { - free(fsc->s_args[1]); - fsc->s_args[1] = NULL; - } - } - if ((trussinfo->flags & EXECVEENVS) == 0) { - if (fsc->s_args[2]) { - free(fsc->s_args[2]); - fsc->s_args[2] = NULL; - } - } - } - } - trussinfo->curthread->fsc = fsc; + for (i = 0; i < narg; i++) + cs->args[i] = args32[i]; + return (0); } -/* - * And when the system call is done, we handle it here. - * Currently, no attempt is made to ensure that the system calls - * match -- this needs to be fixed (and is, in fact, why S_SCX includes - * the system call number instead of, say, an error status). - */ - -long -amd64_fbsd32_syscall_exit(struct trussinfo *trussinfo, int syscall_num __unused) +static int +amd64_fbsd32_fetch_retval(struct trussinfo *trussinfo, long *retval, + int *errorp) { struct reg regs; - struct freebsd32_syscall *fsc; - struct syscall *sc; lwpid_t tid; - long retval; - int errorp, i; - - if (trussinfo->curthread->fsc == NULL) - return (-1); tid = trussinfo->curthread->tid; - if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); return (-1); } - retval = regs.r_rax; - errorp = !!(regs.r_rflags & PSL_C); - - /* - * This code, while simpler than the initial versions I used, could - * stand some significant cleaning. - */ - - fsc = trussinfo->curthread->fsc; - sc = fsc->sc; - if (!sc) { - for (i = 0; i < fsc->nargs; i++) - asprintf(&fsc->s_args[i], "0x%lx", fsc->args[i]); - } else { - /* - * Here, we only look for arguments that have OUT masked in -- - * otherwise, they were handled in the syscall_entry function. - */ - for (i = 0; i < sc->nargs; i++) { - char *temp; - if (sc->args[i].type & OUT) { - /* - * If an error occurred, then don't bother - * getting the data; it may not be valid. - */ - if (errorp) { - asprintf(&temp, "0x%lx", - fsc->args[sc->args[i].offset]); - } else { - temp = print_arg(&sc->args[i], - fsc->args, retval, trussinfo); - } - fsc->s_args[i] = temp; - } - } - } + retval[0] = regs.r_rax & 0xffffffff; + retval[1] = regs.r_rdx & 0xffffffff; + *errorp = !!(regs.r_rflags & PSL_C); + return (0); +} - if (fsc->name != NULL && (strcmp(fsc->name, "freebsd32_execve") == 0 || - strcmp(fsc->name, "exit") == 0)) - trussinfo->curthread->in_syscall = 1; +static struct procabi amd64_fbsd32 = { + "FreeBSD ELF32", + freebsd32_syscallnames, + nitems(freebsd32_syscallnames), + amd64_fbsd32_fetch_args, + amd64_fbsd32_fetch_retval +}; - /* - * It would probably be a good idea to merge the error handling, - * but that complicates things considerably. - */ +PROCABI(amd64_fbsd32); - print_syscall_ret(trussinfo, fsc->name, fsc->nargs, fsc->s_args, errorp, - retval, fsc->sc); - free_fsc(fsc); +static struct procabi amd64_fbsd32_aout = { + "FreeBSD a.out", + freebsd32_syscallnames, + nitems(freebsd32_syscallnames), + amd64_fbsd32_fetch_args, + amd64_fbsd32_fetch_retval +}; - return (retval); -} +PROCABI(amd64_fbsd32_aout); Modified: stable/10/usr.bin/truss/amd64-linux32.c ============================================================================== --- stable/10/usr.bin/truss/amd64-linux32.c Tue Oct 27 16:52:09 2015 (r290051) +++ stable/10/usr.bin/truss/amd64-linux32.c Tue Oct 27 17:00:04 2015 (r290052) @@ -29,124 +29,36 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); -/* - * Linux/i386-specific system call handling. Given how much of this code - * is taken from the freebsd equivalent, I can probably put even more of - * it in support routines that can be used by any personality support. - */ +/* Linux/i386-specific system call handling. */ -#include #include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include "truss.h" -#include "syscall.h" -#include "extern.h" #include "linux32_syscalls.h" -static int nsyscalls = - sizeof(linux32_syscallnames) / sizeof(linux32_syscallnames[0]); - -/* - * This is what this particular file uses to keep track of a system call. - * It is probably not quite sufficient -- I can probably use the same - * structure for the various syscall personalities, and I also probably - * need to nest system calls (for signal handlers). - * - * 'struct syscall' describes the system call; it may be NULL, however, - * if we don't know about this particular system call yet. - */ -struct linux_syscall { - struct syscall *sc; - const char *name; - int number; - unsigned long args[5]; - int nargs; /* number of arguments -- *not* number of words! */ - char **s_args; /* the printable arguments */ -}; - -static struct linux_syscall * -alloc_fsc(void) -{ - - return (malloc(sizeof(struct linux_syscall))); -} - -/* Clear up and free parts of the fsc structure. */ -static void -free_fsc(struct linux_syscall *fsc) -{ - int i; - - if (fsc->s_args) { - for (i = 0; i < fsc->nargs; i++) - free(fsc->s_args[i]); - free(fsc->s_args); - } - free(fsc); -} - -/* - * Called when a process has entered a system call. nargs is the - * number of words, not number of arguments (a necessary distinction - * in some cases). Note that if the STOPEVENT() code in i386/i386/trap.c - * is ever changed these functions need to keep up. - */ - -void -amd64_linux32_syscall_entry(struct trussinfo *trussinfo, int nargs) +static int +amd64_linux32_fetch_args(struct trussinfo *trussinfo, u_int narg) { struct reg regs; - struct linux_syscall *fsc; - struct syscall *sc; + struct current_syscall *cs; lwpid_t tid; - int i, syscall_num; tid = trussinfo->curthread->tid; - + cs = &trussinfo->curthread->cs; if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return; - } - - syscall_num = regs.r_rax; - - fsc = alloc_fsc(); - if (fsc == NULL) - return; - fsc->number = syscall_num; - fsc->name = (syscall_num < 0 || syscall_num >= nsyscalls) ? - NULL : linux32_syscallnames[syscall_num]; - if (!fsc->name) { - fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", - syscall_num); + return (-1); } - if (fsc->name && (trussinfo->flags & FOLLOWFORKS) && - (strcmp(fsc->name, "linux_fork") == 0 || - strcmp(fsc->name, "linux_vfork") == 0)) - trussinfo->curthread->in_fork = 1; - - if (nargs == 0) - return; - /* * Linux passes syscall arguments in registers, not * on the stack. Fortunately, we've got access to the @@ -154,82 +66,22 @@ amd64_linux32_syscall_entry(struct truss * number of arguments. And what does linux do for syscalls * that have more than five arguments? */ - - fsc->args[0] = regs.r_rbx; - fsc->args[1] = regs.r_rcx; - fsc->args[2] = regs.r_rdx; - fsc->args[3] = regs.r_rsi; - fsc->args[4] = regs.r_rdi; - - sc = get_syscall(fsc->name); - if (sc) - fsc->nargs = sc->nargs; - else { -#if DEBUG - fprintf(trussinfo->outfile, "unknown syscall %s -- setting " - "args to %d\n", fsc->name, nargs); -#endif - fsc->nargs = nargs; + switch (narg) { + default: + cs->args[5] = regs.r_rbp; /* Unconfirmed */ + case 5: + cs->args[4] = regs.r_rdi; + case 4: + cs->args[3] = regs.r_rsi; + case 3: + cs->args[2] = regs.r_rdx; + case 2: + cs->args[1] = regs.r_rcx; + case 1: + cs->args[0] = regs.r_rbx; } - fsc->s_args = calloc(1, (1 + fsc->nargs) * sizeof(char *)); - fsc->sc = sc; - - /* - * At this point, we set up the system call arguments. - * We ignore any OUT ones, however -- those are arguments that - * are set by the system call, and so are probably meaningless - * now. This doesn't currently support arguments that are - * passed in *and* out, however. - */ - - if (fsc->name) { -#if DEBUG - fprintf(stderr, "syscall %s(", fsc->name); -#endif - for (i = 0; i < fsc->nargs; i++) { -#if DEBUG - fprintf(stderr, "0x%x%s", sc ? - fsc->args[sc->args[i].offset] : fsc->args[i], - i < (fsc->nargs - 1) ? "," : ""); -#endif - if (sc && !(sc->args[i].type & OUT)) { - fsc->s_args[i] = print_arg(&sc->args[i], - fsc->args, 0, trussinfo); - } - } -#if DEBUG - fprintf(stderr, ")\n"); -#endif - } - -#if DEBUG - fprintf(trussinfo->outfile, "\n"); -#endif - - if (fsc->name != NULL && (strcmp(fsc->name, "linux_execve") == 0 || - strcmp(fsc->name, "exit") == 0)) { - /* - * XXX - * This could be done in a more general - * manner but it still wouldn't be very pretty. - */ - if (strcmp(fsc->name, "linux_execve") == 0) { - if ((trussinfo->flags & EXECVEARGS) == 0) { - if (fsc->s_args[1]) { - free(fsc->s_args[1]); - fsc->s_args[1] = NULL; - } - } - if ((trussinfo->flags & EXECVEENVS) == 0) { - if (fsc->s_args[2]) { - free(fsc->s_args[2]); - fsc->s_args[2] = NULL; - } - } - } - } - trussinfo->curthread->fsc = fsc; + return (0); } /* @@ -247,83 +99,43 @@ static const int bsd_to_linux_errno[] = -6, }; -long -amd64_linux32_syscall_exit(struct trussinfo *trussinfo, - int syscall_num __unused) +static int +amd64_linux32_fetch_retval(struct trussinfo *trussinfo, long *retval, + int *errorp) { struct reg regs; - struct linux_syscall *fsc; - struct syscall *sc; lwpid_t tid; - long retval; - int errorp, i; - - if (trussinfo->curthread->fsc == NULL) - return (-1); + size_t i; tid = trussinfo->curthread->tid; - if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); return (-1); } - retval = regs.r_rax; - errorp = !!(regs.r_rflags & PSL_C); - - /* - * This code, while simpler than the initial versions I used, could - * stand some significant cleaning. - */ - - fsc = trussinfo->curthread->fsc; - sc = fsc->sc; - if (!sc) { - for (i = 0; i < fsc->nargs; i++) - asprintf(&fsc->s_args[i], "0x%lx", fsc->args[i]); - } else { - /* - * Here, we only look for arguments that have OUT masked in -- - * otherwise, they were handled in the syscall_entry function. - */ - for (i = 0; i < sc->nargs; i++) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Tue Oct 27 20:58:15 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B9C9A1C416; Tue, 27 Oct 2015 20:58:15 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 258E61A25; Tue, 27 Oct 2015 20:58:15 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9RKwEBi060012; Tue, 27 Oct 2015 20:58:14 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9RKwENi060011; Tue, 27 Oct 2015 20:58:14 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201510272058.t9RKwENi060011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 27 Oct 2015 20:58:14 +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: r290062 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 20:58:15 -0000 Author: jilles Date: Tue Oct 27 20:58:14 2015 New Revision: 290062 URL: https://svnweb.freebsd.org/changeset/base/290062 Log: MFC r286163: rc.subr: Allow rc.conf.d with multi-directory local_startup. I also changed ${...%*/rc.d} to ${...%/rc.d} since the shortest match always has an empty string for the asterisk. PR: 201641 Submitted by: Jamie Landeg-Jones (original version) Modified: stable/10/etc/rc.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.subr ============================================================================== --- stable/10/etc/rc.subr Tue Oct 27 20:56:57 2015 (r290061) +++ stable/10/etc/rc.subr Tue Oct 27 20:58:14 2015 (r290062) @@ -1335,7 +1335,8 @@ load_rc_config() # If a service name was specified, attempt to load # service-specific configuration if [ -n "$_name" ] ; then - for _d in /etc ${local_startup%*/rc.d}; do + for _d in /etc ${local_startup}; do + _d=${_d%/rc.d} if [ -f ${_d}/rc.conf.d/"$_name" ]; then debug "Sourcing ${_d}/rc.conf.d/$_name" . ${_d}/rc.conf.d/"$_name" From owner-svn-src-stable-10@freebsd.org Tue Oct 27 22:58:00 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39E34A1F951; Tue, 27 Oct 2015 22:58:00 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0760B1DA9; Tue, 27 Oct 2015 22:57:59 +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 t9RMvxex097838; Tue, 27 Oct 2015 22:57:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9RMvxNc097837; Tue, 27 Oct 2015 22:57:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510272257.t9RMvxNc097837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 27 Oct 2015 22:57:59 +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: r290080 - stable/10/sys/mips/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 22:58:00 -0000 Author: jhb Date: Tue Oct 27 22:57:58 2015 New Revision: 290080 URL: https://svnweb.freebsd.org/changeset/base/290080 Log: MFC 283645: Similarly to other architecture, add the include for cpufunc.h which is needed for pte.h by vmstat to resolve MIPS_CCA_UNCACHED. Modified: stable/10/sys/mips/include/pcpu.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/mips/include/pcpu.h ============================================================================== --- stable/10/sys/mips/include/pcpu.h Tue Oct 27 22:24:57 2015 (r290079) +++ stable/10/sys/mips/include/pcpu.h Tue Oct 27 22:57:58 2015 (r290080) @@ -31,6 +31,7 @@ #ifndef _MACHINE_PCPU_H_ #define _MACHINE_PCPU_H_ +#include #include #define PCPU_MD_COMMON_FIELDS \ From owner-svn-src-stable-10@freebsd.org Wed Oct 28 11:22:31 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95C13A1F3AD; Wed, 28 Oct 2015 11:22:31 +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 mx1.freebsd.org (Postfix) with ESMTPS id 6C97C17F7; Wed, 28 Oct 2015 11:22:31 +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 t9SBMU3D030580; Wed, 28 Oct 2015 11:22:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9SBMU5m030579; Wed, 28 Oct 2015 11:22:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510281122.t9SBMU5m030579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Oct 2015 11:22: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: r290094 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 11:22:31 -0000 Author: kib Date: Wed Oct 28 11:22:30 2015 New Revision: 290094 URL: https://svnweb.freebsd.org/changeset/base/290094 Log: MFC r284157 (by emaste): Add user facing errors for exceeding process memory limits. Modified: stable/10/sys/kern/imgact_elf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Wed Oct 28 11:20:55 2015 (r290093) +++ stable/10/sys/kern/imgact_elf.c Wed Oct 28 11:22:30 2015 (r290094) @@ -726,7 +726,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i u_long addr, baddr, et_dyn_addr, entry = 0, proghdr = 0; int32_t osrel = 0; int error = 0, i, n, interp_name_len = 0; - const char *interp = NULL, *newinterp = NULL; + const char *err_str = NULL, *interp = NULL, *newinterp = NULL; Elf_Brandinfo *brand_info; char *path; struct sysentvec *sv; @@ -749,11 +749,14 @@ __CONCAT(exec_, __elfN(imgact))(struct i if ((hdr->e_phoff > PAGE_SIZE) || (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { /* Only support headers in first page for now */ + uprintf("Program headers not in the first page\n"); return (ENOEXEC); } - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); - if (!aligned(phdr, Elf_Addr)) + phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); + if (!aligned(phdr, Elf_Addr)) { + uprintf("Unaligned program headers\n"); return (ENOEXEC); + } n = 0; baddr = 0; for (i = 0; i < hdr->e_phnum; i++) { @@ -767,8 +770,10 @@ __CONCAT(exec_, __elfN(imgact))(struct i /* Path to interpreter */ if (phdr[i].p_filesz > MAXPATHLEN || phdr[i].p_offset > PAGE_SIZE || - phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset) + phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset) { + uprintf("Invalid PT_INTERP\n"); return (ENOEXEC); + } interp = imgp->image_header + phdr[i].p_offset; interp_name_len = phdr[i].p_filesz; break; @@ -789,8 +794,10 @@ __CONCAT(exec_, __elfN(imgact))(struct i return (ENOEXEC); } if (hdr->e_type == ET_DYN) { - if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) + if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) { + uprintf("Cannot execute shared object\n"); return (ENOEXEC); + } /* * Honour the base load address from the dso if it is * non-zero for some reason. @@ -895,12 +902,19 @@ __CONCAT(exec_, __elfN(imgact))(struct i * not actually fault in all the segments pages. */ PROC_LOCK(imgp->proc); - if (data_size > lim_cur(imgp->proc, RLIMIT_DATA) || - text_size > maxtsiz || - total_size > lim_cur(imgp->proc, RLIMIT_VMEM) || - racct_set(imgp->proc, RACCT_DATA, data_size) != 0 || - racct_set(imgp->proc, RACCT_VMEM, total_size) != 0) { + if (data_size > lim_cur(imgp->proc, RLIMIT_DATA)) + err_str = "Data segment size exceeds process limit"; + else if (text_size > maxtsiz) + err_str = "Text segment size exceeds system limit"; + else if (total_size > lim_cur(imgp->proc, RLIMIT_VMEM)) + err_str = "Total segment size exceeds process limit"; + else if (racct_set(imgp->proc, RACCT_DATA, data_size) != 0) + err_str = "Data segment size exceeds resource limit"; + else if (racct_set(imgp->proc, RACCT_VMEM, total_size) != 0) + err_str = "Total segment size exceeds resource limit"; + if (err_str != NULL) { PROC_UNLOCK(imgp->proc); + uprintf("%s\n", err_str); return (ENOMEM); } From owner-svn-src-stable-10@freebsd.org Wed Oct 28 11:29:56 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C66BA1F5D1; Wed, 28 Oct 2015 11:29:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA6B01E35; Wed, 28 Oct 2015 11:29:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9SBTsBc031214; Wed, 28 Oct 2015 11:29:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9SBTs9v031213; Wed, 28 Oct 2015 11:29:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510281129.t9SBTs9v031213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Oct 2015 11:29: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: r290097 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 11:29:56 -0000 Author: kib Date: Wed Oct 28 11:29:54 2015 New Revision: 290097 URL: https://svnweb.freebsd.org/changeset/base/290097 Log: MFC r289322: Allow PT_INTERP and PT_NOTES segments to be located anywhere in the executable image. Modified: stable/10/sys/kern/imgact_elf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Wed Oct 28 11:28:46 2015 (r290096) +++ stable/10/sys/kern/imgact_elf.c Wed Oct 28 11:29:54 2015 (r290097) @@ -715,21 +715,22 @@ fail: static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) { - const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; + struct thread *td; + const Elf_Ehdr *hdr; const Elf_Phdr *phdr; Elf_Auxargs *elf_auxargs; struct vmspace *vmspace; - vm_prot_t prot; - u_long text_size = 0, data_size = 0, total_size = 0; - u_long text_addr = 0, data_addr = 0; - u_long seg_size, seg_addr; - u_long addr, baddr, et_dyn_addr, entry = 0, proghdr = 0; - int32_t osrel = 0; - int error = 0, i, n, interp_name_len = 0; - const char *err_str = NULL, *interp = NULL, *newinterp = NULL; + const char *err_str, *newinterp; + char *interp, *interp_buf, *path; Elf_Brandinfo *brand_info; - char *path; struct sysentvec *sv; + vm_prot_t prot; + u_long text_size, data_size, total_size, text_addr, data_addr; + u_long seg_size, seg_addr, addr, baddr, et_dyn_addr, entry, proghdr; + int32_t osrel; + int error, i, n, interp_name_len, have_interp; + + hdr = (const Elf_Ehdr *)imgp->image_header; /* * Do we have a valid ELF header ? @@ -757,8 +758,17 @@ __CONCAT(exec_, __elfN(imgact))(struct i uprintf("Unaligned program headers\n"); return (ENOEXEC); } - n = 0; + + n = error = 0; baddr = 0; + osrel = 0; + text_size = data_size = total_size = text_addr = data_addr = 0; + entry = proghdr = 0; + interp_name_len = 0; + err_str = newinterp = NULL; + interp = interp_buf = NULL; + td = curthread; + for (i = 0; i < hdr->e_phnum; i++) { switch (phdr[i].p_type) { case PT_LOAD: @@ -768,14 +778,32 @@ __CONCAT(exec_, __elfN(imgact))(struct i break; case PT_INTERP: /* Path to interpreter */ - if (phdr[i].p_filesz > MAXPATHLEN || - phdr[i].p_offset > PAGE_SIZE || - phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset) { + if (phdr[i].p_filesz > MAXPATHLEN) { uprintf("Invalid PT_INTERP\n"); - return (ENOEXEC); + error = ENOEXEC; + goto ret; } - interp = imgp->image_header + phdr[i].p_offset; interp_name_len = phdr[i].p_filesz; + if (phdr[i].p_offset > PAGE_SIZE || + interp_name_len > PAGE_SIZE - phdr[i].p_offset) { + VOP_UNLOCK(imgp->vp, 0); + interp_buf = malloc(interp_name_len + 1, M_TEMP, + M_WAITOK); + vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + error = vn_rdwr(UIO_READ, imgp->vp, interp_buf, + interp_name_len, phdr[i].p_offset, + UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, + NOCRED, NULL, td); + if (error != 0) { + uprintf("i/o error PT_INTERP\n"); + goto ret; + } + interp_buf[interp_name_len] = '\0'; + interp = interp_buf; + } else { + interp = __DECONST(char *, imgp->image_header) + + phdr[i].p_offset; + } break; case PT_GNU_STACK: if (__elfN(nxstack)) @@ -791,12 +819,14 @@ __CONCAT(exec_, __elfN(imgact))(struct i if (brand_info == NULL) { uprintf("ELF binary type \"%u\" not known.\n", hdr->e_ident[EI_OSABI]); - return (ENOEXEC); + error = ENOEXEC; + goto ret; } if (hdr->e_type == ET_DYN) { if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) { uprintf("Cannot execute shared object\n"); - return (ENOEXEC); + error = ENOEXEC; + goto ret; } /* * Honour the base load address from the dso if it is @@ -829,8 +859,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->proc->p_sysent = sv; vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); - if (error) - return (error); + if (error != 0) + goto ret; for (i = 0; i < hdr->e_phnum; i++) { switch (phdr[i].p_type) { @@ -843,7 +873,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i phdr[i].p_memsz, phdr[i].p_filesz, prot, sv->sv_pagesize); if (error != 0) - return (error); + goto ret; /* * If this segment contains the program headers, @@ -915,7 +945,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i if (err_str != NULL) { PROC_UNLOCK(imgp->proc); uprintf("%s\n", err_str); - return (ENOMEM); + error = ENOMEM; + goto ret; } vmspace = imgp->proc->p_vmspace; @@ -937,7 +968,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->entry_addr = entry; if (interp != NULL) { - int have_interp = FALSE; + have_interp = FALSE; VOP_UNLOCK(imgp->vp, 0); if (brand_info->emul_path != NULL && brand_info->emul_path[0] != '\0') { @@ -963,7 +994,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); if (error != 0) { uprintf("ELF interpreter %s not found\n", interp); - return (error); + goto ret; } } else addr = et_dyn_addr; @@ -986,6 +1017,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; + ret: + free(interp_buf, M_TEMP); return (error); } @@ -2037,19 +2070,42 @@ __elfN(parse_notes)(struct image_params { const Elf_Note *note, *note0, *note_end; const char *note_name; - int i; + char *buf; + int i, error; + boolean_t res; - if (pnote == NULL || pnote->p_offset > PAGE_SIZE || - pnote->p_filesz > PAGE_SIZE - pnote->p_offset) + /* We need some limit, might as well use PAGE_SIZE. */ + if (pnote == NULL || pnote->p_filesz > PAGE_SIZE) return (FALSE); - - note = note0 = (const Elf_Note *)(imgp->image_header + pnote->p_offset); - note_end = (const Elf_Note *)(imgp->image_header + - pnote->p_offset + pnote->p_filesz); + ASSERT_VOP_LOCKED(imgp->vp, "parse_notes"); + if (pnote->p_offset > PAGE_SIZE || + pnote->p_filesz > PAGE_SIZE - pnote->p_offset) { + VOP_UNLOCK(imgp->vp, 0); + buf = malloc(pnote->p_filesz, M_TEMP, M_WAITOK); + vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + error = vn_rdwr(UIO_READ, imgp->vp, buf, pnote->p_filesz, + pnote->p_offset, UIO_SYSSPACE, IO_NODELOCKED, + curthread->td_ucred, NOCRED, NULL, curthread); + if (error != 0) { + uprintf("i/o error PT_NOTE\n"); + res = FALSE; + goto ret; + } + note = note0 = (const Elf_Note *)buf; + note_end = (const Elf_Note *)(buf + pnote->p_filesz); + } else { + note = note0 = (const Elf_Note *)(imgp->image_header + + pnote->p_offset); + note_end = (const Elf_Note *)(imgp->image_header + + pnote->p_offset + pnote->p_filesz); + buf = NULL; + } for (i = 0; i < 100 && note >= note0 && note < note_end; i++) { if (!aligned(note, Elf32_Addr) || (const char *)note_end - - (const char *)note < sizeof(Elf_Note)) - return (FALSE); + (const char *)note < sizeof(Elf_Note)) { + res = FALSE; + goto ret; + } if (note->n_namesz != checknote->hdr.n_namesz || note->n_descsz != checknote->hdr.n_descsz || note->n_type != checknote->hdr.n_type) @@ -2065,17 +2121,21 @@ __elfN(parse_notes)(struct image_params * from the ELF OSABI-note if necessary. */ if ((checknote->flags & BN_TRANSLATE_OSREL) != 0 && - checknote->trans_osrel != NULL) - return (checknote->trans_osrel(note, osrel)); - return (TRUE); - + checknote->trans_osrel != NULL) { + res = checknote->trans_osrel(note, osrel); + goto ret; + } + res = TRUE; + goto ret; nextnote: note = (const Elf_Note *)((const char *)(note + 1) + roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE)); } - - return (FALSE); + res = FALSE; +ret: + free(buf, M_TEMP); + return (res); } /* From owner-svn-src-stable-10@freebsd.org Wed Oct 28 11:32:40 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D15FEA1F7EC; Wed, 28 Oct 2015 11:32:40 +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 mx1.freebsd.org (Postfix) with ESMTPS id 833221348; Wed, 28 Oct 2015 11:32:40 +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 t9SBWdML033905; Wed, 28 Oct 2015 11:32:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9SBWdPw033904; Wed, 28 Oct 2015 11:32:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510281132.t9SBWdPw033904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Oct 2015 11:32:39 +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: r290099 - stable/10/libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 11:32:40 -0000 Author: kib Date: Wed Oct 28 11:32:39 2015 New Revision: 290099 URL: https://svnweb.freebsd.org/changeset/base/290099 Log: MFC r289324: Allow PT_NOTES segments to be located anywhere in the executable image. Modified: stable/10/libexec/rtld-elf/map_object.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/map_object.c ============================================================================== --- stable/10/libexec/rtld-elf/map_object.c Wed Oct 28 11:29:58 2015 (r290098) +++ stable/10/libexec/rtld-elf/map_object.c Wed Oct 28 11:32:39 2015 (r290099) @@ -88,6 +88,8 @@ map_object(int fd, const char *path, con size_t relro_size; Elf_Addr note_start; Elf_Addr note_end; + char *note_map; + size_t note_map_len; hdr = get_elf_header(fd, path); if (hdr == NULL) @@ -108,6 +110,7 @@ map_object(int fd, const char *path, con relro_size = 0; note_start = 0; note_end = 0; + note_map = NULL; segs = alloca(sizeof(segs[0]) * hdr->e_phnum); stack_flags = RTLD_DEFAULT_STACK_PF_EXEC | PF_R | PF_W; while (phdr < phlimit) { @@ -150,9 +153,20 @@ map_object(int fd, const char *path, con case PT_NOTE: if (phdr->p_offset > PAGE_SIZE || - phdr->p_offset + phdr->p_filesz > PAGE_SIZE) - break; - note_start = (Elf_Addr)(char *)hdr + phdr->p_offset; + phdr->p_offset + phdr->p_filesz > PAGE_SIZE) { + note_map_len = round_page(phdr->p_offset + + phdr->p_filesz) - trunc_page(phdr->p_offset); + note_map = mmap(NULL, note_map_len, PROT_READ, + MAP_PRIVATE, fd, trunc_page(phdr->p_offset)); + if (note_map == MAP_FAILED) { + _rtld_error("%s: error mapping PT_NOTE (%d)", path, errno); + goto error; + } + note_start = (Elf_Addr)(note_map + phdr->p_offset - + trunc_page(phdr->p_offset)); + } else { + note_start = (Elf_Addr)(char *)hdr + phdr->p_offset; + } note_end = note_start + phdr->p_filesz; break; } @@ -295,12 +309,16 @@ map_object(int fd, const char *path, con obj->relro_size = round_page(relro_size); if (note_start < note_end) digest_notes(obj, note_start, note_end); + if (note_map != NULL) + munmap(note_map, note_map_len); munmap(hdr, PAGE_SIZE); return (obj); error1: munmap(mapbase, mapsize); error: + if (note_map != NULL && note_map != MAP_FAILED) + munmap(note_map, note_map_len); munmap(hdr, PAGE_SIZE); return (NULL); } From owner-svn-src-stable-10@freebsd.org Wed Oct 28 13:30:16 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18A4DA1FDF2; Wed, 28 Oct 2015 13:30: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 mx1.freebsd.org (Postfix) with ESMTPS id CF5431087; Wed, 28 Oct 2015 13:30:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9SDUEmW073012; Wed, 28 Oct 2015 13:30:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9SDUEDw073005; Wed, 28 Oct 2015 13:30:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510281330.t9SDUEDw073005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 28 Oct 2015 13:30:14 +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: r290107 - in stable/10/etc: etc.amd64 etc.i386 etc.ia64 etc.mips etc.pc98 etc.powerpc etc.sparc64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 13:30:16 -0000 Author: gjb Date: Wed Oct 28 13:30:14 2015 New Revision: 290107 URL: https://svnweb.freebsd.org/changeset/base/290107 Log: MFC r262957, r267591, r289634: r262957 (marcel): Change the terminal type/class for enabled serial lines to 3wire. This allows us to change the uart(4) driver to not hardcode specific line settings for the serial console. A terminal type of 3wire makes sure the console still works when no DCD signal is present, which preserves behviour. When it is known that the terminal server (or DCE in general) provides DCD, a terminal type/class of std can be used. This has the effect of being logged out when one disconnects from the console -- improving security overall. r267591 (grehan): Convert the potential console port over to using 3wire, for i386/amd64. r289634: Enable all callin ttys if the tty is an available console. Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/etc.amd64/ttys stable/10/etc/etc.i386/ttys stable/10/etc/etc.ia64/ttys stable/10/etc/etc.mips/ttys stable/10/etc/etc.pc98/ttys stable/10/etc/etc.powerpc/ttys stable/10/etc/etc.sparc64/ttys Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/etc.amd64/ttys ============================================================================== --- stable/10/etc/etc.amd64/ttys Wed Oct 28 13:14:16 2015 (r290106) +++ stable/10/etc/etc.amd64/ttys Wed Oct 28 13:30:14 2015 (r290107) @@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" xterm on ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: stable/10/etc/etc.i386/ttys ============================================================================== --- stable/10/etc/etc.i386/ttys Wed Oct 28 13:14:16 2015 (r290106) +++ stable/10/etc/etc.i386/ttys Wed Oct 28 13:30:14 2015 (r290107) @@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" xterm on ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: stable/10/etc/etc.ia64/ttys ============================================================================== --- stable/10/etc/etc.ia64/ttys Wed Oct 28 13:14:16 2015 (r290106) +++ stable/10/etc/etc.ia64/ttys Wed Oct 28 13:30:14 2015 (r290107) @@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" xterm off ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals. The 'dialup' keyword identifies dialin lines to login, # fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure -ttyu1 "/usr/libexec/getty std.9600" vt100 onifconsole secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: stable/10/etc/etc.mips/ttys ============================================================================== --- stable/10/etc/etc.mips/ttys Wed Oct 28 13:14:16 2015 (r290106) +++ stable/10/etc/etc.mips/ttys Wed Oct 28 13:30:14 2015 (r290107) @@ -30,7 +30,7 @@ console none unknown off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.115200" dialup on secure -ttyu1 "/usr/libexec/getty std.115200" dialup off secure -ttyu2 "/usr/libexec/getty std.115200" dialup off secure -ttyu3 "/usr/libexec/getty std.115200" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure Modified: stable/10/etc/etc.pc98/ttys ============================================================================== --- stable/10/etc/etc.pc98/ttys Wed Oct 28 13:14:16 2015 (r290106) +++ stable/10/etc/etc.pc98/ttys Wed Oct 28 13:30:14 2015 (r290107) @@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" cons25w o ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" dialup off secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: stable/10/etc/etc.powerpc/ttys ============================================================================== --- stable/10/etc/etc.powerpc/ttys Wed Oct 28 13:14:16 2015 (r290106) +++ stable/10/etc/etc.powerpc/ttys Wed Oct 28 13:30:14 2015 (r290107) @@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" xterm on #ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" vt100 on secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: stable/10/etc/etc.sparc64/ttys ============================================================================== --- stable/10/etc/etc.sparc64/ttys Wed Oct 28 13:14:16 2015 (r290106) +++ stable/10/etc/etc.sparc64/ttys Wed Oct 28 13:30:14 2015 (r290107) @@ -46,9 +46,9 @@ ttyv8 "/usr/local/bin/xdm -nodaemon" xte # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. # uart(4) -ttyu0 "/usr/libexec/getty std.9600" vt100 on secure -ttyu1 "/usr/libexec/getty std.9600" vt100 on secure -ttyu2 "/usr/libexec/getty std.9600" vt100 on secure -ttyu3 "/usr/libexec/getty std.9600" vt100 off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure From owner-svn-src-stable-10@freebsd.org Thu Oct 29 00:18:05 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0396A1F45C; Thu, 29 Oct 2015 00:18:05 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7B7751BDD; Thu, 29 Oct 2015 00:18:05 +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 t9T0I4Oj073625; Thu, 29 Oct 2015 00:18:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9T0I421073624; Thu, 29 Oct 2015 00:18:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510290018.t9T0I421073624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2015 00:18:04 +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: r290124 - stable/10/sys/boot/pc98/boot2 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 00:18:05 -0000 Author: jhb Date: Thu Oct 29 00:18:03 2015 New Revision: 290124 URL: https://svnweb.freebsd.org/changeset/base/290124 Log: MFC 278582: MFi386: When building some of the boot loaders with clang, and DEBUG_FLAGS or CFLAGS having '-g' in it, clang outputs several assembly directives that are too new for our version of binutils. Therefore, assemble the resulting .s files with clang instead. A more general solution can be implemented when a GNU as-compatible driver for clang's integrated assembler appears. Modified: stable/10/sys/boot/pc98/boot2/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/10/sys/boot/pc98/boot2/Makefile Wed Oct 28 23:39:33 2015 (r290123) +++ stable/10/sys/boot/pc98/boot2/Makefile Thu Oct 29 00:18:03 2015 (r290124) @@ -93,6 +93,7 @@ boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} boot2.o: boot2.s + ${CC} ${ACFLAGS} -c boot2.s SRCS= boot2.c boot2.h From owner-svn-src-stable-10@freebsd.org Thu Oct 29 00:36:12 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0596AA1F849; Thu, 29 Oct 2015 00:36:12 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 A25751326; Thu, 29 Oct 2015 00:36:11 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9T0aA4C079187; Thu, 29 Oct 2015 00:36:10 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9T0aAWE079186; Thu, 29 Oct 2015 00:36:10 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201510290036.t9T0aAWE079186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Thu, 29 Oct 2015 00:36:10 +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: r290125 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 00:36:12 -0000 Author: hiren Date: Thu Oct 29 00:36:10 2015 New Revision: 290125 URL: https://svnweb.freebsd.org/changeset/base/290125 Log: MFC r289293 Fix an unnecessarily aggressive behavior where mtu clamping begins on first retransmission timeout (rto) when blackhole detection is enabled. Make sure it only happens when the second attempt to send the same segment also fails with rto. Also make sure that each mtu probing stage (usually 1448 -> 1188 -> 524) follows the same pattern and gets 2 chances (rto) before further clamping down. Note: RFC4821 doesn't specify implementation details on how this situation should be handled. Modified: stable/10/sys/netinet/tcp_timer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_timer.c ============================================================================== --- stable/10/sys/netinet/tcp_timer.c Thu Oct 29 00:18:03 2015 (r290124) +++ stable/10/sys/netinet/tcp_timer.c Thu Oct 29 00:36:10 2015 (r290125) @@ -617,9 +617,15 @@ tcp_timer_rexmt(void * xtp) int isipv6; #endif + /* + * Idea here is that at each stage of mtu probe (usually, 1448 + * -> 1188 -> 524) should be given 2 chances to recover before + * further clamping down. 'tp->t_rxtshift % 2 == 0' should + * take care of that. + */ if (((tp->t_flags2 & (TF2_PLPMTU_PMTUD|TF2_PLPMTU_MAXSEGSNT)) == (TF2_PLPMTU_PMTUD|TF2_PLPMTU_MAXSEGSNT)) && - (tp->t_rxtshift <= 2)) { + (tp->t_rxtshift >= 2 && tp->t_rxtshift % 2 == 0)) { /* * Enter Path MTU Black-hole Detection mechanism: * - Disable Path MTU Discovery (IP "DF" bit). @@ -687,9 +693,11 @@ tcp_timer_rexmt(void * xtp) * with a lowered MTU, maybe this isn't a blackhole and * we restore the previous MSS and blackhole detection * flags. + * The limit '6' is determined by giving each probe + * stage (1448, 1188, 524) 2 chances to recover. */ if ((tp->t_flags2 & TF2_PLPMTU_BLACKHOLE) && - (tp->t_rxtshift > 4)) { + (tp->t_rxtshift > 6)) { tp->t_flags2 |= TF2_PLPMTU_PMTUD; tp->t_flags2 &= ~TF2_PLPMTU_BLACKHOLE; optlen = tp->t_maxopd - tp->t_maxseg; From owner-svn-src-stable-10@freebsd.org Thu Oct 29 09:08:05 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A890A20DBD; Thu, 29 Oct 2015 09:08:05 +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 mx1.freebsd.org (Postfix) with ESMTPS id 15BCC1B00; Thu, 29 Oct 2015 09:08:05 +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 t9T984em027741; Thu, 29 Oct 2015 09:08:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9T9847j027740; Thu, 29 Oct 2015 09:08:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510290908.t9T9847j027740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 29 Oct 2015 09:08:04 +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: r290137 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 09:08:05 -0000 Author: mav Date: Thu Oct 29 09:08:04 2015 New Revision: 290137 URL: https://svnweb.freebsd.org/changeset/base/290137 Log: MFC r290004: Don't try to replicate mode pages not present on this device. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Thu Oct 29 08:45:56 2015 (r290136) +++ stable/10/sys/cam/ctl/ctl.c Thu Oct 29 09:08:04 2015 (r290137) @@ -929,6 +929,11 @@ ctl_isc_announce_mode(struct ctl_lun *lu } if (i == CTL_NUM_MODE_PAGES) return; + + /* Don't try to replicate pages not present on this device. */ + if (lun->mode_pages.index[i].page_data == NULL) + return; + bzero(&msg.mode, sizeof(msg.mode)); msg.hdr.msg_type = CTL_MSG_MODE_SYNC; msg.hdr.nexus.targ_port = initidx / CTL_MAX_INIT_PER_PORT; From owner-svn-src-stable-10@freebsd.org Thu Oct 29 16:34:57 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E603A21CD6; Thu, 29 Oct 2015 16:34:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BC601293; Thu, 29 Oct 2015 16:34:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9TGYuXx060777; Thu, 29 Oct 2015 16:34:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9TGYtgo060775; Thu, 29 Oct 2015 16:34:55 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510291634.t9TGYtgo060775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 29 Oct 2015 16:34:55 +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: r290145 - stable/10/usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 16:34:57 -0000 Author: delphij Date: Thu Oct 29 16:34:55 2015 New Revision: 290145 URL: https://svnweb.freebsd.org/changeset/base/290145 Log: MFC r288959: Remove a few unused headers. Modified: stable/10/usr.sbin/iscsid/discovery.c stable/10/usr.sbin/iscsid/pdu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/iscsid/discovery.c ============================================================================== --- stable/10/usr.sbin/iscsid/discovery.c Thu Oct 29 15:20:47 2015 (r290144) +++ stable/10/usr.sbin/iscsid/discovery.c Thu Oct 29 16:34:55 2015 (r290145) @@ -33,10 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include -#include #include #include Modified: stable/10/usr.sbin/iscsid/pdu.c ============================================================================== --- stable/10/usr.sbin/iscsid/pdu.c Thu Oct 29 15:20:47 2015 (r290144) +++ stable/10/usr.sbin/iscsid/pdu.c Thu Oct 29 16:34:55 2015 (r290145) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-stable-10@freebsd.org Thu Oct 29 16:45:08 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16ECFA21F5A; Thu, 29 Oct 2015 16:45:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5D6B1D43; Thu, 29 Oct 2015 16:45:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9TGj6YF063708; Thu, 29 Oct 2015 16:45:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9TGj6T3063707; Thu, 29 Oct 2015 16:45:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510291645.t9TGj6T3063707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 29 Oct 2015 16:45:06 +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: r290146 - stable/10/usr.sbin/watch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 16:45:08 -0000 Author: delphij Date: Thu Oct 29 16:45:06 2015 New Revision: 290146 URL: https://svnweb.freebsd.org/changeset/base/290146 Log: MFC r288960: Use strlcpy() when the string is expected to be nul-terminated. Modified: stable/10/usr.sbin/watch/watch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/watch/watch.c ============================================================================== --- stable/10/usr.sbin/watch/watch.c Thu Oct 29 16:34:55 2015 (r290145) +++ stable/10/usr.sbin/watch/watch.c Thu Oct 29 16:45:06 2015 (r290146) @@ -247,7 +247,7 @@ set_dev(const char *name) if ((sb.st_mode & S_IFMT) != S_IFCHR) fatal(EX_DATAERR, "must be a character device"); - strncpy(dev_name, buf, DEV_NAME_LEN); + strlcpy(dev_name, buf, sizeof(dev_name)); attach_snp(); } @@ -340,7 +340,7 @@ main(int ac, char *av[]) else fatal(EX_DATAERR, "no device name given"); } else - strncpy(dev_name, *av, DEV_NAME_LEN); + strlcpy(dev_name, *av, sizeof(dev_name)); set_dev(dev_name); From owner-svn-src-stable-10@freebsd.org Thu Oct 29 16:53:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F7C9A20239; Thu, 29 Oct 2015 16:53:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6687319F3; Thu, 29 Oct 2015 16:53:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9TGrZ99066657; Thu, 29 Oct 2015 16:53:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9TGrZlk066651; Thu, 29 Oct 2015 16:53:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510291653.t9TGrZlk066651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 29 Oct 2015 16:53:35 +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: r290149 - in stable/10: sbin/rtsol usr.sbin/rtadvd usr.sbin/rtsold X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 16:53:36 -0000 Author: delphij Date: Thu Oct 29 16:53:34 2015 New Revision: 290149 URL: https://svnweb.freebsd.org/changeset/base/290149 Log: MFC r288963: Now that we own the code, use arc4random(3) unconditionally and remove the corresponding HAVE_ARC4RANDOM conditions. Modified: stable/10/sbin/rtsol/Makefile stable/10/usr.sbin/rtadvd/Makefile stable/10/usr.sbin/rtadvd/rtadvd.c stable/10/usr.sbin/rtsold/Makefile stable/10/usr.sbin/rtsold/rtsold.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/rtsol/Makefile ============================================================================== --- stable/10/sbin/rtsol/Makefile Thu Oct 29 16:50:28 2015 (r290148) +++ stable/10/sbin/rtsol/Makefile Thu Oct 29 16:53:34 2015 (r290149) @@ -23,6 +23,6 @@ SRCS= rtsold.c rtsol.c if.c probe.c dump MAN= WARNS?= 3 -CFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_POLL_H -DSMALL +CFLAGS+= -DHAVE_POLL_H -DSMALL .include Modified: stable/10/usr.sbin/rtadvd/Makefile ============================================================================== --- stable/10/usr.sbin/rtadvd/Makefile Thu Oct 29 16:50:28 2015 (r290148) +++ stable/10/usr.sbin/rtadvd/Makefile Thu Oct 29 16:53:34 2015 (r290149) @@ -22,8 +22,6 @@ SRCS= rtadvd.c rrenum.c advcap.c if.c co DPADD= ${LIBUTIL} LDADD= -lutil -CFLAGS+= -DHAVE_ARC4RANDOM - WARNS?= 1 .include Modified: stable/10/usr.sbin/rtadvd/rtadvd.c ============================================================================== --- stable/10/usr.sbin/rtadvd/rtadvd.c Thu Oct 29 16:50:28 2015 (r290148) +++ stable/10/usr.sbin/rtadvd/rtadvd.c Thu Oct 29 16:53:34 2015 (r290149) @@ -242,14 +242,6 @@ main(int argc, char *argv[]) /* timer initialization */ rtadvd_timer_init(); -#ifndef HAVE_ARC4RANDOM - /* random value initialization */ -#ifdef __FreeBSD__ - srandomdev(); -#else - srandom((unsigned long)time(NULL)); -#endif -#endif pfh = pidfile_open(pidfilename, 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) @@ -1016,11 +1008,7 @@ set_short_delay(struct ifinfo *ifi) * delay and send the advertisement at the * already-scheduled time. RFC 4861 6.2.6 */ -#ifdef HAVE_ARC4RANDOM delay = arc4random_uniform(MAX_RA_DELAY_TIME); -#else - delay = random() % MAX_RA_DELAY_TIME; -#endif interval.tv_sec = 0; interval.tv_nsec = delay * 1000; rest = rtadvd_timer_rest(ifi->ifi_ra_timer); @@ -1894,13 +1882,8 @@ ra_timer_update(void *arg, struct timesp * MaxRtrAdvInterval (RFC4861 6.2.4). */ interval = rai->rai_mininterval; -#ifdef HAVE_ARC4RANDOM interval += arc4random_uniform(rai->rai_maxinterval - rai->rai_mininterval); -#else - interval += random() % (rai->rai_maxinterval - - rai->rai_mininterval); -#endif break; case IFI_STATE_TRANSITIVE: /* Modified: stable/10/usr.sbin/rtsold/Makefile ============================================================================== --- stable/10/usr.sbin/rtsold/Makefile Thu Oct 29 16:50:28 2015 (r290148) +++ stable/10/usr.sbin/rtsold/Makefile Thu Oct 29 16:53:34 2015 (r290149) @@ -20,7 +20,7 @@ MLINKS= rtsold.8 rtsol.8 SRCS= rtsold.c rtsol.c if.c probe.c dump.c rtsock.c WARNS?= 3 -CFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_POLL_H +CFLAGS+= -DHAVE_POLL_H DPADD= ${LIBKVM} LDADD= -lkvm Modified: stable/10/usr.sbin/rtsold/rtsold.c ============================================================================== --- stable/10/usr.sbin/rtsold/rtsold.c Thu Oct 29 16:50:28 2015 (r290148) +++ stable/10/usr.sbin/rtsold/rtsold.c Thu Oct 29 16:53:34 2015 (r290149) @@ -223,10 +223,6 @@ main(int argc, char **argv) errx(1, "pid filename (%s) must be an absolute path", pidfilename); } -#ifndef HAVE_ARC4RANDOM - /* random value initialization */ - srandom((u_long)time(NULL)); -#endif #if (__FreeBSD_version < 900000) if (Fflag) { @@ -780,11 +776,7 @@ rtsol_timer_update(struct ifinfo *ifi) ifi->timer = tm_max; /* stop timer(valid?) */ break; case IFS_DELAY: -#ifndef HAVE_ARC4RANDOM - interval = random() % (MAX_RTR_SOLICITATION_DELAY * MILLION); -#else interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION); -#endif ifi->timer.tv_sec = interval / MILLION; ifi->timer.tv_nsec = (interval % MILLION) * 1000; break; From owner-svn-src-stable-10@freebsd.org Thu Oct 29 17:00:53 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94CDEA20470; Thu, 29 Oct 2015 17:00:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 508AD1FE6; Thu, 29 Oct 2015 17:00:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9TH0qXp067110; Thu, 29 Oct 2015 17:00:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9TH0p2F067104; Thu, 29 Oct 2015 17:00:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510291700.t9TH0p2F067104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 29 Oct 2015 17:00: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: r290150 - stable/10/share/timedef X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 17:00:53 -0000 Author: delphij Date: Thu Oct 29 17:00:51 2015 New Revision: 290150 URL: https://svnweb.freebsd.org/changeset/base/290150 Log: MFC r289038,r289041: Add encoding for mime-types. Fix short month names and replace %b with %_m in date_fmt for Chinese locales. When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8, nl_langinfo(ABMON_*) only returned numbers. For instance, nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and so on. This causes problems in applications that put the short month name and the day of the month together. For example, 'Apr 14' in English becomes '414æ—¥' in Chinese on the top bar of GNOME Shell. This problem may be resolved by appending '月' to all short month names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already does this, and this matches the en_US.ISO8859-1 behavior, which returns 'Oct'. The GNU C Library also returns values with '月' appended. PR: 199441 Submitted by: Ting-Wei Lan Modified: stable/10/share/timedef/zh_CN.GB18030.src (contents, props changed) stable/10/share/timedef/zh_CN.GB2312.src (contents, props changed) stable/10/share/timedef/zh_CN.UTF-8.src (contents, props changed) stable/10/share/timedef/zh_CN.eucCN.src (contents, props changed) stable/10/share/timedef/zh_TW.Big5.src (contents, props changed) stable/10/share/timedef/zh_TW.UTF-8.src (contents, props changed) Directory Properties: stable/10/ (props changed) Modified: stable/10/share/timedef/zh_CN.GB18030.src ============================================================================== --- stable/10/share/timedef/zh_CN.GB18030.src Thu Oct 29 16:53:34 2015 (r290149) +++ stable/10/share/timedef/zh_CN.GB18030.src Thu Oct 29 17:00:51 2015 (r290150) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1Ô + 2Ô + 3Ô + 4Ô + 5Ô + 6Ô + 7Ô + 8Ô + 9Ô +10Ô +11Ô +12Ô # # Long month names (as in a date) # @@ -75,7 +75,7 @@ # # date_fmt # -%YÄê%bÔÂ%eÈÕ %A %X %Z +%YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) # Modified: stable/10/share/timedef/zh_CN.GB2312.src ============================================================================== --- stable/10/share/timedef/zh_CN.GB2312.src Thu Oct 29 16:53:34 2015 (r290149) +++ stable/10/share/timedef/zh_CN.GB2312.src Thu Oct 29 17:00:51 2015 (r290150) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1Ô + 2Ô + 3Ô + 4Ô + 5Ô + 6Ô + 7Ô + 8Ô + 9Ô +10Ô +11Ô +12Ô # # Long month names (as in a date) # @@ -75,7 +75,7 @@ # # date_fmt # -%YÄê%bÔÂ%eÈÕ %A %X %Z +%YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) # Modified: stable/10/share/timedef/zh_CN.UTF-8.src ============================================================================== --- stable/10/share/timedef/zh_CN.UTF-8.src Thu Oct 29 16:53:34 2015 (r290149) +++ stable/10/share/timedef/zh_CN.UTF-8.src Thu Oct 29 17:00:51 2015 (r290150) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1月 + 2月 + 3月 + 4月 + 5月 + 6月 + 7月 + 8月 + 9月 +10月 +11月 +12月 # # Long month names (as in a date) # @@ -75,7 +75,7 @@ # # date_fmt # -%Yå¹´%b月%eæ—¥ %A %X %Z +%Yå¹´%_m月%eæ—¥ %A %X %Z # # Long month names (without case ending) # Modified: stable/10/share/timedef/zh_CN.eucCN.src ============================================================================== --- stable/10/share/timedef/zh_CN.eucCN.src Thu Oct 29 16:53:34 2015 (r290149) +++ stable/10/share/timedef/zh_CN.eucCN.src Thu Oct 29 17:00:51 2015 (r290150) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1Ô + 2Ô + 3Ô + 4Ô + 5Ô + 6Ô + 7Ô + 8Ô + 9Ô +10Ô +11Ô +12Ô # # Long month names (as in a date) # @@ -75,7 +75,7 @@ # # date_fmt # -%YÄê%bÔÂ%eÈÕ %A %X %Z +%YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) # Modified: stable/10/share/timedef/zh_TW.Big5.src ============================================================================== --- stable/10/share/timedef/zh_TW.Big5.src Thu Oct 29 16:53:34 2015 (r290149) +++ stable/10/share/timedef/zh_TW.Big5.src Thu Oct 29 17:00:51 2015 (r290150) @@ -4,18 +4,18 @@ # WARNING: empty lines are essential too # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1¤ë + 2¤ë + 3¤ë + 4¤ë + 5¤ë + 6¤ë + 7¤ë + 8¤ë + 9¤ë +10¤ë +11¤ë +12¤ë # # Long month names (as in a date) # @@ -74,7 +74,7 @@ # # date_fmt # -%Y¦~%b¤ë%e¤é %A %X %Z +%Y¦~%_m¤ë%e¤é %A %X %Z # # Long month names (without case ending) # Modified: stable/10/share/timedef/zh_TW.UTF-8.src ============================================================================== --- stable/10/share/timedef/zh_TW.UTF-8.src Thu Oct 29 16:53:34 2015 (r290149) +++ stable/10/share/timedef/zh_TW.UTF-8.src Thu Oct 29 17:00:51 2015 (r290150) @@ -4,18 +4,18 @@ # WARNING: empty lines are essential too # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1月 + 2月 + 3月 + 4月 + 5月 + 6月 + 7月 + 8月 + 9月 +10月 +11月 +12月 # # Long month names (as in a date) # @@ -74,7 +74,7 @@ # # date_fmt # -%Yå¹´%b月%eæ—¥ %A %X %Z +%Yå¹´%_m月%eæ—¥ %A %X %Z # # Long month names (without case ending) # From owner-svn-src-stable-10@freebsd.org Thu Oct 29 17:51:52 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8A0BA20E72; Thu, 29 Oct 2015 17:51:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D6471CA6; Thu, 29 Oct 2015 17:51:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9THppfW081884; Thu, 29 Oct 2015 17:51:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9THpmeG081852; Thu, 29 Oct 2015 17:51:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510291751.t9THpmeG081852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 29 Oct 2015 17:51:48 +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: r290152 - in stable/10: contrib/file contrib/file/doc contrib/file/magic/Magdir contrib/file/src lib/libmagic X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 17:51:53 -0000 Author: delphij Date: Thu Oct 29 17:51:48 2015 New Revision: 290152 URL: https://svnweb.freebsd.org/changeset/base/290152 Log: MFC r287453,287454,288143: file 5.25. Relnotes: yes Modified: stable/10/contrib/file/ChangeLog stable/10/contrib/file/configure stable/10/contrib/file/configure.ac stable/10/contrib/file/doc/file.man stable/10/contrib/file/doc/libmagic.man stable/10/contrib/file/doc/magic.man stable/10/contrib/file/magic/Magdir/adventure stable/10/contrib/file/magic/Magdir/apple stable/10/contrib/file/magic/Magdir/archive stable/10/contrib/file/magic/Magdir/c-lang stable/10/contrib/file/magic/Magdir/c64 stable/10/contrib/file/magic/Magdir/compress stable/10/contrib/file/magic/Magdir/database stable/10/contrib/file/magic/Magdir/elf stable/10/contrib/file/magic/Magdir/filesystems stable/10/contrib/file/magic/Magdir/fortran stable/10/contrib/file/magic/Magdir/frame stable/10/contrib/file/magic/Magdir/iff stable/10/contrib/file/magic/Magdir/images stable/10/contrib/file/magic/Magdir/karma stable/10/contrib/file/magic/Magdir/linux stable/10/contrib/file/magic/Magdir/mail.news stable/10/contrib/file/magic/Magdir/make stable/10/contrib/file/magic/Magdir/map stable/10/contrib/file/magic/Magdir/msdos stable/10/contrib/file/magic/Magdir/netscape stable/10/contrib/file/magic/Magdir/python stable/10/contrib/file/magic/Magdir/scientific stable/10/contrib/file/magic/Magdir/sgi stable/10/contrib/file/magic/Magdir/sgml stable/10/contrib/file/magic/Magdir/windows stable/10/contrib/file/src/apprentice.c stable/10/contrib/file/src/file.c stable/10/contrib/file/src/file.h stable/10/contrib/file/src/file_opts.h stable/10/contrib/file/src/funcs.c stable/10/contrib/file/src/gmtime_r.c stable/10/contrib/file/src/localtime_r.c stable/10/contrib/file/src/magic.c stable/10/contrib/file/src/magic.h stable/10/contrib/file/src/magic.h.in stable/10/contrib/file/src/print.c stable/10/contrib/file/src/readelf.c stable/10/contrib/file/src/softmagic.c stable/10/lib/libmagic/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/file/ChangeLog ============================================================================== --- stable/10/contrib/file/ChangeLog Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/ChangeLog Thu Oct 29 17:51:48 2015 (r290152) @@ -1,3 +1,23 @@ +2015-09-16 9:50 Christos Zoulas + + * release 5.25 + +2015-09-11 13:25 Christos Zoulas + + * add a limit to the length of regex searches + +2015-09-08 9:50 Christos Zoulas + + * fix problems with --parameter (Christoph Biedl) + +2015-07-11 10:35 Christos Zoulas + + * Windows fixes PR/466 (Jason Hood) + +2015-07-09 10:35 Christos Zoulas + + * release 5.24 + 2015-06-11 8:52 Christos Zoulas * redo long option encoding to fix off-by-one in 5.23 Modified: stable/10/contrib/file/configure ============================================================================== --- stable/10/contrib/file/configure Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/configure Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.23. +# Generated by GNU Autoconf 2.69 for file 5.25. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.23' -PACKAGE_STRING='file 5.23' +PACKAGE_VERSION='5.25' +PACKAGE_STRING='file 5.25' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.23 to adapt to many kinds of systems. +\`configure' configures file 5.25 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.23:";; + short | recursive ) echo "Configuration of file 5.25:";; esac cat <<\_ACEOF @@ -1507,7 +1507,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.23 +file configure 5.25 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2163,7 +2163,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.23, which was +It was created by file $as_me 5.25, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3029,7 +3029,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.23' + VERSION='5.25' cat >>confdefs.h <<_ACEOF @@ -15036,7 +15036,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.23, which was +This file was extended by file $as_me 5.25, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15102,7 +15102,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.23 +file config.status 5.25 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/10/contrib/file/configure.ac ============================================================================== --- stable/10/contrib/file/configure.ac Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/configure.ac Thu Oct 29 17:51:48 2015 (r290152) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.23],[christos@astron.com]) +AC_INIT([file],[5.25],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) Modified: stable/10/contrib/file/doc/file.man ============================================================================== --- stable/10/contrib/file/doc/file.man Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/doc/file.man Thu Oct 29 17:51:48 2015 (r290152) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.117 2015/06/03 19:51:27 christos Exp $ -.Dd June 3, 2015 +.\" $File: file.man,v 1.118 2015/09/11 17:24:09 christos Exp $ +.Dd September 11, 2015 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -316,6 +316,7 @@ Set various parameter limits. .It Li elf_notes Ta 256 Ta max ELF notes processed .It Li elf_phnum Ta 128 Ta max ELF program sections processed .It Li elf_shnum Ta 32768 Ta max ELF sections processed +.It Li regex Ta 8192 Ta length limit for regex searches .El .It Fl r , Fl Fl raw Don't translate unprintable characters to \eooo. Modified: stable/10/contrib/file/doc/libmagic.man ============================================================================== --- stable/10/contrib/file/doc/libmagic.man Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/doc/libmagic.man Thu Oct 29 17:51:48 2015 (r290152) @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.37 2015/06/03 18:21:24 christos Exp $ +.\" $File: libmagic.man,v 1.38 2015/09/11 17:24:09 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 3, 2015 +.Dd September 11, 2015 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -291,6 +291,7 @@ library. .It Li MAGIC_PARAM_ELF_NOTES_MAX Ta size_t Ta 256 .It Li MAGIC_PARAM_ELF_PHNUM_MAX Ta size_t Ta 128 .It Li MAGIC_PARAM_ELF_SHNUM_MAX Ta size_t Ta 32768 +.It Li MAGIC_PARAM_REGEX_MAX Ta size_t Ta 8192 .El .Pp The Modified: stable/10/contrib/file/doc/magic.man ============================================================================== --- stable/10/contrib/file/doc/magic.man Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/doc/magic.man Thu Oct 29 17:51:48 2015 (r290152) @@ -1,4 +1,4 @@ -.\" $File: magic.man,v 1.85 2015/01/01 17:07:34 christos Exp $ +.\" $File: magic.man,v 1.86 2015/09/08 13:48:44 christos Exp $ .Dd January 1, 2015 .Dt MAGIC __FSECTION__ .Os @@ -200,7 +200,7 @@ interpreted as a UNIX-style date, but in than UTC. .It Dv indirect Starting at the given offset, consult the magic database again. -The offset of th +The offset of the .Dv indirect magic is by default absolute in the file, but one can specify .Dv /r Modified: stable/10/contrib/file/magic/Magdir/adventure ============================================================================== --- stable/10/contrib/file/magic/Magdir/adventure Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/adventure Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: adventure,v 1.14 2012/06/21 01:32:26 christos Exp $ +# $File: adventure,v 1.15 2015/09/07 10:03:21 christos Exp $ # adventure: file(1) magic for Adventure game files # # from Allen Garvin @@ -17,6 +17,7 @@ # Infocom (see z-machine) #------------------------------------------------------------------------------ # Z-machine: file(1) magic for Z-machine binaries. +# Sanity checks by David Griffith # Updated by Adam Buchbinder # #http://www.gnelson.demon.co.uk/zspec/sect11.html @@ -41,10 +42,12 @@ >>>>>>>2 ubeshort < 10 Release %d / >>>>>>>>18 string >\0 Serial %.6s) !:strength + 40 +!:mime application/x-zmachine #------------------------------------------------------------------------------ # Glulx: file(1) magic for Glulx binaries. # +# David Griffith # I haven't checked for false matches yet. # 0 string Glul Glulx game data @@ -52,7 +55,7 @@ >>6 byte x \b.%d >>8 byte x \b.%d) >36 string Info Compiled by Inform - +!:mime application/x-glulx # For Quetzal and blorb magic see iff @@ -66,11 +69,13 @@ >9 belong !0x0A0D1A00 game data, CORRUPTED >9 belong 0x0A0D1A00 >>13 string >\0 %s game data +!:mime application/x-tads # Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version. 0 string TADS2\ rsc TADS >9 belong !0x0A0D1A00 resource data, CORRUPTED >9 belong 0x0A0D1A00 >>13 string >\0 %s resource data +!:mime application/x-tads # Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian # 2-byte length N, the N-char name of the game file *without* a NUL (darn!), # "TADS2 save\n\r\032\0" and the interpreter version. @@ -78,12 +83,14 @@ >12 belong !0x0A0D1A00 saved game data, CORRUPTED >12 belong 0x0A0D1A00 >>(16.s+32) string >\0 %s saved game data +!:mime application/x-tads # Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter # version. 0 string TADS2\ save TADS >10 belong !0x0A0D1A00 saved game data, CORRUPTED >10 belong 0x0A0D1A00 >>14 string >\0 %s saved game data +!:mime application/x-tads # TADS (Text Adventure Development System) version 3 # Game files start with "T3-image\015\012\032" @@ -97,14 +104,18 @@ >>11 byte x \b%c >>12 byte x \b%c >>13 byte x \b%c) +!:mime application/x-t3vm-image +# edited by David Griffith # Danny Milosavljevic -# this are adrift (adventure game standard) game files, extension .taf -# depending on version magic continues with 0x93453E6139FA (V 4.0) -# 0x9445376139FA (V 3.90) -# 0x9445366139FA (V 3.80) -# this is from source (http://www.adrift.org.uk/) and I have some taf -# files, and checked them. -#0 belong 0x3C423FC9 -#>4 belong 0x6A87C2CF Adrift game file -#!:mime application/x-adrift +# These are ADRIFT (adventure game standard) game files, extension .taf +# Checked from source at (http://www.adrift.co/) and various taf files +# found at the Interactive Fiction Archive (http://ifarchive.org/) +0 belong 0x3C423FC9 +>4 belong 0x6A87C2CF Adrift game file version +>>8 belong 0x94453661 3.80 +>>8 belong 0x94453761 3.90 +>>8 belong 0x93453E61 4.0 +>>8 belong 0x92453E61 5.0 +>>8 default x unknown +!:mime application/x-adrift Modified: stable/10/contrib/file/magic/Magdir/apple ============================================================================== --- stable/10/contrib/file/magic/Magdir/apple Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/apple Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: apple,v 1.30 2015/04/13 13:09:06 christos Exp $ +# $File: apple,v 1.31 2015/08/29 07:10:35 christos Exp $ # apple: file(1) magic for Apple file formats # 0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text @@ -265,14 +265,14 @@ >>20 beshort x \b, descriptors %d # Assume 8 partitions each at a multiple of the sector size. # We could glean this from the partition descriptors, but they are empty!?!? ->>(2.S*1) indirect \b, contains[@0x%x]: ->>(2.S*2) indirect \b, contains[@0x%x]: ->>(2.S*3) indirect \b, contains[@0x%x]: ->>(2.S*4) indirect \b, contains[@0x%x]: ->>(2.S*5) indirect \b, contains[@0x%x]: ->>(2.S*6) indirect \b, contains[@0x%x]: ->>(2.S*7) indirect \b, contains[@0x%x]: ->>(2.S*8) indirect \b, contains[@0x%x]: +>>(2.S*1) indirect x \b, contains[@0x%x]: +>>(2.S*2) indirect x \b, contains[@0x%x]: +>>(2.S*3) indirect x \b, contains[@0x%x]: +>>(2.S*4) indirect x \b, contains[@0x%x]: +>>(2.S*5) indirect x \b, contains[@0x%x]: +>>(2.S*6) indirect x \b, contains[@0x%x]: +>>(2.S*7) indirect x \b, contains[@0x%x]: +>>(2.S*8) indirect x \b, contains[@0x%x]: # Yes, the 3rd and 4th bytes are reserved, but we use them to make the # magic stronger. Modified: stable/10/contrib/file/magic/Magdir/archive ============================================================================== --- stable/10/contrib/file/magic/Magdir/archive Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/archive Thu Oct 29 17:51:48 2015 (r290152) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: archive,v 1.90 2015/04/24 15:44:12 christos Exp $ +# $File: archive,v 1.91 2015/09/16 13:49:33 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # @@ -434,16 +434,34 @@ # AIN 0 string \x33\x18 AIN archive data 0 string \x33\x17 AIN archive data -# XPA32 -0 string xpa\0\1 XPA32 archive data +# XPA32 test moved and merged with XPA by Joerg Jenderek at Sep 2015 # SZip (TODO: doesn't catch all versions) 0 string SZ\x0a\4 SZip archive data # XPack DiskImage -0 string jm XPack DiskImage archive data +# *.XDI updated by Joerg Jenderek Sep 2015 +# ftp://ftp.sac.sk/pub/sac/pack/0index.txt +# GRR: this test is still too general as it catches also text files starting with jm +0 string jm +# only found examples with this additional characteristic 2 bytes +>2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi # XPack Data -0 string xpa XPack archive data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data # XPack Single Data -0 string \xc3\x8d\ jm XPack single archive data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +!:ext xpa # TODO: missing due to unknown magic/magic at end of file: #DWC Modified: stable/10/contrib/file/magic/Magdir/c-lang ============================================================================== --- stable/10/contrib/file/magic/Magdir/c-lang Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/c-lang Thu Oct 29 17:51:48 2015 (r290152) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: c-lang,v 1.19 2014/06/03 19:17:27 christos Exp $ +# $File: c-lang,v 1.20 2015/07/27 14:33:10 christos Exp $ # c-lang: file(1) magic for C and related languages programs # @@ -29,7 +29,7 @@ # C++ # The strength of these rules is increased so they beat the C rules above -0 regex \^template[\ \t\n]+ C++ source text +0 regex \^template[\ \t]+<.*>[\ \t\n]+ C++ source text !:strength + 5 !:mime text/x-c++ 0 regex \^virtual[\ \t\n]+ C++ source text Modified: stable/10/contrib/file/magic/Magdir/c64 ============================================================================== --- stable/10/contrib/file/magic/Magdir/c64 Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/c64 Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: c64,v 1.5 2009/09/19 16:28:08 christos Exp $ +# $File: c64,v 1.6 2015/08/24 05:17:42 christos Exp $ # c64: file(1) magic for various commodore 64 related files # # From: Dirk Jagdmann @@ -41,3 +41,9 @@ >32 leshort x Version:0x%x >36 leshort !0 Entries:%i >40 string x Name:%.24s + +# Raw tape file format (.tap files) +# Esa Hyyti +0 string C64-TAPE-RAW C64 Raw Tape File (.tap), +>0x0c byte x Version:%u, +>0x10 lelong x Length:%u cycles Modified: stable/10/contrib/file/magic/Magdir/compress ============================================================================== --- stable/10/contrib/file/magic/Magdir/compress Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/compress Thu Oct 29 17:51:48 2015 (r290152) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: compress,v 1.63 2015/03/11 19:27:35 christos Exp $ +# $File: compress,v 1.64 2015/07/27 15:41:09 christos Exp $ # compress: file(1) magic for pure-compression formats (no archives) # # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. @@ -258,7 +258,8 @@ !:mime application/x-qpress # Zlib https://www.ietf.org/rfc/rfc6713.txt -0 beshort%31 =0 ->0 byte&0xf =8 ->>0 byte&0x80 =0 zlib compressed data +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data !:mime application/zlib Modified: stable/10/contrib/file/magic/Magdir/database ============================================================================== --- stable/10/contrib/file/magic/Magdir/database Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/database Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: database,v 1.43 2014/10/28 15:47:39 christos Exp $ +# $File: database,v 1.45 2015/09/09 16:25:29 christos Exp $ # database: file(1) magic for various databases # # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk) @@ -533,9 +533,15 @@ # From: Stephane Blondon http://www.yaal.fr # Database file for Zope (done by FileStorage) -0 string FS21 Zope Object Database File Storage (data) +0 string FS21 Zope Object Database File Storage v3 (data) +0 string FS30 Zope Object Database File Storage v4 (data) + # Cache file for the database of Zope (done by ClientStorage) 0 string ZEC3 Zope Object Database Client Cache File (data) # IDA (Interactive Disassembler) database 0 string IDA1 IDA (Interactive Disassembler) database + +# Hopper (reverse engineering tool) http://www.hopperapp.com/ +0 string hopperdb Hopper database + Modified: stable/10/contrib/file/magic/Magdir/elf ============================================================================== --- stable/10/contrib/file/magic/Magdir/elf Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/elf Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: elf,v 1.68 2014/09/19 19:05:57 christos Exp $ +# $File: elf,v 1.69 2015/06/16 17:23:08 christos Exp $ # elf: file(1) magic for ELF executables # # We have to check the byte order flag to see what byte order all the @@ -15,6 +15,32 @@ # Modified by (4): (VMS Itanium) # Modified by (5): Matthias Urlichs (Listing of many architectures) +0 name elf-mips +>0 lelong&0xf0000000 0x00000000 MIPS-I +>0 lelong&0xf0000000 0x10000000 MIPS-II +>0 lelong&0xf0000000 0x20000000 MIPS-III +>0 lelong&0xf0000000 0x30000000 MIPS-IV +>0 lelong&0xf0000000 0x40000000 MIPS-V +>0 lelong&0xf0000000 0x50000000 MIPS32 +>0 lelong&0xf0000000 0x60000000 MIPS64 +>0 lelong&0xf0000000 0x70000000 MIPS32 rel2 +>0 lelong&0xf0000000 0x80000000 MIPS64 rel2 +>0 lelong&0xf0000000 0x90000000 MIPS32 rel6 +>0 lelong&0xf0000000 0xa0000000 MIPS64 rel6 + +0 name elf-sparc +>0 lelong&0x00ffff00 0x00000100 V8+ Required, +>0 lelong&0x00ffff00 0x00000200 Sun UltraSPARC1 Extensions Required, +>0 lelong&0x00ffff00 0x00000400 HaL R1 Extensions Required, +>0 lelong&0x00ffff00 0x00000800 Sun UltraSPARC3 Extensions Required, +>0 lelong&0x3 0 total store ordering, +>0 lelong&0x3 1 partial store ordering, +>0 lelong&0x3 2 relaxed memory ordering, + +0 name elf-pa-risc +>2 leshort 0x0214 2.0 +>0 leshort &0x0008 (LP64) + 0 name elf-le >16 leshort 0 no file type, !:mime application/octet-stream @@ -55,47 +81,26 @@ >18 leshort 8 # only for 32-bit >>4 byte 1 ->>>36 lelong&0xf0000000 0x00000000 MIPS-I ->>>36 lelong&0xf0000000 0x10000000 MIPS-II ->>>36 lelong&0xf0000000 0x20000000 MIPS-III ->>>36 lelong&0xf0000000 0x30000000 MIPS-IV ->>>36 lelong&0xf0000000 0x40000000 MIPS-V ->>>36 lelong&0xf0000000 0x50000000 MIPS32 ->>>36 lelong&0xf0000000 0x60000000 MIPS64 ->>>36 lelong&0xf0000000 0x70000000 MIPS32 rel2 ->>>36 lelong&0xf0000000 0x80000000 MIPS64 rel2 +>>>36 use elf-mips # only for 64-bit >>4 byte 2 ->>>48 lelong&0xf0000000 0x00000000 MIPS-I ->>>48 lelong&0xf0000000 0x10000000 MIPS-II ->>>48 lelong&0xf0000000 0x20000000 MIPS-III ->>>48 lelong&0xf0000000 0x30000000 MIPS-IV ->>>48 lelong&0xf0000000 0x40000000 MIPS-V ->>>48 lelong&0xf0000000 0x50000000 MIPS32 ->>>48 lelong&0xf0000000 0x60000000 MIPS64 ->>>48 lelong&0xf0000000 0x70000000 MIPS32 rel2 ->>>48 lelong&0xf0000000 0x80000000 MIPS64 rel2 +>>>48 use elf-mips >18 leshort 9 Amdahl, >18 leshort 10 MIPS (deprecated), >18 leshort 11 RS6000, >18 leshort 15 PA-RISC, # only for 32-bit >>4 byte 1 ->>>38 leshort 0x0214 2.0 ->>>36 leshort &0x0008 (LP64) +>>>36 use elf-pa-risc # only for 64-bit >>4 byte 2 ->>>50 leshort 0x0214 2.0 ->>>48 leshort &0x0008 (LP64) +>>>48 use elf-pa-risc >18 leshort 16 nCUBE, >18 leshort 17 Fujitsu VPP500, >18 leshort 18 SPARC32PLUS, # only for 32-bit >>4 byte 1 ->>>36 lelong&0xffff00 0x000100 V8+ Required, ->>>36 lelong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required, ->>>36 lelong&0xffff00 0x000400 HaL R1 Extensions Required, ->>>36 lelong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required, +>>>36 use elf-sparc >18 leshort 19 Intel 80960, >18 leshort 20 PowerPC or cisco 4500, >18 leshort 21 64-bit PowerPC or cisco 7500, @@ -117,12 +122,7 @@ >18 leshort 42 Renesas SH, >18 leshort 43 SPARC V9, >>4 byte 2 ->>>48 lelong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required, ->>>48 lelong&0xffff00 0x000400 HaL R1 Extensions Required, ->>>48 lelong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required, ->>>48 lelong&0x3 0 total store ordering, ->>>48 lelong&0x3 1 partial store ordering, ->>>48 lelong&0x3 2 relaxed memory ordering, +>>>48 use elf-sparc >18 leshort 44 Siemens Tricore Embedded Processor, >18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc., >18 leshort 46 Renesas H8/300, Modified: stable/10/contrib/file/magic/Magdir/filesystems ============================================================================== --- stable/10/contrib/file/magic/Magdir/filesystems Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/filesystems Thu Oct 29 17:51:48 2015 (r290152) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: filesystems,v 1.109 2015/02/22 01:22:54 christos Exp $ +# $File: filesystems,v 1.111 2015/09/09 16:26:54 christos Exp $ # filesystems: file(1) magic for different filesystems # 0 name partid @@ -1721,7 +1721,7 @@ 0x410 leshort 0x137f !:strength / 2 >0x402 beshort < 100 ->0x402 beshort > -1 Minix filesystem, V1, %d zones +>0x402 beshort > -1 Minix filesystem, V1, 14 char names, %d zones >0x1e string minix \b, bootable 0x410 beshort 0x137f !:strength / 2 @@ -1740,27 +1740,26 @@ >0x1e string minix \b, bootable 0x410 leshort 0x2468 >0x402 beshort < 100 ->>0x402 beshort > -1 Minix filesystem, V2, %d zones +>>0x402 beshort > -1 Minix filesystem, V2, 14 char names >0x1e string minix \b, bootable 0x410 beshort 0x2468 >0x402 beshort < 100 ->0x402 beshort > -1 Minix filesystem, V2 (big endian), %d zones +>0x402 beshort > -1 Minix filesystem, V2 (big endian) >0x1e string minix \b, bootable - 0x410 leshort 0x2478 >0x402 beshort < 100 ->0x402 beshort > -1 Minix filesystem, V2, 30 char names, %d zones +>0x402 beshort > -1 Minix filesystem, V2, 30 char names >0x1e string minix \b, bootable 0x410 leshort 0x2478 >0x402 beshort < 100 ->0x402 beshort > -1 Minix filesystem, V2, 30 char names, %d zones +>0x402 beshort > -1 Minix filesystem, V2, 30 char names >0x1e string minix \b, bootable 0x410 beshort 0x2478 ->0x402 beshort !0 Minix filesystem, V2, 30 char names (big endian), %d zones ->0x1e string minix \b, bootable -0x410 leshort 0x4d5a ->0x402 beshort !0 Minix filesystem, V3, %d zones +>0x402 beshort !0 Minix filesystem, V2, 30 char names (big endian) >0x1e string minix \b, bootable +0x418 leshort 0x4d5a +>0x402 beshort <100 +>>0x402 beshort > -1 Minix filesystem, V3, 60 char names # SGI disk labels - Nathan Scott 0 belong 0x0BE5A941 SGI disk label (volume header) @@ -2209,13 +2208,21 @@ >>0x10024 belong x (blocksize %d, >>0x10060 string >\0 lockproto %s) -# BTRFS -0x10040 string _BHRfS_M BTRFS Filesystem ->0x1012b string >\0 (label "%s", ->0x10090 lelong x sectorsize %d, ->0x10094 lelong x nodesize %d, ->0x10098 lelong x leafsize %d) - +# Russell Coker +0x10040 string _BHRfS_M BTRFS Filesystem +>0x1012b string >\0 label "%s", +>0x10090 lelong x sectorsize %d, +>0x10094 lelong x nodesize %d, +>0x10098 lelong x leafsize %d, +>0x10020 belong x UUID=%8x- +>0x10024 beshort x \b%4x- +>0x10026 beshort x \b%4x- +>0x10028 beshort x \b%4x- +>0x1002a beshort x \b%4x +>0x1002c belong x \b%8x, +>0x10078 lequad x %lld/ +>0x10070 lequad x \b%lld bytes used, +>0x10088 lequad x %lld devices # dvdisaster's .ecc # From: "Nelson A. de Oliveira" Modified: stable/10/contrib/file/magic/Magdir/fortran ============================================================================== --- stable/10/contrib/file/magic/Magdir/fortran Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/fortran Thu Oct 29 17:51:48 2015 (r290152) @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------ -# $File: fortran,v 1.8 2014/06/03 19:01:34 christos Exp $ +# $File: fortran,v 1.9 2015/06/17 19:55:27 christos Exp $ # FORTRAN source -0 regex/100l \^[Cc][\ \t] FORTRAN program +0 regex/100l \^[Cc][\ \t] FORTRAN program text !:mime text/x-fortran !:strength - 5 Modified: stable/10/contrib/file/magic/Magdir/frame ============================================================================== --- stable/10/contrib/file/magic/Magdir/frame Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/frame Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: frame,v 1.12 2009/09/19 16:28:09 christos Exp $ +# $File: frame,v 1.13 2015/08/29 07:10:35 christos Exp $ # frame: file(1) magic for FrameMaker files # # This stuff came on a FrameMaker demo tape, most of which is @@ -41,10 +41,10 @@ >10 string 1.0 (1.0 >13 byte x %c) # XXX - this book entry should be verified, if you find one, uncomment this -#0 string \6 string 3.0 (3.0) #>6 string 2.0 (2.0) #>6 string 1.0 (1.0) -0 string \ # I don't see why these might collide with anything else. # # Interactive Fiction related formats @@ -69,3 +70,4 @@ >8 string IFRS \b, Blorb Interactive Fiction >>24 string Exec with executable chunk >8 string IFZS \b, Z-machine or Glulx saved game file (Quetzal) +!:mime application/x-blorb Modified: stable/10/contrib/file/magic/Magdir/images ============================================================================== --- stable/10/contrib/file/magic/Magdir/images Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/images Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: images,v 1.106 2015/02/22 01:26:05 christos Exp $ +# $File: images,v 1.107 2015/07/11 14:40:10 christos Exp $ # images: file(1) magic for image formats (see also "iff", and "c-lang" for # XPM bitmaps) # @@ -37,7 +37,7 @@ # The next byte following the magic is always whitespace. # strength is changed to try these patterns before "x86 boot sector" 0 name netpbm ->3 regex/s =[0-9]{1,50}\ [0-9]{1,50} Netpbm PPM image data +>3 regex/s =[0-9]{1,50}\ [0-9]{1,50} Netpbm image data >>&0 regex =[0-9]{1,50} \b, size = %s x >>>&0 regex =[0-9]{1,50} \b %s @@ -59,7 +59,6 @@ !:strength + 45 !:mime image/x-portable-pixmap - 0 string P4 >0 use netpbm >>0 string x \b, rawbits, bitmap Modified: stable/10/contrib/file/magic/Magdir/karma ============================================================================== --- stable/10/contrib/file/magic/Magdir/karma Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/karma Thu Oct 29 17:51:48 2015 (r290152) @@ -1,9 +1,9 @@ #------------------------------------------------------------------------------ -# $File: karma,v 1.7 2014/04/30 21:41:02 christos Exp $ +# $File: karma,v 1.8 2015/08/29 07:10:35 christos Exp $ # karma: file(1) magic for Karma data files # # From -0 string KarmaRHD Version Karma Data Structure Version +0 string KarmaRHD\040Version Karma Data Structure Version >16 belong x %u Modified: stable/10/contrib/file/magic/Magdir/linux ============================================================================== --- stable/10/contrib/file/magic/Magdir/linux Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/linux Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: linux,v 1.62 2015/05/03 13:06:36 christos Exp $ +# $File: linux,v 1.63 2015/08/24 05:16:11 christos Exp $ # linux: file(1) magic for Linux files # # Values for Linux/i386 binaries, from Daniel Quinlan @@ -417,6 +417,25 @@ 0 lelong 0xde020109 locale archive >24 lelong x %d strings +# Linux Software RAID (mdadm) +# Russell Coker +0 name linuxraid +>16 belong x UUID=%8x: +>20 belong x \b%8x: +>24 belong x \b%8x: +>28 belong x \b%8x +>32 string x name=%s +>72 lelong x level=%d +>92 lelong x disks=%d + +4096 lelong 0xa92b4efc Linux Software RAID +>4100 lelong x version 1.2 (%d) +>4096 use linuxraid + +0 lelong 0xa92b4efc Linux Software RAID +>4 lelong x version 1.1 (%d) +>0 use linuxraid + # Summary: Database file for mlocate # Description: A database file as used by mlocate, a fast implementation # of locate/updatedb. It uses merging to reuse the existing Modified: stable/10/contrib/file/magic/Magdir/mail.news ============================================================================== --- stable/10/contrib/file/magic/Magdir/mail.news Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/mail.news Thu Oct 29 17:51:48 2015 (r290152) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: mail.news,v 1.22 2013/01/04 14:22:07 christos Exp $ +# $File: mail.news,v 1.23 2015/06/29 14:44:26 christos Exp $ # mail.news: file(1) magic for mail and news # # Unfortunately, saved netnews also has From line added in some news software. @@ -41,6 +41,7 @@ # From: Simon Matter 0 string \241\002\213\015skiplist\ file\0\0\0 Cyrus skiplist DB +0 string \241\002\213\015twoskip\ file\0\0\0\0 Cyrus twoskip DB # JAM(mbp) Fidonet message area databases # JHR file Modified: stable/10/contrib/file/magic/Magdir/make ============================================================================== --- stable/10/contrib/file/magic/Magdir/make Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/make Thu Oct 29 17:51:48 2015 (r290152) @@ -1,15 +1,21 @@ #------------------------------------------------------------------------------ -# $File: make,v 1.1 2011/12/08 12:12:46 rrt Exp $ +# $File: make,v 1.2 2015/08/25 07:34:06 christos Exp $ # make: file(1) magic for makefiles # -0 regex \^CFLAGS makefile script text +0 regex/100l \^CFLAGS makefile script text !:mime text/x-makefile -0 regex \^LDFLAGS makefile script text +0 regex/100l \^VPATH makefile script text !:mime text/x-makefile -0 regex \^all: makefile script text +0 regex/100l \^LDFLAGS makefile script text !:mime text/x-makefile -0 regex \^.PRECIOUS makefile script text +0 regex/100l \^all: makefile script text +!:mime text/x-makefile +0 regex/100l \^\.PRECIOUS makefile script text +!:mime text/x-makefile +0 regex/100l \^\.BEGIN BSD makefile script text +!:mime text/x-makefile +0 regex/100l \^\.include BSD makefile script text !:mime text/x-makefile -0 regex \^SUBDIRS automake makefile script text +0 regex/100l \^SUBDIRS automake makefile script text !:mime text/x-makefile Modified: stable/10/contrib/file/magic/Magdir/map ============================================================================== --- stable/10/contrib/file/magic/Magdir/map Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/map Thu Oct 29 17:51:48 2015 (r290152) @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------ -# $File: map,v 1.1 2014/06/03 18:22:25 christos Exp $ +# $File: map,v 1.4 2015/08/10 05:18:27 christos Exp $ # map: file(1) magic for Map data # @@ -9,9 +9,11 @@ 8 string .FIT FIT Map data >15 byte 0 >>35 belong x \b, unit id %d -# 20 years after unix epoch >>39 lelong x \b, serial %u ->>43 ledate/631152000 x \b, %s +# http://pub.ks-and-ks.ne.jp/cycling/edge500_fit.shtml +# 20 years after unix epoch +# TZ=GMT date -d '1989-12-31 0:00' +%s +>>43 leldate+631065600 x \b, %s >>47 leshort x \b, manufacturer %d >>47 leshort 1 \b (garmin) @@ -23,3 +25,17 @@ >>53 byte 4 \b (Activity) >>53 byte 8 \b (Elevations) >>53 byte 10 \b (Totals) + +# TOM TOM GPS watches ttbin files: +# http://github.com/ryanbinns/ttwatch/tree/master/ttbin +# From: Daniel Lenski +0 byte 0x20 +>1 leshort 0x0007 +>>0x76 byte 0x20 +>>>0x77 leshort 0x0075 TomTom activity file, v7 +>>>>8 leldate x (%s, +>>>>3 byte x device firmware %d. +>>>>4 byte x \b%d. +>>>>5 byte x \b%d, +>>>>6 leshort x product ID %04d) + Modified: stable/10/contrib/file/magic/Magdir/msdos ============================================================================== --- stable/10/contrib/file/magic/Magdir/msdos Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/msdos Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: msdos,v 1.100 2014/06/03 19:17:27 christos Exp $ +# $File: msdos,v 1.101 2015/08/24 05:08:48 christos Exp $ # msdos: file(1) magic for MS-DOS files # @@ -772,7 +772,7 @@ 0 ulequad 0x3a000000024e4c MS Advisor help file # HtmlHelp files (.chm) -0 string/b ITSF\003\000\000\000\x60\000\000\000\001\000\000\000 MS Windows HtmlHelp Data +0 string/b ITSF\003\000\000\000\x60\000\000\000 MS Windows HtmlHelp Data # GFA-BASIC (Wolfram Kleff) 2 string/b GFA-BASIC3 GFA-BASIC 3 data Modified: stable/10/contrib/file/magic/Magdir/netscape ============================================================================== --- stable/10/contrib/file/magic/Magdir/netscape Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/netscape Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: netscape,v 1.6 2009/09/19 16:28:11 christos Exp $ +# $File: netscape,v 1.7 2015/08/24 05:20:52 christos Exp $ # netscape: file(1) magic for Netscape files # "H. Nanosecond" # version 3 and 4 I think @@ -22,4 +22,5 @@ # #This is files ending in .art, FIXME add more rules -0 string JG\004\016\0\0\0\0 ART +0 string JG\004\016\0\0\0\0 AOL ART image +0 string JG\003\016\0\0\0\0 AOL ART image Modified: stable/10/contrib/file/magic/Magdir/python ============================================================================== --- stable/10/contrib/file/magic/Magdir/python Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/python Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: python,v 1.26 2014/08/04 05:58:40 christos Exp $ +# $File: python,v 1.27 2015/09/08 13:59:44 christos Exp $ # python: file(1) magic for python # # Outlook puts """ too for urgent messages @@ -26,12 +26,16 @@ 0 belong 0xee0c0d0a python 3.4 byte-compiled 0 search/1/w #!\ /usr/bin/python Python script text executable +!:strength + 10 !:mime text/x-python 0 search/1/w #!\ /usr/local/bin/python Python script text executable +!:strength + 10 !:mime text/x-python 0 search/1 #!/usr/bin/env\ python Python script text executable +!:strength + 10 !:mime text/x-python -0 search/1 #!\ /usr/bin/env\ python Python script text executable +0 search/10 #!\ /usr/bin/env\ python Python script text executable +!:strength + 10 !:mime text/x-python Modified: stable/10/contrib/file/magic/Magdir/scientific ============================================================================== --- stable/10/contrib/file/magic/Magdir/scientific Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/scientific Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: scientific,v 1.9 2014/06/03 19:01:34 christos Exp $ +# $File: scientific,v 1.10 2015/08/24 05:18:55 christos Exp $ # scientific: file(1) magic for scientific formats # # From: Joe Krahn @@ -104,3 +104,8 @@ >>5 byte x version %d.0 >4 byte >0x00 version %d >>5 byte x \b.%d + +# Type: LXT (interLaced eXtensible Trace) +# chrysn +0 beshort 0x0138 interLaced eXtensible Trace (LXT) file +>2 beshort >0 (Version %u) Modified: stable/10/contrib/file/magic/Magdir/sgi ============================================================================== --- stable/10/contrib/file/magic/Magdir/sgi Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/sgi Thu Oct 29 17:51:48 2015 (r290152) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: sgi,v 1.21 2014/04/30 21:41:02 christos Exp $ +# $File: sgi,v 1.22 2015/08/29 07:10:35 christos Exp $ # sgi: file(1) magic for Silicon Graphics operating systems and applications # # Executable images are handled either in aout (for old-style a.out @@ -55,8 +55,8 @@ 0 string WNGZWZSS Wingz spreadsheet 0 string WNGZWZHP Wingz help file # -0 string #Inventor V IRIS Inventor 1.0 file -0 string #Inventor V2 Open Inventor 2.0 file +0 string #Inventor\040V IRIS Inventor 1.0 file +0 string #Inventor\040V2 Open Inventor 2.0 file # GLF is OpenGL stream encoding 0 string glfHeadMagic(); GLF_TEXT 4 belong 0x7d000000 GLF_BINARY_LSB_FIRST Modified: stable/10/contrib/file/magic/Magdir/sgml ============================================================================== --- stable/10/contrib/file/magic/Magdir/sgml Thu Oct 29 17:04:43 2015 (r290151) +++ stable/10/contrib/file/magic/Magdir/sgml Thu Oct 29 17:51:48 2015 (r290152) @@ -1,5 +1,4 @@ -#------------------------------------------------------------------------------ -# $File: sgml,v 1.31 2015/03/11 19:38:04 christos Exp $ +#------------------------------------------------------------------------------ # $File: sgml,v 1.32 2015/07/11 15:08:53 christos Exp $ # Type: SVG Vectorial Graphics # From: Noel Torres 0 string \15 string >\0 ->>19 search/4096/cWbt \19 search/4096/cWbt \>15 string >\0 (version %.3s) !:mime text/html 0 string/t \15 string >\0 ->>19 search/4096/cWbt \19 search/4096/cWbt \>15 string >\0 (version %.3s) !:mime text/html 0 string/t \15 string >\0 ->>19 search/4096/cWbt \19 search/4096/cWbt \>15 string >\0 (version %.3s) !:mime text/html #------------------------------------------------------------------------------ @@ -106,9 +105,6 @@ >15 string/t >\0 %.3s document text *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Fri Oct 30 00:30:02 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B8DCA1FFDF; Fri, 30 Oct 2015 00:30:02 +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 mx1.freebsd.org (Postfix) with ESMTPS id 186EB14C5; Fri, 30 Oct 2015 00:30:02 +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 t9U0U1n7098330; Fri, 30 Oct 2015 00:30:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9U0U1EK098329; Fri, 30 Oct 2015 00:30:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510300030.t9U0U1EK098329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 30 Oct 2015 00:30:01 +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: r290172 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2015 00:30:02 -0000 Author: mav Date: Fri Oct 30 00:30:00 2015 New Revision: 290172 URL: https://svnweb.freebsd.org/changeset/base/290172 Log: MFC r289819: Fix LUN disable in CAM broken at r285155. Modified: stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Fri Oct 30 00:24:37 2015 (r290171) +++ stable/10/sys/cam/ctl/scsi_ctl.c Fri Oct 30 00:30:00 2015 (r290172) @@ -1879,7 +1879,7 @@ ctlfe_lun_disable(void *arg, int lun_id) path = lun_softc->periph->path; - if ((xpt_path_target_id(path) == 0) + if ((xpt_path_target_id(path) == softc->target_id) && (xpt_path_lun_id(path) == lun_id)) { break; } From owner-svn-src-stable-10@freebsd.org Fri Oct 30 09:24:17 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA904A215F5; Fri, 30 Oct 2015 09:24:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A28041FD7; Fri, 30 Oct 2015 09:24:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9U9OGvv053505; Fri, 30 Oct 2015 09:24:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9U9OG9I053504; Fri, 30 Oct 2015 09:24:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510300924.t9U9OG9I053504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Oct 2015 09:24: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: r290187 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2015 09:24:18 -0000 Author: kib Date: Fri Oct 30 09:24:16 2015 New Revision: 290187 URL: https://svnweb.freebsd.org/changeset/base/290187 Log: MFC r289823: Decode new values for CPUID leaf 2 cache and TLB descriptors, from the Intel SDM revision 56. Modified: stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Fri Oct 30 08:11:37 2015 (r290186) +++ stable/10/sys/x86/x86/identcpu.c Fri Oct 30 09:24:16 2015 (r290187) @@ -1887,6 +1887,18 @@ print_INTEL_TLB(u_int data) case 0x68: printf("1st-level data cache: 32 KB, 4 way set associative, sectored cache, 64 byte line size\n"); break; + case 0x6a: + printf("uTLB: 4KByte pages, 8-way set associative, 64 entries\n"); + break; + case 0x6b: + printf("DTLB: 4KByte pages, 8-way set associative, 256 entries\n"); + break; + case 0x6c: + printf("DTLB: 2M/4M pages, 8-way set associative, 126 entries\n"); + break; + case 0x6d: + printf("DTLB: 1 GByte pages, fully associative, 16 entries\n"); + break; case 0x70: printf("Trace cache: 12K-uops, 8-way set associative\n"); break; From owner-svn-src-stable-10@freebsd.org Fri Oct 30 10:02:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912D9A2025F; Fri, 30 Oct 2015 10:02:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5794A1FBF; Fri, 30 Oct 2015 10:02:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9UA2vDL065004; Fri, 30 Oct 2015 10:02:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9UA2vXA065002; Fri, 30 Oct 2015 10:02:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510301002.t9UA2vXA065002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Oct 2015 10:02:57 +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: r290189 - in stable/10/sys: amd64/include i386/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2015 10:02:58 -0000 Author: kib Date: Fri Oct 30 10:02:57 2015 New Revision: 290189 URL: https://svnweb.freebsd.org/changeset/base/290189 Log: MFC r289824: Add CLFLUSHOPT instruction wrappers. MFC r290188: Fix prefix on i386. Modified: stable/10/sys/amd64/include/cpufunc.h stable/10/sys/i386/include/cpufunc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/cpufunc.h ============================================================================== --- stable/10/sys/amd64/include/cpufunc.h Fri Oct 30 09:53:33 2015 (r290188) +++ stable/10/sys/amd64/include/cpufunc.h Fri Oct 30 10:02:57 2015 (r290189) @@ -107,6 +107,13 @@ clflush(u_long addr) } static __inline void +clflushopt(u_long addr) +{ + + __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); +} + +static __inline void clts(void) { Modified: stable/10/sys/i386/include/cpufunc.h ============================================================================== --- stable/10/sys/i386/include/cpufunc.h Fri Oct 30 09:53:33 2015 (r290188) +++ stable/10/sys/i386/include/cpufunc.h Fri Oct 30 10:02:57 2015 (r290189) @@ -97,6 +97,13 @@ clflush(u_long addr) } static __inline void +clflushopt(u_long addr) +{ + + __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); +} + +static __inline void clts(void) { From owner-svn-src-stable-10@freebsd.org Fri Oct 30 19:26:56 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4462A1FA47; Fri, 30 Oct 2015 19:26:56 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 A26D21A3F; Fri, 30 Oct 2015 19:26:56 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9UJQtN3034628; Fri, 30 Oct 2015 19:26:55 GMT (envelope-from wollman@FreeBSD.org) Received: (from wollman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9UJQtwP034626; Fri, 30 Oct 2015 19:26:55 GMT (envelope-from wollman@FreeBSD.org) Message-Id: <201510301926.t9UJQtwP034626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wollman set sender to wollman@FreeBSD.org using -f From: Garrett Wollman Date: Fri, 30 Oct 2015 19:26:55 +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: r290203 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2015 19:26:57 -0000 Author: wollman Date: Fri Oct 30 19:26:55 2015 New Revision: 290203 URL: https://svnweb.freebsd.org/changeset/base/290203 Log: Long-overdue MFC of r280930: Fix overflow bugs in and remove obsolete limit from kernel RPC implementation. The kernel RPC code, which is responsible for the low-level scheduling of incoming NFS requests, contains a throttling mechanism that prevents too much kernel memory from being tied up by NFS requests that are being serviced. When the throttle is engaged, the RPC layer stops servicing incoming NFS sockets, resulting ultimately in backpressure on the clients (if they're using TCP). However, this is a very heavy-handed mechanism as it prevents all clients from making any requests, regardless of how heavy or light they are. (Thus, when engaged, the throttle often prevents clients from even mounting the filesystem.) The throttle mechanism applies specifically to requests that have been received by the RPC layer (from a TCP or UDP socket) and are queued waiting to be serviced by one of the nfsd threads; it does not limit the amount of backlog in the socket buffers. The original implementation limited the total bytes of queued requests to the minimum of a quarter of (nmbclusters * MCLBYTES) and 45 MiB. The former limit seems reasonable, since requests queued in the socket buffers and replies being constructed to the requests in progress will all require some amount of network memory, but the 45 MiB limit is plainly ridiculous for modern memory sizes: when running 256 service threads on a busy server, 45 MiB would result in just a single maximum-sized NFS3PROC_WRITE queued per thread before throttling. Removing this limit exposed integer-overflow bugs in the original computation, and related bugs in the routines that actually account for the amount of traffic enqueued for service threads. The old implementation also attempted to reduce accounting overhead by batching updates until each queue is fully drained, but this is prone to livelock, resulting in repeated accumulate-throttle-drain cycles on a busy server. Various data types are changed to long or unsigned long; explicit 64-bit types are not used due to the unavailability of 64-bit atomics on many 32-bit platforms, but those platforms also cannot support nmbclusters large enough to cause overflow. This code (in a 10.1 kernel) is presently running on production NFS servers at CSAIL. Summary of this revision: * Removes 45 MiB limit on requests queued for nfsd service threads * Fixes integer-overflow and signedness bugs * Avoids unnecessary throttling by not deferring accounting for completed requests Differential Revision: https://reviews.freebsd.org/D2165 Reviewed by: rmacklem, mav Relnotes: yes Sponsored by: MIT Computer Science & Artificial Intelligence Laboratory Modified: stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Fri Oct 30 19:20:40 2015 (r290202) +++ stable/10/sys/rpc/svc.c Fri Oct 30 19:26:55 2015 (r290203) @@ -73,7 +73,7 @@ static struct svc_callout *svc_find(SVCP char *); static void svc_new_thread(SVCGROUP *grp); static void xprt_unregister_locked(SVCXPRT *xprt); -static void svc_change_space_used(SVCPOOL *pool, int delta); +static void svc_change_space_used(SVCPOOL *pool, long delta); static bool_t svc_request_space_available(SVCPOOL *pool); /* *************** SVCXPRT related stuff **************** */ @@ -113,13 +113,14 @@ svcpool_create(const char *name, struct } /* - * Don't use more than a quarter of mbuf clusters or more than - * 45Mb buffering requests. + * Don't use more than a quarter of mbuf clusters. Nota bene: + * nmbclusters is an int, but nmbclusters*MCLBYTES may overflow + * on LP64 architectures, so cast to u_long to avoid undefined + * behavior. (ILP32 architectures cannot have nmbclusters + * large enough to overflow for other reasons.) */ - pool->sp_space_high = nmbclusters * MCLBYTES / 4; - if (pool->sp_space_high > 45 << 20) - pool->sp_space_high = 45 << 20; - pool->sp_space_low = 2 * pool->sp_space_high / 3; + pool->sp_space_high = (u_long)nmbclusters * MCLBYTES / 4; + pool->sp_space_low = (pool->sp_space_high / 3) * 2; sysctl_ctx_init(&pool->sp_sysctl); if (sysctl_base) { @@ -139,24 +140,24 @@ svcpool_create(const char *name, struct "groups", CTLFLAG_RD, &pool->sp_groupcount, 0, "Number of thread groups"); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_used", CTLFLAG_RD, - &pool->sp_space_used, 0, + &pool->sp_space_used, "Space in parsed but not handled requests."); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_used_highest", CTLFLAG_RD, - &pool->sp_space_used_highest, 0, + &pool->sp_space_used_highest, "Highest space used since reboot."); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_high", CTLFLAG_RW, - &pool->sp_space_high, 0, + &pool->sp_space_high, "Maximum space in parsed but not handled requests."); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_low", CTLFLAG_RW, - &pool->sp_space_low, 0, + &pool->sp_space_low, "Low water mark for request space."); SYSCTL_ADD_INT(&pool->sp_sysctl, sysctl_base, OID_AUTO, @@ -1064,11 +1065,11 @@ svc_assign_waiting_sockets(SVCPOOL *pool } static void -svc_change_space_used(SVCPOOL *pool, int delta) +svc_change_space_used(SVCPOOL *pool, long delta) { - unsigned int value; + unsigned long value; - value = atomic_fetchadd_int(&pool->sp_space_used, delta) + delta; + value = atomic_fetchadd_long(&pool->sp_space_used, delta) + delta; if (delta > 0) { if (value >= pool->sp_space_high && !pool->sp_space_throttled) { pool->sp_space_throttled = TRUE; @@ -1102,7 +1103,7 @@ svc_run_internal(SVCGROUP *grp, bool_t i enum xprt_stat stat; struct svc_req *rqstp; struct proc *p; - size_t sz; + long sz; int error; st = mem_alloc(sizeof(*st)); @@ -1259,17 +1260,16 @@ svc_run_internal(SVCGROUP *grp, bool_t i /* * Execute what we have queued. */ - sz = 0; mtx_lock(&st->st_lock); while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); mtx_unlock(&st->st_lock); - sz += rqstp->rq_size; + sz = (long)rqstp->rq_size; svc_executereq(rqstp); + svc_change_space_used(pool, -sz); mtx_lock(&st->st_lock); } mtx_unlock(&st->st_lock); - svc_change_space_used(pool, -sz); mtx_lock(&grp->sg_lock); } Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Fri Oct 30 19:20:40 2015 (r290202) +++ stable/10/sys/rpc/svc.h Fri Oct 30 19:26:55 2015 (r290203) @@ -371,10 +371,10 @@ typedef struct __rpc_svcpool { * amount of memory used by RPC requests which are queued * waiting for execution. */ - unsigned int sp_space_low; - unsigned int sp_space_high; - unsigned int sp_space_used; - unsigned int sp_space_used_highest; + unsigned long sp_space_low; + unsigned long sp_space_high; + unsigned long sp_space_used; + unsigned long sp_space_used_highest; bool_t sp_space_throttled; int sp_space_throttle_count; From owner-svn-src-stable-10@freebsd.org Sat Oct 31 09:32:41 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A230A220DB; Sat, 31 Oct 2015 09:32:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 4137C161A; Sat, 31 Oct 2015 09:32:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9V9WeMs081599; Sat, 31 Oct 2015 09:32:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9V9We4R081597; Sat, 31 Oct 2015 09:32:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510310932.t9V9We4R081597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 31 Oct 2015 09:32:40 +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: r290225 - stable/10/usr.sbin/newsyslog X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2015 09:32:41 -0000 Author: bapt Date: Sat Oct 31 09:32:39 2015 New Revision: 290225 URL: https://svnweb.freebsd.org/changeset/base/290225 Log: MFC: 289879 newsyslog.conf: allow to configure the signal using the signal name. Submitted by: Alexandre Perrin Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3961 Modified: stable/10/usr.sbin/newsyslog/newsyslog.c stable/10/usr.sbin/newsyslog/newsyslog.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/10/usr.sbin/newsyslog/newsyslog.c Sat Oct 31 04:53:07 2015 (r290224) +++ stable/10/usr.sbin/newsyslog/newsyslog.c Sat Oct 31 09:32:39 2015 (r290225) @@ -280,6 +280,7 @@ static int age_old_log(const char *file) static void savelog(char *from, char *to); static void createdir(const struct conf_entry *ent, char *dirpart); static void createlog(const struct conf_entry *ent); +static int parse_signal(const char *str); /* * All the following take a parameter of 'int', but expect values in the @@ -1338,12 +1339,13 @@ no_trimat: if (q && *q) { if (*q == '/') working->pid_cmd_file = strdup(q); - else if (isdigit(*q)) + else if (isalnum(*q)) goto got_sig; - else + else { errx(1, - "illegal pid file or signal number in config file:\n%s", + "illegal pid file or signal in config file:\n%s", errline); + } } if (eol) q = NULL; @@ -1354,17 +1356,13 @@ no_trimat: working->sig = SIGHUP; if (q && *q) { - if (isdigit(*q)) { - got_sig: - working->sig = atoi(q); - } else { - err_sig: +got_sig: + working->sig = parse_signal(q); + if (working->sig < 1 || working->sig >= sys_nsig) { errx(1, - "illegal signal number in config file:\n%s", + "illegal signal in config file:\n%s", errline); } - if (working->sig < 1 || working->sig >= NSIG) - goto err_sig; } /* @@ -2662,3 +2660,28 @@ change_attrs(const char *fname, const st warn("can't chflags %s NODUMP", fname); } } + +/* + * Parse a signal number or signal name. Returns the signal number parsed or -1 + * on failure. + */ +static int +parse_signal(const char *str) +{ + int sig, i; + const char *errstr; + + sig = strtonum(str, 1, sys_nsig - 1, &errstr); + + if (errstr == NULL) + return (sig); + if (strncasecmp(str, "SIG", 3) == 0) + str += 3; + + for (i = 1; i < sys_nsig; i++) { + if (strcasecmp(str, sys_signame[i]) == 0) + return (i); + } + + return (-1); +} Modified: stable/10/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- stable/10/usr.sbin/newsyslog/newsyslog.conf.5 Sat Oct 31 04:53:07 2015 (r290224) +++ stable/10/usr.sbin/newsyslog/newsyslog.conf.5 Sat Oct 31 09:32:39 2015 (r290225) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd March 21, 2012 +.Dd October 24, 2015 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -337,7 +337,7 @@ process ID or to find a group process ID .Cm U flag was specified. If this field is present, a -.Ar signal_number +.Ar signal is sent to the process ID contained in this file. If this field is not present and the .Cm N @@ -358,14 +358,23 @@ flag, the file is treated as a path to a by the .Xr newsyslog 8 after rotation instead of sending the signal out. -.It Ar signal_number -This optional field specifies the signal number that will be sent -to the daemon process (or to all processes in a process group, if the +.It Ar signal +This optional field specifies the signal that will be sent to the daemon +process (or to all processes in a process group, if the .Cm U flag was specified). If this field is not present, then a .Dv SIGHUP signal will be sent. +Signal names +must start with +.Dq SIG +and be the signal name, e.g., +.Dv SIGUSR1 . +Alternatively, +.Ar signal +can be the signal number, e.g., 30 for +.Dv SIGUSR1 . .El .Sh EXAMPLES The following is an example of the